mIRC Home    About    Download    Register    News    Help

Print Thread
using /set -z #16625 23/03/03 10:22 PM
Joined: Mar 2003
Posts: 34
L
Lucres Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Mar 2003
Posts: 34
Is there a way to msg a chan when the var
used in the /sat -z command hits 0?

confused


Heh..
Re: using /set -z #16626 23/03/03 11:02 PM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
if %var == 0 { msg #chan this variable is now at 0 }

u should include that somewhere in ur script loop ur tryin to set ... i think that should do what ur asking it do.....


D3m0nnet.com
Re: using /set -z #16627 23/03/03 11:30 PM
Joined: Mar 2003
Posts: 34
L
Lucres Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Mar 2003
Posts: 34
Im still a bit new at scripting ( as shown by the num of posts )
so i don't know about 'loops'. Can you tell me where to put it?

Code:
  on 4:text:!skill doom *:#: { 
     dec -z %cur [ $+ [ $3 ] ] | msg $chan $3 has been inflicted with DOOM! }
  :loop: 
    if %var == 0 { msg #chan $3 $+ ' s HP is now at 0!!! }
}


Heh..
Re: using /set -z #16628 23/03/03 11:30 PM
Joined: Mar 2003
Posts: 34
L
Lucres Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Mar 2003
Posts: 34
<argh, double post! sorry smile >

Last edited by Lucres; 23/03/03 11:33 PM.

Heh..
Re: using /set -z #16629 24/03/03 12:26 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
aok nm its not ven in a loop ur just decreasing the value of the variable on a set trigger ..... ok so then try something like this
Code:
  on 4:text:!skill doom *:#: {
     dec -z %cur [ $+ [ $3 ] ] 
     if %cur [ $+ [ $3 ] ] != 0 { msg $chan $3 has been inflicted with DOOM! }
     if %cur [ $+ [ $3 ] ] == 0 { msg #chan $3 $+ ' s HP is now at 0!!! }
}

hopefully that will show ya what u might need to do to get it working the way u want


D3m0nnet.com