Message to player with most damage (enderdragon)

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

entwickeln

Member
May 11, 2022
40
0
6
21
Hello guys, i need help. with my ender dragon event.
If a player did the most damage, he has to get a present or something like that. But how can i do it? Here is my code:
https://pastebin.com/UaUxZj5D

it's not the full code btw :emoji_slight_smile:
only this part is necessary i gues
 
Code:
on damage:
    if victim is ender dragon:
        if victim's world is "EnderdrachenEvent":
            add damage to {enderdamage::%attacker%}
on death:
    if victim is ender dragon:
        if victim's world is "EnderdrachenEvent":
            h = 0
            loop {enderdamage::%attacker%}:
                if h < {enderdamage::%loop-index%}:
                    h = {enderdamage::%loop-index%}
try that
 
Code:
on damage:
    if victim is ender dragon:
        if victim's world is "EnderdrachenEvent":
            add damage to {enderdamage::%attacker%}
on death:
    if victim is ender dragon:
        if victim's world is "EnderdrachenEvent":
            h = 0
            loop {enderdamage::%attacker%}:
                if h < {enderdamage::%loop-index%}:
                    h = {enderdamage::%loop-index%}
try that
And how i should message the best damage player?
[doublepost=1653082018,1653073521][/doublepost]
Code:
on damage:
    if victim is ender dragon:
        if victim's world is "EnderdrachenEvent":
            add damage to {enderdamage::%attacker%}
on death:
    if victim is ender dragon:
        if victim's world is "EnderdrachenEvent":
            h = 0
            loop {enderdamage::%attacker%}:
                if h < {enderdamage::%loop-index%}:
                    h = {enderdamage::%loop-index%}
try that
How can i add a message for the top player? I dont know much about SKRIPT, pls help
 
Status
Not open for further replies.