-
Fruity Zulrah Killer
I have an ironman account so some limitations. does it support mage only, and does it support regular antipoison?
-
FrostCaves
I have an ironman account - no brews. Does this support food and prayer pots?
- Draw the bounding box of an area
-
Draw the bounding box of an area
annoying, but I've got it working in two ways, one of which should be easier. The ConvexHull method above works, however i also got it working with: https://osbot.org/api/org/osbot/rs07/api/util/GraphicUtilities.html Using GraphicUtilities.getBoundingBox(short [][]) to get the short array, I used this (which to be honest was a guessing game, I only vaguely understand what i was doing with map and stream) getCombatArea().getPositions().stream().map(pos->pos.getVertices()).collect(Collectors.toList()); which gives you List<short [][]> - then flatten it into a single short[][] -> pass it to getBoundingbox, draw the polygon. im using ConvexHull now - its more code but seems cleaner.
-
Draw the bounding box of an area
Another little update - After a bit of research, there's a "convex hull" algorithm that will return a set of points that encloses all other points in a set. I suspect if we break down all the positions->polygons->points and merge them into a list, then we run convex hull on the point sets, create a polygon of the points, and then draw it it should work. I'm currently working on this but if you have a fix before i get there even better.
-
Draw the bounding box of an area
Closer again! but not quite there - it draws a rectangle of the outer perimeter of the area, but does not account for the camera/tiles. The images linked below show what I mean since it's hard to explain. http://imgur.com/a/FNbOk The original solution was closer, mapping it to a shape/to its bounds seems to have "removed" the camera/bot context from it, so it just gets drawn as a square for the appropriate size on the screen and isnt drawn on top of the tiles like the initial suggestion. I suspect the final solution to the problem lies somewhere in the middle - as you were able to call g.draw(java.awt.geom.Area area) but org.osbot.rs07.api.map.Area doesnt directly translate. Can we somehow convert the osbot Area implementation into the java.awt.Area (which i suspect is its superclass) - there's something being lost in translation there. Could you provide some links to Stream, and Map so i can get those figured out and maybe come up with a solution? Possibly a tweak in the reduce function on the original suggestion? I'll try a few things in the meantime, with casting etc. Thanks again!
-
Draw the bounding box of an area
So this is really close but doesnt quite work! - as i dont understand your snippet I can't add the fix myself. It does draw the bounding boxes of the outline by reducing the number of points, but also has some artifact lines left over, it looks like this. http://imgur.com/a/VzFl2 Can you either explain your code a little more so i can figure it out if the fix isn't immediately obvious, or provide a fix? Ideally the former, because I'd like to understand it more than i want it to "just work" Honestly I really appreciate your help.
-
Draw the bounding box of an area
Nothing is drawn on the screen. I'm not sure why. The docs state that Area.getPolygon() returns "the java.awt.Ploygon that this class is based off" which i assume is not quite the same as a polygon that represents the visual placement of that area on screen - which is why you need to pass a Bot object for g.drawPolygon(p.getPolygon(bot)) which does seem to work with a Point object. There is no similar implementation for Area for example area.getPolygon(bot), only Area.getPolygon() exists which takes no bot parameter.
-
Draw the bounding box of an area
Hi all, I'm trying to paint the bounding box of an Area. I tried Area.getPolgyon() and g.draw(polygon), though I suspect as Area is an extension of the polygon class, it doesnt quite work to just draw the polygon from the superclass. Instead, I used Area.getPositions, and then iterate through each position and draw bounding boxes on those - however this is very noisy, as it draws a mesh (box around every tile obviously) rather than just the outer edges of the Area. the code I'm using for the per-tile drawing is: for (Position p : gs.getCombatArea().getPositions()) { if (p.isVisible(bot)) g.drawPolygon(p.getPolygon(bot)); } I suspect I have two options, but I would appreciate a push in the right direction. Use https://osbot.org/api/org/osbot/rs07/api/util/GraphicUtilities.html#getBoundingBox-short:A:A- to get a bounding box of a set of points - but how do i create a short[][] of points from my List of position objects? Use some math to work out the corner points of the area - and then create a rectangle/polygon for those points and draw that Any help would be greatly appreciated.
-
Khal AIO Agility
Hi, A couple of issues with this: 1) It takes a very long time to start, because it hangs and eventually fails to download some images which I assume are for the paint. doesnt work on any of the machines i've run it on. takes about 3-5 minutes to start. 2) in the seers village course, it tries to keep crossing the long tightrope, even while it's already half to 3/4s of the way across it. It's as though it doesn't recognise it's started to cross yet, and so continually tries to click it even though it's already crossing. Could you investigate please? mostly the second one as it's very bot like. Thanks!
-
Perfect Fighter AIO
Bug report: Issue: Navigation to slayer cave is broken with walking type 1. I assume the trolls' cave has the same object ID as the slayer cave entrance, because as it gets close to the slayer cave, it clicks on the trolls cave next to the golden tree. It then realises it's not made it yet and tries to get to the slayer cave, but before it gets there clicks the troll cave and runs back and forth constantly between the two. reproduce: set monster to cockatrices, and banking enabled, with walk/walk. Can you fix please?
-
Khal Warrior Guild
to add to this, I found another bug - the bot still loots black knives when you untoggle it in the GUI. This is a problem for ironmen, as it continuously tries to loot things it cant and so it just stops and spam clicks the item.
-
Khal Warrior Guild
Can you please change the combobox in the GUI for food into an input box and allow entry of our own food? the fact im limited to trout/lobsters etc is really annoying. Adding a task to leave the room and re-enter every 50 seconds when in defender mode shouldnt be difficult and will make it a lot more efficient too.
-
Juggles AIO Shop Buyer
That makes sense... Guess I'm writing my own today then!
-
Juggles AIO Shop Buyer
Banking fails in the warriors guild, it goes to the bank, opens it, and then immediately tries to run off out the guild (I'm assuming to another bank). Can you take a look please?