Advertisement
AdamLam

Untitled

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