Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/29/13 in Posts

  1. To be honest, I think if anything the allowed signature size should be decreased.
    2 points
  2. Hello my dear fellow botters, With the stress of the last days to get the SDN up and rolling and setting people up with their SDN access, I have been sad about the fact we have not had the time to straighten out the last of those randoms to become a 100%. So today is the day that I will solely focus on randoms. So far from what I have been reading on the forums these randoms that are currently supported by OSBot do not work, or do not work correctly all the time: Frog Queen (outside cave) Maze Freaky Forester Surprise Exam Pinball Molly Ones that I will be writing today are: Evil Bob (edit: Written) But I can't do this on my own. I need your help today. I took the day off, so I'll be here most of the day, busting randoms and perfecting them. I need your accounts, stuck in randoms. So please message me in a private message today if you encounter any randoms! Status: Waiting for randoms Sincerely, Maxi
    1 point
  3. Just got into maze random gave you account details.
    1 point
  4. 1 point
  5. Whats up with how pixelated this image is? It looks like trash for an icon. Both our current and this one are not what we need. Constructively, I think this image is too tall, It is also a bit thin lettering which makes it odd to read. I don't know about the pixelated/fuzzy edges, but it does not look good. I also believe red and black is so old... Maybe a different scheme for once would be nice.
    1 point
  6. I actually like this idea alot. And then once a script is released, they can lock their previous topic and post one in either the SDN Scripts or the Local Scripts board.
    1 point
  7. How is nulling unused RAM memory going to prevent your laptop from getting hot?
    1 point
  8. It is not added in the so far released versions of OSBot. I have added it in the next release.
    1 point
  9. Hello, Being that the models for items that are elevated are broken(there heights are wrong), I have come up with a method to advert this pesky problem, it simply builds a Prism around were the model should be, and collides its corner vertices to derive it's midpoint, which in most cases, is were exactly the models center point is. Cool stuff. Example: And the src code: package rdpv2; import org.osbot.script.Script; import org.osbot.script.ScriptManifest; import org.osbot.script.rs2.utility.Utilities; import java.awt.*; @ScriptManifest( author = "Brainfree", version = 1.00, info = "Generates a point of elevation were a item on table should be, roughly", name = "Elevated Point Grabber" ) public class TableGrabbing extends Script { public Point[] getLid(int x, int y, int height, double compression) { Point A = getScreenPoint(x, y, 0, 0, height); if (A.x == -1) return null; Point B = getScreenPoint(x, y, 0, 1, height); if (B.x == -1) return null; Point C = getScreenPoint(x, y, 1, 1, height); if (C.x == -1) return null; Point D = getScreenPoint(x, y, 1, 0, height); if (D.x == -1) return null; Point c = getInterceptionPoint(A.x, A.y, C.x, C.y, B.x, B.y, D.x, D.y); Point Ac = getPointOnLineAtDistance(A.x, A.y, c.x, c.y, compression); Point Bc = getPointOnLineAtDistance(B.x, B.y, c.x, c.y, compression); Point Cc = getPointOnLineAtDistance(C.x, C.y, c.x, c.y, compression); Point Dc = getPointOnLineAtDistance(D.x, D.y, c.x, c.y, compression); return new Point[]{Ac, Bc, Cc, Dc}; } private Point getScreenPoint(int x, int y, int sx, int sy, int height) { return Utilities.getScreenCoordinates(bot, (x - client.getMapBaseX() + sx) << 7, (y - client.getMapBaseY() + sy) << 7, height); } public static Point getInterceptionPoint(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) { double dot = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4); if (dot == 0) new Point(-1, -1); double X = ((x3 - x4) * (x1 * y2 - y1 * x2) - (x1 - x2) * (x3 * y4 - y3 * x4)) / dot; double Y = ((y3 - y4) * (x1 * y2 - y1 * x2) - (y1 - y2) * (x3 * y4 - y3 * x4)) / dot; return new Point((int) X, (int) Y); } public static Point getPointOnLineAtDistance( double OriginX, double OriginY, double EndLocationX, double EndLocationY, double scale) { final double LegXLength = (EndLocationX - OriginX); final double LegYLength = (EndLocationY - OriginY); double HypotenuseLength = Math.sqrt(LegXLength * LegXLength + LegYLength * LegYLength); double InverseX = HypotenuseLength * scale * LegXLength / HypotenuseLength; double InverseY = (HypotenuseLength * scale * LegYLength) / HypotenuseLength; return new Point( (int) (InverseX + OriginX), (int) (InverseY + OriginY) ); } /** * * Builds a 3D prism around were the ground items model should be in cases * of were the model in a elevated height, and is client failed to interpret it. * * @param tileX The Position X for which the ground item is located. * @param tileY The Position Y for which the ground item is located. * @param heightMin The lower elevation height of the prism. * @param heightMax The upper elevation height of the prism. * @param compression 1.0 = Full Tile bounds length, .75 = 3/4 of the side bounds length * @return The midpoint of the prism. */ public Point getElevatedPoint(int tileX, int tileY, int heightMin, int heightMax, double compression) { Point[] bottom = getLid(tileX, tileX, heightMin, compression); if (bottom == null) return null; Point[] top = getLid(tileX, tileY, heightMax, compression); if (top == null) return null; return getInterceptionPoint( top[0].x, top[0].y, bottom[2].x, bottom[2].y, top[1].x, top[1].y, bottom[3].x, bottom[3].y ); } public int onLoop() { Point wereTheMidPointOfTheModelOfThisItemShouldBe = getElevatedPoint(3232, 3399, 80, 120, .75); return 45; } private void drawLid(Point[] lid, Graphics graphics) { for (int i = 0; i < 4; i++) { graphics.drawLine( lid[i].x, lid[i].y, lid[i == 3 ? 0 : i + 1].x, lid[i == 3 ? 0 : i + 1].y); } } public void drawBounds(int tileX, int tileY, int heightMin, int heightMax, double compression, Graphics g) { Point[] bottom = getLid(tileX, tileY, heightMin, compression); if (bottom == null) return; Point[] top = getLid(tileX, tileY, heightMax, compression); if (top == null) return; for (int i = 0; i < 4; i++) { g.drawLine(bottom[i].x, bottom[i].y, top[i].x, top[i].y); } drawLid(bottom, g); drawLid(top, g); Point center = getInterceptionPoint( top[0].x, top[0].y, bottom[2].x, bottom[2].y, top[1].x, top[1].y, bottom[3].x, bottom[3].y ); g.setColor(Color.red); g.drawString(".", center.x, center.y); } public void onPaint(Graphics graphics) { drawBounds(3232, 3399, 80, 120, .75, graphics); } } Hope you can find great use of it.
    1 point
×
×
  • Create New...