Guest User

Rewarding Longshots 1.0

a guest
Aug 21st, 2014
806
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. #Rewarding Longshots Skript
  2.  
  3. Options:
  4. prefix: &7[&9Rewarding Longshots&7]&r
  5. N: &3&l%command sender%
  6.  
  7. command /longshots <text>:
  8. permission: skript.op
  9. trigger:
  10. if arg 1 is equal to "enable":
  11. if {longshot} is true:
  12. message "{@prefix} Already Enabled!"
  13. else:
  14. set {longshot} to true
  15. broadcast "{@prefix} Enabled by {@N}"
  16. else if arg 1 is equal to "disable":
  17. if {longshot} is false:
  18. broadcast "{@prefix} Already Disabled!"
  19. else:
  20. set {longshot} to false
  21. broadcast "{@prefix} Disabled by {@N}
  22. else if arg 1 is equal to "toggle":
  23. if {longshot} is false:
  24. set {longshot} to true
  25. broadcast "{@prefix} Enabled by {@N}
  26. else:
  27. set {longshot} to false
  28. broadcast "{@prefix} Disabled by {@N}
  29.  
  30. on damage of player:
  31. {longshot} is true
  32. projectile exists
  33. projectile is an arrow
  34. set {_dist} to the distance between the victim and the attacker
  35. if {_dist} is between 30 and 49:
  36. Broadcast "{@prefix} %attacker% just got a longshot of %{_dist}% metres!"
  37. execute console command "/give %attacker% iron_ingot 1"
  38. else if {_dist} is between 50 and 99:
  39. Broadcast "{@prefix} %attacker% just got a longshot of %{_dist}% metres!"
  40. execute console command "/give %attacker% iron_ingot 1"
  41. execute console command "/give %attacker% gold_ingot 1"
  42. else if {_dist} is between 100 and 199:
  43. Broadcast "{@prefix} %attacker% just got a longshot of %{_dist}% metres!"
  44. execute console command "/give %attacker% iron_ingot 1"
  45. execute console command "/give %attacker% gold_ingot 1"
  46. execute console command "/give %attacker% diamond 1"
  47. else if {_dist} is greater than 200:
  48. Broadcast "{@prefix} %attacker% just got a longshot of %{_dist}% metres!"
  49. execute console command "/give %attacker% iron_ingot 2"
  50. execute console command "/give %attacker% gold_ingot 3"
  51. execute console command "/give %attacker% diamond 5"
Advertisement
Add Comment
Please, Sign In to add comment