Jump to content

ni562

Members
  • Posts

    74
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by ni562

  1. It's probably the Bank.LUMBRIDGE_UPPER...What is the Bank. part? it should just be just "LUMBRIDGE_UPPER"
  2. Try recompiling, then refreshing.
  3. THis is my code and it works 100% player = myPlayer(); Walker walker = getLocalWalker(); final Area BANK_AREA = new Area(3207, 3218, 3210, 3220); BANK_AREA.setPlane(2); if(!BANK_AREA.contains(player)){ walker.walk(BANK_AREA.getRandomPosition(), true); walker.waitUntilIdle(); } //Do your banking here
  4. Try re working you're script. Or simplifying it. Did you place the setPlane() in the onStart() method? I dont think you can setPlane on a position, it should be on an AREA. Try that and let me know
  5. setPlane() is setting the Z axis for you're Area. Here is an example. Ground floor is on plane(0)...Lumbridge bank is 2 Floor's above the ground floor so the plane is 2. final Area LUMBRIDGE_BANK = new Area(3205, 3208, 3216, 3229); LUMBRIDGE_BANK.setPlane(2); if(LUMBRIDGE_BANK.contains(myPlayer())){ log("Player is on the 3rd of lumbridge castle"); }
  6. When you are no longer on the ground floor, you must do AREA.setPlane(1) or AREA.setPlane(2) or AREA.setPl..... for ever floor that you climb. Hope this helps
  7. I got you!!! have you tried doing BANK_FLOOR.setPlane(2); Or in you're case LUMBRIDE_UPPER.setPlane(2); You have to do this to give it a Z axis. So far you have created the banking area but it is by default on plane(0). Amiright? I put it in the onStart() method in my scripts. It might be this part of you're code , but most likely it's what i posted above. if (Banks.LUMBRIDGE_UPPER.contains(myPlayer())) I would write it the following way: if (LUMBRIDGE_UPPER.contains(myPlayer()))
  8. Hey you might want to try this. I can't remember who posted it earlier this month but it works great for my lumbridge banking. It gets all the bank booths and returns a random one so u dont always bank the same booth. public RS2Object getRandomBank() { List<RS2Object> banks = getObjects().filter(obj -> obj.getName().equals("Bank booth")); return (banks == null || banks.size() == 0) ? null : banks.get(random(banks.size() - 1)); } Credz to: Explv It returns a bankBooth so all you need to do is: RS2Object bankBooth = getRandomBank(); bankBooth.interact("Bank");
  9. ni562

    doorHandler

    Why dont i think of these things lol Thanks Explv
  10. So far my script is working great but theres a litle bug i can't seem to fix.... When the door to the STAIR_AREA is already open, it will click a door that is near the stairs but not at all in my path.. Is there a way to check if the nearest door is already open and skip this bit ? if (doorHandler.handleNextObstacle(STAIR_AREA)) { walker.walk(STAIR_AREA.getRandomPosition(), true); }
  11. Iv tried both of these methods and they don't seem to be working...Am i missing something?
  12. ni562

    Walk()

    ERROR][Bot #1][12/30 07:06:24 PM]: Error in bot executor! java.lang.AbstractMethodError: client.getDestinationX()I at org.osbot.rs07.api.Map.getDestination(ng:134) at org.osbot.rs07.event.WalkingEvent.IIIiIiIIii(nl:482) at org.osbot.rs07.event.WalkingEvent.execute(nl:233) at org.osbot.rs07.event.EventExecutor$2.run(wn:170) at org.osbot.rs07.event.EventExecutor.execute(wn:11) at org.osbot.rs07.script.MethodProvider.execute(qc:247) at org.osbot.rs07.api.LocalWalker.walk(rg:199) at FlaxBot.FlaxSpinner.goBank(FlaxSpinner.java:162) at FlaxBot.FlaxSpinner.onLoop(FlaxSpinner.java:69) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(jh:93) at java.lang.Thread.run(Unknown Source) Any idea why this is happening? i ran my script for 5 hours yesterday no problem and this morning im getting this error....WTF? Is it the client? Btw here is was is on line 162 walker.walk(STAIR_AREA, true); it happens everytime the walk function is called. nvm, OSBot is offline thats why ppl. Some one delete this post?
  13. ni562

    onPaint()

    yeah, i should have left it as g. I casted it to Graphics2D because initially my parameter was only Graphics and i knew it should be Graphics2D...Why did i not think of changing the parameter?...i dont know You can look up type casting in java if u didn't understand this bit of code Graphics2D gr = (Graphics2D) g; It looks to me like gr in your code is an unused variable. meaning it has been assigned a value but it is never being called. Your code should work without that line.
  14. ni562

    onPaint()

    public void onPaint(Graphics g) { Graphics2D gr = (Graphics2D) g; gr.drawString("hahhahahaahha", 16, 105); } any idea why this isn't drawing anything on screen? Iv been messing around with it and it just wont draw anything to screen . I tried just using g (not gr) and still no luck.
  15. well fuck me... thanks to both of you
  16. How do you all get past this? I'v been working on it for a while and nothing seems to work
  17. ni562

    Auto login

    Wooops lol, i never tried running a script while i was logged out :P Thanks for the info
  18. So far my login script does everything but type the the password. Any idea how i can get the password from the current logged in user? If i save my username and password in the OSbot account selector, should i not be able to retrieve the password to login?
  19. "Type Safety: A generic array of Filter<RS2Object> is created for a varargs parameter." anything to worry about?
  20. Eclipse is throwing up some warnings..What should i do?
  21. Thanks man!! Always swooping in and shortening my code :p I'm not sure i understand all of that...you're knowledge of java/programming is greater than mine.
  22. Exactly what i needed! thanks for the feedback. I modified it a little and am posting it here if anyone is interested. public RS2Object randomBanker() { ArrayList<RS2Object> list = new ArrayList<>(); RS2Object bank; // Our bank booth for (RS2Object o : objects.getAll()) { if (o.getName().equalsIgnoreCase("Bank booth")) { list.add(o); } } bank = list.get(random(list.size() - 1)); //Chose a random booth return bank; }
  23. Hey i'm trying to get all the bank booths near the player so i can pick a random one..Can anyone one point me in the right direction? I don't want to always be banking the same booth.
  24. I realized the 2nd part of the if statement was useless...it will never get to the 2nd condition. if(spinMenu == null || !spinMenu.isVisible()){ is the same as if(spinMenu == null ){ because if (spinMenu == null) then it's deff not visible and if it's not null then it is visible.
  25. sweeet, i didn't know that...Im sure it'll be useful in the future. Thanks for the help dude
×
×
  • Create New...