Advertisement
AdamLam

Untitled

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