Advertisement
Guest User

Untitled

a guest
Feb 29th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. Variables:
  2. {skoth} = false
  3. {kmsg} = false
  4.  
  5. on walk on polished andesite:
  6. if {skoth} is true:
  7. if distance between player and {koth} is less than 3:
  8. if size of {capping::*} is 1:
  9. stop
  10. else:
  11. if size of {capping::*} is 0:
  12. add player to {capping::*}
  13. if {kmsg} is not true:
  14. broadcast "&bKothlab &7» &c%player% &7is now capturing the KoTH! 30 Seconds Left!"
  15. set {kmsg} to true
  16. wait 15 seconds
  17. if player is in {capping::*}:
  18. broadcast "&bKothlab &7» &c%player% &7is capturing the KoTH! 15 Seconds Left!"
  19. wait 15 seconds
  20. if player is in {capping::*}:
  21. broadcast "&bKothlab &7» &c%player% &7has captured the KoTH!"
  22. execute console command "/cc give physical Enchanted 2 %player%"
  23. set {skoth} to false
  24. set {kmsg} to false
  25. remove player from {capping::*}
  26.  
  27. on walk on grass:
  28. if {skoth} is true:
  29. if player is in {capping::*}:
  30. if player's location is not within 3 blocks of {koth}:
  31. if player's location is within 4 blocks of {koth}:
  32. broadcast "&bKothlab &7» &c%player% &7is no longer capturing the KoTH!"
  33. set {kmsg} to false
  34.  
  35. command /setkoth:
  36. permission: rank.admin
  37. permission message: &cInsufficient Permissions.
  38. trigger:
  39. set {koth} to player's location
  40. send "&aSuccess! &7&o(Set The KoTH's Location to %player's location%!)"
  41.  
  42. command /startkoth:
  43. permission: rank.admin
  44. permission message: &cInsufficient Permissions.
  45. trigger:
  46. set {skoth} to true
  47. broadcast "&bKothlab &7» A KoTH has begun at &c%{koth}%&b!"
  48.  
  49. command /endkoth:
  50. permission: rank.admin
  51. permission message: &cInsufficient Permissions.
  52. trigger:
  53. set {skoth} to false
  54. set {kmsg} to false
  55. delete {capping::*}
  56. broadcast "&bKothlab &7» The KoTH was abruptly ended!"
  57.  
  58. command /koth:
  59. trigger:
  60. send "&bKothlab &7» The KoTH's location is &c%{koth}%&7!"
  61.  
  62.  
  63.  
  64.  
  65.  
  66. #THE ERROR MESSAGE IT SAYS IS Line 30: Can't compare a location with 'within 3 blocks of {koth}' (script.sk, line 30: if player's location is not within 3 blocks of {koth}:')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement