March 26, 20169 yr hello, i recently started writing scripts after having a huge interest in them since i was a kid, and since i started taking programming in school i am starting to understand the basics. so far after following tutorials i made a sardine fisher that could pretty much only drop the whole inventory and stop. what i want to work on is making a fly-fisher that banks exclusively at edgeville. as i type now i should be able to code the actual fishing, but banking.. i just have no idea how to approach it (how would i walk to the bank? open it? only deposit trout/salmon?) any advice or tutorials to point me in the right direction would be really appreciated!
March 26, 20169 yr Walking: walking.webWalk(Bank.EDGEVILLE); Opening: bank.open(); Deposit: bank.depositAllExcept("Fly fishing rod", "Feather");
March 26, 20169 yr Author Walking: walking.webWalk(Bank.EDGEVILLE); Opening: bank.open(); Deposit: bank.depositAllExcept("Fly fishing rod", "Feather"); something like this -> http://prntscr.com/ak56m3 ? or am i completely in the wrong direction? edit: the getState() was fucked in the beginning but i fixed it Edited March 26, 20169 yr by snowek
March 26, 20169 yr something like this -> http://prntscr.com/ak56m3 ? or am i completely in the wrong direction? edit: the getState() was fucked in the beginning but i fixed it Yes something like that but the enum was Banks not Bank actually.
March 26, 20169 yr something like this -> http://prntscr.com/ak56m3 ? or am i completely in the wrong direction? edit: the getState() was fucked in the beginning but i fixed it uhh not sure about this but wasn't a fishing spot an npc? So it'd be NPC fishSpot = getNpcs().closest("Fishing spot") check however im not entirely sure lol
March 26, 20169 yr uhh not sure about this but wasn't a fishing spot an npc? So it'd be NPC fishSpot = getNpcs().closest("Fishing spot") check however im not entirely sure lol You´re correct.
March 27, 20169 yr something like this -> http://prntscr.com/ak56m3 ? or am i completely in the wrong direction? edit: the getState() was fucked in the beginning but i fixed it Something like that yes, but you should account for cases where walking fails, or opening the bank fails etc. etc. You will also want to sleep when opening the bank to avoid spam clicking. So something more like this: private void bank(){ if(!Banks.EDGEVILLE.cotains(myPosition())) getWalking().webWalk(Banks.EDGEVILLE); else if(!getBank().isOpen()) openBank(); else getBank().depositAllExcept("Fly fishing rod", "Feather"); } private void openBank(){ getBank().open(); new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getBank().isOpen(); } }.sleep(); }
Create an account or sign in to comment