Advertisement
AdamLam

Untitled

Jan 30th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.56 KB | None | 0 0
  1. on script load:
  2. send "&7[&6IslePvPbuildings&7] loaded &asuccessfuly." to console
  3. on first join:
  4. set {buildTime.%player%} to true
  5. command /ipb [<text>] [<text>]:
  6. permission: ipb.admin
  7. trigger:
  8. if arg 1 is "farm1":
  9. give a paper named "&eFarm I &aSchematic" with lore "||&6>> &7Click on &eYellow &7wool to build a farm||||&6>> &7Requirements:||&6>> &7Wood: &a500||&6>> &7Stone: &a250||&6>> &7Clay Block: &a250" to player
  10. send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aFarm Schematic&c!"
  11. stop
  12. if arg 1 is "mine1":
  13. give a paper named "&8Mine I &aSchematic" with lore "||&6>> &7Click on &8Gray &7wool to build a mine||||&6>> &7Requirements:||&6>> &7Wood: &a500||&6>> &7Stone: &a250||&6>> &7Clay Block: &a250" to player
  14. send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aMine Schematic&c!"
  15. stop
  16. if arg 1 is "house1":
  17. give a paper named "&fHouse I &aSchematic" with lore "||&6>> &7Click on &fWhite &7wool to build a house and upgrade island||||&6>> &7Requirements:||&6>> &7Wood: &a500||&6>> &7Stone: &a250||&6>> &7Clay Block: &a250" to player
  18. send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aHouse Schematic&c!"
  19. stop
  20. if arg 1 is "lumber1":
  21. give a paper named "&6Lumber Mill I &aSchematic" with lore "||&6>> &7Click on &6Brown &7wool to build a lumber mill||||&6>> &7Requirements:||&6>> &7Wood: &a500||&6>> &7Stone: &a250||&6>> &7Clay Block: &a250" to player
  22. send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aLumber Mill Schematic&c!"
  23. stop
  24. if arg 1 is "docks1":
  25. give a paper named "&3Docks I &aSchematic" with lore "||&6>> &7Click on &3Cyan &7wool to build a docks and unlock &bShip||||&6>> &7Requirements:||&6>> &7Wood: &a500||&6>> &7Stone: &a250||&6>> &7Clay Block: &a250" to player
  26. send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aDocks Schematic&c!"
  27. stop
  28. if arg 1 is "forge1":
  29. give a paper named "&7Forge I &aSchematic" with lore "||&6>> &7Click on &7&lLight Gray &7wool to build a forge||||&6>> &7Requirements:||&6>> &7Wood: &a500||&6>> &7Stone: &a250||&6>> &7Clay Block: &a250" to player
  30. send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aForge Schematic&c!"
  31. stop
  32. if arg 1 is "list":
  33. send ""
  34. send "&c&l>>>>>>>>>> &7[&6IslePvPbuildings&7] &c&l<<<<<<<<<<"
  35. send "&7/ipb ship1 - First level of Ship"
  36. send "&7/ipb farm1 - First level of Farm"
  37. send "&7/ipb mine1 - First level of Mine"
  38. send "&7/ipb house1 - First level of House"
  39. send "&7/ipb lumber1 - First level of Lumber"
  40. send "&7/ipb docks1 - First level of Docks"
  41. send "&7/ipb forge1 - First level of Forge"
  42. send "&7/ipb list - List of available buildings"
  43. send "&7admin: /ipb <true/false/chceck>"
  44. send "&7Author: &d&mi&f&lNe&8&lzu&6&lko"
  45. stop
  46. if arg 1 is not set:
  47. send ""
  48. send "&c&l>>>>>>>>>> &7[&6IslePvPbuildings&7] &c&l<<<<<<<<<<"
  49. send ""
  50. send "&7/ipb list- List of available commands."
  51. send ""
  52. send "&7Author: &d&mi&f&lNe&8&lzu&6&lko"
  53. stop
  54. if arg 1 is "true":
  55. if arg 2 is set:
  56. set {buildTime.%arg 2%} to true
  57. send "&7[&6IslePvPbuildings&7] &6>> &7%arg 2%'s &atrue!"
  58. else:
  59. send "&7[&6IslePvPbuildings&7] &6>> &7Arg 2 is empty!"
  60. if arg 1 is "false":
  61. if arg 2 is set:
  62. set {buildTime.%arg 2%} to false
  63. send "&7[&6IslePvPbuildings&7] &6>> &7%arg 2%'s &cfalse!"
  64. else:
  65. send "&7[&6IslePvPbuildings&7] &6>> &7Arg 2 is empty!"
  66. if arg 1 is "check":
  67. send "&7[&6IslePvPbuildings&7] &6>> &7 %arg 2% is %{buildTime.%arg 2%}% !"
  68. function woolBuild(player: player,name: text,loc: location,block: material):
  69. if {buildTime.%{_player}%} is false:
  70. set {buildTimeVip.%{_player}%} to false
  71. send "&7[&6IslePvPbuildings&7] &6>> &7Building &b%{_name}% &7started!" to {_player}
  72. wait 1 tick
  73. set block at {_loc} to {_block}
  74. set line 1 of block at {_loc} to "[%{_name}%]"
  75. set line 2 of block at {_loc} to "&8&lIn Construction"
  76. set line 3 of block at {_loc} to "&8&lTime Left:"
  77. set line 4 of block at {_loc} to "&c%{czas}% seconds"
  78. set {buildTimeVip.%{_player}%} to false
  79. set {buildTimerVip.%{_player}%} to 30
  80. loop 30 times:
  81. wait 1 ticks
  82. set {buildTimerVip.%{_player}%} to {buildTimerVip.%{_player}%}-1
  83. set {czasVip} to {buildTimerVip.%{_player}%}
  84. set block at {_loc} to {_block}
  85. set line 1 of block at {_loc} to "[%{_name}%]"
  86. set line 2 of block at {_loc} to "&8&lIn Construction"
  87. set line 3 of block at {_loc} to "&8&lTime Left:"
  88. set line 4 of block at {_loc} to "&c%{czas}% seconds"
  89. set line 2 of block at {_loc} to ""
  90. set line 3 of block at {_loc} to "&2&lCompleted!"
  91. set line 4 of block at {_loc} to "&7Right Click"
  92. set {buildTimeVip.%{_player}%} to true
  93. else if {buildTime.%{_player}%} is true:
  94. set {buildTime.%{_player}%} to false
  95. send "&7[&6IslePvPbuildings&7] &6>> &7Building &b%{_name}% &7started!" to {_player}
  96. wait 1 ticks
  97. set block at {_loc} to {_block}
  98. set line 1 of block at {_loc} to "[%{_name}%]"
  99. set line 2 of block at {_loc} to "&8&lIn Construction"
  100. set line 3 of block at {_loc} to "&8&lTime Left:"
  101. set line 4 of block at {_loc} to "&c%{czas}% seconds"
  102. set {buildTime.%{_player}%} to false
  103. set {buildTimer.%{_player}%} to 30
  104. loop 30 times:
  105. wait 1 ticks
  106. set {buildTimer.%{_player}%} to {buildTimer.%{_player}%}-1
  107. set {czas} to {buildTimer.%{_player}%}
  108. set block at {_loc} to {_block}
  109. set line 1 of block at {_loc} to "[%{_name}%]"
  110. set line 2 of block at {_loc} to "&8&lIn Construction"
  111. set line 3 of block at {_loc} to "&8&lTime Left:"
  112. set line 4 of block at {_loc} to "&c%{czas}% seconds"
  113. set line 2 of block at {_loc} to ""
  114. set line 3 of block at {_loc} to "&2&lCompleted!"
  115. set line 4 of block at {_loc} to "&7Right Click"
  116. set {buildTime.%{_player}%} to true
  117. function woolCoast(player: player,block: location):
  118. drawDot count 2, particle "smoke", material wool, XYZ 0.5, 0.4, 0.5, center location of {_block}, visibleRange 10, pulseDelay 1, keepFor 1 seconds
  119. play raw sound "note.bassattack" at {_player} with pitch 1 volume 1
  120. send "&7[&6IslePvPbuildings&7] &6>> &cYou dont have enough items yet!" to {_player}
  121. on rightclick on wool:
  122. if "%world of player%" is "islepvp":
  123. if block below event-block is anvil:
  124. if {buildTimeVip.%player%} is not set:
  125. set {buildTimeVip.%player%} to true
  126. if {buildTime.%player%} is not set:
  127. set {buildTime.%player%} to true
  128. if {buildTime.%player%} or {buildTimeVip.%player%} are true:
  129. if event-block is yellow wool:
  130. if player's held item is paper named "&eFarm I &aSchematic" with lore "||&6>> &7Click on &eYellow &7wool to build a farm||||&6>> &7Requirements:||&6>> &7Wood: &a500||&6>> &7Stone: &a250||&6>> &7Clay Block: &a250":
  131. if block 2 below event-block is gold sea latern:
  132. if player has 1 diamond:
  133. remove 1 diamond from player's inventory
  134. remove 1 of player's held item from player's inventory
  135. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  136. woolBuild(player,"Farm I",location of event-block,sign:9)
  137. stop
  138. else:
  139. woolCoast(player,event-block)
  140. else:
  141. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  142. else:
  143. drawDot count 2, particle "happyvillager", material wool, XYZ 0.5, 0.4, 0.5, center location of event-block, visibleRange 10, pulseDelay 1, keepFor 1 seconds
  144. play raw sound "note.hat" at player with pitch 1 volume 1
  145. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &eFarm &ahere!"
  146. if event-block is gray wool:
  147. if player's held item is paper named "&8Mine I &aSchematic" with lore "||&6>> &7Click on &8Gray &7wool to build a mine||||&6>> &7Requirements:||&6>> &7Wood: &a500||&6>> &7Stone: &a250||&6>> &7Clay Block: &a250":
  148. if block 2 below event-block is gold sea latern:
  149. if player has 1 diamond:
  150. remove 1 diamond from player's inventory
  151. remove 1 of player's held item from player's inventory
  152. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  153. woolBuild(player,"Mine I",location of event-block,sign:9)
  154. stop
  155. else:
  156. woolCoast(player,event-block)
  157. else:
  158. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  159. else:
  160. drawDot count 2, particle "happyvillager", material wool, XYZ 0.5, 0.4, 0.5, center location of event-block, visibleRange 10, pulseDelay 1, keepFor 1 seconds
  161. play raw sound "note.hat" at player with pitch 1 volume 1
  162. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &8Mine &ahere!"
  163. if event-block is white wool:
  164. if player's held item is paper named "&fHouse I &aSchematic" with lore "||&6>> &7Click on &fWhite &7wool to build a house and upgrade island||||&6>> &7Requirements:||&6>> &7Wood: &a500||&6>> &7Stone: &a250||&6>> &7Clay Block: &a250":
  165. if block 2 below event-block is gold sea latern:
  166. if player has 1 diamond:
  167. remove 1 diamond from player's inventory
  168. remove 1 of player's held item from player's inventory
  169. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  170. woolBuild(player,"House I",location of event-block,sign:9)
  171. stop
  172. else:
  173. woolCoast(player,event-block)
  174. else:
  175. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  176. else:
  177. drawDot count 2, particle "happyvillager", material wool, XYZ 0.5, 0.4, 0.5, center location of event-block, visibleRange 10, pulseDelay 1, keepFor 1 seconds
  178. play raw sound "note.hat" at player with pitch 1 volume 1
  179. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &fHouse &ahere!"
  180. if event-block is brown wool:
  181. if player's held item is paper named "&6Lumber Mill I &aSchematic" with lore "||&6>> &7Click on &6Brown &7wool to build a lumber mill||||&6>> &7Requirements:||&6>> &7Wood: &a500||&6>> &7Stone: &a250||&6>> &7Clay Block: &a250":
  182. if block 2 below event-block is gold sea latern:
  183. if player has 1 diamond:
  184. remove 1 diamond from player's inventory
  185. remove 1 of player's held item from player's inventory
  186. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  187. woolBuild(player,"Lumber Mill I",location of event-block,sign:9)
  188. stop
  189. else:
  190. woolCoast(player,event-block)
  191. else:
  192. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  193. else:
  194. drawDot count 2, particle "happyvillager", material wool, XYZ 0.5, 0.4, 0.5, center location of event-block, visibleRange 10, pulseDelay 1, keepFor 1 seconds
  195. play raw sound "note.hat" at player with pitch 1 volume 1
  196. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &6Lumber Mill &ahere!"
  197. if event-block is cyan wool:
  198. if player's held item is paper named "&3Docks I &aSchematic" with lore "||&6>> &7Click on &3Cyan &7wool to build a docks and unlock &bShip||||&6>> &7Requirements:||&6>> &7Wood: &a500||&6>> &7Stone: &a250||&6>> &7Clay Block: &a250":
  199. if block 2 below event-block is gold sea latern:
  200. if player has 1 diamond:
  201. remove 1 diamond from player's inventory
  202. remove 1 of player's held item from player's inventory
  203. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  204. woolBuild(player,"Docks I",location of event-block,sign:9)
  205. stop
  206. else:
  207. woolCoast(player,event-block)
  208. else:
  209. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  210. else:
  211. drawDot count 2, particle "happyvillager", material wool, XYZ 0.5, 0.4, 0.5, center location of event-block, visibleRange 10, pulseDelay 1, keepFor 1 seconds
  212. play raw sound "note.hat" at player with pitch 1 volume 1
  213. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &3Docks &ahere!"
  214. if event-block is light gray wool:
  215. if player's held item is paper named "&7Forge I &aSchematic" with lore "||&6>> &7Click on &7&lLight Gray &7wool to build a forge||||&6>> &7Requirements:||&6>> &7Wood: &a500||&6>> &7Stone: &a250||&6>> &7Clay Block: &a250":
  216. if block 2 below event-block is gold sea latern:
  217. if player has 1 diamond:
  218. remove 1 diamond from player's inventory
  219. remove 1 of player's held item from player's inventory
  220. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  221. woolBuild(player,"Forge I",location of event-block,sign:9)
  222. stop
  223. else:
  224. woolCoast(player,event-block)
  225. else:
  226. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  227. else:
  228. drawDot count 2, particle "happyvillager", material wool, XYZ 0.5, 0.4, 0.5, center location of event-block, visibleRange 10, pulseDelay 1, keepFor 1 seconds
  229. play raw sound "note.hat" at player with pitch 1 volume 1
  230. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &7Forge &ahere!"
  231. else:
  232. drawDot count 2, particle "smoke", material wool, XYZ 0.5, 0.4, 0.5, center location of event-block, visibleRange 10, pulseDelay 1, keepFor 1 seconds
  233. play raw sound "note.bassattack" at player with pitch 1 volume 1
  234. send "&7[&6IslePvPbuildings&7] &6>> &cYou can't have two constructions being built at the same time."
  235. function signBuild(player: player,loc: location,name: text,schematic: text):
  236. paste schematic "%{_schematic}%" at {_loc}
  237. wait 2 ticks
  238. send "&7[&6IslePvPbuildings&7] &7&l%{_name}% &7has been built!" to {_player}
  239. broadcast "&7[&6IslePvPbuildings&7] &a%{_player}% &7has just built &7&l%{_name}%"
  240. on rightclick on sign:
  241. if "%world of player%" is "islepvp":
  242. if line 2 is "&8&lIn Construction":
  243. play raw sound "note.bassattack" at player with pitch 1 volume 1
  244. send "&7[&6IslePvPbuildings&7] &cPlease wait... Structure is still building"
  245. else if line 3 is "&2&lCompleted!":
  246. set {loc} to location of block 1 up event-block
  247. drawDot count 15, particle "explosionlarge", XYZ 10, 20, 5, center location of block 3 up 15 south 10 east event-block, visibleRange 50, pulseDelay 3, keepFor 2 seconds
  248. play raw sound "random.anvil_land" at player with pitch 1 volume 1
  249. if line 1 is "[Farm I]":
  250. signBuild(player,{loc},"Farm I","farm1")
  251. else if line 1 is "[Mine I]":
  252. signBuild(player,{loc},"Mine I","mine1")
  253. else if line 1 is "[House I]":
  254. signBuild(player,{loc},"House I","house1")
  255. else if line 1 is "[Lumber Mill I]":
  256. signBuild(player,{loc},"Lumber Mill I","lumber1")
  257. else if line 1 is "[Docks I]":
  258. signBuild(player,{loc},"Docks I","docks1")
  259. else if line 1 is "[Forge I]":
  260. signBuild(player,{loc},"Forge I","forge1")
  261. set event-block to air
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement