Advertisement
AdamLam

Untitled

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