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
  • LoremIpsum213

    Members
    • Posts

      13
    • Joined

    • Last visited

    Recent Profile Visitors

    The recent visitors block is disabled and is not being shown to other users.

    LoremIpsum213's Achievements

    1. Hi, I am making a fully featured crafting script, however i am facing one problem when crafting armour, and that is that the Widget Children do not contain any text string to which i can compare to. For making jewellery the following works: for (WidgetChild i : Widgets.getWidget(446).getChildren()) { if (i != null && i.hasAction(this.toString())) { Sleep.sleep(100, 2000); i.interact(); Sleep.sleepUntil(Players.getLocal()::isStandingStill, () -> Players.getLocal().isAnimating(), 10000, 500, 3); break; } } Where this.toString() contains the name of the item to be crafted. the parent widget id for the Armour crafting menu is "270". For more context, I am talking about this menu. Is it possible to extract the names of the items somehow? or do i have to make some item -> WidgetID lookup table?
    2. the fixed sleeping time, is just the timeout, so that means it will always exit after 60 seconds in my latest code change. But 99.9% of time, everything has been smelted by then and the canSmelt function will return false (which is checked every 5 seconds). Perhaps I should randomize that a little bit. so i don't always walk away exactly at the same time.
    3. A script that jumps from task to task, lets say you are mining, got x amount of ores or after random amount of time, then use those ores to smelt bars and then use these bars to craft items. Then rinse and repeat. I think this kind of script will lower banrates a lot. Basically, making full on assembly lines involving multiple skills.
    4. In the end i solved it as following: //get furnace object in Area (= special class that uses Dreambot Area API) GameObject furnace = Area.GetInteractionObject(); // check if we are within reach, otherwise, keep walking to destination if(furnace != null && furnace.distance() < 10) { // if furnace was clicked if(furnace.interact()) { // succesfully clicked on furnace, now wait until widget menu is opened sleepUntil(() -> Widgets.isOpen(), 10000, 500); WidgetChild selectionbox = Widgets.getWidgetChild(270, widgetMap.get(Bar.getID())); if (selectionbox != null && selectionbox.isVisible() && selectionbox.interact()) { //wait until done smelting or when a lvl-up dialogue pops up sleepUntil(() -> !canSmelt() || Dialogues.canContinue(), 60000, 5000); } } } I guess this code can be repeated for many different activities within the game. Let me know if i did something else kinda weird.
    5. Thats what i do, although iam not sure if iam using the sleepWhile() function correctly: // check whether we are in area if(Area.getArea().contains(Players.getLocal().getTile())) { GameObject furnace = Area.GetInteractionObject(); // if player is on tile in front of furnace and we can smelt, and interact if(furnace.interact()) { sleep(500, 3000); WidgetChild selectionbox = Widgets.getWidgetChild(270, widgetMap.get(Bar.getID())); if (selectionbox != null && selectionbox.isVisible()) { //widget exists selectionbox.interact(); } sleepWhile(() -> canSmelt(), 30000, 5000); } }
    6. At the moment i use this function to determine whether the player is smelting bars: private boolean isSmelting() { return Players.getLocal().isAnimating() || (Players.getLocal().getAnimation() == Players.getLocal().getStandAnimation() && canSmelt()); } where canSmelt() determines whether there is enough ores in the inventory. However, this is not fool proof as sometimes, the player model just stands still for a brief moment before adding more ore in the furnace. In the execute function i have an if statement that uses the isSmelting() function to determine whether we should interact with the furnace, \ if we are already smelting i don't want it to click on the furnace again. I have got everything else working for my smithing script, except for this annoying issue. If someone knows a better way, let me know.
    7. I got the same yesterday on my linux machine. in the end i ended up removing all Dreambot data, after that it worked again. (delete folder "Dreambot" under C:\Users\<user>
    8. Take a look at this: https://docs.gradle.org/current/userguide/intro_multi_project_builds.html
    9. My problem with the API is mainly that the API description assumes that the dev knows what a class does and meant to represent. for example https://dreambot.org/javadocs/org/dreambot/api/methods/widget/Widgets.html The Methods are described pretty well, but its useless if there is no description of what a widget is in the first place.. There is no description on how this class represents an element in game. so i have no clue what to use it for. Only after some googling for examples or asking ChatGPT does it become clear what it is meant for. I will certainly consider opensourcing it, however, I think that when a lot of people have access to it, the banrates will increase, even though i have already integrated anti-ban mechanisms.
    10. Ah. yes of course. Well, i started making one myself now. Will perhaps upload it here for free if it works properly . Unfortunately the dreambot API description does not make it easy... but ill get there with some trial and error!
    11. Is each bot a standalone bot, or do you have a superscript that controls all the bots individually. e.g. you have a bot that does mining and after it reached x amount of ores, it fires the smelting bot? if each bot is a standalone bot, then a separate repository is better. if that's not the case, you might want to take a look at Maven/Gradle.
    12. Hi, there is a SDN script that is not maintained well and does not work correctly. So i want to fix it, but i do not have the source code. Where does one find the downloaded .jar files?
    13. there is no antiban? seems dangerous to use this script.
    ×
    ×
    • 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.