Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Set track-player command
- command /track <player>:
- permission: track.use
- permission message: &cNo permission!
- trigger:
- set {targetplayer} to arg 1
- broadcast "&eThe target has been changed to &l%{targetplayer}%"
- # Start manhunt command
- command /manhuntstart:
- permission: track.use
- permission message: &cNo permission!
- trigger:
- broadcast "&8&l[&a&lManhunt&8&l] &a&lManhunt game has initiated, the game starts as soon as the target moves"
- loop all players:
- loop-player is not {targetplayer}:
- set gamemode of loop-player to survival
- clear loop-player's inventory
- give compass to loop-player
- heal loop-player
- loop-player is {targetplayer}:
- set gamemode of loop-player to survival
- clear loop-player's inventory
- heal loop-player
- set {gameactive} to true
- make console execute command "/time set day"
- make console execute command "/weather clear"
- make console execute command "/kill @e[type=!player]"
- make console execute command "/kill @e[type=!player]"
- loop {spectator::*}:
- set gamemode of loop-value to spectator
- send "&8&l[&a&lManhunt&8&l] &aYou are now a spectator until the end of the game!" to loop-value
- on join:
- if {gameactive} is true:
- set gamemode of player to spectator
- send "&8&l[&a&lManhunt&8&l] &eWelcome! Right now, there is a game active, this means you are in spectator mode and cannot interact. Once the game has finished you will be set into survival mode."
- # Track player command
- command /targetcompass:
- permission: track.use
- permission message: &cNo permission!
- trigger:
- set player's compass target to location of {targetplayer}
- # Track player
- on rightclick with a compass:
- if {trackmode.%player%} is not set:
- if player and {targetplayer} is in world "world":
- set {trackmode.%player%} to true
- enchant player's held item with unbreaking 1
- set name of player's held item to "&eTracking %{targetplayer}%"
- send "&8&l[&a&lManhunt&8&l] &eCompass is pointing to %{targetplayer}%"
- stop
- else if player is in world "world":
- send "&8&l[&a&lManhunt&8&l] &c%{targetplayer}% is not in the overworld"
- else:
- send "&8&l[&a&lManhunt&8&l] &cThe compass does not work in this dimension"
- else:
- delete {trackmode.%player%}
- disenchant player's held item
- set player's compass target to spawn
- set name of player's held item to ""
- stop
- every 2 seconds:
- loop all players:
- if {trackmode.%loop-player%} = true:
- set loop-player's compass target to location of {targetplayer}
- # Game end
- on death:
- if victim is {targetplayer}:
- broadcast "&8&l[&a&lManhunt&8&l] &a&l%victim% has died, Hunters win!"
- delete {targetplayer}
- loop all players:
- delete {trackmode.%loop-player%}
- loop {spectator::*}:
- set gamemode of loop-value to survival
- send "&8&l[&a&lManhunt&8&l] &fThe game ended, you are now in survival mode again!" to loop-value
- kill loop-value
- delete {spectator::*}
Advertisement
Add Comment
Please, Sign In to add comment