Jump to content

whipz

Members
  • Posts

    780
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by whipz

  1. Yeah I just noticed it before that was the reason for edit; But i cant think of a way to get around it now while still needing to be in the same area to trade the mule; If i was to add to that line that your on now that you quoted and added !bank.isOpen(); would that fix my problem ?
  2. Yeah mate, it does the deposit all then runs back to cows
  3. Thanks I have done that with this yet I still seem to have the problem it seems to skip it if (bank.isOpen()) { if(inventory.isEmpty()) { if (getBank().getWithdrawMode().equals( Bank.BankMode.WITHDRAW_NOTE)) { getBank().withdrawAll("Raw beef"); log("Withdrawing Noted Beef"); sleep(random(750, 1500)); } else { bank.enableMode(Bank.BankMode.WITHDRAW_NOTE); log("changing to withdraw note mode"); sleep(random(750, 1500)); } } else { bank.depositAll(); } sleep(random(1000, 2500)); } else { int rand = random(3); if (rand == 1) { closestBankBooth.interact("Bank"); log("Using Bank Booth"); sleep(random(750, 1500)); } else { closestBanker.interact("Bank"); log("Using NPC Banker"); sleep(random(750, 1500)); } sleep(random(1000, 2500)); log("Opening Bank"); } } } Its fine in my ide I just wasnt using the code thing at the top i was just using code in [] EDIT: I just realised it could be with my states; private State getState() { if (!inventory.isFull() && cowArea.contains(myPlayer())) return State.PICKUP; if (inventory.contains("Raw Beef") && muleArea.contains(myPlayer())) return State.TRADE; if (!inventory.isFull() && !cowArea.contains(myPlayer())) return State.WALKTOPICKUP; if (inventory.isFull() && !muleArea.contains(myPlayer())) return State.WALKTOMULE; return State.WAIT; } public int onLoop() throws InterruptedException { switch (getState()) { case PICKUP: doPickUp(); break; case WALKTOMULE: getWalking().webWalk(muleArea); break; case TRADE: getNotedItems(); tradeMule(); offerItems(); acceptTrade(); break; case WALKTOPICKUP: getWalking().webWalk(cowArea); break; case STOP: this.stop(); break; case WAIT: sleep(random(200, 300)); break; } return random(200, 300); }
  4. Hey guys; I thought I should re-edit and make it a bit neater; Here is my problem, this bit of code keeps getting skipped. if (bank.isOpen()) { if(inventory.isEmpty()) { if (getBank().getWithdrawMode().equals( Bank.BankMode.WITHDRAW_NOTE)) { getBank().withdrawAll("Raw beef"); log("Withdrawing Noted Beef"); sleep(random(750, 1500)); } else { bank.enableMode(Bank.BankMode.WITHDRAW_NOTE); log("changing to withdraw note mode"); sleep(random(750, 1500)); } } else { bank.depositAll(); } sleep(random(1000, 2500)); The withdraw as a note method just constantly gets skipped; I have a feeling its to do with my states, which are here; private State getState() { if (!inventory.isFull() && cowArea.contains(myPlayer())) return State.PICKUP; if (inventory.contains("Raw Beef") && muleArea.contains(myPlayer())) return State.TRADE; if (!inventory.isFull() && !cowArea.contains(myPlayer())) return State.WALKTOPICKUP; if (inventory.isFull() && !muleArea.contains(myPlayer())) return State.WALKTOMULE; return State.WAIT; } and switch (getState()) { case PICKUP: doPickUp(); break; case WALKTOMULE: getWalking().webWalk(muleArea); break; case TRADE: getNotedItems(); tradeMule(); offerItems(); acceptTrade(); break; case WALKTOPICKUP: getWalking().webWalk(cowArea); break; case STOP: this.stop(); break; case WAIT: sleep(random(200, 300)); break; } return random(200, 300); } See I want to withdraw them as a note obviously so I can trade to my mule; however I think my return state for trade fails as I only want it to be recognized as a noted item; but it obviously just skips back to thinking it needs to walk back to cowarea which is not needed to be done till after its finished the trade method; Any help would be appreciated as im stuck as lol
  5. how much for the thing that makes the accounts and the loader ? haha I dont mind making my own scripts but i know I cant do the rest )': TEACH ME YOUR WAYS !
  6. Just formated code and added your lock thingy; exact same lines of code /: Still getting the same errors; I dunno what is wrong;
  7. Looking over it now thanks (: will post again if I get stuck I still get a similar error, However I can now use the GUI fine, Once I click start; It gives me this error now java.lang.NUllPointerException at main.getstate(main.java:55) at main.onLoop(main.java:64) at org.osbot.rs07.eventScriptExecutor$InternalExecutor.run(hk:274) at java.lang.Thread.run(Unknown Source) Its the exact same lines; However my rawName should be declared once okay is pressed.
  8. Hey guys, I have started writing my own script; I have most of it finished I think; I have created the .jar, I also can see it now on the script selector; However this is as far as I can get; When i click run my GUI opens which is perfect however the client then lags like crazy and wont let me click or even close osbot down unless i task manage it and end the java task. I opened the logger first this time and it gave me this error error in script executor! java.lang.NullPointerException at main.getState(main.java50) at main.onLoop(main.java 59) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(hk:274) at java.lang.Thread.run(Unknown Source) So i think my errors are here ? line 50 if (!inventory.contains(rawName) && !bankArea.contains(myPlayer())) line 59 switch (getState()) { Any help will be appreciated; Also i can post more of the code if needed
×
×
  • Create New...