Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Creator: minouis55
- # Version: fc-FactionSize-1.8.8-V0.1-d3846c
- # Name: FactionSize
- options:
- permission-message: &cVocê não tem permissão de utilizar este comando.
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # Update for new version
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- command /factionversion:
- aliases: /vf, /fv
- trigger:
- set {_ajouts} to text from "http://pastebin.com/raw/YcEKwjuy"
- loop {_ajouts::*}:
- send "This faction running in FactionSize version"
- send "%loop-value% (MC: 1.8.8) Implementing"
- send "API version 1.8.8-F0.2)"
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # ?
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- every 4 seconds:
- loop 8 times:
- loop all players:
- if world of loop-player is "world":
- set {_access} to ""
- if {f.access.%loop-player%} is set:
- set {_access} to "&6Free Access everywhere ! &8| "
- if {f.zone.%loop-player%} is "<none>":
- set {_zone} to "&aLibre"
- else if {f.zone.%loop-player%} is "WARZONE":
- set {_zone} to "&cWarZone"
- else if {f.zone.%loop-player%} is "SAFE":
- set {_zone} to "&bSafeZone"
- else:
- set {_zone} to "&b%{f.zone.%loop-player%}%"
- set {_x} to random integer between (loop-player's x-coordinate) and (loop-player's x-coordinate + 1)
- set {_y} to random integer between (loop-player's y-coordinate) and (loop-player's y-coordinate + 1)
- set {_z} to random integer between (loop-player's z-coordinate) and (loop-player's z-coordinate + 1)
- wait 10 ticks
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # ?
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- on join:
- if "%{f.list.players::*}%" doesn't contain "%player%":
- add player to {f.list.players::*}
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # Comando principal
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- command /faction [<text>] [<text>]: # http://prntscr.com/e5a1l5 http://prntscr.com/e5a1pn
- permission: faction.member
- permission message: {@permission-message}
- aliases: /f , /fac
- description: Comando principal de faction
- trigger:
- if argument 1 is "criar":
- if {f.fac.name.%player%} is set:
- send "&cVocê já faz parte de uma facção."
- else if arg-2 isn't set:
- send "&cUtilize /f criar <nome>."
- else if "%{f.list.factions::*}%" contain "%arg-2%":
- send "&cOpa Já existe outra facção utilizando o nome '%arg-2%'."
- else if arg-2 contain "/" or "[" or "]" or "\" or "~" or "^":
- send "&cO nome da facção não pode conter caracteres especiais."
- else:
- add arg-2 to {f.list.factions::*}
- set {f.fac.name.%player%} to arg-2
- set {f.fac.grade.%player%} to 3
- send "&eYAY! Sua facção foi criada com sucesso!"
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # Funções
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # Comando de dominar área
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- else if argument 1 is "dominar":
- 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.chunk::%chunk at player%}%" is "%{f.fac.name.%player%}%":
- send "&aEsta terra já está dominada por sua facção!"
- else if {f.chunk::%chunk at player%} is set:
- send "&cA facção '%{f.chunk::%chunk at player%}%' já dominou esta terra. Portanto não foi possível dominar esta terra."
- else:
- add 1 to {f.fac.chunksclaims.%{f.fac.name.%player%}%}
- set {f.chunk::%chunk at player%} to {f.fac.name.%player%}
- send "&aVocê dominou esta terra com sucesso!"
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # CLAIMS/CHUNK
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- else if argument 1 is "surclaim":
- if {f.fac.name.%player%} isn't set:
- send "&cVous n'avez pas de Faction !"
- else if {f.fac.grade.%player%} < 2:
- send "&cVous n'avez pas le grade requis !"
- else if "%{f.chunk::%chunk at player%}%" is "%{f.fac.name.%player%}%":
- send "&cCe Chunk vous appartient !"
- else if "%{f.chunk::%chunk at player%}%" is "<none>":
- send "&cCe Chunk n'est pas occupé, dans ce cas la faite: &f/f surclaim %{f.fac.name.%player%}%"
- else if FactionPower("%{f.chunk::%chunk at player%}%") >= {f.fac.chunksclaims.%{f.chunk::%chunk at player%}%}:
- send "&cLa faction a assez de power pour garder ses chunks !"
- else if FactionPower("%{f.fac.name.%player%}%") <= {f.fac.chunksclaims.%{f.fac.name.%player%}%}:
- send "&cIl vous faut %{f.fac.chunksclaims.%{f.fac.name.%player%}%} + 1% powers pour claim un autre chunk !"
- else:
- add 1 to {f.fac.chunksclaims.%{f.fac.name.%player%}%}
- subtract 1 from {f.fac.chunksclaims.%{f.chunk::%chunk at player%}%}
- set {f.chunk::%chunk at player%} to {f.fac.name.%player%}
- send "&cHeey! %player% está tentando claimar a sua terra em %chunk at player%" to {_c}
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # Mapa/Chat/List
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- else if argument 1 is "chat":
- if {f.chat.%player%} is "faction":
- message " Votre chat est passé sur le mode &aAllié &7!"
- set {f.chat.%player%} to "ally"
- else if {f.chat.%player%} is "ally":
- message " Votre chat est passé sur le mode &dGlobal &7!"
- set {f.chat.%player%} to "global"
- else:
- message " Votre chat est passé sur le mode &bFaction &7!"
- set {f.chat.%player%} to "faction"
- else if argument 1 is "listar":
- if size of {f.list.factions::*} is 0:
- message " &cOps! Ainda não tem facções existente, crie a sua!"
- else:
- loop {f.list.factions::*}:
- set {_c} to 0
- set {_nbchefs} to 0
- loop all players:
- if "%{f.fac.name.%loop-player%}%" is "%loop-value-1%":
- add 1 to {_c}
- if {f.fac.grade.%loop-player%} >= 2:
- add 1 to {_nbchefs}
- if {f.fac.invitation.%loop-value%} is true:
- message " &a%loop-value-1% &f- %{_c}% &aonline &f- &a %{f.fac.chunksclaims.%loop-value-1%}% &aterras"
- else:
- message " &a%loop-value-1% &f- %{_c}% &aonline &f- &a %{f.fac.chunksclaims.%loop-value-1%}% &aterras"
- else if argument 1 is "mapa":
- if argument 2 is "off":
- delete {f.fac.bouclemap::%player%}
- loop 15 times:
- send " "
- send "&aModo mapa desativado com sucesso."
- else if argument 2 is "on":
- set {f.fac.bouclemap::%player%} to true
- send "&aModo mapa ativado com sucesso."
- else if argument 2 isn't "auto":
- send "&cUtilize /f mapa [on|off]."
- else:
- set {_mapX} to 11
- set {_mapY} to 6
- set {_m} to ""
- loop 13 times:
- loop 23 times:
- set {_x} to {_mapX} * 16
- set {_y} to {_mapY} * 16
- set {_chunk} to chunk at block {_y} blocks north {_x} blocks west of player
- if {f.chunk::%{_chunk}%} isn't set:
- set {_result} to ""
- else:
- set {_result} to {f.chunk::%{_chunk}%}
- if {_chunk} is chunk at player:
- set {_m} to "%{_m}%&e█"
- else if {_result} is {f.fac.name.%player%}:
- set {_m} to "%{_m}%&8█"
- else if {_result} is "SAFEZONE":
- set {_m} to "%{_m}%&6█"
- else if {_result} is "WARZONE":
- set {_m} to "%{_m}%&4█"
- else if {_result} is "":
- set {_m} to "%{_m}%&7█"
- else:
- set {_m} to "%{_m}%&c█"
- add -1 to {_mapX}
- send "%{_m}%" to player
- set {_m} to ""
- add -1 to {_mapY}
- set {_mapX} to 11
- if arg-2 isn't "auto":
- send " "
- send "&8█ &fSua facção &e█ &fSua posição &c█ &fInimiga"
- send "&6█ &fZona Protegida &7█ &fZona Livre &4█ &fWARZONE"
- else if arg-2 isn't set:
- send " "
- send "&8█ &fSua facção &e█ &fSua posição &c█ &fInimiga"
- send "&6█ &fZona Protegida &7█ &fZona Livre &4█ &fWARZONE"
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # Zonas Protegidas
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- else if argument 1 is "setsafe":
- if player doesn't have permission "faction.admin":
- send "{@permission-message}"
- else if {f.chunk::%chunk at player%} is set:
- send "&aZona Protegida já está claimado nesta terra."
- else:
- send "&aVocê dominou esta terra com sucesso!"
- set {f.chunk::%chunk at player%} to "SAFE"
- else if argument 1 is "remsafe":
- if player doesn't have permission "faction.admin":
- send "{@permission-message}"
- else if {f.chunk::%chunk at player%} isn't "SAFE":
- send "&aEsta terra é da facção '%{f.chunk::%chunk at player%}%'!"
- else:
- send "&aVocê dominou esta terra com sucesso!"
- delete {f.chunk::%chunk at player%}
- else if argument 1 is "setwarzone":
- if player doesn't have permission "faction.admin":
- send "{@permission-message}"
- else if {f.chunk::%chunk at player%} is set:
- send "&aWARZONE já está claimado nesta terra."
- else:
- send "&aVocê dominou esta terra com sucesso!"
- set {f.chunk::%chunk at player%} to "WARZONE"
- else if argument 1 is "remwarzone":
- if player doesn't have permission "faction.admin":
- send "{@permission-message}"
- else if {f.chunk::%chunk at player%} isn't "WARZONE":
- send "&aEsta terra é da facção '%{f.chunk::%chunk at player%}%'!"
- else:
- send "&aVocê dominou esta terra com sucesso!"
- delete {f.chunk::%chunk at player%}
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # Comando de abandonar área
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- else if argument 1 is "abandonarc":
- 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.chunk::%chunk at player%} isn't set:
- send "&cEsta terra não é de sua facção!"
- else if {f.chunk::%chunk at player%} isn't {f.fac.name.%player%}:
- send "&cEsta terra não é de sua facção!"
- else:
- subtract 1 from {f.fac.chunksclaims.%{f.fac.name.%player%}%}
- delete {f.chunk::%chunk at player%}
- send "&aTerra perdida com sucesso."
- else if argument 1 is "abandonaradmin":
- subtract 1 from {f.fac.chunksclaims.%{f.fac.name.%player%}%}
- delete {f.chunk::%chunk at player%}
- send "&aTerra perdida com sucesso."
- else if argument 1 is "admin":
- if player doesn't have permission "faction.admin":
- send "{@permission-message}"
- if {f.bypass.%player%} isn't set:
- send "&cAtive o seu modo admin para utilizar esta ferramenta."
- if {f.bypass.%player%} is set:
- send "&a/f admin [on|off] &8- &7Utilize para ativar o modo admin."
- send "&a/f admin abandonar &8 - &7Utilize para retirar a dominação de alguma facção."
- if argument 2 is "abandonar":
- subtract 1 from {f.fac.chunksclaims.%{f.fac.name.%player%}%}
- delete {f.chunk::%chunk at player%}
- send "&cTerra perdida com sucesso. Lembre-se seu admin está ativado!"
- if argument 2 is "off":
- delete {f.bypass.%player%}
- send "&aModo admin desativado."
- else if argument 2 is "on":
- set {f.bypass.%player%} to true
- send "&aModo admin ativado."
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # Comando de remover/sair (de) facção
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- else if argument 1 is "desfazerc" or "sairc":
- if command sender is a player:
- if {f.fac.name.%player%} isn't set:
- send "&cVocê não está em uma facção."
- else if {f.fac.grade.%player%} isn't 3:
- send "&cVocê não tem o grau necessário."
- else:
- set {_faction} to "%{f.fac.name.%player%}%"
- else:
- if arg-2 isn't set:
- stop
- set {_faction} to "%arg-2%"
- if command sender is a player:
- send "&aA facção %{f.fac.name.%player%}% foi terminada com sucesso!"
- loop {f.list.factions::*}:
- if "%{_faction}%" is "%loop-value%":
- remove loop-value from {f.list.factions::*}
- delete {f.fac.desc.%{_faction}%}
- delete {f.fac.powerboost.%{_faction}%}
- delete {f.fac.tag.%{_faction}%}
- delete {f.fac.lastconnection.%{_faction}%}
- delete {f.fac.home.%{_faction}%}
- delete {f.fac.invitation.%{_faction}%}
- delete {f.fac.chunksclaims.%{_faction}%}
- clear {f.fac.ennemy.%{_faction}%::*}
- loop {f.fac.ally.%{_faction}%::*}:
- loop {f.fac.ally.%loop-value-1%::*}:
- if "%loop-value-2%" is "%{_faction}%":
- remove loop-value-2 from {f.fac.ennemy.%loop-value-1%::*}
- clear {f.fac.ally.%{_faction}%::*}
- loop {f.chunk::*}:
- if "%loop-value-1%" is "%{_faction}%":
- remove loop-value-1 from {f.chunk::*}
- loop {f.list.players::*}:
- if {f.fac.name.%loop-value-1%} is {_faction}:
- delete {f.fac.name.%loop-value-1%}
- delete {f.fac.grade.%loop-value-1%}
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- # HOME/SETHOME
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- else if argument 1 is "definir":
- if argument 2 is "base":
- if {f.fac.name.%player%} isn't set:
- send "&cVocê não está em uma facção."
- else if {f.fac.grade.%player%} < 1:
- send "&cVocê não tem o grau necessário."
- else if {f.chunk::%chunk at player%} isn't set:
- send "&cVocê só pode definir bases dentro das terras da sua facção!"
- else if {f.chunk::%chunk at player%} isn't {f.fac.name.%player%}:
- send "&cVocê só pode definir bases dentro das terras da sua facção!"
- else if arg-2 isn't set:
- send "&cUtilize /f definir base."
- else:
- set {f.fac.home.%{f.fac.name.%player%}%} to location of player
- send "&aLocalização de base alterada com sucesso."
- else if argument 1 is "base":
- if {f.fac.name.%player%} isn't set:
- send "&cVocê não está em uma facção."
- else if {f.fac.home.%{f.fac.name.%player%}%} isn't set:
- send "&cHum... Sua facção ainda não está com sua base definida."
- else:
- teleport player to {f.fac.home.%{f.fac.name.%player%}%}
- send "&aTeleportado para a base da sua facção!" # delete {f.fac.home.%{_faction}%}
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # Descrição
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- else if argument 1 is "info" or "who" or "show" or "f":
- if arg-2 is set:
- if player is op:
- if {f.fac.chunksclaims.%arg-2%} isn't set:
- if {f.fac.name.%arg-2%} isn't set:
- send "&cOps! Parece que esta facção não existe!"
- stop
- else:
- set {_faction} to "%{f.fac.name.%arg-2%}%"
- else:
- set {_faction} to "%arg-2%"
- else:
- send "{permission-send}"
- stop
- else:
- if {f.fac.name.%player%} isn't set:
- send "&cOps! Aparentemente você não possuí nenhuma facção!"
- stop
- else:
- set {_faction} to "%{f.fac.name.%player%}%"
- if {_faction} isn't set:
- send " &4ERREUR !"
- stop
- send " "
- send " &e%{_faction}% "
- # Informations
- if {f.fac.invitation.%{_faction}%} is true:
- send "&2Terras/&4Poder&2/&4Poder máximo&2: &7%{f.fac.chunksclaims.%{_faction}%}%/%{_p}%"
- else:
- send "&2Terras/&4Poder&2/&4Poder máximo&2: &7%{f.fac.chunksclaims.%{_faction}%}%/%{_p}%"
- set {_dif} to difference between now and {f.fac.lastconnection.%{_faction}%}
- if {f.fac.lastconnection.%{_faction}%} is set:
- set {_dif_D} to "%difference between 14 days and {_dif}%"
- replace all " hours" with "&6h&e" in {_dif_D}
- replace all " hour" with "&6h&e" in {_dif_D}
- replace all " days" with "&6j&e" in {_dif_D}
- replace all " day" with "&6j&e" in {_dif_D}
- replace all " minutes" with "&6m&e" in {_dif_D}
- replace all " minute" with "&6m&e" in {_dif_D}
- replace all " seconds" with "&6s&e" in {_dif_D}
- replace all " second" with "&6s&e" in {_dif_D}
- replace all " and " with " " in {_dif_D}
- send "&7Suppression Auto dans: &e%{_dif_D}%"
- set {_p} to FactionPower("%{_faction}%")
- # connecté et membres
- set {_c} to 0
- set {_nbchefs} to 0
- loop all players:
- if "%{f.fac.name.%loop-player%}%" is "%{_faction}%":
- add 1 to {_c}
- if {f.fac.grade.%loop-player%} is 3:
- if {_m} is set:
- set {_m} to "%{_m}%&7, &c%loop-player%"
- else:
- set {_m} to "&7%loop-player%"
- add 1 to {_nbchefs}
- else if {f.fac.grade.%loop-player%} is 2:
- if {_m} is set:
- set {_m} to "%{_m}%&7, &5%loop-player%"
- else:
- set {_m} to "&5%loop-player%"
- add 1 to {_nbchefs}
- else:
- if {_m} is set:
- set {_m} to "%{_m}%&7, &d%loop-player%"
- else:
- set {_m} to "&d%loop-player%"
- if {_m} isn't set:
- set {_m} to "&7Nenhum."
- loop {f.list.players::*}:
- if {f.fac.name.%loop-value%} is {_faction}:
- if {_mem} is set:
- set {_mem} to "%{_mem}%, %loop-value%"
- else:
- set {_mem} to "%loop-value%"
- if {_mem} isn't set:
- set {_mem} to "&fFaction Vide !"
- send "&2Líder: &7%{_nbchefs}%"
- send "&2Membros: &7%{_c}%"
- send "&2Membros online: &7%{_c}% %newline% &7%{_m}%"
- # Allié et Ennemis
- loop {f.fac.ennemy.%{f.fac.name.%player%}%::*}:
- if {_e} is set:
- set {_e} to "%{_e}%&7, &c%loop-value%"
- else:
- set {_e} to "&c%loop-value%"
- loop {f.fac.ally.%{f.fac.name.%player%}%::*}:
- if {_a} is set:
- set {_a} to "%{_a}%&7, &a%loop-value%"
- else:
- set {_a} to "&a%loop-value%"
- if {_e} isn't set:
- set {_e} to "&7Nenhum"
- if {_a} isn't set:
- set {_a} to "&7Nenhum"
- send "&2Aliados: %{_a}%"
- send "&2Inimigos: %{_e}%"
- send " "
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # menu
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- if argument 1 is "menu":
- if {f.fac.name.%player%} isn't set:
- send "&cVocê não faz parte de uma facção."
- else:
- open chest with 3 rows named "%{f.fac.name.%player%}%" to player
- format slot 10 of player with a paper named "&aRelações" with lore "&7Mostrar relações com outras facções" to close then run [make player execute command "/f sairc"]
- format slot 12 of player with head:3 named "&aMembros" with lore "&7Mostrar membros de sua facção." to run [execute player command "/f invitations"]
- format slot 14 of player with a grass named "&aTerras" with lore "&7Mostrar todas as terras dominadas." to close then run [make player execute command "/negar"]
- format slot 16 of player with map named "&aPedidos" with lore "&7Mostrar todos os pedidos pendentes." to run [execute player command "/f invitations"]
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # Desfazer
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- else if argument 1 is "sair":
- if {f.fac.name.%player%} isn't set:
- send "&cVocê não faz parte de uma facção."
- stop
- else if {f.fac.grade.%player%} > 2:
- send "&cO líder da facção não pode abandoná-la. Caso queira deletá-la, utilize /f desfazer."
- else:
- delete {f.fac.name.%player%}
- delete {f.fac.grade.%player%}
- open chest with 3 rows named "Confirmação" to player
- format slot 12 of player with a wool:5 named "&aAceitar (Leia Abaixo)" to close then run [make player execute command "/f sairc"]
- format slot 16 of player with a wool:14 named "&cNegar" with lore "&7Cancelar esta operação." to close then run [make player execute command "/negar"]
- stop
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # Remover
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- else if argument 1 is "desfazerc":
- if command sender is a player:
- if {f.fac.name.%player%} isn't set:
- send "&cVocê não está em uma facção."
- stop
- else if {f.fac.grade.%player%} isn't 3:
- send "&cVocê não tem o grau necessário."
- stop
- else:
- set {_faction} to "%{f.fac.name.%player%}%"
- else:
- if arg-2 isn't set:
- stop
- set {_faction} to "%arg-2%"
- if command sender is a player:
- send "&cVocê acaba de sair da sua facção."
- loop {f.list.factions::*}:
- if "%{_faction}%" is "%loop-value%":
- remove loop-value from {f.list.factions::*}
- delete {f.fac.desc.%{_faction}%}
- delete {f.fac.powerboost.%{_faction}%}
- delete {f.fac.tag.%{_faction}%}
- delete {f.fac.lastconnection.%{_faction}%}
- delete {f.fac.home.%{_faction}%}
- delete {f.fac.invitation.%{_faction}%}
- delete {f.fac.chunksclaims.%{_faction}%}
- clear {f.fac.ennemy.%{_faction}%::*}
- loop {f.fac.ally.%{_faction}%::*}:
- loop {f.fac.ally.%loop-value-1%::*}:
- if "%loop-value-2%" is "%{_faction}%":
- remove loop-value-2 from {f.fac.ennemy.%loop-value-1%::*}
- clear {f.fac.ally.%{_faction}%::*}
- loop {f.chunk::*}:
- if "%loop-value-1%" is "%{_faction}%":
- remove loop-value-1 from {f.chunk::*}
- loop {f.list.players::*}:
- if {f.fac.name.%loop-value-1%} is {_faction}:
- delete {f.fac.name.%loop-value-1%}
- delete {f.fac.grade.%loop-value-1%}
- delete {f.fac.name.%player%}
- delete {f.fac.grade.%player%}
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # Desfazer Principal
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- else if argument 1 is "desfazer":
- if {f.fac.name.%player%} isn't set:
- send "&cVocê não faz parte de uma facção."
- else:
- open chest with 3 rows named "Confirmação" to player
- format slot 11 of player with a wool:5 named "&aAceitar (Leia Abaixo)" with lore "&cVocê tem certeza que quer desfazer sua facção?" to close then run [make player execute command "/f desfazerc"]
- format slot 15 of player with a wool:14 named "&cNegar" with lore "&7Cancelar esta operação." to close then run [make player execute command "/negar"]
- wait 45 seconds
- send "&cVocê está sendo monitorado por atividades suspeitas."
- stop
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # Abandonar Principal
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- else if argument 1 is "abandonar":
- if {f.fac.name.%player%} isn't set:
- send "&cVocê não faz parte de uma facção."
- stop
- else if {f.fac.grade.%player%} < 2:
- send "&cVocê não tem o grau necessário."
- stop
- else if {f.chunk::%chunk at player%} isn't set:
- send "&cVocê não pode retirar terras de outras facções!"
- stop
- else if {f.chunk::%chunk at player%} isn't {f.fac.name.%player%}:
- send "&cVocê não pode retirar terras de outras facções!"
- stop
- else:
- subtract 1 from {f.fac.chunksclaims.%{f.fac.name.%player%}%}
- delete {f.chunk::%chunk at player%}
- open chest with 4 rows named "Confirmação" to player
- format slot 13 of player with a grass named "Tem certeza que quer abandonar esta terra?" to close then run [make player execute command "/example1"]
- format slot 20 of player with a wool:5 named "&aAceitar (Leia Abaixo)" to close then run [make player execute command "/f abandonarc"]
- format slot 24 of player with a wool:14 named "&cNegar" with lore "&7Cancelar esta operação." to close then run [make player execute command "/negar"]
- add 1 to {f.fac.chunksclaims.%{f.fac.name.%player%}%}
- set {f.chunk::%chunk at player%} to {f.fac.name.%player%}
- stop
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # QUIT/KICK/PROMOTE
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- else if argument 1 is "expulsarc":
- if {f.fac.name.%player%} isn't set:
- send "&cVocê não está em uma facção."
- else if arg-2 isn't set:
- send "&cUtilize /f expulsar <jogador>."
- else if {f.fac.grade.%player%} < 2:
- send "&c&cVocê não tem o grau necessário."
- else if {f.fac.name.%arg-2%} isn't {f.fac.name.%player%}:
- send "&cOps! O jogador %arg-2% não está em sua facção!"
- else if {f.fac.grade.%arg-2%} isn't 1:
- send "&cVocê deve rebaixar a classificação do jogador antes de expulsa-lo!"
- else:
- delete {f.fac.name.%arg-2%}
- delete {f.fac.grade.%arg-2%}
- send "&aO jogador %player% foi expulso de sua facção!" to {_c}
- else if argument 1 is "expulsar":
- if {f.fac.name.%player%} isn't set:
- send "&cVocê não está em uma facção."
- else if arg-2 isn't set:
- send "&cUtilize /f expulsar <jogador>."
- else if {f.fac.grade.%player%} < 2:
- send "&c&cVocê não tem o grau necessário."
- else if {f.fac.name.%arg-2%} isn't {f.fac.name.%player%}:
- send "&cOps! O jogador %arg-2% não está em sua facção!"
- else if {f.fac.grade.%arg-2%} isn't 1:
- send "&cVocê deve rebaixar a classificação do jogador antes de expulsa-lo!"
- else:
- open chest with 3 rows named "Confirmação" to player
- format slot 11 of player with a wool:5 named "&aAceitar (Leia Abaixo)" with lore "&cVocê tem certeza que deseja remover este jogador?" to close then run [make player execute command "/f expulsarc %arg-2%"]
- format slot 15 of player with a wool:14 named "&cNegar" with lore "&7Cancelar esta operação." to close then run [make player execute command "/negar"]
- stop
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # INVITATION/MEMBRE
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- 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 "&cUtilize /f aceitar <nome>."
- 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%::*}
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # Descrição
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- if argument 1 is "desc":
- if {f.fac.name.%player%} isn't set:
- send "&cVocê não está em uma facção."
- else if arg-2 isn't set:
- send "&cColoque a descrição após o 'desc'."
- else if {f.fac.grade.%player%} < 2:
- send "&cVocê não tem o grau necessário."
- else:
- set {f.fac.desc.%{f.fac.name.%player%}%} to arg-2
- send "&aVocê definiu a descrição da facção para '%arg-2%'."
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- # Ajuda
- #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
- else if argument 1 is "ajuda":
- if {f.fac.name.%player%} isn't set:
- send "&a/f listar &8- &7Utilize para ver as facções online."
- send "&a/f info <nome> &8- &7Utilize para as informações sobre uma facção."
- send "&a/f perfil <jogador> &8- &7Utilize para ver as informações de um jogador."
- send "&a/f criar <nome> &8- &7Crie sua própia facção."
- send "&a/f aceitar <nome>&8- &7Utilize para aceitar um convite."
- send "&a/f recusar &8- &7Utilize para recusar um convite."
- send "&a/f menu &8- &7Utilize para ver o menu da sua facção."
- send "&a/f membros <nome> &8- &7Utilize para listar membros de uma facção."
- send "&a/f mapa [on|off] &8- &7Utilize para ver o mapa."
- send "&a/f verterras &8- &7Mostrar delimitações das terras."
- else:
- send "&a/f listar &8- &7Utilize para listar todas as facções."
- send "&a/f info <facção> &8- &7Utilize para ver as informações sobre uma facção."
- send "&a/f sair &8- &7Utilize para sair de sua facção."
- send "&a/f dominar &8- &7Utilize para dominar uma terra."
- send "&a/f abandonar &8- &7Utilize abandonar uma terra de sua facção."
- send "&a/f base &8- &7Utilize para ir até a base de sua facção."
- send "&a/f definir base &8- &7Definir localização da base.."
- send "&a/f expulsar <jogador> &8- &7Utilize para expulsar algum jogador de sua facção."
- send "&a/f desfazer &8- &7Utilize para caso for lider exclua a sua facção."
- send "&a/f criar <nome> &8- &7Utilize para criar sua facção."
- send "&a/f desc <descrição> &8- &7Utilize para definir a descrição."
- send "&a/f mapa [on/off] &8- &7Utilize para ver o mapa."
- send "&a/f menu &8- &7Utilize para ver o menu da facção."
- send "&a/f convidar <jogador> &8- &7Utilize para convidar um jogador para uma facção."
Advertisement
Add Comment
Please, Sign In to add comment