1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Request Add Traversal .hasStaminaPotion()

Discussion in 'Client & Site Suggestions' started by Guru, Mar 6, 2017.

  1. Guru

    Joined:
    Dec 31, 2015
    Messages:
    602
    Likes Received:
    175
    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.
     
    SkyGuy likes this.
  2. Gengsta

    Gengsta Community Manager

    Joined:
    Apr 7, 2015
    Messages:
    1,392
    Likes Received:
    763
    I'd recommend isJuiced.

    On a serious note though, I support.
     
    Savior and Party like this.
  3. Snufalufugus

    Joined:
    Aug 23, 2015
    Messages:
    1,961
    Likes Received:
    757
    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.
     
  4. Guru

    Joined:
    Dec 31, 2015
    Messages:
    602
    Likes Received:
    175
    @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.
     
  5. Party

    Party Client Developer

    Joined:
    Oct 12, 2015
    Messages:
    3,708
    Likes Received:
    1,606
    This is not a hybrid method and it's for a hybrid class.

    de_clined
     
  6. Wet Rag

    Wet Rag easily triggered ✌

    Joined:
    Dec 31, 2015
    Messages:
    4,449
    Likes Received:
    1,692
    csgo meme, nice
     
  7. Guru

    Joined:
    Dec 31, 2015
    Messages:
    602
    Likes Received:
    175
    If( environment.isrs3() )
    return false;

    return osrsCheck();

    boom its well hybrid now :p.
     
  8. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    Your actually somewhat right, we do that type of thing else where.
    --- Double Post Merged, May 17, 2017, Original Post Date: May 17, 2017 ---
    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.
    --- Double Post Merged, May 17, 2017 ---
    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?
     
  9. Snufalufugus

    Joined:
    Aug 23, 2015
    Messages:
    1,961
    Likes Received:
    757
    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
     
  10. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    That would require supporting all energy potions, super energy potions, the mix variations, and for rs3 the flask variations...
    --- Double Post Merged, May 17, 2017, Original Post Date: May 17, 2017 ---
    Currently I've written the code for having it drink stamina potions (not mixes) when the stamina enhancement wears off.
    --- Double Post Merged, May 17, 2017 ---
    Also support for tireless run with a spirit terrorbird in rs3would fall in the same line if adding all mix variations and flask stuff...
     
  11. Guru

    Joined:
    Dec 31, 2015
    Messages:
    602
    Likes Received:
    175
    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.
     
  12. Snufalufugus

    Joined:
    Aug 23, 2015
    Messages:
    1,961
    Likes Received:
    757
    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.
     
  13. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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.
     

Share This Page

Loading...