Solved My clan skript help

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
Feb 24, 2017
191
7
0
foroendertheth.foroactivo.com
I want to do like a clan tag of 3 letters whend you chat send the 3 letter the clan owner chooze for the clan and colored. but I just can do the clan name that the players chooze and I delete the on chat event because sometimes is too long or offencive for other players
code_language.skript:
options:
    logo: &a&l<&7&lClan&a&l>&r&7
    clan: {clan.%{nombre.%player%}%} #clan name
    unido: {clan.unido.%player%.%{nombre.%player%}%}# unido= join
    creador: {clan.creador.%{nombre.%player%}%}#Creador= owner
    nombre: {nombre.%player%}#nombre = name
command /clancrear [<text>]:#crear = create
    trigger:
        if arg 1 is not set:
            send "{@logo}clancrear <nombre>"
            send "{@logo}Si nesesitas ayuda /clan ayuda"
        else:
            if {@unido} is true:
                send "{@logo}Ya estas en un clan o tienes uno"
                send "{@logo}/clan abandonar"
                send "{@logo}/clanborrar"
            else:              
                if {clan.%arg 1%} is true:
                    send "{@logo}Ese clan existe"
                    stop
                else:
                    set {nombre.%player%} to arg 1
                    send "{@logo}clan %{nombre.%player%}% creado"
                    set {@clan} to true
                    set {@unido} to true
                    set {@creador} to true
command /clanborrar:#borrar = delete
    trigger:
        if {@creador} is true:
            if {seguro.%player%} is true:
                send "{@logo}Clan %{@nombre}% Borrado"
                wait a tick
                delete {@clan}
                delete {@unido}
            else:
                set {seguro.%player%} to true
                send "{@logo}Seguro si quieres borrarlo escribe el comando otra ves tienes 10 segundos"
                wait 10 second
                delete {seguro.%player%}
        else:
            send "{@logo}No eres creador de un clan"
command /clan [<text>] [<offlineplayer>]:
    trigger:
        if arg 1 is not set:
            send "{@logo}/Clan help"
        if arg 1 is "help":
            if arg 2 is set:
                send "{@logo}/Clan help"
            else:
                send "{@logo}/Clancrear <nombre>:crea tu clan"
                send "{@logo}/Clanborrar:Borra tu clan"
                send "{@logo}/Clan Invitar <jugador>:Invita jugadores a tu clan"
                send "{@logo}/Clan Expulsar <jugador>:Expulsa jugador de tu clan"
                send "{@logo}/Clan accept <jugador>:Acepta su invitacion a tu clan"
                send "{@logo}/Clan Salir:Sal de el clan en que estes"
                send "{@logo}/Clan set base: Pon la base del clan"
                send "{@logo}/Clan base: Teleportate a la base"
        if arg 1 is "invitar":
            if {@creador} is true:
                if arg 2 is set:
                    if {clan.invitando.%player%} is true:
                        send "{@logo}Espera 30 segundos para invitar a alguien"
                    else:
                        if {clan.unido.%arg 2%.%{nombre.%arg 2%}%} is true:
                            send "{@logo}%arg 2% esta en el clan %{nombre.%arg 2%}%"
                        else:
                            send "{@logo}Invitastes a %arg 2% a tu clan %{@nombre}%"
                            send "{@logo}%player% quiere que te unas a %{@nombre}%" to arg 2
                            send "{@logo}clan accept %player%" to arg 2
                            send "{@logo}Tienes 30 segundos para aceptar"
                            set {clan.invitado.%arg 2%.%player%} to true
                            set {clan.invitando.%player%} to true
                            wait 30 second
                            delete {clan.invitado.%arg 2%.%player%}
                            delete {clan.invitando.%player%}
                else:
                    send "{@logo}/Clan invitar jugador"                          
        if arg 1 is "accept":
            if {clan.invitado.%player%.%arg 2%} is true:
                set {clan.unido.%player%.%{nombre.%arg 2%}%} to true
                set {@nombre} to "%{nombre.%arg 2%}%"
                send "{@logo}Te as unido a %{nombre.%arg 2%}%"
                send "{@logo}%player% se unio a tu clan" to arg 2
            else:
                send "{@logo}No tienes invitacion de %arg 2% o tardastes mucho en aceptar"
        if arg 1 is "expulsar":
            if {@creador} is true:
                if {nombre.%arg 2%} is "%{@nombre}%":
                    delete {clan.unido.%arg 2%.%{nombre.%player%}%}
                    delete {nombre.%arg 2%}
                    send "{@logo}%arg 2% Expulsado de %{@nombre}%"
                    send "{@logo}%arg 2% Expulsado de %{@nombre}%" to arg 2
                else:
                    send "{@logo}%arg 2% No esta en tu clan"
            else:
                send "{@logo}No eres dueño de un clan"
        if arg 1 is "salir":
            if {@unido} is true:
                if {@creador} is true:
                    send "{@logo}Eres creador de tu clan usa este comando /clanborrar"
                else:
                    send "{@logo}Salistes del clan {@nombre}"
                    wait a tick
                    delete {@unido}
                    delete {@nombre}
            else:
                send "{@logo}No tienes un clan"
        if arg 1 is "set":
            if arg 2 is "base":
                if {@creador} is true:
                    set {clan.base.%{@nombre}%} to the player's location
                    send "{@logo}Base puesta"
                else:
                    send "{@logo}No eres el creador de un clan"
            else:
                send "{@logo}/Clan set base"
        if arg 1 is "base":
            if {@unido} is true:
                if {combate.%player%} is true:
                    send "{@logo}Estas en combate"
                else:
                    send "{@logo}espera 3 segundos"
                    set {mover.%player%} to true
                    delete {move.%player%}
                set {mover.%player%} to true
                wait 1 second
                send "{@logo}&c3"
                wait 1 second
                if {move.%player%} is true:
                    send "{@logo}Te movistes"
                else:
                    send "{@logo}&c2"
                    wait 1 second
                    if {move.%player%} is true:
                        send "{@logo}Te movistes"
                    else:
                        send "{@logo}&c1"
                        wait 1 second
                        if {move.%player%} is true:
                            send "{@logo}Te movistes"
                        else:
                            teleport the player to {clan.base.%{@nombre}%}
                            delete {mover.%player%}
on join:
    if {@unido} is true:
        execute console command "cclan %{@nombre}% %player%"
command /cclan <text> <player>:
    executable by: console
    trigger:
        if {clan.%arg 1%} is true:
            stop
        else:
            delete {clan.unido.%arg 2%.%{nombre.%arg 2%}%}
on damage of a player:
    attacker is a player
    if victim is in world "void":
        stop
    else if victim is in world "pvp":
        stop
    else:
        if {nombre.%attacker%} is "%{nombre.%victim%}%":
            cancel event
            send "{@logo}%victim% es de tu clan" to attacker
 
im sorry, do i understand correctly? You want a Clan Tag (3 letters) in Chat? just create a new commands example /clan TAG <Letters> and check if more than 3 letters, cancel it?
 
a
im sorry, do i understand correctly? You want a Clan Tag (3 letters) in Chat? just create a new commands example /clan TAG <Letters> and check if more than 3 letters, cancel it?[/Q

yes yes but how I cancel if is more than 3 or if is less than 3
 
Got an idea. or you doing this way:

code_language.skript:
command clan create:
 trigger:
  if arg-1 is "create":
   if arg-2 is set:
    set {_ClanName::*} to "%arg-2%" split at ""
    loop 3 times:
     if {_tag} is not set:
      set {_tag} to "%{_ClanName::%loop-number%}%"
     else:
      set {_tag} to "%{_tag}%%{_ClanName::%loop-number%}%"

This will tag with 3 letters at beginn example

i create a clan named "TeamBash" Tags will be "Tea"
 
Status
Not open for further replies.