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

    Members
    • Posts

      25
    • Joined

    • Last visited

    1 Follower

    Recent Profile Visitors

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

    hashbang's Achievements

    1. I'm not actually familiar with the BlastFurnace widgets, but to type normal messages you can use: Keyboard.type("Hello", true); To type the message "Hello" and press enter afterwards.
    2. Check VarBit 5357.
    3. Nice work, but you could just use DropPattern from the DreamBot API StandardDropPattern dp = new StandardDropPattern(new int[] {0, 4, 8, 12, 16, 20, 24, 25, 21, 17, 13, 9, 5, 1, 2, 6, 10, 14, 18, 22, 26, 27, 23, 19, 15, 11, 7, 3}); Inventory.setDropPattern(dp);
    4. It's all stored in the Varbits. The runelite source code on GitHub is very useful for things like this //Varbit ids for runes in the pouch (These are not Item IDs, see below) RUNE_POUCH_RUNE1: 29 RUNE_POUCH_RUNE2: 1622 RUNE_POUCH_RUNE3: 1623 // Varbit ids for the quantity of each rune RUNE_POUCH_AMOUNT1: 1624 RUNE_POUCH_AMOUNT2: 1625 RUNE_POUCH_AMOUNT3: 1626 // This list maps the varbit value to a given Rune type (1 = Air Rune, etc) AIR(1, AIR_RUNE), WATER(2, WATER_RUNE), EARTH(3, EARTH_RUNE), FIRE(4, FIRE_RUNE), MIND(5, MIND_RUNE), CHAOS(6, CHAOS_RUNE), DEATH(7, DEATH_RUNE), BLOOD(8, BLOOD_RUNE), COSMIC(9, COSMIC_RUNE), NATURE(10, NATURE_RUNE), LAW(11, LAW_RUNE), BODY(12, BODY_RUNE), SOUL(13, SOUL_RUNE), ASTRAL(14, ASTRAL_RUNE), MIST(15, MIST_RUNE), MUD(16, MUD_RUNE), DUST(17, DUST_RUNE), LAVA(18, LAVA_RUNE), STEAM(19, STEAM_RUNE), SMOKE(20, SMOKE_RUNE), WRATH(21, WRATH_RUNE);
    5. Looks like using SkillTracker will be suitable for what you're trying to achieve, but for future reference, here is how to use the ExperienceListener directly public class Tester extends AbstractScript implements ExperienceListener { @Override public int onLoop() { return 10; } @Override public void onGained(ExperienceEvent event) { Logger.log(String.format("Gained %d xp in %s", event.getChange(), event.getSkill())); } }
    6. Each of those WidgetChilds have further children, but they don't show on the Widget Explorer. If you call WidgetChild.get(270, 14).getChildren() - You will get a list of 39 WidgetChild-ren with the same id (270, 14) but with an index from 0 to 38. For some reason, the final entry contains the Item you're looking for. WidgetChild wc = Widgets.get(270, 14); if (wc == null) { return; } WidgetChild[] children = wc.getChildren(); Logger.log(String.format("270, 14 has %d children", children.length)); for (WidgetChild c : children) { Logger.log(String.format("270, 14, %d Item: %s", c.getIndex(), c.getItem())); } Produces the following log: 2023-04-10 01:00:01 [INFO] 270, 14 has 39 children 2023-04-10 01:00:01 [INFO] 270, 14, 0 Item: {name=,id=-1,amount=0,slot=-1} 2023-04-10 01:00:01 [INFO] 270, 14, 1 Item: {name=,id=-1,amount=0,slot=-1} 2023-04-10 01:00:01 [INFO] 270, 14, 2 Item: {name=,id=-1,amount=0,slot=-1} 2023-04-10 01:00:01 [INFO] 270, 14, 3 Item: {name=,id=-1,amount=0,slot=-1} ... Truncated ... 2023-04-10 01:00:01 [INFO] 270, 14, 36 Item: {name=,id=-1,amount=0,slot=-1} 2023-04-10 01:00:01 [INFO] 270, 14, 37 Item: {name=,id=-1,amount=0,slot=-1} 2023-04-10 01:00:01 [INFO] 270, 14, 38 Item: {name=Leather gloves,id=1059,amount=2147483647,slot=-1} <- This is what you're looking for I suspect the easiest way to handle this, would be call `wc.getChildItems()` to a return a List<Item>, then iterate that and return the first item with a non-null id. I'm surprised by how awkward this is!
    7. Try this. You may not even need to check if it's already enabled, the Toggle function may check that already and just no-op if it's already enabled. if (!ClientSettings.isShiftClickDroppingEnabled()) { ClientSettings.toggleShiftClickDropping(true); }
    8. What on earth are you talking to yourself about? Are you trying to request that DreamBot implements 2FA on the Forum & Client? I personally feel that 2FA is overkill for a tool used to automate an online game, and it's implementation will bring an additional administrative burden to the site admins when users inevitably lose their 2fa devices/keys.
    9. Thanks for getting back to me. My issue was that I only wanted to test the Telekinetic room, but each time it would start it would chose a random room, run to the bank deposit the telekinetic runes/staff and go into the chosen room, before leaving and running to the bank again. Manually restarting a few times, coerced it into starting with the Telekinetic room. Once there it wasn't starting correctly and stuck in the state "Zoom Out". After a lot of trial and error I managed to get it working by experimenting with different client window sizes and manually zooming in/out. I'm not sure what fixed it in the end, but it definitely needed human intervention. Once started it rain flawlessly :), great work on the maze solutions!
    10. The calibrating stage at the start is mad. Why not just talk to the Progress Hat to discover how many points the player has? This just runs back and forth to the bank every time I start the script
    11. Looks like Dreambot have rotated their SSH host key and you'll need to remove the key from your known_hosts file. You can remove the third entry (non-commented line) from /home/XXX/.ssh/known_hosts as shown by the line in the above output: Offending ECDSA key in /home/XXX/.ssh/known_hosts:3 (Note: - The :3 identified the third line) Or alternative, as the message suggests you can run the command to remove that key automatically remove with: ssh-keygen -f "/home/XXX/.ssh/known_hosts" -R "ssh.dreambot.org"
    12. You could just `Mouse.click()` on every inventory slot? public void dropItems(int[] dropOrder) { Keyboard.pressShift(); for (int i : dropOrder) { Item item = Inventory.getItemInSlot(i); if (item != null && !shouldKeep(item.getName())) { Mouse.click(Inventory.slotBounds(i)); } } Keyboard.releaseShift(); }
    13. Look into using the `reset` condition of the sleepUntil method. This way you can sleepUntil your inventory contains no more resources (raw fish, ores etc) with a low timeout (5 seconds for example), but reset the timeout if you are ever animating. Something like this could work: static int SMELTING_ANIMATION_ID = 899 Player me = Players.getLocal(); Sleep.sleepUntil(me::isStandingStill, () -> me.getAnimation() == SMELTING_ANIMATION_ID, 10000, 150, 3);
    14. Nice first attempt. There is a huge amount of repeated code in there, each case of the switch statement is basically the same code. One way you could simplify this is by storing a map of Skills & their corresponding WidgetChild Ids, then you can grab the child widget id as a variable and pass it into the widget interaction block. static Map<Skill, Integer> SKILL_WIDGETID_MAP = new HashMap<>(){{ put(Skill.ATTACK, 2); put(Skill.STRENGTH, 3); put(Skill.RANGED, 4); //TODO: Add all other skills here }}; public void SolveGeniLamp(Skill skill) { Item item = Inventory.get(it-> it.getName().equals("Lamp") && it.hasAction("Rub")); if (item == null) { return; // Return early, nothing to do. } if (item.interact("Rub")) { Sleep.sleep(1000, 1500); / Widget chooseSkillWidget = Widgets.getWidget(240); if (chooseSkillWidget != null && chooseSkillWidget.isVisible()){ Integer childId = SKILL_WIDGETID_MAP.get(skill); if (childId == null) { Logger.error("Unknown Child Widget id for Skill " + skill.toString()); return; } WidgetChild wig = Widgets.getChildWidget(240, childId); WidgetChild widg = Widgets.getChildWidget(240, 26); if (wig != null && wig.isVisible()) { if (wig.interact()) { Sleep.sleep(500,1200); widg.interact(); } } else { Widgets.closeAll(); } } } }
    15. You're not logged in (I'm guessing). First you need to check if the Player instance is not null before fetching the combat level Player me = Players.getLocal(); if (me != null) { combatLevel = me.getLevel(); } // Wrap this in a loop to try fetch the combat level repeatedly until logged in.
    ×
    ×
    • 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.