Advertisement
AdamLam

Untitled

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