Jump to content

Flamezzz

Members
  • Posts

    763
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Flamezzz

  1. I'm pretty sure it's Limpwurt root, dunno what's causing osbot to crash tho...
  2. You can barely make 20k/h now, it used to 40k/h...
  3. 1. I would recommend counting the amount of times you loop and not use actual minutes, since this wouldn't work when taking breaks. Something like: int loopCount = 0 in onLoop: loopCount++ if(loopCount % 1000 == 0) // check if xp > last xp >>> Note: this failsafe wouldn't work when a flaw causes your script to not loop anymore (localwalker ) 2. When a RandomSolver is active your script is paused and once it's finished it will be resumed. So during this time onLoop will not be called.
  4. if (inventory.isFull()) { return State.WALK2BANK; } So if your inventory is full, you always return State.WALK2BANK. I think you want to move if (inventory.isFull() && bankArea.contains(myPlayer())) { return State.BANK; } this before the other if so that it is evaluated first.
  5. public void onPaint(Graphics2D g) { I think the issue is you're not overriding properly
  6. Interact also left clicks. Finding widgets ids: http://osbot.org/forum/topic/79422-cook-all-option/?view=getlastpost
  7. You need to use widgets. Go to settings and enable widget debugging. Now you see something like this: So the parent widget id = 307, child id = 4 RS2Widget cookMenu = widgets.get(307,4); if(cookMenu != null && cookMenu.isVisible()) cookMenu.interact("Cook All");
  8. I don't even know where to start Well... first of all, this: Inventory inven = client.getMethods().getInventory(); Player player = client.getMethods().myPlayer(); Bank bank = client.getMethods().getBank(); What are you trying to do here? You already have access to the inventory by calling, for example, inventory.contains() directly. Same for player and bank. The reason the script doesn't start is that client doesn't exist yet, any initialization should be done in onStart. if(inven.isEmptyExcept(995)){ Should just use inventory.isEmptyExcept(995). if(BANK_AREA.contains(player)){ You have access to the local player through myplayer() ellis.getMethods().getWidgets().getWidgetContainingText("Hard Leather").in teract("All"); All methods are already accessible from the script itself. You can directly call : getWidgets().getWidgetContainingText("Hard Leather").interact("All"); Also, banking can simply be done by calling bank.open(), you don't have to do there interaction yourself
  9. Ye there were some other bits set in config 738, but as liverare posted the enum values should of course be indexed and not iterated as I did.
  10. Returns POH location found in config 738. My cons is quite low so I've only tested this for rimmington/taverly/pollniveach, unless they do some weird shit it should work for other locations as well. Note: positions for brimhaven/yanille are missing atm. public class POH { private static final int POH_CONFIG = 738; public static POHLocation getLocation(MethodProvider api) { int c = api.configs.get(POH_CONFIG) & 0x7; // clear other bits return POHLocation.values()[c]; } public enum POHLocation { None(0x0, new Position(0,0,0)), RIMMINGTON(0x1, new Position(2953,3224,0)), TAVERLY(0x2, new Position(2893,3465,0)), POLLNIVEACH(0x3, new Position(3340,3003,0)), RELLEKKA(0x4, new Position(2670,3631,0)), BRIMHAVEN(0x5, new Position(0,0,0)), YANILLE(0x6, new Position(0,0,0)); public final int mask; public final Position position; POHLocation(int mask, Position position) { this.mask = mask; this.position = position; } } }
  11. Imo f2p isn't worth botting unless your farm is fully autonomous, so accounts get replaced upon being banned and your mule auto collects. Accounts simply don't last too long in f2p, especially when low level.
  12. camera#toEntity isn't working either?
  13. It's not used correctly, it's supposed to be the first thing in the onLoop so that in the next lines you know you're not in a dialogue. Anyways I'm glad it's solved now.
  14. if(dialogues.isPendingContinuation() || dialogues.clickContinue() || dialogues.completeDialogue("option1", "option2", "option3")) return random(300,600);
  15. I'd be surprised if this fixes it, since this is the exact conditional sleep bank.open uses. In general, I'd recommend executing one action in the onLoop and use conditional statements to determine which one, and use the return values :p if(bank.open()) { ... }
  16. ^ that but don't use UML. Identify the states, transitions and just write abstract, high level pseudocode first.
  17. You can find an incomplete list somewhere. (hint: they're often called varps).
  18. Configs are values part of the client state. In this case config 43 tells us something about the current attack style, if config 43 is set to 0 it means the first attack style is selected, config 43 = 1 means the second is selected etc. There are config values for a lot of things ranging from current quest state to the autocasted spell (config 108). I'm not even sure why most of them are stored in the client, but they're very useful
  19. I highly doubt the standard client itself is detectable in any way.
  20. I checked ObjectDebug, first you check if the object is visible on the screen: if(GraphicUtilities.getScreenCoordinates(bot,obj.getGridX(), obj.getGridY(), obj.getZ(), obj.getHeight()))[0] != -1) { GraphicUtilities.drawModel(bot, g, obj.getGridX(), obj.getGridY(), obj.getZ(), obj.getModel()); }
×
×
  • Create New...