1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Message to player with most damage (enderdragon)

Discussion in 'Skript' started by entwickeln, May 20, 2022.

  1. entwickeln

    entwickeln Member

    Joined:
    May 11, 2022
    Messages:
    40
    Likes Received:
    0
    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
     
  2. KokoPlayzYT

    KokoPlayzYT Member

    Joined:
    Aug 6, 2021
    Messages:
    21
    Likes Received:
    1
    Code (Text):
    1. on damage:
    2.     if victim is ender dragon:
    3.         if victim's world is "EnderdrachenEvent":
    4.             add damage to {enderdamage::%attacker%}
    5. on death:
    6.     if victim is ender dragon:
    7.         if victim's world is "EnderdrachenEvent":
    8.             h = 0
    9.             loop {enderdamage::%attacker%}:
    10.                 if h < {enderdamage::%loop-index%}:
    11.                     h = {enderdamage::%loop-index%}
    try that
     
  3. entwickeln

    entwickeln Member

    Joined:
    May 11, 2022
    Messages:
    40
    Likes Received:
    0
    And how i should message the best damage player?
    --- Double Post Merged, May 20, 2022, Original Post Date: May 20, 2022 ---
    How can i add a message for the top player? I dont know much about SKRIPT, pls help
     

Share This Page

Loading...