mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2006
Posts: 15
J
Pikka bird
OP Offline
Pikka bird
J
Joined: Mar 2006
Posts: 15
I am looking to add a script to my bot that will repeat into the room anything that I PM to it...I want it to only do this when I pm it and not when everyone else does. Can anyone help?

Joined: Jul 2004
Posts: 59
L
Babel fish
Offline
Babel fish
L
Joined: Jul 2004
Posts: 59
on *:Open:?: {
if $nick == yournick notice #channame $1-
}

Try something like that you can find more help in the mIRC help files. On Open, Levels give it a go and post here for more help.

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
you don't want on open, you want on text. on open triggers only on the first message of a new window.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Mar 2006
Posts: 15
J
Pikka bird
OP Offline
Pikka bird
J
Joined: Mar 2006
Posts: 15
Yep i figured out that on text is best, but now that I got it working I would like to add a bit that if anyone but me messages the bot it will reply to them telling them not to PM the bot.

Here is what I have so far, I tried adding elseif but I must have gotten the brackets wrong or something because it flooded the pm with replies.

Quote:
on *:TEXT:*:?: {
if $nick == Eric-4-Yah msg #YHWH $1-
elseif $nick != Eric-4-Yah msg $nick I am not a human...Please do not PM me
}


Joined: Jun 2006
Posts: 79
B
Babel fish
Offline
Babel fish
B
Joined: Jun 2006
Posts: 79
Code:
 
on *:TEXT:*:?: {
if ($nick == Eric-4-Yah) .msg #YHWH $1-
else { .msg $nick I am not a human...Please do not PM me }
}


Link Copied to Clipboard