blueking: type: Assignment Interact scripts: - 1 killtheking actions: on death: - if == "" { - execute as_server "eco give 25" - Announce " has killed the Blue teams' king!" } - if == "" { - execute as_server "eco give 25" - Announce " has killed the Blue teams' king!" } - announce "Red has won the game!" - flag global "matchon:false" - foreach { - if <%value%.flag[team]> == "red" execute as_server "eco give <%value%.name> 25" - execute as_server "warp lobby <%value%.name>" } - execute as_server "npc select 13" - execute as_server "npc despawn" - flag global "lobby:true" duration:20 redking: type: Assignment Interact scripts: - 1 killtheking actions: on death: - if == "" { - execute as_server "eco give 25" - Announce " has killed the Red teams' king!" - if == "" { - execute as_server "eco give 25" - Announce " has killed the Red teams' king!" - announce "Blue has won the game!" - flag global "matchon:false" - foreach { - if <%value%.flag[team]> == "blue" execute as_server "eco give <%value%.name> 25" - execute as_server "warp lobby <%value%.name>" } - execute as_server "npc select 14" - execute as_server "npc despawn" - flag global "lobby:true" duration:20 gamemgmt: type: world debug: true events: on blue command: - if determine CANCELLED killtheking: type: world events: on player opens inventory: - run killthekingstart killthekingstart: type: task script: - announce "Kill the King will begin in 10" - wait 1 - announce "Kill the King will begin in 9" - wait 1 - announce "Kill the King will begin in 8" - wait 1 - announce "Kill the King will begin in 7" - wait 1 - announce "Kill the King will begin in 6" - wait 1 - announce "Kill the King will begin in 5" - wait 1 - announce "Kill the King will begin in 4" - wait 1 - announce "Kill the King will begin in 3" - wait 1 - announce "Kill the King will begin in 2" - wait 1 - announce "Kill the King will begin in 1" - wait 1 - foreach { - if == "spectator" { - execute as_server "vanish <%value%.name>" - execute as_server "fly <%value%.name>" - execute as_server "warp center %value%" } - if == "" { - execute as_server "tell <%value%.name> You have not chosen a class, so you have been made a spectator." - flag "team:spectator" } - if == "red" { - execute as_server "warp redspawn <%value%.name>" } else { - execute as_server "warp bluespawn <%value%.name>" } - if <%value%.flag[class]> == "pyro" { - if <%value%.money> >= 100 { - execute as_server "tell <%value%.name> 100 Faction Points have been deducted from your account." - execute as_server "eco take <%value%.name> 100" } else { - flag <%value%> "class:peasant" - execute as_server "tell <%value%.name> You do not have enough Faction Points to play as a Pyro again." } - if <%value%.flag[class]> == "alchemist" { - if <%value%.money> >= 100 { - execute as_server "tell <%value%.name> 100 Faction Points have been deducted from your account." - execute as_server "eco take <%value%.name> 100" } else { - flag <%value%> "class:peasant" - execute as_server "tell <%value%.name> You do not have enough Faction Points to play as an Alchemist again." } - if <%value%.flag[class]> == "paladin" { - if <%value%.money> >= 100 { - execute as_server "tell <%value%.name> 100 Faction Points have been deducted from your account." - execute as_server "eco take <%value%.name> 100" } else { - flag <%value%> "class:peasant" - execute as_server "tell <%value%.name> You do not have enough Faction Points to play as a Holy Paladin again." } - execute as_server "clear <%value%.name> **" - execute as_server "kit <%value%.flag[class]> } - flag global "matchon:true" - execute as_server "npc select 12" - execute as_server "npc spawn" - execute as_server "npc select 14" - execute as_server "npc spawn"