Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. options:
  2. rewardReq: 1, 5, 10, 15, 20 and 25
  3. rewards: 10, 1 diamond, 50, 5 diamonds, 150, 1 emerald and 500
  4.  
  5. function checkKS(p: player):
  6. set {_uuid} to {_p}'s uuid
  7. set {_rewardReq::*} to {@rewardReq}
  8. set {_rewards::*} to {@rewards}
  9. loop {_rewardReq::*}:
  10. {killStreak::%{_uuid}%} = loop-value
  11. broadcast "%{_p}% has been awarded with %{_rewards::%loop-index%}%"
  12. {_rewards::%loop-index%} is a number:
  13. add {_rewards::%loop-index%} to {_p}'s balance
  14. else:
  15. give {_rewards::%loop-index%} to {_p}
  16. stop
  17.  
  18. on death of player:
  19. clear {killStreak::%victim's uuid%}
  20. attacker is a player
  21. add 1 to {killStreak::%attacker's uuid%}
  22. checkKS(attacker)
  23.  
  24. command killstreak [<offlineplayer>]:
  25. trigger:
  26. arg-1 is not set:
  27. {killStreak::%player's uuid%} is set:
  28. send "Your current Kill Streak is %{killStreak::%player's uuid%}%"
  29. else:
  30. send "Your current Kill Streak is 0"
  31. else:
  32. {killStreak::%arg-1's uuid%} is set:
  33. send "%arg-1%'s current Kill Streak is %{killStreak::%arg-1's uuid%}%"
  34. else:
  35. send "%arg-1%'s current Kill Streak is 0"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement