Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Commands and options
- options:
- #------------------------------------------------------------------------------------#
- #Change the color codes for the prefixes.
- prefix: &f[&cSimpleFFA&f]&c
- #------------------------------------------------------------------------------------#
- #DO NOT ENABLE THIS, JUST GETS SPAMMY
- dev-mode: false
- #------------------------------------------------------------------------------------#
- #The world for the game to take place in. Still making some optimizations
- world: ffa
- #------------------------------------------------------------------------------------#
- #Permission for players to create spawns.
- permission: {@variable-starter}.admin
- #------------------------------------------------------------------------------------#
- #You know what, here. Just incase you're picky about your variables.
- variable-starter: mce
- #Please don't edit this. It'll just turn out bad for everyone. Just no.
- variables:
- {{@variable-starter}.ffav2.locations.spawnpoints} = 0
- command /ffa [<text>]:
- trigger:
- if {@dev-mode} is true:
- if player doesn't have permission "{@permission}":
- message "{@prefix} The FFA is in dev mode. Please wait for it to re-open."
- if arg 1 doesn't exist:
- make player execute "ffa join"
- stop
- if {{@variable-starter}.ffav2.playing.%player%} is true:
- message "{@prefix} You are already playing!"
- stop
- if arg 1 is equal to "join" or "enter" or "play":
- if {{@variable-starter}.ffav2.players.%player%} is true:
- message "{@prefix} You are already playing FFA! Leave with &e/ffa leave"
- stop
- message "{@prefix} Joining FFA"
- make console execute "ffainfo save %player%"
- set {{@variable-starter}.ffav2.players.%player%} to true
- give player an iron sword
- give player a bow
- give player 10 mushroom soup
- give player 10 arrows
- equip player with all iron armor
- set {_spawn} to a random integer between 1 and {{@variable-starter}.ffav2.locations.spawnpoints}
- teleport player to {{@variable-starter}.ffav2.locations.spawnpoint::%{_spawn}%}
- broadcast "{@prefix} %player% joined the FFA game!"
- heal the player
- console execute command "/scoreboard objectives add FFA playerKillCount &aFFA &bArena &cKills"
- console execute command "/scoreboard objectives add FFA deathCount &aFFA &bArena &cDeaths"
- console execute command "/scoreboard setdisplay sidebar FFA"
- if arg 1 is equal to "leave" or "exit":
- if {{@variable-starter}.ffav2.players.%player%} doesn't exist:
- message "{@prefix} You are not in the FFA game!"
- stop
- message "{@prefix} Leaving FFA."
- make console execute "ffainfo restore %player%"
- delete {{@variable-starter}.ffav2.players.%player%}
- delete {{@variable-starter}.ffav2.kills.%player%}
- command /ffainfo <text> <player>:
- executable by: console
- trigger:
- if arg 1 is equal to "save":
- set {{@variable-starter}.ffav2.armor.helmet.%arg 2%} to "%helmet of arg 2%"
- set {{@variable-starter}.ffav2.armor.chestplate.%arg 2%} to "%chestplate of arg 2%"
- set {{@variable-starter}.ffav2.armor.legging.%arg 2%} to "%legging of arg 2%"
- set {{@variable-starter}.ffav2.armor.boots.%arg 2%} to "%boots of arg 2%"
- if arg 2's gamemode is creative:
- set {{@variable-starter}.ffav2.gamemode.%arg 2%} to true
- set arg 2's gamemode to survival
- equip arg 2 with all air
- set {{@variable-starter}.ffav2.inventory.%arg 2%} to serialized inventory of arg 2
- set {{@variable-starter}.ffav2.locations.lastloc.%arg 2%} to location of arg 2
- clear arg 2's inventory
- stop
- if arg 1 is equal to "restore":
- clear arg 2's inventory
- equip arg 2 with {{@variable-starter}.ffav2.armor.helmet.%arg 2%} parsed as item
- equip arg 2 with {{@variable-starter}.ffav2.armor.chestplate.%arg 2%} parsed as item
- equip arg 2 with {{@variable-starter}.ffav2.armor.legging.%arg 2%} parsed as item
- equip arg 2 with {{@variable-starter}.ffav2.armor.boots.%arg 2%} parsed as item
- restore inventory of arg 2 to {{@variable-starter}.ffav2.inventory.%arg 2%}
- teleport arg 2 to {{@variable-starter}.ffav2.locations.lastloc.%arg 2%}
- delete {{@variable-starter}.ffav2.armor.helmet.%arg 2%}
- delete {{@variable-starter}.ffav2.armor.chestplate.%arg 2%}
- delete {{@variable-starter}.ffav2.armor.legging.%arg 2%}
- delete {{@variable-starter}.ffav2.armor.boots.%arg 2%}
- delete {{@variable-starter}.ffav2.inventory.%arg 2%}
- delete {{@variable-starter}.ffav2.lastloc.%arg 2%}
- if {{@variable-starter}.ffav2.gamemode.%arg 2%} is true:
- set player's gamemode to creative
- delete {{@variable-starter}.ffav2.gamemode.%arg 2%}
- stop
- command /ffadmin <text>:
- permission: {@permission}
- trigger:
- if arg 1 is equal to "setspawn" or "addspawn":
- if {{@variable-starter}.ffav2.locations.spawnpoints} is not set:
- set {{@variable-starter}.ffav2.locations.spawnpoints} to 0
- if {{@variable-starter}.ffav2.locations.spawnpoints} doesn't exist:
- set {{@variable-starter}.ffav2.locations.spawnpoints} to 0
- add 1 to {{@variable-starter}.ffav2.locations.spawnpoints}
- add location of player to {{@variable-starter}.ffav2.locations.spawnpoint::*}
- set {{@variable-starter}.ffav2.misc.lastspawn.%player%} to location of player
- message "{@prefix} Spawn set at %location of player%"
- if arg 1 is equal to "list":
- message "{@prefix} Total Spawnpoints:"
- loop {{@variable-starter}.ffav2.locations.spawnpoint::*}:
- send "%loop-index%: %loop-value%" to command sender
- if {@dev-mode} is true:
- message "{@prefix} %{{@variable-starter}.ffav2.locations.spawnpoints}%"
- if arg 1 is equal to "clearspawns":
- message "{@prefix} Clearing all spawns"
- delete {{@variable-starter}.ffav2.locations.spawnpoint::*}
- set {{@variable-starter}.ffav2.locations.spawnpoints} to 0
- message "{@prefix} Success!"
- stop
- if arg 1 is equal to "delspawn":
- message "{@prefix} Removing last set spawn set by you, which was at %{{@variable-starter}.ffav2.misc.lastspawn.%player%}%"
- remove {{@variable-starter}.ffav2.misc.lastspawn.%player%} from {{@variable-starter}.ffav2.locations.spawnpoint::*}
- remove 1 from {{@variable-starter}.ffav2.locations.spawnpoints}
- if {@dev-mode} is true:
- message "{@prefix} DEV MODE: PROCESSING SPAWNS"
- loop {{@variable-starter}.ffav2.locations.spawnpoint::*}:
- send "&a%loop-index%: %loop-value%" to command sender
- #Events
- on death of player:
- if {{@variable-starter}.ffav2.players.%victim%} is true:
- if attacker exists:
- if {{@variable-starter}.ffav2.players.%attacker%} is true:
- if {{@variable-starter}.ffav2.kills.%attacker%} is not set:
- set {{@variable-starter}.ffav2.kills.%attacker%} to 0
- add 1 to {{@variable-starter}.ffav2.kills.%attacker%}
- send "{@prefix} You killed &f%victim%! &cYou have &6%{{@variable-starter}.ffav2.kills.%attacker%}% &ckills." to attacker
- if {{@variable-starter}.ffav2.kills.%attacker%} is equal to 1:
- remove an iron sword from attacker
- give attacker a diamond sword
- give attacker 5 mushroom soup
- give attacker 4 arrows
- if {{@variable-starter}.ffav2.kills.%attacker%} is equal to 3:
- broadcast "{@prefix} %attacker% is on a 3 kill streak! Stop him with &e/ffa"
- if {{@variable-starter}.ffav2.kills.%attacker%} is greater than 3:
- give attacker 2 mushroom soup
- delete {{@variable-starter}.ffav2.kills.%victim%}
- send "{@prefix} You died by the hands of %attacker%" to victim
- clear drops
- on respawn:
- if {{@variable-starter}.ffav2.players.%player%} is true:
- wait 0.1 seconds
- make console execute "ffainfo restore %player%"
- console execute command "/scoreboard players reset %player%"
- delete {{@variable-starter}.ffav2.players.%player%}
- on break:
- if {{@variable-starter}.ffav2.players.%player%} is true:
- cancel event
- on place:
- if {{@variable-starter}.ffav2.players.%player%} is true:
- cancel event
- On Hunger Meter Change:
- if {{@variable-starter}.ffav2.players.%player%} is true:
- cancel event
- set the player's food level to 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement