Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • WorldHopper help


    kamilo
     Share

    Recommended Posts

    Hey everyone, im a new scripter. Im a engineer graduate but I haven't coded my own scripts on rs (idk why + I had lots of school work).

     

    So I am currently working on designing a world hopper mechanic for my script (a simple shop buyer)

    ill try to explain in simple terms

     

    Basically Im designing a world hopper that hops to random worlds to buy an item from the shop. However, my goal is to buy it at full stock, if its not at full stock I want my program to record it and (start a timer until full restock), while my account continues to hop to other worlds. 

     

    And so,  I want to code my program to avoid those worlds until they're fully stocked again. (basically a cool down timer on worlds that aren't at full stock of that item).

     

    I know this is a bit advanced but I really want to finish this. I know it will come in handy in future as well. 

     

    Any tips ideas would be greatly appreciated.

     

    Also im not too familiar with the API either, since there isn't a search bar its seeming to be even tougher. Is there a discord where everyone uses? I would like to chat with members and perhaps ask for help instead of making threads in the future on little things.

     

    Thanks guys 

     

     

    Link to comment
    Share on other sites

    Current thoughts

    //max stack of that item
    fullStock = 10;
    
    //Restock time per 1 item restocked (in seconds)
    restockTime = 30;
    
    
    //Array to store all worlds you want to use [typed manually] - yes, long list
    int[] worlds = {305,375,366,etc..};
    
    //loop here (for, if, while) - which one is best to use here?
    	if item not at full stock start cooldown on that world {
    
    	//cooldown timer
    	cdTime = (fullStock - currentStock)*restockTime;
    
    	*** a little confused at this point, now i have a timer for each world that is not fully
    	stocked, now i need to tell the program to avoid this world until timer is up. Any 
    	thoughts here ***
    
    	}
    	else {
    
    	//buy the item
    
    	}
    
    

     

    Link to comment
    Share on other sites

    You can write it much cleaner than suggested above, simply filter PvP worlds etc, then upon opening the shop on a new world store the world no. And shop item amounts to a Map and then time it based on items respawn time in the shop. 

    Link to comment
    Share on other sites

    8 hours ago, Pseudo said:

    You can write it much cleaner than suggested above, simply filter PvP worlds etc, then upon opening the shop on a new world store the world no. And shop item amounts to a Map and then time it based on items respawn time in the shop. 

    Can you elaborate please, I thought it was pretty basic and clean lol. yeah PvP worlds and skill total worlds too

     

    this might be a dumb questions whats the command for storing item amount (sorry not too good with API) atm.

     

    but my real dilemma is how to filter the worlds until timer is up. I thought of doing a while loop with an increment counter, but im not sure I can increment seconds properly, or maybe there is a better method

     

    suggestions>?

    Link to comment
    Share on other sites

    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
     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.