Jump to content

Jack Shep

Members
  • Posts

    36
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Jack Shep

  1. Putting a 5 second sleep before hopping seemed to do the trick, thanks!
  2. I can't get getWorlds().hop() to work, here's some code: ladder = getObjects().closest("Ladder"); if (ladder != null) { if (ladder.interact("Climb")) { new ConditionalSleep(20000) { @Override public boolean condition() { return bankArea.contains(myPlayer()); } }.sleep(); } } if (bankArea.contains(myPlayer())) { log("Hop"); worldHop(328); } } public void worldHop(int world) { getWorlds().hop(world); } I've also tried ladder = getObjects().closest("Ladder"); if (ladder != null) { if (ladder.interact("Climb")) { new ConditionalSleep(20000) { @Override public boolean condition() { return bankArea.contains(myPlayer()); } }.sleep(); } } if (bankArea.contains(myPlayer())) { log("Hop"); getWorlds().hop(328) } I get the "Hop" message in the logger, but it doesn't hop. Any ideas?
  3. I messed around with it some more and ended up figuring it out, thanks for your suggestions and help
  4. Still getting the NPE even though the client is logged out, going to continue trouble shooting to try and figure out the issue. Any other ideas of what it might be?
  5. I've tried a few things and still am getting the same results. Perhaps I don't fully understand what you're saying, either way, I don't know what else to try.
  6. Hey all, I ran into some trouble trying to use Explv's login handler: Here's my onStart(): private LoginEvent loginEvent; @Override public void onStart() { loginEvent = new LoginEvent("username/email", "password"); getBot().addLoginListener(loginEvent); } Here's how I'm attempting to use the login handler in my onLoop(): if (getClient().getLoginStateValue() == 10) { loginEvent.execute(loginEvent); } All I'm getting in the logger when the bot should be logging in is this spammed over and over again. Unsure what I'm missing, any and all help is appreciated
  7. Thank you for the help man, I've been struggling with this for a little while. I really appreciate it
  8. That's the code the person who released the RSBuddyExchangePrice had on their post, I literally copied and pasted it, and it still didn't work. That's why I continue to have questions.
  9. Thanks, I used their code to get the price for a dragon chainbody (like they do in their post) but the console output was: core.RSBuddyExchangePrice@7946e1f4 Any idea on what I'm doing wrong? This is the full code public static void main(String[] args) throws IOException { RSBuddyExchangeOracle.retrievePriceGuide(); // ... RSBuddyExchangePrice price; price = RSBuddyExchangeOracle.getItemByName("Dragon chainbody"); System.out.println(price); } I tried using the: getGrandExchange().getOverallPrice(int ID) method before and it didn't work. That's why I'm so confused.
  10. I'm having some trouble understanding how to properly use this. I'm trying different things but they aren't working.
  11. Is 30-80m daily considered low as far as gold farming goes?
  12. I've looked over and have tried to use multiple peoples snippets on how to get the G.E/OSBuddy prices for items but nothing will work. I don't know if I'm doing something wrong or if the code I'm using is just out of date. Any help would be greatly appreciated.
  13. It works! Thank you so much for your help
  14. What I tried worked, my paint finally prints now, thank you for the help. But of course this generated another issue, now the script stops moments after I start it, although it sounds like an unrelated issue, the script worked 100% (besides for the paint) before I made the change. I tried parsing the strings in my onLoop() instead which fixed the new issues but again the constant re-parsing caused some issues. (So much lag that the script wouldn't run). Any Ideas?
  15. The only issue with leaving the variables as 'string' is that I don't actually print those values. I use them in my formulas to calculate the values of the variables that I do actually print. So I need those variables as 'int's. However, what you're saying about re-parsing again and again makes sense. I only need to convert the variables from 'string' to 'int' once as they're just the OSBuddy prices of a few items. So I'll try parsing my strings to integers in my onStart() method and see if that fixes the issue.
  16. Yeah, that didn't work either. I still have no clue what the issue is
  17. The value of guiOptionChose is being set correctly, I have a set of if statements identical to the pair in my paint in my onLoop() and they work fine.
  18. Yeah, my GUI works fine and is written the same way. I also use the same two if statements in my onLoop() and it works fine.
  19. I know this seems like a rookie problem but I can't find the issue. Here's my paint. @Override public void onPaint(Graphics2D g) { DecimalFormat df = new DecimalFormat("#"); timeRan = System.currentTimeMillis() - this.timeBegan; currentXp = skills.getExperience(Skill.FLETCHING); if (currentXp > logXp) { itemsMade += 15; logXp = currentXp; } if (guiOptionChose == "Arrow shafts") { int temp = Integer.parseInt(logPrice); int temp2 = Integer.parseInt(arrowShaftPrice); int temp3 = Integer.parseInt(headlessArrowPrice); int temp4 = Integer.parseInt(featherPrice); xpGained = currentXp - beginningXp; gpGained = (itemsMade * temp2) - (temp * itemsMade); totalGpGained = gpGained / 1000; gpPerHour = (int)(gpGained / ((System.currentTimeMillis() - timeBegan) / 3600000.0D)); totalGpPerHour = gpPerHour / 1000; } if (guiOptionChose == "Headless arrows") { int temp = Integer.parseInt(logPrice); int temp2 = Integer.parseInt(arrowShaftPrice); int temp3 = Integer.parseInt(headlessArrowPrice); int temp4 = Integer.parseInt(featherPrice); int temp5 = temp2 + temp4; xpGained = currentXp - beginningXp; gpGained = (itemsMade * temp3) - (temp5 * itemsMade); totalGpGained = gpGained / 1000; gpPerHour = (int)(gpGained / ((System.currentTimeMillis() - timeBegan) / 3600000.0D)); totalGpPerHour = gpPerHour / 1000; } g.setColor(Color.WHITE); g.drawString("Run Time: " + ft(timeRan), 5, 260); g.drawString("Xp Gained: " + xpGained, 5, 280); g.drawString("Gp Gained: " + df.format(totalGpGained) + " k", 5, 300); g.drawString("Gp Per Hour: " + df.format(totalGpPerHour) + " k/hr", 5, 320); }
  20. I need to refresh the script selector every time I run the script but this worked. However is this only because it's a local script? If it was an SDN script or a private script would it not have the issue? Also is there a way to fix this issue with code?
  21. I'll try this, but if it's returning true sometimes for no reason, how would I fix that?
  22. I have an if statement inside of my onLoop which contains all of the code that would normally be in the onLoop. The only way the code will run is if "started" equals "true", and the only place "started" is changed from "false" to "true" is inside of the action listener for my start button in the GUI. However, about 25% of the time the code inside of onLoop and the if statement runs even if you haven't hit "Start" in the GUI. Using the search tool I've found nowhere else in my code that changes "started" to true besides for that action listener. I don't know what to do.
  23. What code would you use to implement this into your script? I'm pretty confused rn.
  24. In my experience you can, when I delete the sleep code the bot stops immediately instead of after 20 seconds.
×
×
  • Create New...