Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # _ ___ ___
- # | | |___
- # |_ | |
- #
- options:
- pref: &c[CTF]
- flag: red wool or blue wool
- on skript start:
- set {redfwand} to stick with name "&cRed Flag"
- set {bluefwand} to stick with name "&3Blue Flag"
- set {redswand} to stick with name "&cRed Spawn"
- set {blueswand} to stick with name "&3Blue Spawn &7(This one last)"
- set {lspawnwand} to stick with name "&7Lobby Spawn"
- on join:
- wait 1 tick
- set {team.%player%} to "lobby"
- teleport player to {ls.loc}
- set the player's display name to "&7%name of player%&f"
- set the player's tablist name to "&7%name of player%&f"
- clear inventory of player
- command /test <number>:
- trigger:
- if arg-1 is 1:
- if block at {crf.loc} is red wool:
- broadcast "yes"
- else:
- broadcast "no"
- if arg-1 is 2:
- set block at {crf.loc} to red wool
- if arg-1 is 3:
- set block at {rf.loc} to red wool
- command /ctf <text> [<text>]:
- trigger:
- if arg-1 is "help":
- message "{@pref} Here are the options for this command!"
- message "{@pref} /ctf help (This command)"
- message "{@pref} /ctf setup (To setup the arena)"
- message "{@pref} /ctf start (to start the game if it has not done so already)"
- if arg-1 is "setup":
- clear inventory of player
- add {redfwand} to player
- add {redswand} to player
- add {bluefwand} to player
- add {blueswand} to player
- if arg-1 is "join":
- if arg-2 is "red":
- set {team.%player%} to "red"
- set the player's display name to "&c[R] %name of player%&f"
- set the player's tablist name to "&c[R] %name of player%&f"
- kill player
- if arg-2 is "blue":
- set {team.%player%} to "blue"
- set the player's display name to "&9[B] %name of player%&f"
- set the player's tablist name to "&9[B] %name of player%&f"
- kill player
- if arg-1 is "leave":
- set {team.%player%} to "lobby"
- teleport player to {ls.loc}
- set the player's display name to "&7%name of player%&f"
- set the player's tablist name to "&7%name of player%&f"
- clear inventory of player
- on respawn:
- add a wooden sword to player
- set helmet of player to leather helmet
- set chestplate of player to leather chestplate
- set boots of player to iron boots
- set legs of player to iron leggings
- add a shears to player
- if {team.%player%} is "red":
- teleport player to {rs.loc}
- dye player's helmet red
- dye player's chestplate red
- if {team.%player%} is "blue":
- teleport player to {bs.loc}
- dye player's helmet blue
- dye player's chestplate blue
- on drop:
- message "{@pref} You may not drop items!"
- cancel event
- on death:
- set {dloc.%player%} to location of player
- if drops is {@flag}:
- if drops is red wool:
- broadcast "{@pref} &1%player%&f has dropped the Red flag!"
- set {crf.loc} to {dloc.%player%}
- set block at {crf.loc} to red wool
- if drops is blue wool:
- broadcast "{@pref} &4%player%&f has dropped the Blue flag!"
- set {cbf.loc} to {dloc.%player%}
- set block at {cbf.loc} to blue wool
- clear drops
- on rightclick:
- if player is holding {redfwand}:
- set {rf.loc} to location of clicked block
- message "{@pref} Red Flag location set"
- set clicked block to red wool
- if player is holding {redswand}:
- set {rs.loc} to block above clicked block
- message "{@pref} Red spawn location set"
- if player is holding {bluefwand}:
- set {bf.loc} to location of clicked block
- message "{@pref} Blue Flag location set"
- set clicked block to blue wool
- if player is holding {blueswand}:
- set {bs.loc} to block above clicked block
- message "{@pref} Blue spawn location set"
- clear inventory of player
- add {lspawnwand} to player
- if player is holding {lspawnwand}:
- set {ls.loc} to block above clicked block
- message "{@pref} Lobby spawn location set"
- clear inventory of player
- every 40 ticks:
- loop players:
- if loop-player is holding blue wool:
- set {cbf.loc} to loop-player's location
- if loop-player is holding red wool:
- set {crf.loc} to loop-player's location
- if block at {rf.loc} is not red wool:
- launch ball large coloured red at {crf.loc} with duration 1
- if block at {bf.loc} is not blue wool:
- launch ball large coloured blue at {cbf.loc} with duration 1
- on break of red wool or blue wool:
- if block is red wool:
- if {team.%player%} is "red":
- if location is {crf.loc}:
- set block at {rf.loc} to red wool
- if location is {rf.loc}:
- message "{@pref} You cant break your own flag."
- cancel event
- if {team.%player%} is "blue":
- if location is {rf.loc} or {crf.loc}:
- clear inventory of player
- give player 2304 of block
- broadcast "{@pref} %player%&f has the Red flag!"
- if block is blue wool:
- if {team.%player%} is "red":
- clear inventory of player
- give player 2304 of block
- broadcast "{@pref} %player%&f has the Blue flag!"
- if {team.%player%} is "blue":
- cancel event
- message "{@pref} You cant break your own flag."
- #on place:
- # cancel event
- # message "{@pref} You can't place blocks"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement