Jump to content

mr magoo

Trade With Caution
  • Posts

    13
  • Joined

  • Last visited

  • Feedback

    0%

About mr magoo

Profile Information

  • Gender
    Male

Recent Profile Visitors

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

mr magoo's Achievements

Newbie

Newbie (1/10)

1

Reputation

  1. It's like you're trying to be helpful but your reading comprehension isn't up for it.
  2. Of course I use sleep. Unless you're unaware the onLoop method must return an integer value for the script to wait. In what manner would using a sleep stop the one line of code I provided to stop executing twice in rapid succession? It gets called only a maximum of once per execution of onloop, but per observation it very obviously executes more than once per execution of onLoop. This is the problem. Consider the problem in a vacuum. If the mouse is located ontop of a prayer, and if every iteration of onLoop consisted of left clicking once, sleeping for x amount of time, left clicking again (that is, turning the prayer on and then off), and then sleeping for 5 seconds, there would occasionally be an instance where each click would register twice. The outcome is effectively the same, but the problem is there. This is a simplified version of the problem but this scenario has appeared often.
  3. something as simple as: if (getBank().isOpen() { getBank().depositAll(itemID); } Seems to run into problems. It SEEMS to click twice very quickly: it right clicks on the item once, begins to move, and then right clicks again all in a very short time frame. The second click is not on an item and thus does not have a deposit-all option, so the bot stutters, and then goes to attempt the deposit again (which at this point works 100% of the time as far as I'm aware). This is rather frustrating though. I'm not sure if it's a bug or if it's intended but it's a considerable problem when it comes to doing multithreaded processes. I've noticed this issue of double clicking very blatantly in other projects, but now I've run into a stand still for this project due to the problem and will likely stop developing for this platform unless it turns out it's actually a problem on my end, which is my reason for this post. Does this also happen to you? Considering the situation has appeared in numerous projects of mine I'm lead to believe it's not due to something I've done.
  4. I recommend this book, Learn you a Haskell for Great Good. Everything you need to know and it's very easy to read. http://learnyouahaskell.com/chapters
  5. So, when you shift click the rune pouch it automatically uses the empty option for the item? To make matters simpler I'm just going to assume the pouch is always in the first slot. It wouldn't be a bad idea to hard code it as players generally have a preferred location of the pouch. If you want to abstract it for it being in any position in the inventory, searching for it would be a good exercise to learn from. getMouse().move(getInventory().getMouseDestination(0)); getKeyboard().pressKey(KeyEvent.VK_SHIFT); getMouse().click(false); getKeyboard().releaseKey(KeyEvent.VK_SHIFT); This will shift click the first item (index 0) in your inventory. Edit: be sure to import the necessary KeyEvent package: import java.awt.event.KeyEvent;
  6. First off I would really recommend looking up a tutorial and trying to work on it using state based logic. But anyways, given your current code with the intention of trying to do what you want to do, I would just keep track of your xp gains. If you haven't gained exp since the last time you tried to light a log, then presumably you're not done burning that log yet, so don't try to light another one.
  7. You could get the keyboard and mouse instance and send a shift and left click I guess. getKeyboard().pressKey(*KEYCODE FOR SHIFT*); getMouse().click(false); getKeyboard().releaseKey(*SAME KEYCODE FOR SHIFT*); This would presumably work.
  8. I've made another class that aids me in getting some work done in my script, but I need it to sleep as it would if all my code was in the main class. Is this possible? Normally I would do import main; but it doesn't work in this case. The sleep function comes from the Script extension of main. Thank you for your time
  9. So I'm working on a script right now and I can't manage to do nothing, apparently? When I do something like this: case IDLE: break; the script continues doing what it was previously doing. But if I do something like: case IDLE : cycleThroughTabs(); break; Where the function cyclethroughTabs just shifts between the inventory and the prayer tabs, it works properly. Does anyone have a proper method of simply doing nothing? EDIT: I guess i fixed the problem .. but I'm not sure how. Somewhere along the way while I was creating the cycleThroughTabs() function and integrating it, i must have fixed the problem, because I just removed it and recreated the first example and it worked. Woops. Also I guess you can't delete topics? Sorry for the spam.
  10. Ah the widget, of course. Sorry I'm new and didn't think of that. Thank you so much!
  11. Is this even possible? I imagine it being a function of the Player class but I can't see anything of use. Thank you for your time.
  12. I started learning how to write a script for another bot and learned I needed VIP to test it .. surely that's not the norm? I'm not new to programming but I'm new to writing scripts and would like to test them. Perhaps the community would like them too
×
×
  • Create New...