mIRC Home    About    Download    Register    News    Help

Print Thread
Need help with a simple script #257972 28/05/16 11:12 AM
Joined: Mar 2016
Posts: 50
T
TUSK3N Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Mar 2016
Posts: 50
Hello I want a script for my bot that responds with a nick

so if someone types
User: !hello TUSK3N
The output should be
Bot: Hello, TUSK3N!

etc

What it shouldnt do is if $2 is not a nick in the channel it shouldnt say anything.

So if it hasnt seen the nick it shouldnt trigger it.

Because if someone says something rude and my bot will repeat it its not good.

Re: Need help with a simple script [Re: TUSK3N] #257973 28/05/16 12:36 PM
Joined: Jun 2015
Posts: 84
F
Fonic_Artes Offline
Babel fish
Offline
Babel fish
F
Joined: Jun 2015
Posts: 84
Hmm, how about this.

Code:
on *:TEXT:!hello*:#: {
 if ($2 !isin $chan) { halt }
 else {
  msg # Hello, $2 $+ !
 }
}

Re: Need help with a simple script [Re: Fonic_Artes] #257974 28/05/16 03:30 PM
Joined: Mar 2016
Posts: 50
T
TUSK3N Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Mar 2016
Posts: 50
It only works in one channel its really wierd.

nvm I would mention that im on Twitch and it will only respond if the broadcaster isin $2 how does that work?

Last edited by TUSK3N; 28/05/16 03:52 PM.
Re: Need help with a simple script [Re: TUSK3N] #257976 28/05/16 08:28 PM
Joined: Sep 2014
Posts: 259
S
Sakana Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
Use !ison instead of !isin

isin is to check if string1 is inside string2