Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. #This skript was made by /u/AnimatedAnimater ^^
  2. #Feel free to edit this skript as much as you please!
  3.  
  4. options:
  5. tag: &8[&7Combat Tag&8]&7
  6.  
  7. on join:
  8. set {combattag::%uuid of player%} to false
  9. set {combattag::delay::%uuid of player%} to 0
  10. clear {enemy::%uuid of player%}
  11.  
  12. on death:
  13. set {combattag::%uuid of victim%} to false
  14. set {combattag::delay::%uuid of victim%} to 0
  15. clear {enemy::%uuid of player%}
  16.  
  17. on quit:
  18. if {combattag::%uuid of player%} is true:
  19. set {combattag::%uuid of player%} to false
  20. set {combattag::delay::%uuid of player%} to 0
  21. loop all players:
  22. if loop-player has permission "skript.spec":
  23. send "{@tag} &4%player% &6has combat logged" to loop-player
  24. set {_enemy} to {enemy::%uuid of player%}
  25.  
  26. on damage:
  27. attacker is a player
  28. victim is a player
  29. attacker is in world "UHC" or "UHC_end" or "UHC_nether" or "pvp"
  30. victim is in world "UHC" or "UHC_end" or "UHC_nether" or "pvp"
  31. if {combattag::%(uuid of victim)%} is false:
  32. set {combattag::%(uuid of victim)%} to true
  33. set {combattag::delay::%(uuid of victim)%} to 30
  34. set {enemy::%victim%} to "%(uuid of attacker)%"
  35. message "{@tag} You are now combat tagged." to victim
  36. if {combattag::%(uuid of victim)%} is true:
  37. set {combattag::delay::%(uuid of victim)%} to 30
  38. set {enemy::%victim%} to "%(uuid of attacker)%"
  39. if {combattag::%(uuid of attacker)%} is false:
  40. set {combattag::%(uuid of attacker)%} to true
  41. set {combattag::delay::%(uuid of attacker)%} to 30
  42. set {enemy::%attacker%} to "%(uuid of victim)%"
  43. message "{@tag} You are now combat tagged." to attacker
  44. if {combattag::%(uuid of attacker)%} is true:
  45. set {combattag::delay::%(uuid of attacker)%} to 30
  46. set {enemy::%attacker%} to "%(uuid of victim)%"
  47.  
  48. every 1 seconds:
  49. loop {combattag::*}:
  50. if {combattag::%loop-index%} is true:
  51. remove 1 from {combattag::delay::%loop-index%}
  52. if {combattag::delay::%loop-index%} is 0:
  53. set {combattag::%loop-index%} to false
  54. message "{@tag} You are no longer in combat." to %loop-value%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement