-
Posts
821 -
Joined
-
Last visited
-
Feedback
100%
Everything posted by lisabe96
-
I mean it's in red on the front page OFFLINE, in some way they apparently manage to not notice it lol. However I believe it would be a good thing to have a post in announcements or something about down times, giving us some information about what's going on and if possible the estimated time it should go back online. It would definitely decrease such panic threads
-
Annoying but it's their responsibility so you'll get the extra money for fast shipment back if you ask for it.
-
-
I made the same 2 days ago package rqai.utilities; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.map.constants.Banks; import org.osbot.rs07.script.Script; /** * * @author randqm * * Represents a bank. * */ public enum Bank { LUMBRIDGE(new Area(new Position(3207, 3220, 0), new Position(3210, 3218, 0))), VARROCK_WEST(Banks.VARROCK_WEST), VARROCK_EAST(Banks.VARROCK_EAST), GRAND_EXCHANGE(new Area(new Position(3162, 3486, 0), new Position(3168, 3493, 0))), DRAYNOR(Banks.DRAYNOR), EDGEVILLE(Banks.EDGEVILLE), SEERS(Banks.CAMELOT); /* The area of the bank. */ private final Area area; /** * Creates a new bank. * * @param area The area of the bank. */ private Bank(Area area) { this.area = area; } /** * Retrieves the area of the bank. * * @return The bank's area. */ public Area getArea() { return area; } /** * Retrieves the closest bank. * * @param script The script. * * @return The closest bank found. */ public static Bank getClosestBank(Script script) { Bank closest = null; for (Bank bank : values()) { if (closest == null || bank.getArea().getRandomPosition().distance(script.myPosition()) < closest.getArea().getRandomPosition().distance(script.myPosition())) { closest = bank; } } return closest; } }
-
I worked something out and It seems to be working great. What section is appropriate to release something like this? I'd love some people using it to find and work out possible bugs
-
I know it's not a simple task, but I've written whole RSPS's from scratch so I'm confident that I could work something out. Ill take a look to the doorhandler tonight and see what I can come up with
-
Thanks! Looks like this might be what I'm looking for at first glance. Will check it out tomorrow, it's far past bed time im out
-
I want to find out why we can't reach it, what obstacle is stopping us from reaching the position is what I want to know
-
That's what I'm doing now, and sure it works great. But for my AI project I want to build a more general approach where we don't need to know the specific situation. Where I could send my bot to random coordinates and it would handle the obstacles it comes across. I would be able to write the code for that, I just need to find out what I mentioned in my original post. How do I let the pathfinder ignore obstacles and how do I know which kind of obstacle it is.
-
That won't tell us anything about any object's on the path, only that it can't be reached. But if you put 4 walls without a door, it won't be able to reach it either, we have no clue about any obstacles on why we can't reach it.
-
Imagine that I want to run from lumbridge castle to the cows. IF you try to make a path to inside the cows area, the pathfinder will give you a path through the gate IF it's open. When the gate is not open, the pathfinder won't be able to get in and get stuck. I want to work out a general approach where the pathfinder would ignore that the gate is closed so I can codewise intercept it and handle it. However the pathfinder doesn't know that there's a gate when it's closed, it just treats it as an area where it can not pass/get in. I'm looking for ideas on how I could get doors/gates and let the pathfinder ignore it. Not looking for spoonfedding, I can work it out myself if only I had a lead. Thanks in advance for any help towards this.
-
Clicking on inventory items + antiban would be helpful :)
lisabe96 replied to rafomaniac's topic in Scripting Help
Because wine is 35gp and jug is ~85, with water 110 Its mad beginner cash -
I did yes
-
It doesn't return "true" it just gives the area. It works perfect for other banks, however maybe there's an issue when the bank is not on the floor plane. At least it didnt find me being in the area so I assume there's something wrong with it
-
It's part of the API Banks. contains all the banks and returns their area Banks.LUMBRIDGE_UPPER returns the bank area for lumbridge upper
-
Works! Thanks a lot. So apparently there's something wrong with Banks.LUMBRIDGE_UPPER I'd assume.
-
Movement.walkToArea(script, Banks.LUMBRIDGE_UPPER); new ConditionalSleep(5000, 6000) { @Override public boolean condition() throws InterruptedException { for (RS2Object bankBooth : script.getObjects().getAll()) { if (Banks.LUMBRIDGE_UPPER.contains(bankBooth)) { if (bankBooth.getName().equals("Bank booth")) { bankBooth.interact("Bank"); break; } } } return script.getBank().isOpen(); } }.sleep(); This works, however I can't be sure that the player is within the bank area, could be stuck behind the back wall or something. As you see this time there's no check on the z-axis which obviously is the problem @ni562 Yes I tried that, same issue
-
Tried using area, same issue: Banks.LUMBRIDGE_UPPER.setPlane(2); if (Movement.walkToArea(script, Banks.LUMBRIDGE_UPPER)) { script.log("Arrived at destination"); } public static boolean walkToArea(Script script, Area area) { if (!script.myPlayer().isMoving()) { script.log("not moving"); if (area.contains(script.myPlayer())) { script.log("finished"); return true; } script.log("tryna move"); script.getWalking().webWalk(area.getRandomPosition()); } script.log("movement"); checkRunning(script); return false; } Doesn't recognize my player being inside the area, the plane reset
-
This seems to be the issue, however it seems to reset the plane Position pos = Banks.LUMBRIDGE_UPPER.getRandomPosition(); Position bank = new Position(pos.getX(), pos.getY(), 2); if (Movement.walkTo(script, bank)) { script.log("here"); } This will print out a plane of 2, however when going to the walkTo method it prints out 0 as plane: public static boolean walkTo(Script script, Position pos) { return walkTo(script, pos, false); } public static boolean walkTo(Script script, Position pos, boolean handleDoor) { if (!script.myPlayer().isMoving()) { script.log(script.myPosition().getZ() + ", " + pos.getZ()); if (script.myPosition().distance(pos) < 3) { script.log("in distance"); if (handleDoor) { openDoor(script, pos); } return true; } script.getWalking().webWalk(pos); } checkRunning(script); return false; } For some reason it resets to 0
-
Nope ^ I think it's not the actual banking that is the problem becauseeee It doesnt recognize my player being in the bank area in the first place. I'm guessing that that is my issue, it doesnt return my player being in the bank area. Though the player is, no clue how thats possible though
-
I know, originally I checked for the banker: NPC npc = getNpcs().closest("Banker"); if (npc != null) { npc.interact("Bank"); } } But as that didnt work I tried the bankbooth, then I tried looping through the nearby objects and then I came here. None of the given solutions got it working yet This is what I have now: (doesnt work) if (Banks.LUMBRIDGE_UPPER.contains(myPlayer())) { log("in the bank"); //Doesnt print if (!getBank().isOpen()) { try { if (getBank().open()) { new ConditionalSleep(5000, 6000) { @Override public boolean condition() throws InterruptedException { return getBank().isOpen(); } }.sleep(); } } catch (InterruptedException e) { e.printStackTrace(); } } } else { getWalking().webWalk(Banks.LUMBRIDGE_UPPER.getRandomPosition()); }
-
That's what I originally tried
-
I did now and It didn't work. Logged the stages and it never even found my player being in the bank area.
-
Got stuck at chickens, it didn't attack them. For the rest it worked great
-
Trying to bank at the lumbridge bank at the 2nd floor of the caslte. However when I tried to grab a banker or a bank booth with .closest("Banker"); It didn't find the bankbooth/banker. So I tried looping myself through all the RS2Objects in the area to find a bank booth, but it returned nothing. Am I missing something? for (RS2Object obj : script.getObjects().getAll()) { if (obj.getPosition().distance(script.myPosition()) < 10) { script.log(obj.getName()); if (obj.hasAction("Bank")) { obj.interact("Bank"); return true; } } }