Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- {ctf.%player%.active}=0
- {ctf.%player%.team}=1 #2 is red, 3 is blue
- {ctf.red.players}=0
- {ctf.blue.players}=0
- {ctf.red.hasflag}=0
- {ctf.blue.hasflag}=0
- {ctf.game.open}=0
- {ctf.red.taken}=0
- {ctf.blue.taken}=0
- command /ctf:
- trigger:
- broadcast "Capture the Flag game starting now! Type /ctfjoin to join!"
- set {ctf.game.open} to 1
- command /reset:
- trigger:
- set {ctf.red.players} to 0
- set {ctf.blue.players} to 0
- set {ctf.red.taken} to 0
- set {ctf.blue.taken} to 0
- command /ctfjoin:
- trigger:
- broadcast "Someone just joined the CTF game going on!"
- set {ctf.%player%.active} to 1
- if {ctf.blue.players} is less than {ctf.red.players}:
- send "You are on the BLUE team." to player
- make player execute command "/mvtp ctfstuff"
- add 1 to {ctf.blue.players}
- set {ctf.%player%.team} to 3
- if {ctf.blue.players} is more than {ctf.red.players}:
- send "You are on the RED team." to player
- make player execute command "/mvtp ctfstuff"
- add 1 to {ctf.red.players}
- set {ctf.%player%.team} to 2
- if {ctf.blue.players} is equal to {ctf.red.players}:
- chance of 50%:
- send "You are on the RED team." to player
- make player execute command "/mvtp ctfstuff"
- add 1 to {ctf.red.players}
- set {ctf.%player%.team} to 2
- else:
- send "You are on the BLUE team." to player
- make player execute command "/mvtp ctfstuff"
- add 1 to {ctf.blue.players}
- set {ctf.%player%.team} to 3
- make player execute command "/mvconfirm"
- give 1 282 to the player
- give 1 282 to the player
- give 1 282 to the player
- give 1 282 to the player
- give 1 276 to the player
- give 1 261 to the player
- equip the player with 306
- equip the player with 307
- equip the player with 308
- equip the player with 309
- give 1 257 to the player
- command /ctfleave:
- trigger:
- broadcast "Someone just left the CTF game!"
- set {ctf.%player%.active} to 0
- if {ctf.%player%.team} is equal to 3:
- set {ctf.%player%.team} to 1
- add -1 to {ctf.blue.players}
- else:
- set {ctf.%player%.team} to 1
- add -1 to {ctf.red.players}
- if {ctf.red.hasflag} is equal to player:
- set {ctf.red.hasflag} to 0
- broadcast "%player% no longer has the Red team's flag!"
- if {ctf.blue.hasflag} is equal to player:
- set {ctf.blue.hasflag} to 0
- broadcast "%player% no longer has the Blue team's flag!"
- clear the player's inventory
- make player execute command "/spawn"
- command /triggerwinblue <player>:
- executable by: console
- trigger:
- broadcast "THIS IS A TEST"
- if {ctf.red.hasflag} is equal to player:
- equip the player with 306
- if {ctf.%player%.team} is equal to 3:
- broadcast "Blue wins this game!"
- loop all players:
- if {ctf.%loop-player%.active} is equal to 1:
- if {ctf.%loop-player%.team} is equal to 3:
- add 90 to {karma.%player%.combat}
- else:
- add -20 to {karma.%loop-player%.combat}
- make loop-player execute command "/ci"
- make loop-player execute command "/spawn"
- set {ctf.%loop-player%.active} to 0
- set {ctf.%loop-player%.team} to 1
- set {ctf.game.open} to 0
- set {ctf.red.players} to 0
- set {ctf.blue.players} to 0
- set {ctf.red.taken} to 0
- set {ctf.blue.taken} to 0
- command /triggerwinred <player>:
- executable by: console
- trigger:
- broadcast "THIS IS A TEST"
- if {ctf.blue.hasflag} is equal to player:
- equip player with 306
- if {ctf.%player%.team} is equal to 2:
- broadcast "Red wins this game!"
- loop all players:
- if {ctf.%loop-player%.active} is equal to 1:
- if {ctf.%loop-player%.team} is equal to 2:
- add 90 to {karma.%player%.combat}
- else:
- add -20 to {karma.%player%.combat}
- make loop-player execute command "/ci"
- make loop-player execute command "/spawn"
- set {ctf.%loop-player%.active} to 0
- set {ctf.%loop-player%.team} to 1
- set {ctf.game.open} to 0
- set {ctf.red.players} to 0
- set {ctf.blue.players} to 0
- set {ctf.red.taken} to 0
- set {ctf.blue.taken} to 0
- on break of 87:
- if {ctf.%player%.active} is equal to 1:
- if {ctf.red.taken} is equal to 1:
- cancel event
- exit trigger
- if {ctf.%player%.team} is equal to 3:
- broadcast "%player% is carrying the Red team's flag!"
- set {ctf.red.hasflag} to player
- set {ctf.red.taken} to 1
- set player's helmet to 73
- cancel event
- on break of 21:
- if {ctf.%player%.active} is equal to 1:
- if {ctf.blue.taken} is equal to 1:
- cancel event
- exit trigger
- if {ctf.%player%.team} is equal to 2:
- broadcast "%player% is carrying the Blue team's flag!"
- set player's helmet to 21
- set {ctf.blue.hasflag} to player
- set {ctf.blue.taken} to 1
- cancel event
- on death of player:
- if {ctf.%player%.active} is equal to 1:
- clear drops
- make player execute command "/mvtp ctfstuff"
- if {ctf.red.hasflag} is equal to player:
- set {ctf.red.hasflag} to 0
- set {ctf.red.taken} to 0
- if {ctf.blue.hasflag} is equal to player:
- set {ctf.blue.hasflag} to 0
- set {ctf.blue.taken} to 0
- on break of 22:
- if {ctf.%player%.active} is equal to 1:
- cancel event
- on break of 87:
- if {ctf.%player%.active} is equal to 1:
- cancel event
- on break of 1:
- if {ctf.%player%.active} is equal to 1:
- cancel event
- on break of 89:
- if {ctf.%player%.active} is equal to 1:
- cancel event
- on break of 65:
- if {ctf.%player%.active} is equal to 1:
- cancel event
- command /jump:
- trigger:
- if {ctf.%player%.active} is equal to 0:
- teleport player to targeted block
Advertisement