Advertisement
AdamLam

Untitled

Jan 31st, 2020
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.50 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,time: number):
  69. if {buildTime.%{_player}%} is false:
  70. set block at {_loc} to {_block}
  71. set {buildTimeVip.%{_player}%} to false
  72. send "&7[&6IslePvPbuildings&7] &6>> &7Building &b%{_name}% &7started!" to {_player}
  73. set {buildTimeVip.%{_player}%} to false
  74. set {time.%{_player}%.now} to convert date now to unix date
  75. set {time.%{_player}%.start} to convert date now to unix date
  76. while difference between {time.%{_player}%.start} and {time.%{_player}%.now} is less than {_time}:
  77. set {time.%{_player}%.now} to convert date now to unix date
  78. set {czasVIP} to difference between {time.%{_player}%.start} and {time.%{_player}%.now}
  79. set block at {_loc} to {_block}
  80. set line 1 of block at {_loc} to "[%{_name}%]"
  81. set line 2 of block at {_loc} to "&8&lIn Construction"
  82. set line 3 of block at {_loc} to "&8&lTime Left:"
  83. set line 4 of block at {_loc} to "&c%{_czasVip}% seconds"
  84. set line 2 of block at {_loc} to ""
  85. set line 3 of block at {_loc} to "&2&lCompleted!"
  86. set line 4 of block at {_loc} to "&7Right Click"
  87. set {buildTimeVip.%{_player}%} to true
  88. else if {buildTime.%{_player}%} is true:
  89. set block at {_loc} to {_block}
  90. set {buildTime.%{_player}%} to false
  91. send "&7[&6IslePvPbuildings&7] &6>> &7Building &b%{_name}% &7started!" to {_player}
  92. set {buildTime.%{_player}%} to false
  93. set {time.%{_player}%.now} to convert date now to unix date
  94. set {time.%{_player}%.start} to convert date now to unix date
  95. while difference between {time.%{_player}%.start} and {time.%{_player}%.now} is less than {_time}:
  96. set {time.%{_player}%.now} to convert date now to unix date
  97. set {czas} to difference between {time.%{_player}%.start} and {time.%{_player}%.now}
  98. set block at {_loc} to {_block}
  99. set line 1 of block at {_loc} to "[%{_name}%]"
  100. set line 2 of block at {_loc} to "&8&lIn Construction"
  101. set line 3 of block at {_loc} to "&8&lTime Left:"
  102. set line 4 of block at {_loc} to "&c%{czas}% seconds"
  103. set line 2 of block at {_loc} to ""
  104. set line 3 of block at {_loc} to "&2&lCompleted!"
  105. set line 4 of block at {_loc} to "&7Right Click"
  106. set {buildTime.%{_player}%} to true
  107. function woolCoast(player: player,block: location):
  108. 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
  109. play raw sound "note.bassattack" at {_player} with pitch 1 volume 1
  110. send "&7[&6IslePvPbuildings&7] &6>> &cYou dont have enough items yet!" to {_player}
  111. on rightclick on wool:
  112. if "%world of player%" is "islepvp":
  113. if block below event-block is anvil:
  114. if {buildTimeVip.%player%} is not set:
  115. set {buildTimeVip.%player%} to true
  116. if {buildTime.%player%} is not set:
  117. set {buildTime.%player%} to true
  118. if {buildTime.%player%} or {buildTimeVip.%player%} are true:
  119. if event-block is yellow wool:
  120. 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":
  121. if block 2 below event-block is sea lantern:
  122. if player has 1 diamond:
  123. remove 1 diamond from player's inventory
  124. remove 1 of player's held item from player's inventory
  125. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  126. woolBuild(player,"Farm I",location of event-block,sign:9,30)
  127. stop
  128. else:
  129. woolCoast(player,event-block)
  130. else:
  131. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  132. else:
  133. 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
  134. play raw sound "note.hat" at player with pitch 1 volume 1
  135. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &eFarm &ahere!"
  136. if event-block is gray wool:
  137. 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":
  138. if block 2 below event-block is sea lantern:
  139. if player has 1 diamond:
  140. remove 1 diamond from player's inventory
  141. remove 1 of player's held item from player's inventory
  142. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  143. woolBuild(player,"Mine I",location of event-block,sign:9,30)
  144. stop
  145. else:
  146. woolCoast(player,event-block)
  147. else:
  148. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  149. else:
  150. 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
  151. play raw sound "note.hat" at player with pitch 1 volume 1
  152. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &8Mine &ahere!"
  153. if event-block is white wool:
  154. 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":
  155. if block 2 below event-block is sea lantern:
  156. if player has 1 diamond:
  157. remove 1 diamond from player's inventory
  158. remove 1 of player's held item from player's inventory
  159. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  160. woolBuild(player,"House I",location of event-block,sign:9,30)
  161. stop
  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 &fHouse &ahere!"
  170. if event-block is brown wool:
  171. 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":
  172. if block 2 below event-block is sea lantern:
  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,"Lumber Mill I",location of event-block,sign:9,30)
  178. stop
  179. else:
  180. woolCoast(player,event-block)
  181. else:
  182. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  183. else:
  184. 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
  185. play raw sound "note.hat" at player with pitch 1 volume 1
  186. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &6Lumber Mill &ahere!"
  187. if event-block is cyan wool:
  188. 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":
  189. if block 2 below event-block is sea lantern:
  190. if player has 1 diamond:
  191. remove 1 diamond from player's inventory
  192. remove 1 of player's held item from player's inventory
  193. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  194. woolBuild(player,"Docks I",location of event-block,sign:9,30)
  195. stop
  196. else:
  197. woolCoast(player,event-block)
  198. else:
  199. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  200. else:
  201. 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
  202. play raw sound "note.hat" at player with pitch 1 volume 1
  203. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &3Docks &ahere!"
  204. if event-block is light gray wool:
  205. 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":
  206. if block 2 below event-block is sea lantern:
  207. if player has 1 diamond:
  208. remove 1 diamond from player's inventory
  209. remove 1 of player's held item from player's inventory
  210. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  211. woolBuild(player,"Forge I",location of event-block,sign:9,30)
  212. stop
  213. else:
  214. woolCoast(player,event-block)
  215. else:
  216. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  217. else:
  218. 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
  219. play raw sound "note.hat" at player with pitch 1 volume 1
  220. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &7Forge &ahere!"
  221. else:
  222. 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
  223. play raw sound "note.bassattack" at player with pitch 1 volume 1
  224. send "&7[&6IslePvPbuildings&7] &6>> &cYou can't have two constructions being built at the same time."
  225. function signBuild(player: player,loc: location,name: text,schematic: text):
  226. paste schematic "%{_schematic}%" at {_loc}
  227. wait 2 ticks
  228. send "&7[&6IslePvPbuildings&7] &7&l%{_name}% &7has been built!" to {_player}
  229. broadcast "&7[&6IslePvPbuildings&7] &a%{_player}% &7has just built &7&l%{_name}%"
  230. on rightclick on sign:
  231. if "%world of player%" is "islepvp":
  232. if line 2 is "&8&lIn Construction":
  233. play raw sound "note.bassattack" at player with pitch 1 volume 1
  234. send "&7[&6IslePvPbuildings&7] &cPlease wait... Structure is still building"
  235. else if line 3 is "&2&lCompleted!":
  236. set {loc} to location of block 1 up event-block
  237. 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
  238. play raw sound "random.anvil_land" at player with pitch 1 volume 1
  239. if line 1 is "[Farm I]":
  240. signBuild(player,{loc},"Farm I","farm1")
  241. else if line 1 is "[Mine I]":
  242. signBuild(player,{loc},"Mine I","mine1")
  243. else if line 1 is "[House I]":
  244. signBuild(player,{loc},"House I","house1")
  245. else if line 1 is "[Lumber Mill I]":
  246. signBuild(player,{loc},"Lumber Mill I","lumber1")
  247. else if line 1 is "[Docks I]":
  248. signBuild(player,{loc},"Docks I","docks1")
  249. else if line 1 is "[Forge I]":
  250. signBuild(player,{loc},"Forge I","forge1")
  251. set event-block to air
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement