Sidd2009-01-15 17:28:06
Hello, I'm looking for some help, I made myself an autosipper and I'm running into problems because basing it to fire off my prompt is causing me to sip excessively and I can't figure out how to stop it. The problem runs into when my prompt flashes multiple times quickly and I end up sipping two or three times in a row. IE I get attacked and attack and two prompt's flash by and I sip twice. Is there a better way to do this? Thanks
Below is what I have
2028
3856
3372
400
800
800
1
2028
3856
3372
On
1628
3056
2572
#set HealthBal = 0.5
#set HealthBal = 0.5
#set HealthBal = 1
#set HealthBal = 0.5
#set On = Off
#set DmgHP = 10000
#set DmgMana = 10000
#set DmgEgo = 10000
#echo Sipper Off
#if $HealthBal = 1 and $Anorexia = 0 and $SlitThroat = 0 and $Windpipe = 0 {
#if $CurrentHealth < $SipHealth {
sip health
} elsif $CurrentMana < $SipMana {
sip mana
} elsif $CurrentEgo < $SipEgo {
sip bromides
}
}
#set MaxEgo = $2
#math SipEgo $MaxEgo - $DmgEgo
#set MaxHealth = $2
#math SipHealth $MaxHealth - $DmgHP
#set MaxMana = $2
#math SipMana $MaxMana - $DmgMana
#if $On = On {
#set DmgHP = 10000
#set DmgMana = 10000
#set DmgEgo = 100000
#set On = Off
#echo Sipper Off
} elsif $On = Off {
#set DmgHP = 800
#set DmgMana = 800
#set DmgEgo = 400
#set On = On
#echo Sipper On
}
Below is what I have
2028
3856
3372
400
800
800
1
2028
3856
3372
On
1628
3056
2572
#set DmgHP = 10000
#set DmgMana = 10000
#set DmgEgo = 10000
#echo Sipper Off
#if $CurrentHealth < $SipHealth {
sip health
} elsif $CurrentMana < $SipMana {
sip mana
} elsif $CurrentEgo < $SipEgo {
sip bromides
}
}
#math SipEgo $MaxEgo - $DmgEgo
#math SipHealth $MaxHealth - $DmgHP
#math SipMana $MaxMana - $DmgMana
#set DmgHP = 10000
#set DmgMana = 10000
#set DmgEgo = 100000
#set On = Off
#echo Sipper Off
} elsif $On = Off {
#set DmgHP = 800
#set DmgMana = 800
#set DmgEgo = 400
#set On = On
#echo Sipper On
}
Sidd2009-01-15 17:31:20
Below is an example of when I sip twice
the two prompts flash at below my siphealth level so I sip twice.
Thrusting her sword with all her might, a female krokani plunges cold steel into
your gut.
You twist aside, deflecting part of the attack.
2984h, 3372m, 2028e, 10p, 16903en, 15120w, 5mo ex-
You have recovered balance on your right arm.
You have recovered balance on your left arm.
You have recovered balance on your right leg.
You attempt the Kata form of hunt3.
* ka nekai krokani right
Slashing viciously at a female krokani, you rend her with a predatory nekai
drenched in gore.
* ka nekai krokani left
Slashing viciously at a female krokani, you rend her with a predatory nekai
drenched in gore.
* ka kick krokani right
With a quick spin, you kick a female krokani with your right foot.
2984h, 3372m, 2028e, 10p, 16882en, 15120w, 5mo ex-
You take a drink from a beryl vial.
The potion heals and soothes you.
3743h, 3372m, 2028e, 10p, 16882en, 15120w, 5mo ex-
You take a drink from a beryl vial.
The potion flows down your throat without effect.
3743h, 3372m, 2028e, 10p, 16882en, 15120w, 5mo ex-
the two prompts flash at below my siphealth level so I sip twice.
Thrusting her sword with all her might, a female krokani plunges cold steel into
your gut.
You twist aside, deflecting part of the attack.
2984h, 3372m, 2028e, 10p, 16903en, 15120w, 5mo ex-
You have recovered balance on your right arm.
You have recovered balance on your left arm.
You have recovered balance on your right leg.
You attempt the Kata form of hunt3.
* ka nekai krokani right
Slashing viciously at a female krokani, you rend her with a predatory nekai
drenched in gore.
* ka nekai krokani left
Slashing viciously at a female krokani, you rend her with a predatory nekai
drenched in gore.
* ka kick krokani right
With a quick spin, you kick a female krokani with your right foot.
2984h, 3372m, 2028e, 10p, 16882en, 15120w, 5mo ex-
You take a drink from a beryl vial.
The potion heals and soothes you.
3743h, 3372m, 2028e, 10p, 16882en, 15120w, 5mo ex-
You take a drink from a beryl vial.
The potion flows down your throat without effect.
3743h, 3372m, 2028e, 10p, 16882en, 15120w, 5mo ex-
Unknown2009-01-15 17:39:15
You've got your logic a bit off. You should set HealthBal to 0.5 when you try to sip (via an alias), set it to 0 when you do sip (only if it's 0.5, to avoid illusions), and set it back to 1 when you get the balance regained message.
Sidd2009-01-15 17:57:17
Here is an updated one with changing the HealthBal but I'm still sipping twice
2028
3856
3372
400
800
800
1
2028
3856
3372
On
1628
3056
2572
#if $HealthBal = 0.5 {
#set HealthBal = 0
}
#if $HealthBal = 0.5 {
#set HealthBal = 0
}
#set HealthBal = 1
#if $HealthBal = 0.5 {
#set HealthBal = 0
}
#set On = Off
#set DmgHP = 10000
#set DmgMana = 10000
#set DmgEgo = 10000
#echo Sipper Off
#if $HealthBal = 1 and $Anorexia = 0 and $SlitThroat = 0 and $Windpipe = 0 {
#if $CurrentHealth < $SipHealth {
sip health
#set HealthBal = 0.5
} elsif $CurrentMana < $SipMana {
sip mana
#set HealthBal = 0.5
} elsif $CurrentEgo < $SipEgo {
sip bromides
#set HealthBal = 0.5
}
}
#set MaxEgo = $2
#math SipEgo $MaxEgo - $DmgEgo
#set MaxHealth = $2
#math SipHealth $MaxHealth - $DmgHP
#set MaxMana = $2
#math SipMana $MaxMana - $DmgMana
#if $On = On {
#set DmgHP = 10000
#set DmgMana = 10000
#set DmgEgo = 100000
#set On = Off
#echo Sipper Off
} elsif $On = Off {
#set DmgHP = 800
#set DmgMana = 800
#set DmgEgo = 400
#set On = On
#echo Sipper On
}
2028
3856
3372
400
800
800
1
2028
3856
3372
On
1628
3056
2572
#set HealthBal = 0
}
#set HealthBal = 0
}
#set HealthBal = 0
}
#set DmgHP = 10000
#set DmgMana = 10000
#set DmgEgo = 10000
#echo Sipper Off
#if $CurrentHealth < $SipHealth {
sip health
#set HealthBal = 0.5
} elsif $CurrentMana < $SipMana {
sip mana
#set HealthBal = 0.5
} elsif $CurrentEgo < $SipEgo {
sip bromides
#set HealthBal = 0.5
}
}
#math SipEgo $MaxEgo - $DmgEgo
#math SipHealth $MaxHealth - $DmgHP
#math SipMana $MaxMana - $DmgMana
#set DmgHP = 10000
#set DmgMana = 10000
#set DmgEgo = 100000
#set On = Off
#echo Sipper Off
} elsif $On = Off {
#set DmgHP = 800
#set DmgMana = 800
#set DmgEgo = 400
#set On = On
#echo Sipper On
}
Unknown2009-01-15 18:03:47
I have never used Nexus myself, but I do write a lot of code, and that looks pretty good to me. Technically, the = in the #SET command is only needed for expressions, so you might try removing those?