Advertisement
AdamLam

Untitled

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