This is a small command that you can use for a bot.. It's relatively simple.
(Please pardon my messy scripting, I'm not too organised when it comes to writing scripts.. Mainly trial and error)
..:: WARNING ::..
This script can heavily spam depending on the channel that it is used on.. Use at your own risk.
..:: ADDITIONAL NOTES ::..
• Do not criticise because of lack of timers.. I designed this for my bot which has netadmin which thusly means it does not need use of timers.
• I have been scripting in mIRC for a long time, so please do not treat me like a noob.
• This is old, sorry about using set instead of var.
on *:TEXT:!userlist*:#: {
if ($2 == $null) { msg $chan 4USAGE: !userlist <channel> | HALT }
elseif ($me !ison $2) { msg $chan 4ERROR: I cannot scan $2 as I am not in it. | HALT }
else {
msg $chan 12..::13 Userlist of $2 $+ 12 ::..
msg $chan 13There are 12 $+ $nick($2,0) $+ 13users in $2 $+ .
set %ulist 0
}
while (%ulist < $nick($2,0)) {
inc %ulist
msg $chan 12 $+ %ulist $+ : $nick($2,%ulist)
}
while (%ulist == $nick($2,0)) {
unset %ulist
HALT
}
}
TrueCoppa Said:
Napa182, the hax thing is just a joke we run around on the network I'm on
well maybe you should take that %hax var out an use the right var in the snippet cuz without the right var the snippet does not work the way it should.
unless you only want it to do numbers and not say the nicks...
Blackvenomm666, everyone's scripting style is different. If it works, that's all that matters. I usually keep my scripts to myself, so I script it messily =x
TheNitelyfe, Basically what I said in the above comment, I like my scripting style =x
Napa182, the hax thing is just a joke we run around on the network I'm on
Jethro_, a friend of mine has a scripting style very similar to yours, I just like my messy style hehehe
on *:TEXT:!uzerlist *:#:{
var %c $2
if (!%c) || ($me !ison %c) { msg # 4 $iif(!$2,USAGE: !userlist <channel>,ERROR: I can't scan $2 as I'm not in it.) }
else {
msg $chan 12..::13 Userlist of %c $+ 12 ::..
tokenize 62 $regsubex($str(@,$nick(%c,0)),/./g,12 $+ \n $+ 13:12 $nick(%c,\n) >)
msg $chan 13There are 12 $+ $0 $+ 13users in %c $+ .
msg $chan $*
}
}
Looks better imo
I believe that's a typo. Here is it, which looks better and less messy:
on *:text:!userlist*:#: {
if (!$2) { msg # 4USAGE: !userlist <channel> }
elseif ($me !ison $2) { msg # 4ERROR: I can't scan $2 as I'm not in it. }
else { var %u = 1 | while (%u <= $nick($2,0)) { msg # 12 $+ %u $+ : $nick($2,%u) | inc %u } }
}