See who did the most damage?

  • 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. :emoji_grinning: I wanted to ask if there is a method in Skript that shows you, who did the most damage to an enderdragon or the most hits.
I want to make an Event where people have to fight against a Enderdragon and the person who did the most hits/damage gets a gift. :emoji_slight_smile:'

And second question: Is there a way to execute a command when the enderdragon dies in world "EnderdrachenEvent"?

Help me pls xd
And thanks for every help
 
Hello Guys. :emoji_grinning: I wanted to ask if there is a method in Skript that shows you, who did the most damage to an enderdragon or the most hits.
I want to make an Event where people have to fight against a Enderdragon and the person who did the most hits/damage gets a gift. :emoji_slight_smile:'

And second question: Is there a way to execute a command when the enderdragon dies in world "EnderdrachenEvent"?

Help me pls xd
And thanks for every help
You can add the number of hits to a list and the damage to another list then check the highest hits and damage and make another list and add those two values and the hiest score wins the event. I am not sure how to check the hiest score of a list but I can help you on how to define the list
Code:
On damage of ender dragon:
    Victim is in world "world name"
    Set {damage_deal::%attacker's uuid%} to last damage cause of victim#not sure of this works not test it
    Set {hits_deal::%attacker's uuid%} to {hits_deal::%attacker's uuid%} + 1 #im sure this will work to store hits
    Set {total_score::%attacker's uuid%} to {damage_deal::%attacker's uuid%} + {hits_deal::%attacker's uuid%}

#now find a way to check every player total score when the event ends this have to be done with loops
And for the command part just use on death of ender dragon and use the condition world you have to do something like if victim is in world "world name":

To check who is the highest score try to make that using this code https://forums.skunity.com/threads/how-to-sort-things-in-list-variables.3664/
 
Last edited:
You can add the number of hits to a list and the damage to another list then check the highest hits and damage and make another list and add those two values and the hiest score wins the event. I am not sure how to check the hiest score of a list but I can help you on how to define the list
Code:
On damage of ender dragon:
    Victim is in world "world name"
    Set {damage_deal::%attacker's uuid%} to last damage cause of victim#not sure of this works not test it
    Set {hits_deal::%attacker's uuid%} to {hits_deal::%attacker's uuid%} + 1 #im sure this will work to store hits
    Set {total_score::%attacker's uuid%} to {damage_deal::%attacker's uuid%} + {hits_deal::%attacker's uuid%}

#now find a way to check every player total score when the event ends this have to be done with loops
And for the command part just use on death of ender dragon and use the condition world you have to do something like if victim is in world "world name":

To check who is the highest score try to make that using this code https://forums.skunity.com/threads/how-to-sort-things-in-list-variables.3664/
What Addons do i need for this?
It can't understand "
set {total_score::%attacker's uuid%} to sorted {Kills::*} from highest to lowest"
 
It's not working
[doublepost=1653241656,1653241622][/doublepost]
RandomSK is red when i do /pl
idk why pls help xd
Try using
The latest version of skript and random sk and paper 1.18.2

We're I got the example Shane said it worked using this versions and the other guy was using paper 1.8 and don't work
Works fine using:
- RandomSK 2.7.1
- Bensku's Skript fork: dev-25
- PaperSpigot for 1.11.2 (Paper-1079)
 
Try using
The latest version of skript and random sk and paper 1.18.2

We're I got the example Shane said it worked using this versions and the other guy was using paper 1.8 and don't work
Works fine using:
- RandomSK 2.7.1
- Bensku's Skript fork: dev-25
- PaperSpigot for 1.11.2 (Paper-1079)
do you know how i can loop all players EXCEPT Shroush and Testperson21?

loop all players:
set {_player} to random element of all players
if player is "Shroush" or "TestPerson21":
repeat loop <--- how can i make this repeat the thing again when someone is called like this? or how can i set a random player in {_player} except Shroush or TestPerson21?

pls help
 
do you know how i can loop all players EXCEPT Shroush and Testperson21?

loop all players:
set {_player} to random element of all players
if player is "Shroush" or "TestPerson21":
repeat loop <--- how can i make this repeat the thing again when someone is called like this? or how can i set a random player in {_player} except Shroush or TestPerson21?

pls help
If loop-player is not "examplePlayer" or "example Player2"
 
Status
Not open for further replies.