#blacklisting names in a clan skript

1 messages · Page 1 of 1 (latest)

thorny egret
#
                if arg-1 is "create":
                    if arg-2 is not set:
                        send "{@color1}/clan create name"
                    else:
                        if length of arg-2 is greater than 8:
                            send "{@color2}Clan names can only be up to {@color2}8 {@color1}characters"
                            stop
                        if arg-2 is "###, ####, #####, ####, ####, ####, ####, ####, ###, ####,":
                            send "&c&lthat name is not allowed" to player
                            stop
                        if arg-2 matches "[a-zA-Z]+":
                            if {clans::%player%} is not set:
                                loop {clans::*}:```
#

if arg-1 is "create" or "disband" or "join" or "leave" or "invite" or "chat" or "info" or "kick":
if arg-1 is "create":
if arg-2 is not set:
send "{@color1}/clan create name"
else:
if length of arg-2 is greater than 8:
send "{@color2}Clan names can only be up to {@color2}8 {@color1}characters"
stop
if arg-2 is "###, ####, #####, ####, ####, ####, ####, ####, ###, ####,":
send "&c&lthat name is not allowed" to player
stop
if arg-2 matches "[a-zA-Z]+":
if {clans::%player%} is not set:
loop {clans::*}:

#

textblocks messed it up

gray current
#

so what u need help w/

#

?

quiet basin
#

no idea what you want bro

thorny egret
#

I need to be able to block list names. For example, racial slurs from being created into a clan.

#

Right now, what I'm using is.

Send "&c&lThat name is not allowed"
Stop```
But this doesent work for some reason
gray current
#

error?

thorny egret
#

None ill send exact skript again just removing most of the slurs

gray current
#

like you can create the clan with the censored word even though it has the thingy right

thorny egret
#

Yeah, that's the problem.

#

Here is the script, so it's more readable.

rapid stratus
#

try doing if arg-2 contains "###, ####, #####, ####, ####, ####, ####, ####, ###, ####,"

thorny egret
#
                if arg-1 is "create":
                    if arg-2 is not set:
                        send "&6Totem Clans: /clan create name"
                    else:
                        if length of arg-2 is greater than 8:
                            send "{@color2}Clan names can only be up to {@color1}8 {@color2}characters"
                            stop
                        if arg-2 contains "slur1, slur2,":
                            send "&c&lthat name is not allowed" to player
                            stop```
thorny egret
#

Still works. Like it still creates the clan when it should not.

gray current
#

hmmm

#

can you send the full skript

#

like isnt it part of the cmd

thorny egret
#

the full skript is 1230 lines

rapid stratus
#

the command is 1230 lines?

thorny egret
#

I'm going to have to send it as a file as it will not let me in any other way.

gray current
#

huh

#

no file

#

pls

thorny egret
gray current
#

do you have a coding app

#

or something

thorny egret
#

i have vsc

gray current
#

paste the code there

#

do ctrl a -> ctrl c

#

and paste here

#

I think it automatically puts it as a format where

#

its not a file

#

or something

#

idk

thorny egret
#

I'll try

rapid stratus
# thorny egret

click enter and choose to send it as a file scroll up and it will be up there

#

and remove the text

#

press enter and it will show this

#

prress upload as file

#

and remove the text and send

#

a file will get attached

thorny egret
#

there we go

gray current
#

nice

#

time to steal the code

#

/j

thorny egret
#

bro thats like 1% of it lol

rapid stratus
#

he is joking

thorny egret
gray current
#

maybe use else if

thorny egret
#

Could you give me an example?

gray current
#

instead of

if
if```
thorny egret
#

I'm kind of confused by that.

gray current
#

oh

#

maybe not stop

#

you might wanna use cancel event

#

idk

rapid stratus
thorny egret
#

Yes, it's not an event.

rapid stratus
#

so you cant cancel it

#

maybe make a list of the slurs and then check for them

#

instead of writing them

gray current
#

oh wait nvm

thorny egret
gray current
#

thought it was on command for some reason

gray current
#

set the list to the bad words

#

and then loop

rapid stratus
#

and then check for that liist

#

do smth like

  if arg-2 contains {noslurs::*}:
    send "bad" to player```
thorny egret
#

I will try that right now.

rapid stratus
#

k

gray current
#

:/

rapid stratus
gray current
#

because

#

becuaae]

#

qao0wipiwfhweuo;

#

:)

rapid stratus
gray current
#

is the comma at the end needed

rapid stratus
#

no

thorny egret
#

@rapid stratus @gray current I love you both so much. Thank you so much.

rapid stratus
#

np

gray current
#

yw

rapid stratus
#

did the list work?

thorny egret
#

Yes,

#

Now I just gotta go make the full liat

#

List

rapid stratus
#

nie

#

nice

gray current
#

now time to copy code

#

/j

thorny egret
#

@rapid stratus If you're still available, could you help me with this It's becoming a major problem now.

rapid stratus
#

ok

#

im fast (:

#

multi taasking

thorny egret
#

I'm trying discord's being stupid.

#

It literally won't send. I gotta do the file thing again, but because my Ram is so limited, it's hard.

rapid stratus
#

indent

#

like this

    if arg-2 contains "{noslurs::*}"
        send "hi" to player
        stop
    if arg-2 matches "[a-zA-Z]+":```
thorny egret
rapid stratus
#

yea

#

after conditions indent

thorny egret
rapid stratus
#

try it and see

#

Did it work

#

@thorny egret

gray current
#

Always follow the !indent thing

#

th

#

!indent

civic ridgeBOT
# gray current !indent

In skript, you need to maintain consistent indentation, meaning you cannot indent 1 line 5 spaces, and the next 7 spaces. Usually it’s recommended you use tabs, however.

A good rule of thumb is to always indent the subsequent line whenever the previous statement ends with a :, an exception to this is in command statements with items before the trigger such as permission: or aliases:

With conditional statements and loops, any code that is indented within the statement will be run as a part of the statement, other code will not be run within the statement. Here is an example of proper indentation:

https://i.imgur.com/PbfZ12M.png

thorny egret
rapid stratus
#

ok

quiet basin
#

a text does not contain a list

thorny egret
#

I'm gonna have to let you know tomorrow.
Plan expired.

quiet basin
#

or if arg-2 contains "this", "that" or "e"

thorny egret
#

I had to change it because it was slurs. Minehut does not allow it.

thorny egret