-
Posts
669 -
Joined
-
Last visited
-
Days Won
3 -
Feedback
100%
Everything posted by PolishCivil
-
It will search every interface which is slow.
-
import dependencies.api.ATMethodProvider; import org.osbot.rs07.api.ui.MediaType; import org.osbot.rs07.api.ui.RS2Interface; import org.osbot.rs07.api.ui.RS2InterfaceChild; import org.osbot.rs07.utility.Condition; import java.util.Arrays; /** * Created by PolishCivil on 5/16/2014. */ public class Questions { private static final int[] ANSWER_INTERFACES = new int[]{230, 228}; private static final int[] QUESTION_INTERFACES = new int[]{243, 242, 244, 241}; private static final String[] CORRECT_ANSWERS = new String[] { "Nobody", "Don't tell them anything and ignore them.", "Talk to any banker in RuneScape.", "Nothing", "Memorable", "Politely tell them no and then use the 'Report Abuse' button.", "Don't tell them anything and inform Jagex through the game website.", "No, it might steal my password.", "Don't give him my password.", "To recover my account if i don't remember my password.", "Nowhere", "No", "To help me recover my password if I forget it or if it is stolen.", "Recovering your account if you forget your password.", "Game Inbox on the RuneScape website." }; public static Condition getAnySosQuestion(final ATMethodProvider methodProvider) { return new Condition() { @Override public boolean evaluate() { for (int interId : QUESTION_INTERFACES) { RS2Interface rs2Interface = methodProvider.interfaces.get(interId); if (rs2Interface != null && rs2Interface.isValid()) { RS2InterfaceChild child = rs2Interface.getChild(0); if (child != null && child.getDisabledMediaType() == MediaType.NPC_HEAD && child.getDisabledMediaId() > 0) { return true; } } } for (int interId : ANSWER_INTERFACES) { RS2Interface rs2Interface = methodProvider.interfaces.get(interId); if (rs2Interface != null && rs2Interface.isValid()) { return true; } } return false; } }; } public static boolean solve(ATMethodProvider methodProvider) { RS2Interface validInterface = null; for (int interId : QUESTION_INTERFACES) { RS2Interface rs2Interface = methodProvider.interfaces.get(interId); if (rs2Interface != null && rs2Interface.isValid()) { RS2InterfaceChild child = rs2Interface.getChild(0); if (child != null && child.getDisabledMediaType() == MediaType.NPC_HEAD && child.getDisabledMediaId() > 0) { validInterface = rs2Interface; break; } } } if (validInterface != null) { methodProvider.dialogues.clickContinue(); return solve(methodProvider); } else { for (int interId : ANSWER_INTERFACES) { RS2Interface rs2Interface = methodProvider.interfaces.get(interId); if (rs2Interface != null && rs2Interface.isValid()) { validInterface = rs2Interface; } } if (validInterface != null) { RS2InterfaceChild[] children = validInterface.getChildren(); for (RS2InterfaceChild child : children) { if (Arrays.asList(CORRECT_ANSWERS).contains(child.getMessage())) { methodProvider.clickOnChild(child); return solve(methodProvider); } } } else { return false; } } return true; } }
-
I'm going crazy! CALL-OUT TO EVERYBODY D:
PolishCivil replied to lolmanden's topic in Spam/Off Topic
wtf -
lel anyways this is an example : http://www.benf.org/other/cfr/
-
Please dont use JODE shit... there are many others better decompiles with built in some deobfuscation techniques.
-
Jeez this is soo old.
-
What the fuck?
-
Its position's polygon. (bad)
-
public static short[][] getScreenCoordinates(Client client, int gridX, int gridY, int gridZ, Model model) { int cameraX = client.getCameraX(); int cameraY = client.getCameraY(); int cameraZ = client.getCameraZ(); int sinP = Utilities.CAMERA_SIN[client.getCameraPitch()]; int cosP = Utilities.CAMERA_COS[client.getCameraPitch()]; int sinY = Utilities.CAMERA_SIN[client.getCameraYaw()]; int cosY = Utilities.CAMERA_COS[client.getCameraYaw()]; if (model.getTriangleCount() < 0) { return new short[0][]; } short[][] screenCoords = new short[model.getVerticeCount()][]; for (int n = 0; n < model.getVerticeCount(); n++) { int x0 = model.getVerticesX()[n] + gridX; int z0 = model.getVerticesZ()[n] + gridY; int y0 = model.getVerticesY()[n] + Utilities.getTileHeight(client.getBot(), x0, z0, gridZ) - cameraZ; int n15 = (z0 -= cameraY) * sinY + (x0 -= cameraX) * cosY >> 16; z0 = z0 * cosY - x0 * sinY >> 16; x0 = n15; n15 = y0 * cosP - z0 * sinP >> 16; z0 = y0 * sinP + z0 * cosP >> 16; y0 = n15; if (z0 >= 50) { x0 = 260 + (x0 << 9) / z0; y0 = 171 + (y0 << 9) / z0; if (x0 >= 0 && y0 >= 0) { screenCoords[n] = new short[2]; screenCoords[n][0] = (short) x0; screenCoords[n][1] = (short) y0; } } } return screenCoords; } + public static Polygon getBoundingBox(Client client, Model model, int gridX, int gridY) { short[][] screenCoordinates = Utilities.getScreenCoordinates(client.getBot(), gridX, gridY, client.getPlane(), model); Polygon temp = new Polygon(); int minX = Integer.MAX_VALUE; int minY = Integer.MAX_VALUE; int maxX = 0; int maxY = 0; for (int triangleId = 0; triangleId < model.getTriangleCount(); triangleId++) try { int triangleA = model.getTrianglesA()[triangleId]; int triangleB = model.getTrianglesB()[triangleId]; int triangleC = model.getTrianglesC()[triangleId]; short[] pointA = screenCoordinates[triangleA]; short[] pointB = screenCoordinates[triangleB]; short[] pointC = screenCoordinates[triangleC]; if (pointA != null && pointB != null && pointC != null) { int aX = pointA[0]; int aY = pointA[1]; int bX = pointB[0]; int bY = pointB[1]; int cX = pointB[0]; int cY = pointB[1]; if (aX < minX) { minX = aX; } if (bX < minX) { minX = bX; } if (cX < minX) { minX = cX; } if (aY < minY) { minY = aY; } if (bY < minY) { minY = bY; } if (cY < minY) { minY = cY; } //maxes if (aX > maxX) { maxX = aX; } if (bX > maxX) { maxX = bX; } if (cX > maxX) { maxX = cX; } if (aY > maxY) { maxY = aY; } if (bY > maxY) { maxY = bY; } if (cY > maxY) { maxY = cY; } } } catch (ArrayIndexOutOfBoundsException var13) { } temp.addPoint(minX, minY); temp.addPoint(minX + (maxX - minX), minY); temp.addPoint(maxX, maxY); temp.addPoint(minX, maxY); return temp; }
-
OSBot BETA 2.1.1 - Proxy Support, CPU Enhancements, and More!
PolishCivil replied to
Laz's topic in ReleasesShiit i would never come up with this lol, seriously -
OSBot BETA 2.1.1 - Proxy Support, CPU Enhancements, and More!
PolishCivil replied to
Laz's topic in ReleasesAnd aaa Can i turn this shit off? -
I know many others that works exactly like osbot: paid+free scripts. Osbot is not free at all if you want to have best working script.
-
Because it sucks. The only thing that is keeping community is that osbot was developed quickly so there was not much of choice which bot u want to use, now we have plenty of better bots. But yh, I wont move cuz i spent too much time on developing current scripts.
- 72 replies
-
- 10
-
-
public static final int minimapX = 545; public static final int minimapY = 4; public static Point getMinimapScreenCoordinate(Client client, int localX, int localY, boolean clipOval) { int minimapX = localX * 4 + 2 - client.getMyPlayer().getGridX() / 32; int minimapY = localY * 4 + 2 - client.getMyPlayer().getGridY() / 32; if (clipOval && (minimapX < -73 || minimapX >= 73 || minimapY < -75 || minimapY > 75)) return new Point(-1, -1); int rotation = client.getMinimapX() + client.getMinimapRotation() & 2047; int minimapZoom = 256 + client.getMinimapZoom(); int sine = 256 * Utilities.CAMERA_SIN[rotation] / minimapZoom; int cosine = 256 * Utilities.CAMERA_COS[rotation] / minimapZoom; int i1 = -minimapX * sine + minimapY * cosine >> 16; int i2 = minimapX * cosine + minimapY * sine >> 16; int posX = Calculations.minimapX + 98 + i2; int posY = Calculations.minimapY + 80 - i1; return new Point(posX, posY); } Old: Mine: Why? client.getInterface(548).getChild(71);
-
Ye, lol. But this is decompiled, not my version. You get it or not? http://freespace.virgin.net/hugo.elias/routines/3d_to_2d.htm http://en.wikipedia.org/wiki/Fixed-point_arithmetic Rite.
-
Ye, osbot's api is f closed source but that doesnt mean i can't decompile it and release. public static short[][] getScreenCoordinates(Client client, int gridX, int gridY, int gridZ, Model model) { int cameraX = client.getCameraX(); int cameraY = client.getCameraY(); int cameraZ = client.getCameraZ(); int sinP = Utilities.CAMERA_SIN[client.getCameraPitch()]; int cosP = Utilities.CAMERA_COS[client.getCameraPitch()]; int sinY = Utilities.CAMERA_SIN[client.getCameraYaw()]; int cosY = Utilities.CAMERA_COS[client.getCameraYaw()]; if (model.getTriangleCount() < 0) { return new short[0][]; } short[][] screenCoords = new short[model.getVerticeCount()][]; for (int n = 0; n < model.getVerticeCount(); n++) { int x0 = model.getVerticesX()[n] + gridX; int z0 = model.getVerticesZ()[n] + gridY; int y0 = model.getVerticesY()[n] + Utilities.getTileHeight(client.getBot(), x0, z0, gridZ) - cameraZ; int n15 = (z0 -= cameraY) * sinY + (x0 -= cameraX) * cosY >> 16; z0 = z0 * cosY - x0 * sinY >> 16; x0 = n15; n15 = y0 * cosP - z0 * sinP >> 16; z0 = y0 * sinP + z0 * cosP >> 16; y0 = n15; if (z0 >= 50) { x0 = 260 + (x0 << 9) / z0; y0 = 171 + (y0 << 9) / z0; if (x0 >= 0 && y0 >= 0) { screenCoords[n] = new short[2]; screenCoords[n][0] = (short) x0; screenCoords[n][1] = (short) y0; } } } return screenCoords; } Its just exact copy of Utilities.getScreenCoordinates It could be used in faster model debugging (u need add some edits ofc, thats why its snippet) for new scripters. Yeah, if you want anything more (not engine) pm me, and i will see what i can do.
-
Um this will eat cpu.
-
http://www.learnjavaonline.org/en/Arrays
-
lol
-
Timekeepers Weekly Pizza Giveaway Bonanza!
PolishCivil replied to Timekeeper's topic in Spam/Off Topic
\\\ -
Timekeepers Weekly Pizza Giveaway Bonanza!
PolishCivil replied to Timekeeper's topic in Spam/Off Topic
-
Timekeepers Weekly Pizza Giveaway Bonanza!
PolishCivil replied to Timekeeper's topic in Spam/Off Topic
U pay shipping? -
Fuck gravity.