|
Joined: Mar 2004
Posts: 359
Fjord artisan
|
OP
Fjord artisan
Joined: Mar 2004
Posts: 359 |
Is there a way to "grab" a nickname from the current channel? for an example:
-Bot Loaded- --Scanning Nicknames-- <Bot> Aha, I see you, George!
Just to clear something up, because I have a weird feeling if I don't say this then you'll think this is what I mean.. I don't want it to read nicknames from a list, but from the current channel so it could be possibly anybody in the channel.
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
alias scan {
var %i = $nick($1,0)
while (%i) {
var $+(%,nick,%i) = $nick($1,%i)
dec %i
}
{ other commands here }
} I am not sure this is what you wanted, but i'll try it This checks every nick in the channel and stores them in temp. variables. Lest say John is the 5th nick in the nicklist, then John's nick would be stored in a temporary variable called %nick5 Later on the same script you can refer to John's nick as %nick5 The usage of the alias is /scan <#channel>Hope this is what you wanted Zyzzy.
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Mar 2004
Posts: 359
Fjord artisan
|
OP
Fjord artisan
Joined: Mar 2004
Posts: 359 |
Havent tested it yet, but i'll try it and as far as youve described it, its what im lookin for Thanks
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
Cool If you want to say 'Aha, I see you, <nick>" to any random nick from the channel, you could add this to the command parts: msg $1 Aha, I see you, %nick $+ $rand(1,$nick($1,0)) And this would get a random nick and say that sentence. Greetings, Zyzzyx.
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: May 2004
Posts: 24
Ameglian cow
|
Ameglian cow
Joined: May 2004
Posts: 24 |
Try this alias checknick {
; here u set your friends' name separated by space.
var %x George Mike Peter
var %z = 1
while ($nick($1,%z)) {
var %c $ifmatch
if ($istok(%x,%c,32)) {
var %friends = $addtok(%friends,%c,32)
}
inc %z
}
if (%friends) {
msg # Aha I see you, $replace(%friends,$chr(44),$chr(44) $+ $chr(32)) $+ !!!
}
else {
msg # Uh, I cant see you. Where are u gone?
}
} usage: /checknick #channel EDIT: sry Zyzzyx26, i saw your post too late :tongue:
Last edited by kocam; 12/06/04 02:41 PM.
|
|
|
|
Joined: Mar 2004
Posts: 359
Fjord artisan
|
OP
Fjord artisan
Joined: Mar 2004
Posts: 359 |
- OTHER Unknown command - thats what i get when i try Zyzzyx's and for the other one im not sure thats what im lookin for im on ver 6.15
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
alias scan {
var %i = $nick($1,0)
while (%i) {
var $+(%,nick,%i) = $nick($1,%i)
dec %i
}
msg $1 Aha, I see you, %nick $+ $rand(1,$nick($1,0))
} Try this one That 1st code i gave you was a general one. The Other commands here part was to you to change it to whatever you wanted to do. This code here should do what you wish to Zyzzy.
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Apr 2003
Posts: 701
Hoopy frood
|
Hoopy frood
Joined: Apr 2003
Posts: 701 |
I think you forgot some parsing, unless you want to have the nick show as whatever happens to be in the global variable %nick appended with a random number msg $1 Aha, I see you, %nick [ $+ [ $rand(1,$nick($1,0)) ] ]There's other ways using $eval and $+(), this is my favorite though
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
That is very true, thanks
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
|