mIRC Home    About    Download    Register    News    Help

Print Thread
#157242 23/08/06 06:09 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
I have 2 set of codes to make this work. One in alias and one in remote. Is it possible to replace both with one in remote?

alias: randomnick {
if ( $me isop #manila ) { set %op.random.channel.nick $rand($nick(#manila,0),1) | whois $nick(#manila,%op.random.channel.nick) }
}
remote: on *:{
if ( %op.random == off ) || ( %op.random == $null ) { return }}

#157243 23/08/06 06:56 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
You can put this on your remote

Code:
 alias randomnick {
  if ( !%op.random ) && ( $me isop #manila ) { whois $nick($v2,$rand(1,$nick($v2,0))) }
}
 


If this is not what you're looking for, please clarify.


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
#157244 23/08/06 07:02 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Will this do a whois on the random nick every 60sec ?
Something like this maybe?

alias randomnick {
if ( %op.random == off ) || ( %op.random == $null ) || ($nick isop #) { return }
{ set %op.random On | timerrnick 0 60 randomnick }
if ( !%op.random ) && ( $me isop #manila ) { whois $nick($v2,$rand(1,$nick($v2,0))) }
}

Last edited by Garou; 23/08/06 07:32 PM.
#157245 23/08/06 07:24 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
No, but you will need to use a /timer

Code:
 /timerrandomwhois 0 60 randomnick 


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
#157246 23/08/06 07:28 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Yes, can it be added in the same code?

#157247 23/08/06 07:42 PM
Joined: Mar 2004
Posts: 210
F
Fjord artisan
Offline
Fjord artisan
F
Joined: Mar 2004
Posts: 210
You can have an alias in your remotes by using the "alias" word, but you can't have either a remote or an alias functioning as both an alias and a remote - they have to be 1 remote and 1 alias. You can't call a remote (it triggers based on an event) and you can't have an event trigger an alias (without a remote calling the alias when it [the remote] triggers).

So "can it all be in one file"? Yes. "Can it all be one function"? No.

(I guess the answer depends on which question you're asking.)

#157248 23/08/06 07:47 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
I see ok Yes all in one file please is just fine for me.

#157249 23/08/06 07:48 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Code:
 alias randomnick {
  if  ( !%op.random ) {
    if ( !$timer(randomwhois) ) { .timerrandomwhois 0 60 randomnick  }
    if ( $me isop #manila ) { whois $nick($v2,$rand(1,$nick($v2,0))) }
  }
} 


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
#157250 23/08/06 08:04 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
I put this in the alias right?

I get this error

* Error: /RANDOMNICK is an unknown command.

#157251 23/08/06 08:24 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
It working now, those this seem ok to you?

alias randomnick {
if ( %op.random == off ) || ( %op.random == $null ) || ($nick isop #) { return }
if ( !$timer(randomwhois) ) { timerrandomwhois 0 60 randomnick }
if ( $me isop #manila ) { whois $nick($v2,$rand(1,$nick($v2,0))) }
}
}

#157252 23/08/06 08:30 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
You can remove the "|| ($nick isop #)", not needed there.


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
#157253 23/08/06 08:31 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Ok cool thx very much.


Link Copied to Clipboard