kamilo 7 Posted October 29, 2019 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
kamilo 7 Author Posted October 29, 2019 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 }
Pseudo 179 Posted October 29, 2019 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.
kamilo 7 Author Posted October 29, 2019 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>?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.