mIRC Home    About    Download    Register    News    Help

Print Thread
#62405 30/11/03 05:53 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
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:

#62406 30/11/03 06:26 PM
Joined: Oct 2003
Posts: 30
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2003
Posts: 30
just use the on TEXT....

or do you think we write the script for you?


------
Cheers m8!
#62407 30/11/03 06:32 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
on text ffs... will that work?!

#62408 01/12/03 08:36 AM
Joined: Oct 2003
Posts: 30
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2003
Posts: 30
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)


------
Cheers m8!
#62409 01/12/03 01:52 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
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...



Code:
//if ( khaled isgod ) echo yes | else echo no
#62410 02/12/03 10:37 AM
Joined: Dec 2002
Posts: 191
N
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
Isn't your checking for $2 pointless as the matchtext all ready checks that there are at least 2 tokens.


Link Copied to Clipboard