Jump to content

best way to add potting to a script


Recommended Posts

Posted

Hi, I was looking at adding potting to a script. Not sure if i am missing something but I couldn't work out how best to go about it:

Firstly I thought: is it possible to grab the boosted say strength level and repot below a certain threshold: couldn't work out how to do this? Could just be missing a method on API

Secondly, I thought about adding a slightly random timer and potting in the timer after a 'random' amount of time. so after 700 seconds repot next time after 550 seconds repot

Posted (edited)
16 minutes ago, scriptersteve said:

Firstly I thought: is it possible to grab the boosted say strength level and repot below a certain threshold: couldn't work out how to do this? Could just be missing a method on API

Go with this option.

Compare the dynamic level and the static level of a skill to see if you should pot or not.

if((getSkills().getDynamic(Skill.STRENGTH) - getSkills().getStatic(Skill.STRENGTH)) < minDiff) {
                //pot
            }

Edited by Jammer
  • Like 1
Posted
15 minutes ago, scriptersteve said:

Hi, I was looking at adding potting to a script. Not sure if i am missing something but I couldn't work out how best to go about it:

Firstly I thought: is it possible to grab the boosted say strength level and repot below a certain threshold: couldn't work out how to do this? Could just be missing a method on API

Secondly, I thought about adding a slightly random timer and potting in the timer after a 'random' amount of time. so after 700 seconds repot next time after 550 seconds repot

https://osbot.org/api/org/osbot/rs07/api/Skills.html#getDynamic-org.osbot.rs07.api.ui.Skill-

for grabbing boosted and actual levels

Posted
4 minutes ago, scriptersteve said:

thanks guys - appreciate it: so getDynamic() gets boosted level and getstatic gets actual?

Nvr mind just read jammers :)

13 minutes ago, Jammer said:

Go with this option.

Compare the dynamic level and the static level of a skill to see if you should pot or not.

if((getSkills().getDynamic(Skill.STRENGTH) - getSkills().getStatic(Skill.STRENGTH)) < minDiff) {
                //pot
            }

Thanks

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...