Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /battlebuild <text>:
- trigger:
- if {gameplayer.%player%} is set:
- message "&7[&9Game&7]&f You already joined game %{gameplayer.%player%}%"
- stop
- if arg-1 is not "A":
- message "&7[&cBattleBuild&7]&f This is not a valid Arena"
- stop
- if {battlebuildstart.%arg-1%} is "true":
- message "&7[&cBattleBuild&7]&f This arena is already started!"
- stop
- loop 14 times:
- if {battlebuild.%arg-1%.%loop-number%} is set:
- if loop-number is 14:
- message "&7[&cBattleBuild&7]&f This BattleBuild Arena is Full!"
- stop
- else:
- wipe player sidebar
- add 1 to {battlebuildmember.%arg-1%}
- add player to {battlebuildlistplayer.%arg-1%::*}
- set {gameplayer.%player%} to "battlebuild%arg-1%"
- set {battlebuild.%arg-1%.%loop-number%} to player
- set {gamelocation.%player%} to "battlebuild%arg-1%%loop-number%"
- execute player command "/worldinventorysave talesofmemorybigproject"
- wait 1 ticks
- teleport player to {teleport.%{gamelocation.%player%}%}
- wait 1 ticks
- execute console command "/gmc %player%"
- if {battlebuildmember.%arg-1%} is smaller than 5:
- loop all players:
- loop-player is in world "Game":
- {gameplayer.%loop-player%} is "battlebuild%arg-1%":
- message "%player% Joined the game" to loop-player
- message "&7[&cBattleBuild&7]&f Need %5-{battlebuildmember.%arg-1%}% player more to start the game" to loop-player
- if loop-number is 5:
- loop all players:
- loop-player is in world "Game":
- {gameplayer.%loop-player%} is "battlebuild%arg-1%":
- message "&7[&cBattleBuild&7]&f 10 seconds to start game!" to loop-player
- wait 10 seconds
- if {battlebuildmember.%arg-1%} is smaller than 5:
- loop all players:
- loop-player is in world "Game":
- {gameplayer.%loop-player%} is "battlebuild%arg-1%":
- message "&7[&cBattleBuild&7]&f Game cancelled because not enough player!" to loop-player
- else:
- execute console command "/startbattlebuild %arg-1%"
- exit loop
- command /startbattlebuild <text>:
- permission: buildbattle.admin
- trigger:
- if {battlebuildstart.%arg-1%} is "true":
- message "&7[&cBattleBuild&7]&f This arena is already started!"
- stop
- set {battlebuildstart.%arg-1%} to "true"
- set {_namescore} to "&9&lBattle Build"
- set {_minutes} to 7
- set {_seconds} to 0
- set {_time} to "&6Duration&f&l: &70%{_minutes}%&f:&7%{_seconds}%"
- execute console command "/setthemebattlebuild %arg-1%"
- wait 1 seconds
- loop all players:
- loop-player is in world "Game":
- {gameplayer.%loop-player%} is "battlebuild%arg-1%":
- wipe loop-player sidebar
- message "&7[&cBattleBuild&7]&f Game will end after 7 minutes!" to loop-player
- loop 7 times:
- remove 1 from {_minutes}
- set {_seconds} to 60
- loop 60 times:
- remove 1 from {_seconds}
- set {_time} to "&6Duration&f&l: &70%{_minutes}%&f:&7%{_seconds}%"
- if {_seconds} is less than 10:
- set {_time} to "&6Duration&f&l: &70%{_minutes}%&f:&70%{_seconds}%"
- loop all players:
- loop-player is in world "Game":
- {gameplayer.%loop-player%} is "battlebuild%arg-1%":
- if {stopbuild.%arg-1%} is "true":
- wipe loop-player sidebar
- stop
- wipe loop-player sidebar
- set name of sidebar of loop-player to {_namescore}
- set score "&d-=-=-=-=-=-=-=-=-=-=-" in sidebar of loop-player to 8
- set score "&f" in sidebar of loop-player to 7
- set score "%{themebattlebuild.%arg-1%}%" in sidebar of loop-player to 6
- set score "&f" in sidebar of loop-player to 5
- set score {_time} in sidebar of loop-player to 4
- set score "&f" in sidebar of loop-player to 3
- set score "&3Player&7&l: &a%{battlebuildmember.%arg-1%}%" in sidebar of loop-player to 2
- set score "&f" in sidebar of loop-player to 1
- set score "&btalesofmemory.mcph.co" in sidebar of loop-player to 0
- wait 1 seconds
- loop all players:
- loop-player is in world "Game":
- {gameplayer.%loop-player%} is "battlebuild%arg-1%":
- message "&7[&cBattleBuild&7]&6 End of minigame!" to loop-player
- delete {allowbuild.%loop-player%}
- wait 1 seconds
- loop all players:
- loop-player is in world "Game":
- {gameplayer.%loop-player%} is "battlebuild%arg-1%":
- message "&7[&cBattleBuild&7]&6 Time to Vote!" to loop-player
- wait 2 seconds
- loop 15 times:
- if {battlebuild.%arg-1%.%loop-number%} is set:
- loop all players:
- loop-player is in world "Game":
- {gameplayer.%loop-player%} is "battlebuild%arg-1%":
- teleport loop-player to {teleport.battlebuild%arg-1%%loop-number%}
- message "&6Plot of %{battlebuild.%arg-1%.%loop-number%}%" to loop-player
- if {stopbuild.%arg-1%} is "true":
- wipe loop-player sidebar
- stop
- wipe loop-player sidebar
- set name of sidebar of loop-player to {_namescore}
- set score "&d-=-=-=-=-=-=-=-=-=-=-" in sidebar of loop-player to 8
- set score "&f" in sidebar of loop-player to 7
- set score "%{themebattlebuild.%arg-1%}%" in sidebar of loop-player to 6
- set score "&f" in sidebar of loop-player to 5
- set score "&cOwner&7&l: %{battlebuild.%arg-1%.%loop-number%}%" in sidebar of loop-player to 4
- set score "&f" in sidebar of loop-player to 3
- set score "&3Player&7&l: &a%{battlebuildmember.%arg-1%}%" in sidebar of loop-player to 2
- set score "&f" in sidebar of loop-player to 1
- set score "&btalesofmemory.mcph.co" in sidebar of loop-player to 0
- wait 20 seconds
- loop all players:
- loop-player is in world "Game":
- {gameplayer.%loop-player%} is "battlebuild%arg-1%":
- if {battlebuild.%arg-1%.%loop-number%} is loop-player:
- message "&6All player will vote your plot" to {battlebuild.%arg-1%.%loop-number%}
- else:
- message "&7[&cBattleBuild&7]&f 5 seconds to left to view and then vote this plot" to loop-player
- wait 5 seconds
- loop all players:
- loop-player is in world "Game":
- {gameplayer.%loop-player%} is "battlebuild%arg-1%":
- {battlebuild.%arg-1%.%loop-number%} is not loop-player:
- execute loop-player command "/battlebuildvotearena %arg-1% %loop-number% battlebuildvotearena"
- wait 5 seconds
- set {_winner} to "<None>"
- set {_winnerpoint} to 0
- set {_winnerlocation} to "<None>"
- loop 15 times:
- if {_winnerpoint} is greater than {battlebuildpoint.%arg-1%.%loop-number%}:
- set {_winner} to {_winner}
- set {_winnerpoint} to {_winnerpoint}
- set {_winnerlocation} to {_winnerlocation}
- else if {_winnerpoint} is smaller than {battlebuildpoint.%arg-1%.%loop-number%}:
- set {_winner} to {battlebuild.%arg-1%.%loop-number%}
- set {_winnerpoint} to {battlebuildpoint.%arg-1%.%loop-number%}
- set {_winnerlocation} to "battlebuild%arg-1%%loop-number%"
- else:
- chance of 50%:
- set {_winner} to {battlebuild.%arg-1%.%loop-number%}
- set {_winnerpoint} to {battlebuildpoint.%arg-1%.%loop-number%}
- set {_winnerlocation} to "battlebuild%arg-1%%loop-number%"
- loop all players:
- loop-player is in world "Game":
- {gameplayer.%loop-player%} is "battlebuild%arg-1%":
- teleport loop-player to {teleport.%{_winnerlocation}%}
- wait 1 seconds
- message "&7[&cBattleBuild&7]&f player &6%{_winner}%&f has won BattleBuild!" to all players
- message "&7You get %{battlebuildmember.%arg-1%}% Point Battlebuild!" to {_winner}
- add {battlebuildmember.%arg-1%} to {minigamepoint.%{_winner}%}
- wait 10 seconds
- loop all players:
- loop-player is in world "Game":
- {gameplayer.%loop-player%} is "battlebuild%arg-1%":
- wipe loop-player sidebar
- execute player command "/scoreboard digitalscoreboardtom"
- execute console command "/purgebattlebuild A"
Advertisement
Add Comment
Please, Sign In to add comment