NoHacksJustACow

Worldguard.sk

Jan 25th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.32 KB | None | 0 0
  1. command /Build:
  2. permission: builder
  3. trigger:
  4. if {Build::%player%} is true:
  5. send "&7Building has been &a&lEnabled&7!"
  6. set {Build::%player%} to false
  7. set {WG::%player%} to false
  8. stop
  9. if {Build::%player%} is false:
  10. send "&7Building has been &c&lDisabled&7!"
  11. set {WG::%player%} to true
  12. set {Build::%player%} to true
  13. stop
  14.  
  15. on inventory click:
  16. if {inventory::%player%} is true:
  17. cancel event
  18. if {inventory::%player%} is false:
  19. stop
  20.  
  21. every 1 tick in "CowClicks":
  22. loop all players:
  23. if {inventory::%loop-player%} is not set:
  24. set {inventory::%loop-player%} to false
  25.  
  26. command /Pvp:
  27. trigger:
  28. if {pvp::%player%} is false:
  29. if {attacks1::%player%} is true:
  30. send "&7PVP has been &a&lEnabled&7!"
  31. set player's chestplate to a diamond_chestplate named "&f"
  32. set player's helmet to a diamond helmet named "&f"
  33. set player's leggings to a diamond_leggings named "&f"
  34. set player's boots to a diamond_boots named "&f"
  35. add a diamond_sword of sharpness 5 to player's inventory
  36. add a bow of infinity 1 and power 3 to player's inventory
  37. add a arrow to player's inventory
  38. set {attacks1::%player%} to false
  39. set {attacks::%player%} to true
  40. set {inventory::%player%} to true
  41. stop
  42. if {attacks1::%player%} is false:
  43. send "&7PVP has been &c&lDisabled&7!"
  44. set player's chestplate to air
  45. set player's helmet to air
  46. set player's leggings to air
  47. set player's boots to air
  48. set {inventory::%Player%} to false
  49. remove a diamond_sword from player's inventory
  50. remove a bow from player's inventory
  51. remove a arrow from player's inventory
  52. set {attacks1::%player%} to true
  53. set {attacks::%player%} to false
  54. stop
  55. else:
  56. send "&3&lYou are in combat wait 10 seconds!"
  57.  
  58.  
  59.  
  60. every 1 second in "CowClicks":
  61. loop all players:
  62. if {WG::%loop-player%} is not set:
  63. set {WG::%loop-player%} to true
  64. if {Build::%loop-player%} is not set:
  65. set {Build::%loop-player%} to true
  66.  
  67. every 1 second in "CowClicks":
  68. loop all players:
  69. if {attacks::%loop-player%} is not set:
  70. set {attacks::%loop-player%} to false
  71. if {attacks1::%loop-player%} is not set:
  72. set {attacks1::%loop-player%} to false
  73.  
  74.  
  75. on damage of a player:
  76. if {attacks::%attacker%} is true:
  77. if {attacks::%victim%} is true:
  78. stop
  79. if {attacks::%victim%} is false:
  80. send "&7%victim% has pvp disabled!" to attacker
  81. cancel event
  82.  
  83. if {attacks::%attacker%} is false:
  84. cancel event
  85. send "&7You may not harm another player here!" to attacker
  86.  
  87.  
  88.  
  89. on place:
  90. if {WG::%player%} is true:
  91. cancel event
  92. send "&7You may not edit these grounds!"
  93. stop
  94. if {WG::%player%} is false:
  95. uncancel event
  96. stop
  97.  
  98.  
  99.  
  100. on break:
  101. if {WG::%player%} is true:
  102. cancel event
  103. send "&7You may not edit these grounds!"
  104. stop
  105. if {WG::%player%} is false:
  106. uncancel event
  107. stop
  108.  
  109. options:
  110. ConfigVersion: 1.0
  111. # Do not edit this, its for me to help people if / when they require help! #
  112. Version: 0.0.5
  113. # Please do not edit this #
  114. SkriptName: AntiCombatLog
  115. # Edit this to what you save the skript as *WITHOUT THE .SK AT THE END*
  116. Prefix: &7[&bACL&7]
  117. # Set this to the prefix of your server.
  118. ColorScheme1: &7
  119. # Pick a color and put it here! #
  120. NoPermissionMessage: &cYou have no permission!
  121. # Set this to the permission message for the skript - Players without the permission to reload the Skript will see this #
  122. # You may use variables / placeholders such as %player% and %uuid of player% etc #
  123. SelectedWorld: "CowClicks" # Default setting
  124. # Set this to the world or worlds that you wish to use this skript in #
  125. PunishmentCommand1: kill %player%
  126. # The punishment command a player will receieve after logging out in combat. eg /kill %player%
  127. # NEW #
  128. CombatTimer: 9 # Default #
  129. # The amount of time set, please minus 1 away from the desired amount. e.g if you want 20 seconds put 19. #
  130.  
  131.  
  132.  
  133. # Thats it, you're done with the config :D
  134. # More Updates Coming Soon #
  135.  
  136.  
  137.  
  138.  
  139.  
  140. on damage:
  141. if victim is a player:
  142. if attacker is a player:
  143. if {anticombatlog.%attacker%} = 0:
  144. message "{@Prefix} {@ColorScheme1}You have been combat tagged, do not log out!" to victim
  145. message "{@Prefix} {@ColorScheme1}You have tagged %victim%, do not log out!" to attacker
  146. set {anticombatlog.%victim%} to 1
  147. set {anticombatlog.%attacker%} to 1
  148.  
  149. every second in {@SelectedWorld}:
  150. loop all players:
  151. if {anticombatlog.%loop-player%} > 0:
  152. add 1 to {anticombatlog.%loop-player%}
  153. loop all players:
  154. if {anticombatlog.%loop-player%} > {@CombatTimer}:
  155. set {anticombatlog.%loop-player%} to 0
  156. message "{@Prefix} {@ColorScheme1}You can now log out!" to loop-player
  157.  
  158. command /anticombatlog [<text>]:
  159. permission: anticombatlog.reload
  160. permission message: {@NoPermissionMessage}
  161. trigger:
  162. if arg 1 is "reload":
  163. broadcast "&7AntiCombatLog {@Version} is reloading.."
  164. make player execute command "/sk reload {@SkriptName}.sk"
  165. wait 4 seconds
  166. broadcast "&bAntiCombatLog {@Version} has succesfully reloaded!"
  167. broadcast "&bPlease report any issues on the Spigot page!"
  168. else:
  169. send "&9Usage /anticombatlog reload"
  170.  
  171. command /ct:
  172. trigger:
  173. send "{@ColorScheme1}The server combat log timer is &9{@CombatTimer} seconds" to player
  174.  
  175.  
  176. # Added in V0.0.4 HOTFIX 2 #
  177.  
  178. on join:
  179. if {anticombatlog.%player%} > 0:
  180. message "{@Prefix} {@ColorScheme1}You logged out in combat!"
  181. make console execute command "{@PunishmentCommand1}"
  182.  
  183. # Added in V0.0.4 HOTFIX 3 #
  184.  
  185.  
  186.  
  187. on command "spawn":
  188. if {anticombatlog.%player%} > 0:
  189. cancel event
  190. message "{@Prefix} {@ColorScheme1}You may not teleport to spawn whilst in combat!"
  191.  
  192. on command "home":
  193. if {anticombatlog.%player%} > 0:
  194. cancel event
  195. message "{@Prefix} {@ColorScheme1}You may not teleport whilst in combat!"
  196.  
  197. on command "pvp":
  198. if {anticombatlog.%player%} > 0:
  199. cancel event
  200. message "{@Prefix} {@ColorScheme1}You may not teleport whilst in combat!"
  201.  
  202. # How to add your own command to be blocked whilst a player is in combat #
  203. #on command "<command name without backslash>":
  204. # if {anticombatlog.%player%} > 0:
  205. # cancel event
  206. # message "{@Prefix} {@ColorScheme1}<insert deny message here>"
  207.  
  208. on item damage:
  209. cancel event
Advertisement
Add Comment
Please, Sign In to add comment