Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- {duelaccept::%player%} = "True"
- {arenaused} = "False"
- {kills::%player%} = 0
- {deaths::%player%} = 0
- command /duel [<player>]:
- trigger:
- if arg 1 is not set:
- send "&8(&2Duels&8) &cCorrect Usage: /duel <player>"
- stop
- if arg 1 is set:
- if {ingame::%player%} is "True":
- send "&8(&2Duels&8) &aYou cannot request a duel because you are in a game"
- stop
- if {duelaccept::%arg 1%} is "True":
- json("%arg-1%","&8(&2Duels&8) &aClick to accept &2%player%'s &aduel request||cmd:/duelaccept %player%")
- send "&8(&2Duels&8) &aSuccesfully sent a duel request to &2%arg 1%" to player
- command /duelaccept <player>:
- trigger:
- if {ingame::%player%} is "True":
- send "&8(&2Duels&8) &aYou cannot request a duel because you are in a game"
- stop
- if {arenaused} is "True":
- teleport arg 1 to {arenalobby}
- send "&8(&2Duels&8) &aThe arena is currently being used, wait here until they finish" to player
- send "&8(&2Duels&8) &aThe arena is currently being used, wait here until they finish" to arg 1
- if {arenaused} is "False":
- set {arenaused} to "True"
- teleport arg 1 to {arenaspawn1}
- teleport player to {arenaspawn2}
- add 2 to {arenaplayers}
- add arg 1 to {arenausers::*}
- add player to {arenausers::*}
- set {player2} to player
- set {player1} to arg 1
- set {ingame::%player%} to "True"
- set {ingame::%arg 1%} to "True"
- set {gamestarting::%player%} to "True"
- set {gamestarting::%arg 1%} to "True"
- send "&8(&2Duels&8) &aThe game will start in &25 &aseconds" to arg 1
- send "&8(&2Duels&8) &aThe game will start in &25 &aseconds" to player
- wait 1 second
- send "&8(&2Duels&8) &aThe game will start in &24 &aseconds" to arg 1
- send "&8(&2Duels&8) &aThe game will start in &24 &aseconds" to player
- wait 1 second
- send "&8(&2Duels&8) &aThe game will start in &23 &aseconds" to arg 1
- send "&8(&2Duels&8) &aThe game will start in &23 &aseconds" to player
- wait 1 second
- send "&8(&2Duels&8) &aThe game will start in &22 &aseconds" to arg 1
- send "&8(&2Duels&8) &aThe game will start in &22 &aseconds" to player
- wait 1 second
- send "&8(&2Duels&8) &aThe game will start in &21 &asecond" to arg 1
- send "&8(&2Duels&8) &aThe game will start in &21 &asecond" to player
- wait 1 second
- send "&8(&2Duels&8) &aThe game has started" to arg 1
- send "&8(&2Duels&8) &aThe game has started" to player
- set {gamestarting::%player%} to "False"
- set {gamestarting::%arg 1%} to "False"
- on death:
- if victim is a player:
- if attacker is a player:
- remove 1 from {arenaplayers}
- remove victim from {arenausers::*}
- set {ingame::%Victim%} to "False"
- add 1 to {kills::%attacker%}
- add 1 to {death::%victim%}
- clear drops
- command /test:
- trigger:
- send "%{arenausers::*}%"
- command /resetarena:
- trigger:
- set {arenaused} to "False"
- delete {arenausers::*}
- delete {arenaplayers}
- every tick:
- loop all players:
- if {arenaused} is "True":
- if {arenaplayers} is less than 2:
- broadcast "&8(&2Duels&8) &2%{arenausers::*}% &Ahas won the duel"
- delete {arenausers::*}
- delete {arenaplayers}
- delete {player1}
- delete {player2}
- teleport loop-player to {lobby}
- set {arenaused} to "False"
- set {ingame::%loop-player%} to "False"
- on any movement:
- if {gamestarting::%player%} is "True":
- cancel event
- send "&8(&2Duels&8) &aYou cannot move while the game is starting"
- command /arena [<text>]:
- permission: arena.set
- trigger:
- if arg 1 is "setspawn1":
- set {arenaspawn1} to location of player
- send "&8(&2Duels&8) &aSet arena spawn point 1 to your location"
- if arg 1 is "setspawn2":
- set {arenaspawn2} to location of player
- send "&8(&2Duels&8) &aSet arena spawn point 2 to your location"
- if arg 1 is "arenalobby":
- set {arenalobby} to location of player
- send "&8(&2Duels&8) &aSet arena lobby to your location"
- every second:
- loop all players:
- if {ingame::%loop-player%} is "True":
- set {_now} to "%now%"
- wipe loop-player's sidebar
- set name of sidebar of loop-player to "&e&lDUELS"
- set score "&7%{_now}%" in sidebar of loop-player to 7
- set score "&a" in sidebar of loop-player to 6
- set score "&e%{player1}% &a%health of {player1}% &c&l❤" in sidebar of loop-player to 5
- set score "&e%{player2}% &a%health of {player2}% &c&l❤" in sidebar of loop-player to 4
- set score "&2" in sidebar of loop-player to 3
- set score "&fMap: &aHigh Vally" in sidebar of loop-player to 2
- set score "&6" in sidebar of loop-player to 1
- if {ingame::%loop-player%} is "False":
- set {_now} to "%now%"
- wipe loop-player's sidebar
- set name of sidebar of loop-player to "&e&lDUELS LOBBY"
- set score " &7%{_now}%" in sidebar of loop-player to 5
- set score "&a" in sidebar of loop-player to 4
- set score " &fKills: &a%{kills::%loop-player%}%" in sidebar of loop-player to 3
- set score " &fDeaths: &a%{deaths::%loop-player%}%" in sidebar of loop-player to 2
- set score "&6" in sidebar of loop-player to 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement