mIRC Home    About    Download    Register    News    Help

Print Thread
#105496 16/12/04 07:00 PM
Joined: Nov 2004
Posts: 84
GogetaX Offline OP
Babel fish
OP Offline
Babel fish
Joined: Nov 2004
Posts: 84
hi all
i have code:
alias start {
msg $chan START
**and here i wanna past a wait 4 secunds**
** here i wanna past after this 4 secunds, will active alias 1
}

alias 1 {
...
...
...
wait 4 secunds
active alias 2
}

so how to do the wait thing (timer i guess)


by the time you finish reading this, you realize you have wasted 5 secundes of your life!
#105497 16/12/04 07:24 PM
Joined: Dec 2004
Posts: 12
D
Pikka bird
Offline
Pikka bird
D
Joined: Dec 2004
Posts: 12
use:

/timer <number of times you want to do it> <seconds> <syntax>

so wat you really want is

Code:
alias start {
msg $chan START
/timer 1 4 /1
}

alias 1 {
/timer 1 4 /2
}


if you wanted to infinatly increase variable %x every second, you'd type
/timer 0 1 inc %x

Note: You do not need the '/' before 1 and 2.

#105498 16/12/04 08:01 PM
Joined: Nov 2004
Posts: 84
GogetaX Offline OP
Babel fish
OP Offline
Babel fish
Joined: Nov 2004
Posts: 84
the code dont working in "on *:TEXT:" function...


alias 1 {
set %BoT.Q The Last Version Of NFS?
msg $chan 4-------------------------
msg $chan 11 %BoT.Q
msg $chan 13 *****
msg $chan 4-------------------------
set %BoT.Q2 1
}
on *:TEXT:nfsu2:#onlineinfo:{ if ( %BoT.Q2 == 1 ) {
msg $chan 4Right14 $nick $+ ! 7The Answer Was:12 NFSU2
unset %BoT.A
timer1 1 4 2
}
}

and the time here dont working...


by the time you finish reading this, you realize you have wasted 5 secundes of your life!
#105499 17/12/04 02:29 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
You could be having trouble with /timer1, Dont use /timer1 becuase timers are numbered dynamicly so that number might be in use just use /timer

Your going to be having trouble using $chan in those alias, if called from a timer the alias does not have a $chan value so you well need to pass it to the alias. ex
do NOT use ... /1
do use ... /1$chan
or depending where u are use /1 #onlineinfo

Then use this code.

Code:
alias 1 {
  set %BoT.Q The Last Version Of NFS?
  msg $1 4-------------------------
  msg $1 11 %BoT.Q
  msg $1 13 *****
  msg $1 4-------------------------
  set %BoT.Q2 1
}
on *:TEXT:nfsu2:#onlineinfo:{ if ( %BoT.Q2 == 1 ) {
    msg $chan 4Right14 $nick $+ ! 7The Answer Was:12 NFSU2
    unset %BoT.A
    timer 1 4 2 $chan
  }
}


Link Copied to Clipboard