Everything posted by Jack Shep
-
getWorlds().hop() Not Working
Putting a 5 second sleep before hopping seemed to do the trick, thanks!
-
getWorlds().hop() Not Working
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?
-
Having Trouble with Simple Login Handler
I messed around with it some more and ended up figuring it out, thanks for your suggestions and help
-
Having Trouble with Simple Login Handler
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?
-
Having Trouble with Simple Login Handler
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.
-
Having Trouble with Simple Login Handler
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
-
Get G.E Data
Thank you for the help man, I've been struggling with this for a little while. I really appreciate it
-
Get G.E Data
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.
-
Get G.E Data
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.
-
Get G.E Data
I'm having some trouble understanding how to properly use this. I'm trying different things but they aren't working.
-
Selling farmed gold
Is 30-80m daily considered low as far as gold farming goes?
-
Get G.E Prices
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.
-
Paint won't show
It works! Thank you so much for your help
-
Paint won't show
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?
-
Paint won't show
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.
-
Paint won't show
Yeah, that didn't work either. I still have no clue what the issue is
-
Paint won't show
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.
-
Paint won't show
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.
- Paint won't show
-
Paint won't show
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); }
-
Script starts before GUI closes 25% of the time
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?
-
Script starts before GUI closes 25% of the time
I'll try this, but if it's returning true sometimes for no reason, how would I fix that?
-
Script starts before GUI closes 25% of the time
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.
-
Grand Exchange Price API
What code would you use to implement this into your script? I'm pretty confused rn.
-
Get Auto-Login to make multiple login attemps
In my experience you can, when I delete the sleep code the bot stops immediately instead of after 20 seconds.