Maleran2007-10-17 20:20:16
I just have a general question, I am trying to do a timed reset for my cures using the alarm command. I do this...
#ALARM +1 {
#IF (@eatting!=1) {
eatting=0
herbcheck
}
}
only instead of actually functioning to reset the eatting varaible, it makes a thriger for +1 and makes its value:
#IF (@eatting!=1) {
eatting=0
herbcheck
}
Could anyone enlighten me as to what I am doing wrong?
#ALARM +1 {
#IF (@eatting!=1) {
eatting=0
herbcheck
}
}
only instead of actually functioning to reset the eatting varaible, it makes a thriger for +1 and makes its value:
#IF (@eatting!=1) {
eatting=0
herbcheck
}
Could anyone enlighten me as to what I am doing wrong?
Forren2007-10-17 20:26:26
On my ^You eat (*).$, when I identify it's an herb, I do:
#alarm "herbBalanceRecover" +4
{
//#SAY HIT
#if (@herbBalance==0)
{
#VAR herbBalance 1
}
newline
}
This alarm is #UNTRIGGERed when I get the real herb balance recovery message.
If you mean eating etc:
herb
outr %1
eat %1
#VAR lastHerb %1
#VAR herbBalance .5
#addkey tryingList eatHerb 1
#alarm "herbBalanceReset" +.6 {#if (@herbBalance==".5") {#VAR herbBalance 1};newLine}
#alarm "herbBalanceRecover" +4
{
//#SAY HIT
#if (@herbBalance==0)
{
#VAR herbBalance 1
}
newline
}
This alarm is #UNTRIGGERed when I get the real herb balance recovery message.
If you mean eating etc:
herb
outr %1
eat %1
#VAR lastHerb %1
#VAR herbBalance .5
#addkey tryingList eatHerb 1
#alarm "herbBalanceReset" +.6 {#if (@herbBalance==".5") {#VAR herbBalance 1};newLine}
Xinael2007-10-18 00:07:45
Alarms are a type of trigger. Creating a trigger is what this command's supposed to do. If you add a command #say LOL to the alarm, you'll see that it goes off and the trigger disappears. If you make the alarm time long, you'll see that its type is set to alarm. You're not doing anything wrong.