Advertisement
AdamLam

Untitled

Jan 27th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.90 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.  
  6. command /ipb [<text>] [<text>]:
  7. permission: ipb.admin
  8. trigger:
  9. if arg 1 is "farm1":
  10. 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
  11. send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aFarm Schematic&c!"
  12. stop
  13. if arg 1 is "mine1":
  14. 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
  15. send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aMine Schematic&c!"
  16. stop
  17. if arg 1 is "house1":
  18. 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
  19. send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aHouse Schematic&c!"
  20. stop
  21. if arg 1 is "lumber1":
  22. 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
  23. send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aLumber Mill Schematic&c!"
  24. stop
  25. if arg 1 is "docks1":
  26. 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
  27. send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aDocks Schematic&c!"
  28. stop
  29. if arg 1 is "ship1":
  30. 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
  31. send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aShip Schematic&c!"
  32. stop
  33. if arg 1 is "forge1":
  34. 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
  35. send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aForge Schematic&c!"
  36. stop
  37. if arg 1 is "list":
  38. send ""
  39. send "&c&l>>>>>>>>>> &7[&6IslePvPbuildings&7] &c&l<<<<<<<<<<"
  40. send "&7/ipb ship1 - First level of Ship"
  41. send "&7/ipb farm1 - First level of Farm"
  42. send "&7/ipb mine1 - First level of Mine"
  43. send "&7/ipb house1 - First level of House"
  44. send "&7/ipb lumber1 - First level of Lumber"
  45. send "&7/ipb docks1 - First level of Docks"
  46. send "&7/ipb docks1 - First level of Ship"
  47. send "&7/ipb forge1 - First level of Forge"
  48. send "&7/ipb list - List of available buildings"
  49. send "&7admin: /ipb <true/false/chceck>"
  50. send "&7Author: &d&mi&f&lNe&8&lzu&6&lko"
  51. stop
  52. if arg 1 is not set:
  53. send ""
  54. send "&c&l>>>>>>>>>> &7[&6IslePvPbuildings&7] &c&l<<<<<<<<<<"
  55. send ""
  56. send "&7/ipb list- List of available commands."
  57. send ""
  58. send "&7Author: &d&mi&f&lNe&8&lzu&6&lko"
  59. stop
  60. if arg 1 is "true":
  61. if arg 2 is set:
  62. set {buildTime.%arg 2%} to true
  63. send "&7[&6IslePvPbuildings&7] &6>> &7%arg 2%'s &atrue!"
  64. else:
  65. send "&7[&6IslePvPbuildings&7] &6>> &7Arg 2 is empty!"
  66. if arg 1 is "false":
  67. if arg 2 is set:
  68. set {buildTime.%arg 2%} to false
  69. send "&7[&6IslePvPbuildings&7] &6>> &7%arg 2%'s &cfalse!"
  70. else:
  71. send "&7[&6IslePvPbuildings&7] &6>> &7Arg 2 is empty!"
  72. if arg 1 is "check":
  73. send "&7[&6IslePvPbuildings&7] &6>> &7 %arg 2% is %{buildTime.%arg 2%}% !"
  74.  
  75. function woolBuild(player: player,name: text,block: location,c: text):
  76. send "&7[&6IslePvPbuildings&7] &6>> &7Building &b%{_name}% &7started!" to {_player}
  77. wait 1 tick
  78. set {buildOwner.%{_player}%} to true
  79. set block at {_block} to sign:6
  80. set line 1 of block at {_block} to "&7[&%{_c}%&l%{_name}%&7]"
  81. set line 2 of block at {_block} to "&8&lIn Construction"
  82. set line 3 of block at {_block} to "&8&lTime Left:"
  83. set line 4 of block at {_block} to "&c30 seconds"
  84. set {buildTime.%{_player}%} to false
  85. set {buildTimer.%{_player}%} to 30
  86. loop 30 times:
  87. wait 1 seconds
  88. set {buildTimer.%{_player}%} to {buildTimer.%{_player}%}-1
  89. set {czas} to {buildTimer.%{_player}%}
  90. set block at {_block} to sign:6
  91. set line 1 of block at {_block} to "&7[&%{_c}%&l%{_name}%&7]"
  92. set line 2 of block at {_block} to "&8&lIn Construction"
  93. set line 3 of block at {_block} to "&8&lTime Left:"
  94. set line 4 of block at {_block} to "&c%{czas}% seconds"
  95. set block at {_block} to sign:6
  96. set line 1 of block at {_block} to "&7[&%{_c}%&l%{_name}%&7]"
  97. set line 2 of block at {_block} to ""
  98. set line 3 of block at {_block} to "&2&lCompleted!"
  99. set line 4 of block at {_block} to "&7Right Click"
  100. set {buildTime.%{_player}%} to true
  101. set {buildOwner.%{_player}%} to false
  102. function woolCoast(player: player,block: location):
  103. 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
  104. play raw sound "note.bassattack" at {_player} with pitch 1 volume 1
  105. send "&7[&6IslePvPbuildings&7] &6>> &cYou dont have enough items yet!" to {_player}
  106.  
  107. on rightclick on wool:
  108. if "%world of player%" is "islepvp":
  109. if {buildTime.%player%} is true:
  110. if block below event-block is anvil:
  111. if event-block is yellow wool:
  112. 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":
  113. if block 3 below event-block is gold block:
  114. if player has 1 diamond:
  115. remove 1 diamond from player's inventory
  116. remove 1 of player's held item from player's inventory
  117. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  118. woolBuild(player,"Farm I",event-block,"b")
  119. else:
  120. woolCoast(player,event-block)
  121. else:
  122. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  123. else:
  124. 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
  125. play raw sound "note.hat" at player with pitch 1 volume 1
  126. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &eFarm &ahere!"
  127. if event-block is gray wool:
  128. 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":
  129. if block 3 below event-block is gold block:
  130. if player has 1 diamond:
  131. remove 1 diamond from player's inventory
  132. remove 1 of player's held item from player's inventory
  133. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  134. woolBuild(player,"Mine I",event-block,"b")
  135. else:
  136. woolCoast(player,event-block)
  137. else:
  138. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  139. else:
  140. 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
  141. play raw sound "note.hat" at player with pitch 1 volume 1
  142. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &8Mine &ahere!"
  143. if event-block is white wool:
  144. 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":
  145. if block 3 below event-block is gold block:
  146. if player has 1 diamond:
  147. remove 1 diamond from player's inventory
  148. remove 1 of player's held item from player's inventory
  149. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  150. woolBuild(player,"House I",event-block,"b")
  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 &fHouse &ahere!"
  159. if event-block is brown wool:
  160. 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":
  161. if block 3 below event-block is gold block:
  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,"Lumber Mill I",event-block,"b")
  167. else:
  168. woolCoast(player,event-block)
  169. else:
  170. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  171. else:
  172. 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
  173. play raw sound "note.hat" at player with pitch 1 volume 1
  174. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &6Lumber Mill &ahere!"
  175. if event-block is cyan wool:
  176. 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":
  177. if block 3 below event-block is gold block:
  178. if player has 1 diamond:
  179. remove 1 diamond from player's inventory
  180. remove 1 of player's held item from player's inventory
  181. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  182. woolBuild(player,"Docks I",event-block,"b")
  183. else:
  184. woolCoast(player,event-block)
  185. else:
  186. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  187. else:
  188. 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
  189. play raw sound "note.hat" at player with pitch 1 volume 1
  190. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &3Docks &ahere!"
  191. if event-block is light blue wool:
  192. 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":
  193. if block 2 below event-block is spruce slab:9:
  194. if player has 1 diamond:
  195. remove 1 diamond from player's inventory
  196. remove 1 of player's held item from player's inventory
  197. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  198. woolBuild(player,"Ship I",event-block,"b")
  199. else:
  200. woolCoast(player,event-block)
  201. else:
  202. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  203. else:
  204. 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
  205. play raw sound "note.hat" at player with pitch 1 volume 1
  206. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &bShip &ahere!"
  207. if event-block is light gray wool:
  208. 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":
  209. if block 3 below event-block is gold block:
  210. if player has 1 diamond:
  211. remove 1 diamond from player's inventory
  212. remove 1 of player's held item from player's inventory
  213. play raw sound "random.anvil_use" at player with pitch 1 volume 1
  214. woolBuild(player,"Forge I",event-block,"b")
  215. else:
  216. woolCoast(player,event-block)
  217. else:
  218. send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
  219. else:
  220. 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
  221. play raw sound "note.hat" at player with pitch 1 volume 1
  222. send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &7Forge &ahere!"
  223. else:
  224. 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
  225. play raw sound "note.bassattack" at player with pitch 1 volume 1
  226. send "&7[&6IslePvPbuildings&7] &6>> &cYou can't have two constructions being built at the same time."
  227.  
  228. function signBuild(player: player,loc: location,name: text,schematic: text,level: number): #signBuild(player,{loc},NazwaBudynku,NazwaSchematu,PoziomSchematu)
  229. paste schematic "%{_schematic}%" at {_loc}
  230. wait 2 ticks
  231. send "&7[&6IslePvPbuildings&7] &7&l%{_name}% I &7has been built!" to {_player}
  232. broadcast "&7[&6IslePvPbuildings&7] &a%{_player}% &7has just built &7&l%{_name}% &7level &a%{_level}%"
  233.  
  234. on rightclick on sign:
  235. if "%world of player%" is "islepvp":
  236. if line 2 is "&8&lIn Construction":
  237. play raw sound "note.bassattack" at player with pitch 1 volume 1
  238. send "&7[&6IslePvPbuildings&7] &cPlease wait... Structure is still building"
  239. else if line 3 is "&2&lCompleted!":
  240. set {loc} to location of event-block
  241. set event-block to air
  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 "&7[&b&lFarm I&7]":
  246. signBuild(player,{loc},"Farm I","farm1",1)
  247. if line 1 is "&7[&b&lMine I&7]":
  248. signBuild(player,{loc},"Mine I","mine1",1)
  249. if line 1 is "&7[&b&lHouse I&7]":
  250. signBuild(player,{loc},"House I","house1",1)
  251. if line 1 is "&7[&b&lLumber Mill I&7]":
  252. signBuild(player,{loc},"Lumber Mill I","lumber1",1)
  253. if line 1 is "&7[&b&lDocks I&7]":
  254. signBuild(player,{loc},"Docks I","docks1",1)
  255. if line 1 is "&7[&b&lShip I&7]":
  256. signBuild(player,{loc},"Ship I","ship1",1)
  257. if line 1 is "&7[&b&lForge I&7]":
  258. signBuild(player,{loc},"Forge I","forge1",1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement