Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- PrEfixo: &a[TOPCraft]
- LimiteHomeMembro: 2
- PermMembro: home.membro
- LimiteHomeVip: 100
- PermVip: home.vip
- PermCriar: home.criar
- PermDeletar: home.deletar
- PermIr: home.ir
- PermLista: home.lista
- variables:
- {aHome.Set.WaitArgument::%player%} = false
- {aHome.Ir.WaitArgument::%player%} = false
- {aHome.Del.WaitArgument::%player%} = false
- {aHome.Del.Confirm.WaitArgument::%player%} = false
- on quit:
- set {aHome.Set.WaitArgument::%player%} to false
- set {aHome.Ir.WaitArgument::%player%} to false
- set {aHome.Del.WaitArgument::%player%} to false
- set {aHome.Del.Confirm.WaitArgument::%player%} to false
- on command "delhome":
- cancel event
- execute player command "home"
- stop
- on command "sethome":
- cancel event
- execute player command "home"
- stop
- command /home [<text>] [<text>]:
- aliases: homes
- trigger:
- if arg 1 is not set:
- MenuMain(player)
- else:
- if arg 1 is "ir":
- if {aHome.Ir.WaitArgument::%player%} is false:
- set {aHome.Ir.WaitArgument::%player%} to true
- send "%nl%{@PrEfixo} &7Digite o nome da home que você deseja ir, ou digite 'cancelar' para cancelar.%nl%" to player
- stop
- else:
- send "%nl%{@PrEfixo} &7Por favor digite o nome.%nl%" to player
- stop
- if arg 1 is "criar":
- if {aHome.Set.WaitArgument::%player%} is false:
- set {aHome.Set.WaitArgument::%player%} to true
- send "%nl%{@PrEfixo} &7Digite o nome da home que você desejar, ou digite 'cancelar' para cancelar.%nl%" to player
- stop
- else:
- send "%nl%{@PrEfixo} &7Por favor digite o nome.%nl%" to player
- stop
- if arg 1 is "deletar":
- if {aHome.Del.WaitArgument::%player%} is false:
- set {aHome.Del.WaitArgument::%player%} to true
- send "%nl%{@PrEfixo} &7Digite o nome da home que você deseja deletar.%nl%" to player
- stop
- else:
- send "%nl%{@PrEfixo} &7Por favor digite o nome.%nl%" to player
- stop
- if arg 1 is "lista":
- MenuLista(player)
- on chat:
- set {_args::*} to message split at " "
- if {aHome.Set.WaitArgument::%player%} is true:
- if size of {_args::*} = 1:
- set {_m} to {_args::1} parsed as text
- if {_m} is "cancelar":
- send "%nl%{@PrEfixo} &7Você cancelou a criação da home.%nl%"
- set {aHome.Set.WaitArgument::%player%} to false
- cancel event
- stop
- else:
- if {aHome.Home.%player%::%{_m}%} is not set:
- CreateHome(player, {_m})
- set {aHome.Set.WaitArgument::%player%} to false
- cancel event
- stop
- else:
- send "%nl%{@PrEfixo} &7Já existe uma home com o nome &9%{_m}%&7.%nl%" to player
- cancel event
- stop
- else:
- send "%nl%{@PrEfixo} &7Por favor digite o nome.%nl%"
- cancel event
- stop
- if {aHome.Ir.WaitArgument::%player%} is true:
- if size of {_args::*} = 1:
- set {_m} to {_args::1} parsed as text
- if {_m} is "cancelar":
- send "%nl%{@PrEfixo} &7Você cancelou o teleporte para home.%nl%"
- set {aHome.Ir.WaitArgument::%player%} to false
- cancel event
- stop
- else:
- TeleportHome(player, {_m})
- cancel event
- stop
- else:
- send "%nl%{@PrEfixo} &7Por favor digite o nome.%nl%"
- cancel event
- stop
- if {aHome.Del.WaitArgument::%player%} is true:
- if size of {_args::*} = 1:
- set {_m} to {_args::1} parsed as text
- if {_m} is "cancelar":
- send "%nl%{@PrEfixo} &7Você cancelou a exclusão de uma home.%nl%"
- set {aHome.Ir.WaitArgument::%player%} to false
- cancel event
- stop
- else:
- set {aHome.ConfirmDel::%player%} to {_m}
- DelHome(player, {_m}, "Certz")
- cancel event
- stop
- else:
- send "%nl%{@PrEfixo} &7Por favor digite o nome.%nl%"
- cancel event
- stop
- if {aHome.Del.Confirm.WaitArgument::%player%} is true:
- if size of {_args::*} = 1:
- set {_h} to "%{aHome.ConfirmDel::%player%}%" parsed as text
- set {_m} to {_args::1} parsed as text
- send "%{_h}%" to console
- cancel event
- if {_m} is "sim":
- DelHome(player, {_h}, "Del")
- if {_m} is "não":
- DelHome(player, {_h}, "Nao")
- else:
- DelHome(player, {_h}, "Certz")
- function DelHome(p: player, m: text, i: text):
- if {_p} has permission "{@PermDeletar}":
- if {_i} is "Certz":
- if {aHome.Home.%{_p}%::%{_m}%} is set:
- set {aHome.Del.WaitArgument::%{_p}%} to false
- set {aHome.Del.Confirm.WaitArgument::%{_p}%} to true
- send "%nl%{@PrEfixo} &7Você realmente quer deletar sua home &9%{_m}%&7 ?%nl% &7Se sim digite 'sim&7' se não digite 'não&7'.%nl%" to {_p}
- stop
- else:
- send "%nl%{@PrEfixo} &7Você não tem uma home com o nome &9%{_m}%&7.%nl%" to {_p}
- stop
- if {_i} is "Del":
- set {aHome.Del.Confirm.WaitArgument::%{_p}%} to false
- clear {aHome.Home.%{_p}%::%{_m}%}
- send "%nl%{@PrEfixo} &7Você deletou a home &9%{_m}%&7!%nl%" to {_p}
- stop
- if {_i} is "Nao":
- set {aHome.Del.Confirm.WaitArgument::%{_p}%} to false
- send "%nl%{@PrEfixo} &7Exclusão de &9%{_m}%&7 cancelada!%nl%" to {_p}
- stop
- else:
- send "%nl%{@PrEfixo} &7Você não tem permissão para deletar homes%nl%" to {_p}
- function TeleportHome(p: player, m: text):
- if {_p} has permission "{@PermIr}":
- if {aHome.Home.%{_p}%::%{_m}%} is set:
- set {aHome.Ir.WaitArgument::%{_p}%} to false
- send "%nl%{@PrEfixo} &7Teleportando a home selecionada, aguarde!%nl%" to {_p}
- wait 3 seconds
- teleport {_p} to {aHome.Home.%{_p}%::%{_m}%}
- else:
- send "%nl%{@PrEfixo} &7Você não tem uma home com o nome &9%{_m}%&7.%nl%" to {_p}
- else:
- send "%nl%{@PrEfixo} &7Você não tem permissão para ir as suas homes%nl%" to {_p}
- function MenuMain(p: player):
- wait 5 tick
- open chest with 3 row named "&9Home - &7%{_p}%" to {_p}
- play raw sound "random.chestopen" at {_p} with pitch 1 volume 5
- wait 5 tick
- set {_slot} to 0
- loop 27 times:
- format slot {_slot} of {_p} with a gray stained glass named "&0" to be unstealable
- add 1 to {_slot}
- format slot 8 of {_p} with a red wool block named "&aFechar menu" with lore "||&7* Clique aqui para fechar o menu" to close
- format slot 10 of {_p} with {_p}'s skull named "&7%{_p}'s name%" with lore "||&e* Homes: &6%size of {aHome.Home.%{_p}%::*}%" to be unstealable
- format slot 12 of {_p} with ender pearl named "&7Ir para uma home" with lore "||&e* Clique aqui" to close then run [make {_p} execute command "home ir"]
- format slot 13 of {_p} with redstone named "&7Criar uma home" with lore "||&e* Clique aqui" to close then run [make {_p} execute command "home criar"]
- format slot 14 of {_p} with barrier named "&7Deletar uma home" with lore "||&e* Clique aqui" to close then run [make {_p} execute command "home deletar"]
- format slot 15 of {_p} with book named "&7Lista de homes" with lore "||&e* Clique aqui" to close then run [make {_p} execute command "home lista"]
- function MenuLista(p: player):
- if {_p} has permission "{@PermLista}":
- wait 5 tick
- open chest with 6 row named "&9Suas homes - &7%{_p}%" to {_p}
- play raw sound "random.chestopen" at {_p} with pitch 1 volume 5
- wait 5 tick
- set {_slot} to 0
- loop 54 times:
- format slot {_slot} of {_p} with a gray stained glass named "&0" to be unstealable
- add 1 to {_slot}
- set {_slot} to 9
- loop {aHome.Home.%{_p}%::*}:
- format slot {_slot} of {_p} with 324 named "&9%loop-index%" with lore "||&e* Localização|| &f%loop-value%" to be unstealable
- if {_slot} < 45:
- add 1 to {_slot}
- else:
- stop loop
- format slot 0 of {_p} with a light green wool block named "&aVoltar o menu" with lore "||&7* Clique aqui para voltar o menu" to close then run [execute {_p} command "home"]
- format slot 8 of {_p} with a red wool block named "&aFechar menu" with lore "||&7* Clique aqui para fechar o menu" to close
- else:
- send "%nl%{@PrEfixo} &7Você não tem permissão para ver as suas homes%nl%" to {_p}
- function CreateHome(p: player, n: text):
- if {_p} has permission "{@PermCriar}":
- if {_p} has permission "{@PermVip}":
- if size of {aHome.Home.%{_p}%::*} = {@LimiteHomeVip}:
- send "%nl%{@PrEfixo} &7Você excedeu o limite de homes &9({@LimiteHomeVip})%nl%" to {_p}
- else:
- set {aHome.Home.%{_p}%::%{_n}%} to location of {_p}
- send "%nl%{@PrEfixo} &7Home &9%{_n}% &7setada com sucesso!%nl%" to {_p}
- if {_p} has permission "{@PermMembro}":
- if size of {aHome.Home.%{_p}%::*} = {@LimiteHomeMembro}:
- send "%nl%{@PrEfixo} &7Você excedeu o limite de homes &9({@LimiteHomeMembro})%nl%" to {_p}
- else:
- set {aHome.Home.%{_p}%::%{_n}%} to location of {_p}
- send "%nl%{@PrEfixo} &7Home &9%{_n}% &7setada com sucesso!%nl%" to {_p}
- else:
- send "%nl%{@PrEfixo} &7Você não tem permissão para criar homes%nl%" to {_p}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement