snailmail12 0 Share Posted November 25, 2020 Hi I have just returned to OSRS and the scripts I made before are now all depreciated. I have been looking through the API and I dont really get it. I get that tutorials take time to write or make so I was wondering in the mean time if anyone can just put down some code I can look at and get a feel for how it all works. Ideally something that includes walking banking and widgets would be great but Ill appreciate whatever you can offer. Link to comment Share on other sites More sharing options...
yeeter 517 Share Posted November 25, 2020 The new api removed all static references. For example getBank().doTheThing(); would now be Bank.doTheThing(); If you have old scripts source code from examples I wrote a simple updater that roughly updates DreamBot 2 scripts -> DreamBot 3. Might still be some bugs in it but if you edit the updater.sh script you can see a good chunk of the conversions needed. Another good resource would be the guides page which isn't fully up to date or complete yet on script conversion (I'll get around to it eventually) https://dreambot.org/guides/scripter-guide/script-dev/upgrading-to-db3/ Any questions feel free to hit me up on here or Discord. Link to comment Share on other sites More sharing options...
snailmail12 0 Author Share Posted November 25, 2020 Ah Cheers Ill have a look Link to comment Share on other sites More sharing options...
snailmail12 0 Author Share Posted November 26, 2020 20 hours ago, yeeter01 said: The new api removed all static references. For example getBank().doTheThing(); would now be Bank.doTheThing(); If you have old scripts source code from examples I wrote a simple updater that roughly updates DreamBot 2 scripts -> DreamBot 3. Might still be some bugs in it but if you edit the updater.sh script you can see a good chunk of the conversions needed. Another good resource would be the guides page which isn't fully up to date or complete yet on script conversion (I'll get around to it eventually) https://dreambot.org/guides/scripter-guide/script-dev/upgrading-to-db3/ Any questions feel free to hit me up on here or Discord. Any Chance youj can help me with this. I have logs to see where I am in the code for now. It gets there in the end but it doesnt seem very efficient or good at using the widget any way I can improve this? I will add better sleeps etc after Im just trying to do basic code atm WidgetChild makeAllWidg = Widgets.getWidgetChild(446,34); if (makeAllWidg != null && makeAllWidg.isVisible()) { // sleep(Calculations.random(100, 10000)); log("2.2"); makeAllWidg.interact(); log("2.3"); sleep(Calculations.random(50000, 80000)); What it does is I think implements some antiban? cos the screen moves around a little but also the mouse moves around weirdly on the smelt screen. Instead of just going straight to the amulet in this case and clicking on it Link to comment Share on other sites More sharing options...
una_maquina 35 Share Posted November 27, 2020 Everything is almost the same, but now you don't need to type a million letters like: MethodProvider.getLocalPlayer(); You can just do getLocalPlayer()... Or, previously you'd need to do this: Widgets.getWidgets().getWidgetChild(). Now you can just type Widgets.getWidgetChild(). I dunno if the code is correct, but basically the API has been shortened, that's all there's to it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.