Response to chat

  • 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 comminuty!

    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.

AmberH

Member
Jan 26, 2017
4
0
0
38
Hello and thank you for reading my post.

I am trying to make a sort of AI or bot. I set it up based on people chatting but i am running into some issues.

code_language.skript:
On chat:
     if message contains "Dame":
        if message contains "Why":
           if message contains "hate":
              if message contains "me":
                 wait 1 second
                 broadcast "{@prefix} &d&l%player%, I do not hate you! We merely have just irreconcilable differences"
                stop
         else:
            wait 1 second
           broadcast "{@prefix} &d&lI do not hate anyone."


So basically When they type in Dame which is the name of the bot. Me is included. How do I make it ignore words inside other words? I am sorry if i am not making sense. Basically it keeps doing the first thing because dame has me in it.. I am trying to get it to do the second thing when they say do you hate this person
 
Last edited:
I guess the code is a little wonky. What i tried to do is have it first search for the player to say Dame. So that activates the script and it looks for the next word. Does that make sense.
 
Yah. and then dame would respond about differences. When they say "Dame, why do you hate pikachu" She should respond with "I don't hate anyone" but instead it sees the ME in dame and responds with that.
 
Yah. and then dame would respond about differences. When they say "Dame, why do you hate pikachu" She should respond with "I don't hate anyone" but instead it sees the ME in dame and responds with that.
I am not at my computer right now, but I can give you some code once I get back to it (unless someone else responses first).
 
Yah. and then dame would respond about differences. When they say "Dame, why do you hate pikachu" She should respond with "I don't hate anyone" but instead it sees the ME in dame and responds with that.
What if u do

If message contains " me "

instead of

If message contains "me"?
 
Status
Not open for further replies.