Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if argument 1 is "invitation" or "invitations":
- if arg-2 isn't set:
- if {f.fac.name.%player%} isn't set:
- set {_objet} to "me"
- else:
- set {_objet} to "faction"
- else if arg-2 isn't "me" or "faction":
- send "&cUtilize /f invitation [me/faction]"
- stop
- else:
- set {_objet} to "%arg-2%"
- if {_objet} is "me":
- open chest with 6 rows named "Convites de si mesmo." to player
- else:
- open chest with 5 rows named "%{f.fac.name.%player%}% - Pedidos" to player
- wait 2 tick
- set {_case} to 0
- set {_case1} to 0
- if {_objet} is "me":
- loop {f.list.factions::*}:
- loop {f.fac.invitations.%loop-value-1%::*}:
- if "%loop-value-2%" is "%player%":
- format slot {_case} of player with 1 of paper named "&7Facção: &f%loop-value-1%" with lore " ||&7Convite em andamente...|| ||&7Para aceitar: &a/f aceitar %loop-value-1%||&7Para recusar: &c/f recusar %loop-value-1%" to be unstealable
- add 1 to {_case}
- format slot {_case1} of player with 1 of paper named "&7Facção: &f%loop-value-1%" with lore " ||&7Convite em andamente...|| ||&7Para aceitar: &a/f aceitar %loop-value-1%||&7Para recusar: &c/f recusar %loop-value-1%" to be unstealable
- add 1 to {_case1}
- else:
- loop {f.fac.invitations.%{f.fac.name.%player%}%::*}:
- format slot {_case} of player with 1 of loop-value's skull named "&7Jogador: &f%loop-value%" with lore " ||&7Convite em andamente...|| ||&cClique para recusar o recrutamento." to run "faction reminvitation|%loop-value% %player%"
- add 1 to {_case}
- else if argument 1 contains "reminvitation":
- if command sender isn't console:
- stop
- else:
- set {_a} to "%arg-1%"
- set {_a::*} to {_a} split at "|"
- loop {f.fac.invitations.%{f.fac.name.%arg-2%}%::*}:
- if "%loop-value%" is "%{_a::2}%":
- remove loop-value from {f.fac.invitations.%{f.fac.name.%arg-2%}%::*}
- send "&cVocê revogou o convite do jogador %{_a::2}%." to (arg-2 parsed as player)
- execute (arg-2 parsed as player) command "/faction invitations"
- else if argument 1 is "toggleinvitation" or "toggleinvite":
- if {f.fac.name.%player%} isn't set:
- send "&cVocê não está em uma facção."
- else if {f.fac.grade.%player%} < 2:
- send "&cVocê não tem o grau necessário."
- else if {f.fac.invitation.%{f.fac.name.%player%}%} is true:
- delete {f.fac.invitation.%{f.fac.name.%player%}%}
- clear {f.fac.invitations.%{f.fac.name.%player%}%::*}
- send "&aAgora não é possível convidar membros!"
- else if {f.fac.invitation.%{f.fac.name.%player%}%} isn't set:
- set {f.fac.invitation.%{f.fac.name.%player%}%} to true
- send "&aAgora é possível convidar membros!"
- else if argument 1 is "convidar" or "invite":
- if {f.fac.name.%player%} isn't set:
- send "&cVocê não está em uma facção."
- else if {f.fac.invitation.%{f.fac.name.%player%}%} isn't set:
- send "&cA sua facção não está convidando membros. Para poder convidar membros digite '/f toggleinvite'."
- else if arg-2 isn't set:
- send "&cUtilize /f convidar <jogador>"
- else if {f.fac.name.%arg-2%} is set:
- send "&c%arg-2% já tem uma facção!"
- else if "%{f.fac.invitations.%{f.fac.name.%player%}%::*}%" contains "%arg-2%":
- send "&cOps! Um convite já está em andamento, espere ele aceitar ou recusar para fazer outro."
- else:
- set {_p} to (arg-2 parsed as player)
- add {_p} to {f.fac.invitations.%{f.fac.name.%player%}%::*}
- send "&aVocê convidou '%{_p}%' para sua facção."
- send "&a%player% está te convidando para a facção '%{f.fac.name.%player%}%'." to {_p}
- else if argument 1 is "aceitar":
- if {f.fac.name.%player%} is set:
- send "&cVocê já está em uma facção!"
- else if arg-2 isn't set:
- send "&cVocê precisa especificar a facção depois do '%arg-1%'."
- else if "%{f.fac.invitations.%arg-2%::*}%" doesn't contain "%player%":
- send "&cEsta facção não te convidou para participar."
- else:
- set {f.fac.name.%player%} to "%arg-2%"
- set {f.fac.grade.%player%} to 1
- loop {f.fac.invitations.%arg-2%::*}:
- if "%loop-value%" is "%player%":
- remove loop-value from {f.fac.invitations.%arg-2%::*}
- send "&aVocê entrou na facção %arg-2%!"
- else if argument 1 is "recusar":
- if {f.fac.name.%player%} is set:
- send "&cVocê já está em uma facção."
- else if arg-2 isn't set:
- send "&cVocê precisa especificar uma facção depois do '%arg-1%'."
- else if "%{f.fac.invitations.%arg-2%::*}%" doesn't contain "%player%":
- send "&cEsta facção não te convidou para participar."
- else:
- send "&cVocê recusou o pedido da facção '%arg-2%'."
- loop {f.fac.invitations.%arg-2%::*}:
- if "%loop-value%" is "%player%":
- remove loop-value from {f.fac.invitations.%arg-2%::*}
Advertisement
Add Comment
Please, Sign In to add comment