Jump to content

Help with simple program


Recommended Posts

Posted

I made my own alching script, but it is just an autoclicker. I wanted this so that it could have a failsafe, for example with a regular autoclicker it sometimes stops working at level up. How would I be able to, for example, check if the character is not doing the alch animation for x amount of time, or any other way to check that I'm not alching? Thanks!

Posted

You could just check if the player has not gained magic exp for x amount of time.

 

How would I do this? Right now what I am using is checking nature runes, if the amount doesn't go down after 20 checks then open the magic spellbook. It doesn't work for me though, here is the code:

alchAmount = inventory.getAmount("Nature runes");

        mouse.click(false);



        alchAmount1 = inventory.getAmount("Nature runes");

        

        if (alchAmount == alchAmount1){

            i++;

        } else {

            i = 0;

        }

        if (i == 20){

            if(getTabs().getOpen() != null && !getTabs().getOpen().equals(Tab.MAGIC)) {

                getTabs().open(Tab.MAGIC);

            }

            mouse.move(rectangleDest, true);

        }

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...