Jump to content

lisabe96

Members
  • Posts

    821
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by lisabe96

  1. Apparently osbot's logic is flawing then because it doesn't work half of the time, while frostbug's solution does all the time
  2. It's weird, it sometimes works and sometimes not. Ill try your solution. Edit: Seems to be working this way, thanks!
  3. if (script.getDialogues().inDialogue()) { if (script.getDialogues().isPendingContinuation()) { script.getDialogues().clickContinue(); break; } } When I log the code, It says that I'm in a dialogue, but not that there's pending continuation. With other words, I'm stuck as it doesn't continue the dialogue. Am I missing something?
  4. The image is transparent, and I don't want users to have to click inside the fish, that would be a bad case of UI handling. It has to work when they click the area around it as well.
  5. @Override public void onStart() { getBot().addMouseListener(this); try { normalImg = ImageIO.read(new URL("https://i.imgur.com/tXYml3w.png")); powerImg = ImageIO.read(new URL("https://i.imgur.com/LVpXu5C.png")); displayImage = normalImg; } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } @Override public void mouseClicked(MouseEvent event) { int x = event.getX(); int y = event.getY(); if (x > 413 && x < 471 && y > 388 && y < 458) { powerfishing = !powerfishing; displayImage = powerfishing ? powerImg : normalImg; } } @Override public void mouseMoved(MouseEvent event) { int x = event.getX(); int y = event.getY(); tooltip = x > 413 && x < 471 && y > 388 && y < 458; } @Override public void onPaint(Graphics2D graphics) { Graphics2D g = (Graphics2D) graphics; g.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF)); if (displayImage != null) { graphics.drawImage(displayImage, 420, 400, null); } if (tooltip) { g.setColor(Color.BLUE); g.drawString("Click to " + (powerfishing ? "disable" : "enable") + " powerfishing.", 311, 15); } } Got it all working perfectly Thanks, code posted for people looking for this in the future
  6. Oh so it's basically just default java implementation, I was expecting something more complex built into the API. Thanks I think i can figure it out
  7. I think you meant to post this
  8. I have only 1 option for the user to chose and it's kinda ridiculous to make a GUI for that, so I'd like to draw a toggle button to the game screen and handle it when it's clicked by the user. I have no experience what so ever with this, how would I go about implementing this?
  9. No offense, sure you learned some things and enjoy making stuff without purpose, because so do I. But if you can't drag a shortcut into a folder you wont be able to use this program either :p This is uber useless
  10. Simply amazing, not a lot more you can say about this
  11. - Fixed an issue where when out of bars it would keep trying to smith anyways. - Added anti-pattern and pseudo anti-ban options. - Tweaked some things - Can be started anywhere, any time (will go get utilities on it's own) I would love to push this to the SDN but lack the rsgp for a 2 hour proggy If anybody could help me out with a proggy that'd be great!
  12. Don't kill me when I'm wrong but with isVisible(); I'm assuming it's actually visible on the screen. This means that the widget might not be null, but because of e.g. lag it's not visible instantly yet. So checking if it's visible would be a good thing over only checking if it's not null.
  13. Smiths any type of bar into items. Checks for better items on level-up. Uses the fast & close Varrock West location. No worries when you were in a rush and forgot to put a hammer in your inventory. The bot will get it out of your bank for you. Got different kinds of bars? No problem either, if you toggle "continuation" mode, the bot auto-switches bars until all the bars in your bank are done. If you only want to do one type of bar, just use "specific" mode. Current version: 1.1 Download here! Put the downloaded JAR inside "c:\Users\YOUR_USER\osbot\scripts\" and refresh your scripts list in your client. As always, report any bugs so I can fix them. If anybody could post a longer proggy that'd be great. I'm too poor for long smithing sessions
  14. RS2Widget w = getWidgets().get(162, 31); if (w == null) { log("Widget not found"); break; } if (w.isVisible()) { getKeyboard().typeString("5"); } Works perfectly, thanks for the help guys
  15. Use sure, thinking about it is another thing As this is dialogue related to me I was thinking dialogues and not widgets. Will try to get it working with widgets in a bit
  16. How would I handle inputting an amount when you click the X-option. The dialogues class didn't bring me any solution, neither did configs and I don't really know where else to look.
  17. Not at all as not all banks are in the API and some are a bit off. But I read that the next API update will have those fixed Edit: well right now in OP's case it is indeed
  18. Yea you'll have to define the widget value later on when the script is initialized
  19. long runTime = System.currentTimeMillis() - startTime; RS2Widget w = widgets.get(309,2); Set these 2 global variables to default ^ long runTime; RS2Widget w; Then do the same again, comment out everything in start(); again and see if it prints out now public void onStart() throws InterruptedException { /*startTime = System.currentTimeMillis(); players.myPlayer(); startCRAFTEXP = getSkills().getExperience(Skill.CRAFTING); g.setVisible(true); while(guiWait) try { sleep(500); } catch (InterruptedException e) { e.printStackTrace(); }*/ log("They see me loggin, they hatin"); }
×
×
  • Create New...