Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on script load:
- send "&7[&6IslePvPbuildings&7] loaded &asuccessfuly." to console
- on first join:
- set {buildTime.%player%} to true
- command /ipb [<text>] [<text>]:
- permission: ipb.admin
- trigger:
- if arg 1 is "farm1":
- 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
- send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aFarm Schematic&c!"
- stop
- if arg 1 is "mine1":
- 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
- send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aMine Schematic&c!"
- stop
- if arg 1 is "house1":
- 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
- send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aHouse Schematic&c!"
- stop
- if arg 1 is "lumber1":
- 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
- send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aLumber Mill Schematic&c!"
- stop
- if arg 1 is "docks1":
- 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
- send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aDocks Schematic&c!"
- stop
- if arg 1 is "ship1":
- 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
- send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aShip Schematic&c!"
- stop
- if arg 1 is "forge1":
- 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
- send "&7[&6IslePvPbuildings&7] &6>> &cYou received &aForge Schematic&c!"
- stop
- if arg 1 is "list":
- send ""
- send "&c&l>>>>>>>>>> &7[&6IslePvPbuildings&7] &c&l<<<<<<<<<<"
- send "&7/ipb ship1 - First level of Ship"
- send "&7/ipb farm1 - First level of Farm"
- send "&7/ipb mine1 - First level of Mine"
- send "&7/ipb house1 - First level of House"
- send "&7/ipb lumber1 - First level of Lumber"
- send "&7/ipb docks1 - First level of Docks"
- send "&7/ipb docks1 - First level of Ship"
- send "&7/ipb forge1 - First level of Forge"
- send "&7/ipb list - List of available buildings"
- send "&7admin: /ipb <true/false/chceck>"
- send "&7Author: &d&mi&f&lNe&8&lzu&6&lko"
- stop
- if arg 1 is not set:
- send ""
- send "&c&l>>>>>>>>>> &7[&6IslePvPbuildings&7] &c&l<<<<<<<<<<"
- send ""
- send "&7/ipb list- List of available commands."
- send ""
- send "&7Author: &d&mi&f&lNe&8&lzu&6&lko"
- stop
- if arg 1 is "true":
- if arg 2 is set:
- set {buildTime.%arg 2%} to true
- send "&7[&6IslePvPbuildings&7] &6>> &7%arg 2%'s &atrue!"
- else:
- send "&7[&6IslePvPbuildings&7] &6>> &7Arg 2 is empty!"
- if arg 1 is "false":
- if arg 2 is set:
- set {buildTime.%arg 2%} to false
- send "&7[&6IslePvPbuildings&7] &6>> &7%arg 2%'s &cfalse!"
- else:
- send "&7[&6IslePvPbuildings&7] &6>> &7Arg 2 is empty!"
- if arg 1 is "check":
- send "&7[&6IslePvPbuildings&7] &6>> &7 %arg 2% is %{buildTime.%arg 2%}% !"
- function woolBuild(player: player,name: text,loc: location,block: material):
- if {buildTime.%{_player}%} is false:
- set {buildTimeVip.%{_player}%} to false
- send "&7[&6IslePvPbuildings&7] &6>> &7Building &b%{_name}% &7started!" to {_player}
- wait 1 tick
- set block at {_loc} to {_block}
- set line 1 of block at {_loc} to "[%{_name}%]"
- set line 2 of block at {_loc} to "&8&lIn Construction"
- set line 3 of block at {_loc} to "&8&lTime Left:"
- set line 4 of block at {_loc} to "&c%{czas}% seconds"
- set {buildTimeVip.%{_player}%} to false
- set {buildTimerVip.%{_player}%} to 30
- loop 30 times:
- wait 1 ticks
- set {buildTimerVip.%{_player}%} to {buildTimerVip.%{_player}%}-1
- set {czasVip} to {buildTimerVip.%{_player}%}
- set block at {_loc} to {_block}
- set line 1 of block at {_loc} to "[%{_name}%]"
- set line 2 of block at {_loc} to "&8&lIn Construction"
- set line 3 of block at {_loc} to "&8&lTime Left:"
- set line 4 of block at {_loc} to "&c%{czas}% seconds"
- set line 2 of block at {_loc} to ""
- set line 3 of block at {_loc} to "&2&lCompleted!"
- set line 4 of block at {_loc} to "&7Right Click"
- set {buildTimeVip.%{_player}%} to true
- else if {buildTime.%{_player}%} is true:
- set {buildTime.%{_player}%} to false
- send "&7[&6IslePvPbuildings&7] &6>> &7Building &b%{_name}% &7started!" to {_player}
- wait 1 ticks
- set block at {_loc} to {_block}
- set line 1 of block at {_loc} to "[%{_name}%]"
- set line 2 of block at {_loc} to "&8&lIn Construction"
- set line 3 of block at {_loc} to "&8&lTime Left:"
- set line 4 of block at {_loc} to "&c%{czas}% seconds"
- set {buildTime.%{_player}%} to false
- set {buildTimer.%{_player}%} to 30
- loop 30 times:
- wait 1 ticks
- set {buildTimer.%{_player}%} to {buildTimer.%{_player}%}-1
- set {czas} to {buildTimer.%{_player}%}
- set block at {_loc} to {_block}
- set line 1 of block at {_loc} to "[%{_name}%]"
- set line 2 of block at {_loc} to "&8&lIn Construction"
- set line 3 of block at {_loc} to "&8&lTime Left:"
- set line 4 of block at {_loc} to "&c%{czas}% seconds"
- set line 2 of block at {_loc} to ""
- set line 3 of block at {_loc} to "&2&lCompleted!"
- set line 4 of block at {_loc} to "&7Right Click"
- set {buildTime.%{_player}%} to true
- function woolCoast(player: player,block: location):
- 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
- play raw sound "note.bassattack" at {_player} with pitch 1 volume 1
- send "&7[&6IslePvPbuildings&7] &6>> &cYou dont have enough items yet!" to {_player}
- on rightclick on wool:
- if "%world of player%" is "islepvp":
- if block below event-block is anvil:
- if {buildTimeVip.%player%} is not set:
- set {buildTimeVip.%player%} to true
- if {buildTime.%player%} is not set:
- set {buildTime.%player%} to true
- if {buildTime.%player%} or {buildTimeVip.%player%} are true:
- if event-block is yellow wool:
- 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":
- if block 3 below event-block is gold block:
- if player has 1 diamond:
- remove 1 diamond from player's inventory
- remove 1 of player's held item from player's inventory
- play raw sound "random.anvil_use" at player with pitch 1 volume 1
- woolBuild(player,"Farm I",location of event-block,sign:9)
- stop
- else:
- woolCoast(player,event-block)
- else:
- send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
- else:
- 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
- play raw sound "note.hat" at player with pitch 1 volume 1
- send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &eFarm &ahere!"
- if event-block is gray wool:
- 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":
- if block 3 below event-block is gold block:
- if player has 1 diamond:
- remove 1 diamond from player's inventory
- remove 1 of player's held item from player's inventory
- play raw sound "random.anvil_use" at player with pitch 1 volume 1
- woolBuild(player,"Mine I",location of event-block,sign:9)
- stop
- else:
- woolCoast(player,event-block)
- else:
- send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
- else:
- 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
- play raw sound "note.hat" at player with pitch 1 volume 1
- send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &8Mine &ahere!"
- if event-block is white wool:
- 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":
- if block 3 below event-block is gold block:
- if player has 1 diamond:
- remove 1 diamond from player's inventory
- remove 1 of player's held item from player's inventory
- play raw sound "random.anvil_use" at player with pitch 1 volume 1
- woolBuild(player,"House I",location of event-block,sign:9)
- stop
- else:
- woolCoast(player,event-block)
- else:
- send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
- else:
- 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
- play raw sound "note.hat" at player with pitch 1 volume 1
- send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &fHouse &ahere!"
- if event-block is brown wool:
- 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":
- if block 3 below event-block is gold block:
- if player has 1 diamond:
- remove 1 diamond from player's inventory
- remove 1 of player's held item from player's inventory
- play raw sound "random.anvil_use" at player with pitch 1 volume 1
- woolBuild(player,"Lumber Mill I",location of event-block,sign:9)
- stop
- else:
- woolCoast(player,event-block)
- else:
- send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
- else:
- 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
- play raw sound "note.hat" at player with pitch 1 volume 1
- send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &6Lumber Mill &ahere!"
- if event-block is cyan wool:
- 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":
- if block 3 below event-block is gold block:
- if player has 1 diamond:
- remove 1 diamond from player's inventory
- remove 1 of player's held item from player's inventory
- play raw sound "random.anvil_use" at player with pitch 1 volume 1
- woolBuild(player,"Docks I",location of event-block,sign:9)
- stop
- else:
- woolCoast(player,event-block)
- else:
- send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
- else:
- 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
- play raw sound "note.hat" at player with pitch 1 volume 1
- send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &3Docks &ahere!"
- if event-block is light blue wool:
- 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":
- if block 2 below event-block is spruce slab:9:
- if player has 1 diamond:
- remove 1 diamond from player's inventory
- remove 1 of player's held item from player's inventory
- play raw sound "random.anvil_use" at player with pitch 1 volume 1
- woolBuild(player,"Ship I",location of event-block,sign:9)
- stop
- else:
- woolCoast(player,event-block)
- else:
- send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
- else:
- 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
- play raw sound "note.hat" at player with pitch 1 volume 1
- send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &bShip &ahere!"
- if event-block is light gray wool:
- 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":
- if block 3 below event-block is gold block:
- if player has 1 diamond:
- remove 1 diamond from player's inventory
- remove 1 of player's held item from player's inventory
- play raw sound "random.anvil_use" at player with pitch 1 volume 1
- woolBuild(player,"Forge I",location of event-block,sign:9)
- stop
- else:
- woolCoast(player,event-block)
- else:
- send "&cError! Contact Administrator as soon as possible. Visit our Discord to do so!"
- else:
- 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
- play raw sound "note.hat" at player with pitch 1 volume 1
- send "&7[&6IslePvPbuildings&7] &6>> &aYou can build &7Forge &ahere!"
- else:
- 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
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&7[&6IslePvPbuildings&7] &6>> &cYou can't have two constructions being built at the same time."
- function signBuild(player: player,loc: location,name: text,schematic: text):
- paste schematic "%{_schematic}%" at {_loc}
- wait 2 ticks
- send "&7[&6IslePvPbuildings&7] &7&l%{_name}% &7has been built!" to {_player}
- broadcast "&7[&6IslePvPbuildings&7] &a%{_player}% &7has just built &7&l%{_name}%"
- on rightclick on sign:
- if "%world of player%" is "islepvp":
- if line 2 is "&8&lIn Construction":
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&7[&6IslePvPbuildings&7] &cPlease wait... Structure is still building"
- else if line 3 is "&2&lCompleted!":
- set {loc} to location of block 1 up event-block
- 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
- play raw sound "random.anvil_land" at player with pitch 1 volume 1
- if line 1 is "[Farm I]":
- signBuild(player,{loc},"Farm I","farm1")
- else if line 1 is "[Mine I]":
- signBuild(player,{loc},"Mine I","mine1")
- else if line 1 is "[House I]":
- signBuild(player,{loc},"House I","house1")
- else if line 1 is "[Lumber Mill I]":
- signBuild(player,{loc},"Lumber Mill I","lumber1")
- else if line 1 is "[Docks I]":
- signBuild(player,{loc},"Docks I","docks1")
- else if line 1 is "[Ship I]":
- signBuild(player,{loc},"Ship I","ship1")
- else if line 1 is "[Forge I]":
- signBuild(player,{loc},"Forge I","forge1")
- set event-block to air
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement