Advertisement
AdamLam

Untitled

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