mIRC Homepage
Posted By: Deep3D Bot Script (whois) - 30/11/03 05:53 PM
Hi, im making a script for my bot..

Here is how it need to work:
1. msg bot: !status <nick>
2. Bot takes a whois on nick
3. If nick is irc oper, return notice: nick is a irc oper (and the bot will halt his command)
4. Else send command to nick, ect: msg nick hello there

Get it? :tongue:
Posted By: pleur Re: Bot Script (whois) - 30/11/03 06:26 PM
just use the on TEXT....

or do you think we write the script for you?
Posted By: Deep3D Re: Bot Script (whois) - 30/11/03 06:32 PM
on text ffs... will that work?!
Posted By: pleur Re: Bot Script (whois) - 01/12/03 08:36 AM
on *:TEXT:!status*:*:{
If ($1) {
echo - Put command's in here, the parameter is filled and the command was requested by $nick
}
}


(I'm not sure about the first line, 'cause i've no mIRC around here, just use the mIRC Help)
Posted By: theRat Re: Bot Script (whois) - 01/12/03 01:52 PM
on *:TEXT:!status*:*:{
If ($1) {
echo - Put command's in here, the parameter is filled and the command was requested by $nick
}
}

let's see, the event will trigger if the text starts with !status, so $0 >= 1 in the event, so the $1 parameter exists all the time(!status is actually $1), but it can also be !statuswhateverwewanthere, but it doesn't matter, the point is that the if ( $1 ) is totally useless statement

on *:TEXT:!status *:*:{
If ($2) {
set %status.whois %status.whois $2
set $+(%,status.,$2) $nick
whois $2
enable #!statuswhois
}
}

#!statuswhois off
raw 313:*: {
if ( $2 isin %status.whois ) {
%status.whois = $remtok(%status.whois,$2,32)
if ( !%status.whois ) disable #!statuswhois
msg $eval($+(%,status.,$2),2) $2 is IRCop
}
}
#!statuswhois end

I'd use something like this.... This isn't tested of course, but it should work...

Posted By: Nobodi Re: Bot Script (whois) - 02/12/03 10:37 AM
Isn't your checking for $2 pointless as the matchtext all ready checks that there are at least 2 tokens.
© mIRC Discussion Forums