Guest User

Untitled

a guest
Aug 25th, 2014
460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.10 KB | None | 0 0
  1. options:
  2.  
  3. Prefix: &8[&eKing Of The Sky&8]
  4. HighlightColor: &e
  5. ChatColor: &r
  6. BreakAttemptSound: random.break
  7. BreakAttemptPitch: 1
  8. YouWereHealedSound: note.pling
  9. YouWereHealedPitch: 2
  10.  
  11.  
  12.  
  13. #= Commands =#
  14.  
  15. command /kots [<text>] [<world>]:
  16. aliases: /kingofthesky
  17. trigger:
  18. if arg-1 is "on" or "enable":
  19. command sender has permission "Skript.KingOfTheSky":
  20. if {KOTS.Enabled} is not set:
  21. set {KOTS.Enabled} to true
  22. broadcast "{@Prefix}{@ChatColor} Enabled by {@HighlightColor}%command sender%!"
  23. else:
  24. message "{@Prefix}{@ChatColor} Already enabled!" to the command sender
  25. stop trigger
  26. else:
  27. execute console command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
  28. message "{@Prefix}{@ChatColor} You don't have permission for that!" to the command sender
  29.  
  30. else if arg-1 is "off" or "disable":
  31. command sender has permission "Skript.KingOfTheSky":
  32. if {KOTS.Enabled} is true:
  33. delete {KOTS.Enabled}
  34. broadcast "{@Prefix}{@ChatColor} Disabled by {@HighlightColor}%command sender%!"
  35. if the block at ({KOTS.GoldBlock}) is gold block:
  36. set the block at ({KOTS.GoldBlock}) to air
  37. delete {KOTS.GoldBlock}
  38. delete {KOTS.LatestAtGoldBlock}
  39. else:
  40. message "{@Prefix}{@ChatColor} Already disabled!" to the command sender
  41. stop trigger
  42. else:
  43. execute console command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
  44. message "{@Prefix}{@ChatColor} You don't have permission for that!" to the command sender
  45.  
  46.  
  47. else if arg-1 is "toggle" or "switch":
  48. if {KOTS.Enabled} is true:
  49. command sender command "/kots off"
  50. stop trigger
  51. if {KOTS.Enabled} is not set:
  52. command sender command "/kots on"
  53. stop trigger
  54.  
  55. else if arg-1 is "who":
  56. if {KOTS.LatestAtGoldBlock} is set:
  57. message "{@Prefix}{@ChatColor} {@HighlightColor}%{KOTS.LatestAtGoldBlock}%{@ChatColor} is the King of the Sky!"
  58. stop trigger
  59. message "{@Prefix}{@ChatColor} There is no King of the Sky!"
  60.  
  61. else if arg-1 is "setup" or "block":
  62. if {KOTS.Enabled} is not set:
  63. message "{@Prefix}{@ChatColor} Enable first!"
  64. message "{@Prefix}{@ChatColor} /kingofthesky on"
  65. stop trigger
  66. if arg-2 is not set:
  67. message "{@Prefix}{@ChatColor} /kingofthesky setup <world>"
  68. stop trigger
  69. set {KOTS.GoldBlock} to (the location at 0.5, 200.5, 0.5 of the world (arg-2))
  70. set the block at {KOTS.GoldBlock} to gold block
  71. broadcast "{@Prefix}{@ChatColor} Gold block setup at 0, 200, 0!"
  72.  
  73. else if arg-1 is "help" or "?" or "question" or "info" or "information":
  74. message "" to the command sender
  75. if command sender has permission "Skript.KingOfTheSky":
  76. message "{@Prefix}{@ChatColor} /King of the Sky {@HighlightColor}on/off/toggle" to the command sender
  77. message "{@Prefix}{@ChatColor} Scenario by: {@HighlightColor}/u/bucklakeluki"
  78. if command sender is "Fleft":
  79. message "{@Prefix}{@ChatColor} Skript: {@HighlightColor}You!" to the command sender
  80. else:
  81. message "{@Prefix}{@ChatColor} Skript: {@HighlightColor}Fleft" to the command sender
  82. message "" to the command sender
  83. message "{@Prefix}{@ChatColor} In {@HighlightColor}King Of The Sky{@ChatColor}, there is a gold" to the command sender
  84. message "{@Prefix}{@ChatColor} block {@HighlightColor}200{@ChatColor} blocks above 0,0." to the command sender
  85. message "{@Prefix}{@ChatColor} Every minute, the player standing on this block" to the command sender
  86. message "{@Prefix}{@ChatColor} will be healed {@HighlightColor}half a heart." to the command sender
  87. message "{@Prefix}{@ChatColor} To counter this, when you shoot someone," to the command sender
  88. message "{@Prefix}{@ChatColor} you switch positions." to the command sender
  89. message "" to the command sender
  90.  
  91. else if arg-1 is not set:
  92. command sender command "/kots help"
  93. else:
  94. command sender command "/kots help"
  95.  
  96.  
  97. #= KOTS Monument Healing =#
  98.  
  99. every minute:
  100. {KOTS.Enabled} is true:
  101. {KOTS.GoldBlock} is set:
  102. loop all players:
  103. set {_loc} to (the location at (block below loop-player))
  104. if {_loc} is equal to {KOTS.GoldBlock}:
  105. if {KOTS.LatestAtGoldBlock} is not set:
  106. set {KOTS.LatestAtGoldBlock} to loop-player
  107. heal loop-player by 0.5 heart
  108. execute console command "/playsound {@YouWereHealedSound} %loop-player% ~ ~ ~ 1 {@YouWereHealedPitch} 1"
  109. message "{@Prefix}{@ChatColor} You were healed half a heart!" to loop-player
  110. if loop-player is not {KOTS.LatestAtGoldBlock}:
  111. set {KOTS.LatestAtGoldBlock} to loop-player
  112. broadcast "{@Prefix}{@ChatColor} {@HighlightColor}%loop-player%{@ChatColor} is the King of the Sky!"
  113.  
  114. #= KOTS Anti-Mine =#
  115.  
  116. on mine:
  117. {KOTS.Enabled} is true:
  118. set {_loc} to location of event-block
  119. if {_loc} is equal to {KOTS.GoldBlock}:
  120. cancel the event
  121. message "{@Prefix}{@ChatColor} You can't break the monument!"
  122. execute console command "/playsound {@BreakAttemptSound} %player% ~ ~ ~ 1 {@BreakAttemptPitch} 1"
  123.  
  124.  
  125. on place:
  126. {KOTS.Enabled} is true:
  127. set {_loc} to location of event-block
  128. loop blocks in radius 2 around {_loc}:
  129. set {_loopLoc} to (the location at loop-block)
  130. if {_loopLoc} is equal to {KOTS.GoldBlock}:
  131. cancel the event
  132. message "{@Prefix}{@ChatColor} You can't place blocks around the monument!" to event-player
  133. execute console command "/playsound {@BreakAttemptSound} %event-player% ~ ~ ~ 1 {@BreakAttemptPitch} 1"
  134.  
  135. #= King Death Removal =#
  136.  
  137. on death of player:
  138. {KOTS.Enabled} is true:
  139. {KOTS.LatestAtGoldBlock} is equal to victim:
  140. broadcast "{@Prefix}{@ChatColor} The current King of the Sky has died!"
  141. delete {KOTS.LatestAtGoldBlock}
  142.  
  143.  
  144. #= Switcheroo =#
  145.  
  146. on damage:
  147. {KOTS.Enabled} is true:
  148. attacker is a player:
  149. attacker is alive:
  150. victim is a player:
  151. victim is alive:
  152. damage was caused by projectile:
  153. projectile is an arrow:
  154. set {_KOTS.TempLoc} to (location of victim)
  155. teleport victim to (location 0.3 below attacker)
  156. teleport attacker to {_KOTS.TempLoc}
  157.  
  158.  
  159. command damage:
  160. permission: skript.op
  161. trigger:
  162. damage (command sender) by 3 hearts
Advertisement
Add Comment
Please, Sign In to add comment