Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /home [<text>]:
- trigger:
- if arg 1 isn't set:
- send "&cUtilize /home [player:]<home>."
- send ""
- if "%{Homes::%player%::*}%" contains "%arg-1%-PUBLIC":
- if {Homes::%player%::*} is set:
- loop {Homes::%player%::*}:
- if "%loop-value%" is "%loop-value%-PUBLIC":
- add "%loop-value%" to {_HomesP::*}
- set {_HomesFix} to "%{_HomesP::*}%"
- replace " and " with ", " in {_HomesFixP}
- replace " , " with ", " in {_HomesFixP}
- send "&6Homes públicas: &f%{_HomesFixP}%"
- else:
- send "&6Homes públicas: &fNenhuma."
- if {Homes::%player%::*} is set:
- loop {Homes::%player%::*}:
- if "%loop-value%" is "%loop-value%":
- add "%loop-value%" to {_Homes::*}
- set {_HomesFix} to "%{_Homes::*}%"
- replace " and " with ", " in {_HomesFix}
- replace " , " with ", " in {_HomesFix}
- send "&6Homes particulares: &f%{_HomesFix}%" to player
- else:
- send "&6Homes particulares: &fNenhuma."
- else:
- if "%{Homes::%player%::*}%" contains "%arg-1%":
- set {_HomeX} to value "Homes.%arg 1%.x" get of "plugins/SkyHomes/%player%.yml"
- set {_HomeY} to value "Homes.%arg 1%.y" get of "plugins/SkyHomes/%player%.yml"
- set {_HomeZ} to value "Homes.%arg 1%.z" get of "plugins/SkyHomes/%player%.yml"
- set {_loc.x} to {_HomeX} parsed as number
- set {_loc.y} to {_HomeY} parsed as number
- set {_loc.z} to {_HomeZ} parsed as number
- set {_location} to location ({_loc.x}, {_loc.y}, {_loc.z})
- set {_ClaimA} to value "Terras.%chunk at {_location}%" get of "plugins/Factions/claimdata.yml"
- if {_ClaimA} isn't set:
- if player have permission "default.group":
- send "&eEm 3 segundos você irá para a home '%arg 1%'."
- wait 3 seconds
- teleport player to location ({_loc.x}, {_loc.y}, {_loc.z})
- send "&aTeleportado com sucesso."
- stop
- else:
- teleport player to location ({_loc.x}, {_loc.y}, {_loc.z})
- send "&aTeleportado com sucesso."
- stop
- if {_ClaimA} is "%{_FactionTag}%":
- if player have permission "default.group":
- send "&eEm 3 segundos você irá para a home '%arg 1%'."
- wait 3 seconds
- teleport player to location ({_loc.x}, {_loc.y}, {_loc.z})
- send "&aTeleportado com sucesso."
- stop
- else:
- teleport player to location ({_loc.x}, {_loc.y}, {_loc.z})
- send "&aTeleportado com sucesso."
- stop
- else:
- send "&cVocê não tem permissão para teleportar para este local."
- stop
- else:
- send "&cHome '%arg 1%' não existe."
- stop
- command /sethome [<text>]:
- trigger:
- if arg 1 isn't set:
- send "&cUtilize /sethome <home>."
- else:
- set {_lenght1} to length of the arg-1
- set {_FactionTag} to value "%player%.FactionTag" get of "plugins/Factions/data.yml"
- set {_Claim} to value "Terras.%chunk at player%" get of "plugins/Factions/claimdata.yml"
- if {_lenght1} > 16:
- send "&cUtilize apenas letras e números como nome da home, máximo de 16 caracteres."
- stop
- if arg-1 contains "/" or "[" or "]" or "\" or "~" or "^":
- send "&cUtilize apenas letras e números como nome da home, máximo de 16 caracteres."
- stop
- if {_Claim} isn't set:
- send "&aHome '%arg 1%' criada com sucesso."
- set "Homes.%arg 1%.x" to "%player's x-coordinate%" in yml file "plugins/SkyHomes/%player%.yml"
- set "Homes.%arg 1%.y" to "%player's y-coordinate%" in yml file "plugins/SkyHomes/%player%.yml"
- set "Homes.%arg 1%.z" to "%player's z-coordinate%" in yml file "plugins/SkyHomes/%player%.yml"
- if "%{Homes::%player%::*}%" contains "%arg-1%":
- stop
- else:
- add arg-1 to {Homes::%player%::*}
- if {_Claim} is "%{_FactionTag}%":
- send "&aHome '%arg 1%' criada com sucesso."
- set "Homes.%arg 1%.x" to "%player's x-coordinate%" in yml file "plugins/SkyHomes/%player%.yml"
- set "Homes.%arg 1%.y" to "%player's y-coordinate%" in yml file "plugins/SkyHomes/%player%.yml"
- set "Homes.%arg 1%.z" to "%player's z-coordinate%" in yml file "plugins/SkyHomes/%player%.yml"
- if "%{Homes::%player%::*}%" contains "%arg-1%":
- stop
- else:
- add arg-1 to {Homes::%player%::*}
- if {_Claim} is set:
- if {_Claim} isn't "%{_FactionTag}%":
- send "&cVocê não tem permissão para criar home neste local."
- stop
Advertisement
Add Comment
Please, Sign In to add comment