mIRC Homepage
Posted By: Lucres using /set -z - 23/03/03 10:22 PM
Is there a way to msg a chan when the var
used in the /sat -z command hits 0?

confused
Posted By: _D3m0n_ Re: using /set -z - 23/03/03 11:02 PM
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.....
Posted By: Lucres Re: using /set -z - 23/03/03 11:30 PM
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!!! }
}
Posted By: Lucres Re: using /set -z - 23/03/03 11:30 PM
<argh, double post! sorry smile >
Posted By: _D3m0n_ Re: using /set -z - 24/03/03 12:26 AM
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
© mIRC Discussion Forums