Everything posted by Swizzbeat
-
BetterBarrows progress
Back when I played legit I remember that happened. Can't remember if it was a timeout, failing the puzzle, or a mixture of both.
-
How to use ConditonalSleep
Not really needed since the API already provides this in many different ways:
-
How to use ConditonalSleep
Since I think it's important scripters do this instead of adding static sleeps here's a basic guide on how to use them. The ConditonalSleep interface takes a timeout parameter as well as a condition method that requires overriding. When the sleep() method is invoked on the instantiated anonymous implementation it will sleep until either the timeout argument is met or the condition returns true. The condition method will return true if the condition was met before the specified timeout or false if the timeout has passed. For example the following code will sleep until either 5000 milliseconds has passed or the condition method returns true, then return the value. return new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return sI.myPlayer().isAnimating(); } }.sleep();
-
What makes a great script?
Memory/CPU management Stability Perform the given task for an infinite amount of time without human input Not be detected by the bot watch
-
NSA Website
No way brah I can make a site name and have it redirect anywhere I want?!
-
She hot?
If she offered me sex I wouldn't say no, but she isn't a girl I'd be drooling over.
-
Anyone going to see this?
This looks god awful.
-
99 Def pure @ Monks (Near Perfection)
Why is this in projects if it's a SSF script..?
-
ctrl v / cmd v without checking.
Not my code lol. Plus it doesn't matter considering I highly doubt the sleep is going to start exactly on a game tick :p
- Villain fix
-
ctrl v / cmd v without checking.
public void waitFor(Condition c, int timeout) { long t = System.currentTimeMillis(); while (System.currentTimeMillis() - t < timeout && !c.condition()) { Time.sleep(30); } }
-
Walker With Basic Obstacle Handling
Dunno I just put that there so I wouldn't have to release my own walking method :p hai corey with an e
-
My Resignation
Bye scrubby poo, goodluck on your future endeavours
-
People are fucking assholes.
Please mate it was a woman getting mad. She's probably just trying to assert her dominance on the road in other ways than her shitty driving.
-
get farthest (or minimum distance) visible main screen tile in a given direction?
Why do you guys make this so complex? If you can get the doors you need to open via configs, you can literally just run around the perimeter until the door is reachable. Finding the next position to walk to is ezpz as you can just find the farthest walkable tile in your game region and walk to it.
-
get farthest (or minimum distance) visible main screen tile in a given direction?
I'm pretty sure the game map is 16 by 16, so the farthest position to the right would be: new Position(myPosition.getX() + 16, myPosition().getY(), myPosition().getZ()); Farthest position below: new Position(myPosition().getX(), myPosition().getY() - 16, myPosition().getZ()); etc...
-
Paying 500$ for help to create my own rs client
If they're from here you're going to want to just reopen it now lol
-
Walker With Basic Obstacle Handling
Read the above quote. I saw asking about clipping data so I posted a snippet I had but then figured I mine as well post the whole walker. Guarantee mines better.
-
Walker With Basic Obstacle Handling
Lol you should see my walker with multiplane handling as well as @NotoriousPP's sexy blindwalking addition ;)
-
Walker With Basic Obstacle Handling
Pretty basic, all credits to @Maxi who designed pretty much the whole thing while I updated a few core components. import org.osbot.rs07.api.def.ObjectDefinition; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.util.LocalPathFinder; import org.osbot.rs07.input.mouse.MiniMapTileDestination; import org.osbot.rs07.input.mouse.RectangleDestination; import org.osbot.rs07.script.Script; import java.util.LinkedList; import java.util.List; /** * Originally created by Maxi */ /** * Updated by Swizzbeat */ public class Walker { private Script scriptInstance; public Walker(Script scriptInstance) { this.scriptInstance = scriptInstance; } public boolean noObstacleBlocking(Position p) throws InterruptedException { RS2Object obstacle = getNextObstacle(p); if (obstacle != null) { obstacle.interact("open"); return false; } return true; } public boolean walkPathMM(Position[] path) throws InterruptedException { return walkPathMM(path, 3); } public boolean walkPathMM(Position[] path, int distance) throws InterruptedException { Position next = nextTile(path, 15); if (next != null && noObstacleBlocking(next)) { return clickMiniMapPosition(next); } Position lastNode = path[path.length - 1]; return lastNode != null && scriptInstance.map.distance(lastNode) < distance; } public Position nextTile(Position path[], int skipDist) { int dist = -1, closest = -1; for (int i = path.length - 1; i >= 0; i--) { Position tile = path[i]; int d = scriptInstance.map.distance(tile); if (d < dist || dist == -1) { dist = d; closest = i; } } int feasibleTileIndex = -1; for (int i = closest; i < path.length; i++) { if (scriptInstance.map.distance(path[i]) <= skipDist) { feasibleTileIndex = i; } else { break; } } return (feasibleTileIndex == -1) ? null : path[feasibleTileIndex]; } public RS2Object getNextObstacle(Entity e) { List<RS2Object> obstacles = getObstacles(); List<Position> path = generatePath(e); if (path == null) { return null; } for (RS2Object obj : obstacles) { for (Position pos : path) { if (obj.getPosition().equals(pos)) { return obj; } } } return null; } public RS2Object getNextObstacle(Position p) { List<RS2Object> obstacles = getObstacles(); List<Position> path = generatePath(p); if (path == null) { return null; } for (RS2Object obj : obstacles) { for (Position pos : path) { if (obj.getPosition().equals(pos)) { return obj; } } } return null; } public List<RS2Object> getObstacles() { List<RS2Object> list = new LinkedList<>(); for (RS2Object obj : scriptInstance.objects.getAll()) { if (obj.getType() == 0 && obj.getDefinition() != null && obj.getDefinition().getActions() != null && obj.getDefinition().getModelIds() != null && obj.getDefinition().getModelIds().length < 3) { search: { for (String action : obj.getDefinition().getActions()) { if (action != null && action.equalsIgnoreCase("open")) { list.add(obj); break search; } } } } } return list; } private List<Position> generatePath(Position p) { LocalPathFinder pf = new LocalPathFinder(scriptInstance.bot); int[][] flags = generateModifiedClippingData(); List<Position> path = pf.findPath(p, flags); if (path == null) { return null; } return path; } private List<Position> generatePath(Entity e) { LocalPathFinder pf = new LocalPathFinder(scriptInstance.bot); int[][] flags = generateModifiedClippingData(); List<Position> path = pf.findPath(e, flags); if (path == null) { return null; } return path; } private int[][] generateModifiedClippingData() { int[][] origFlags = scriptInstance.map.getRegion().getClippingPlanes()[scriptInstance.map.getPlane()].getTileFlags(); int[][] flags = new int[origFlags.length][origFlags.length]; for (int x = 0; x < flags.length; x++) { for (int y = 0; y < flags.length; y++) { flags[x][y] = origFlags[x][y]; } } for (RS2Object obj : getObstacles()) { int lx = obj.getLocalX(); int ly = obj.getLocalY(); ObjectDefinition def = obj.getDefinition(); if (def.isClipping1()) { switch (obj.getOrientation()) { case 0: case 2: flags[lx][ly] &= ~585; break; case 1: case 3: flags[lx][ly] &= ~1170; break; } } if (def.getClipping2() != 0) { if (0 == obj.getOrientation()) { flags[lx][ly] &= ~128; flags[lx - 1][ly] &= ~8; } if (1 == obj.getOrientation()) { flags[lx][ly] &= ~2; flags[lx][ly + 1] &= ~32; } if (2 == obj.getOrientation()) { flags[lx][ly] &= ~8; flags[lx + 1][ly] &= ~128; } if (3 == obj.getOrientation()) { flags[lx][ly] &= ~32; flags[lx][ly - 1] &= ~2; } if (def.isClipping3()) { if (0 == obj.getOrientation()) { flags[lx][ly] &= ~65536; flags[lx - 1][ly] &= ~4096; } if (obj.getOrientation() == 1) { flags[lx][ly] &= ~1024; flags[lx][ly + 1] &= ~16384; } if (2 == obj.getOrientation()) { flags[lx][ly] &= ~4096; flags[lx + 1][ly] &= ~65536; } if (3 == obj.getOrientation()) { flags[lx][ly] &= ~16384; flags[lx][ly - 1] &= ~1024; } } } } return flags; } private boolean clickMiniMapPosition(Position position) throws InterruptedException { return scriptInstance.mouse.click(new RectangleDestination(scriptInstance.bot, new MiniMapTileDestination(scriptInstance.bot, position).getBoundingBox())); } public Position[] reversePath(Position[] path) { Position[] t = new Position[path.length]; for (int i = 0; i < t.length; i++) { t[i] = path[path.length - i - 1]; } return t; } }
-
Paying 500$ for help to create my own rs client
Are you autistic?
-
Paying 500$ for help to create my own rs client
http://osbot.org/forum/topic/50819-osbot-2-flawless-denoxums-perfect-staker-calculator-super-efficient-advanced/ That's all you need...
-
Paying 500$ for help to create my own rs client
Like you said if they don't know simple low level instructions that are similar across the board they 110% have no idea what they're doing, considering you need libraries such as BCEL or ASM to go about creating the updater. Not only that, but good freaken luck finding someone that can properly inject classes without it throwing a flag up to Jagex or even what xbooting is. @OP this would be a good guy ^
-
Paying 500$ for help to create my own rs client
Are you kidding? Name one person here that even knows what the instructions iconst_5 or invokespecial do...or even that it's bytecode.
-
Paying 500$ for help to create my own rs client
lolwut I don't have to show you anything because 1) I couldn't create a fully functioning bot from scratch and 2) you haven't even shown me your work yet considering that was ripped. OP: Basically the only people here that could actually create a bot would be @XavierM, @PolishCivil and probably the two script managers. Other than that either copy and paste everything off jhacking to give you a piece of shit bot or keep fumbling around with code until something works (and give you a easily detectable bot).