Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Request Add Traversal .hasStaminaPotion()

Joined
Dec 31, 2015
Messages
602
Easier for newer developers.

Note: Name for method idk. hasStaminaPotion is ambiguous. isStaminaed is weird. maybe isStaminaActive or isStaminaPotionActive.

I assume varps are the same between OSRS & RS3, but I'm not an RS3 dev so can't comment.

OSRS varp is 638 for stamina.

Secondly, add a Traversal Option for Stamina Potion

Path.step( TraversalOption.STAMINA_POTIONS )
Would auto drink a stamina potion in the inventory :).

Just simplifies the code base.
 
Community Manager
Joined
Apr 7, 2015
Messages
1,395
Easier for newer developers.

Note: Name for method idk. hasStaminaPotion is ambiguous. isStaminaed is weird. maybe isStaminaActive or isStaminaPotionActive.

I assume varps are the same between OSRS & RS3, but I'm not an RS3 dev so can't comment.

OSRS varp is 638 for stamina.

Secondly, add a Traversal Option for Stamina Potion

Path.step( TraversalOption.STAMINA_POTIONS )
Would auto drink a stamina potion in the inventory :).

Just simplifies the code base.
I'd recommend isJuiced.

On a serious note though, I support.
 
Joined
Aug 23, 2015
Messages
1,970
Varbit 25 is stamina potions, 0=inactive, 1=active.

Relevant item names:
"Vial", "Stamina potion(1)", "Stamina potion(2)", "Stamina potion(3)", "Stamina potion(4)"

Potion action: "Drink"

RS3 doesn't have anything similar to stamina potions AFAIK. They have no need with terrorbirds to restore run energy and resting.
 
Joined
Dec 31, 2015
Messages
602
@Party
Maybe you want to add this to your API stuff today. Feels fairly relevant for the Traversal class.

Maybe isStaminaPotionActive() as a method name or something.
 
Client Developer
Joined
Oct 12, 2015
Messages
3,764
This is not a hybrid method and it's for a hybrid class.

de_clined
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
If( environment.isrs3() )
return false;

return osrsCheck();

boom its well hybrid now :p.
Your actually somewhat right, we do that type of thing else where.
 
Under what condition would you drink the stamina potion? I'm not entirely familiar with their behavior/usage. I know they restore some run energy but beyond that and the fact that the icon changes color I really have no idea.
 
Looked into it a bit, my only question now is should it only be activated when the 2 minute effect is up or when your low on run energy or what? What extent do you guys want it to be automatically handled?
 
Joined
Aug 23, 2015
Messages
1,970
Your actually somewhat right, we do that type of thing else where.
 
Under what condition would you drink the stamina potion? I'm not entirely familiar with their behavior/usage. I know they restore some run energy but beyond that and the fact that the icon changes color I really have no idea.
 
Looked into it a bit, my only question now is should it only be activated when the 2 minute effect is up or when your low on run energy or what? What extent do you guys want it to be automatically handled?
IMO make it base the decision off of whether or not other types of run-restore are in inventory.

  • If run is low, stamina is active, and there is an Energy Potion or Super Energy Potion, drink one of those
  • If run is low, stamina is active, and there are no energy potions, drink stamina
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
IMO make it base the decision off of whether or not other types of run-restore are in inventory.

  • If run is low, stamina is active, and there is an Energy Potion or Super Energy Potion, drink one of those
  • If run is low, stamina is active, and there are no energy potions, drink stamina
That would require supporting all energy potions, super energy potions, the mix variations, and for rs3 the flask variations...
 
Currently I've written the code for having it drink stamina potions (not mixes) when the stamina enhancement wears off.
 
Also support for tireless run with a spirit terrorbird in rs3would fall in the same line if adding all mix variations and flask stuff...
 
Joined
Dec 31, 2015
Messages
602
Your actually somewhat right, we do that type of thing else where.
 
Under what condition would you drink the stamina potion? I'm not entirely familiar with their behavior/usage. I know they restore some run energy but beyond that and the fact that the icon changes color I really have no idea.
 
Looked into it a bit, my only question now is should it only be activated when the 2 minute effect is up or when your low on run energy or what? What extent do you guys want it to be automatically handled?
If you want to automatically use it in .step() I recommend when its not active + < 80 (Player sensed) run. As it gives 20 run + 2 minutes of stamina.

Infact, double it up if you really want. Have two player sense keys, one for the "I'll activate it if its not already activated" and one for the "I'm low on run, but I want to get more energy" However, I don't really recommend it drinking at EXACTLY the same number every time. It will generate a massive pattern. My preferred method is to specify a number and use a guassian to select a number for it within a range, thus keeping it consistent but not the same every time.
 
Joined
Aug 23, 2015
Messages
1,970
If you don't want to add support for all run-regen techniques, which I don't blame you for, drinking staminas at low health would be fine. I just assumed it was osrs only since rs3 doesn't have staminas.
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
If you want to automatically use it in .step() I recommend when its not active + < 80 (Player sensed) run. As it gives 20 run + 2 minutes of stamina.

Infact, double it up if you really want. Have two player sense keys, one for the "I'll activate it if its not already activated" and one for the "I'm low on run, but I want to get more energy" However, I don't really recommend it drinking at EXACTLY the same number every time. It will generate a massive pattern. My preferred method is to specify a number and use a guassian to select a number for it within a range, thus keeping it consistent but not the same every time.
It's player sensed similar to run is and now will only activate it if your run energy is at or below a player sensed value.
 
Top