Jump to content

zasz

Members
  • Posts

    11
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

1151 profile views

zasz's Achievements

Newbie

Newbie (1/10)

3

Reputation

  1. I need to read the api more. Didn't even notice the class. Thanks!
  2. Unless I haven't noticed it using another amount, it seems running toggles at 15. Perhaps either a method to change the default or disable the ability for webwalking to toggle run so that way custom numbers can be used.
  3. @Token Well, Webwalking is working on my latest script, I may for fun still work on something like what I was tasking myself with at another point, sorry for the waste of time.
  4. I appreciate the informational reply. When I was testing Webwalking it didn't handle a door properly but I could'v done something wrong. I'll look back at taking a crack at using it tomorrow in my next session. Again thank you for the effort at getting me information
  5. I probably am wanting one thing thinking its associated with another, why I linked the other community hoping to get the intention. Basically, building little more than a basic walking system, I know localPathFinder has the from/to list as a API style to figure walkable for availability. But getting all tiles from a position on the map can let go relatively in depth for layers of doors/obstacles for a few check iterations. For instance from above, if I am in freds house, it has a gate to get to the door for the house. i can be in the house, get a Position pCoord[2] for right outside the fence, check for an objects starting closest to Player that pCoord[2] can reach, then do the Position opposite to gate, check if player can reach, if not do another check for the new Position for another object. And have a iteration cutoff of course So can dynamically walk out of any house and traverse through varrock castle if wanted with a single method parsing a Position[] Otherwise I would be forced with a less accurate if(!map.canReach(t)) if((canReach(t,obs.getPosition()) || obs.getPosition().distance(t)<4 || forceSteps) && map.canReach(obs)) Which would interact with all obstacles that can be reached hoping it would be the one to lead to the point on the map.
  6. I figured when I noticed the stars, I thought since it wasn't advertising nor endorsing it would still be alright. But exactly that, getting all for the client given a given position, regardless of my players flags. I thought it was clear enough of the intention in my first sentence on original, I do apologize the intention isn't coming across though. Edit: Example NPC fred = npcs.closest("Fred the Farmer"); fredFlags = npcs.closest("Fred the Farmer").getPosition().FLAGS();
  7. Oops, I meant legitimate flags as if the position is an entity that gets its surrounding flags.
  8. Is there a method that can pull flags given a specific position. All I can find is client.accessor.getClippingPlanes() Rather I'd need something like position.getClippingPlanes();
  9. Appreciate the time, the last one was just for debug to stop at that point. fixed the cast, originally the other bot i created for distance returned a double. Also, fixed the type, i couldve swore at some point in the long past, not doing the argument compiled with a warning.
  10. I did this years ago and tweaked a bit for OSBot, some still has RS3 information, but how does the walking look public class Navigation { public static Script ourBot; public Navigation(Script scriptInstance) { ourBot = scriptInstance; } public enum Lodes { Lumbridge(17); private int id; public int getInterfaceID(){ return id; } Lodes(int interfaceid) { id = interfaceid; } } final static int lodestoneInt = 1092; final static int homeTelePortInterface = 1465; static final int UNWALKABLE = 256 | 0x200000 | 0x40000; public static boolean isWalkable(int flag) { return (flag & (UNWALKABLE)) == 0; } //static NavPath nullNav = new NavPath(); public boolean posReach(Collection<Position> reachableCords, Position t){ Collection<Position> p = reachableCords; for (Position c : p) { //if(t.getX()==c.getX() && t.getY()==c.getY()){ //debug("Can reach: "+t); // return t.isReachable(); //} if(c.equals(t)) return true; } return false; } public boolean stepTowardsPoint(Player local, Position point, boolean forceSteps){ XClippingPlane[] clippingPlanes = ourBot.client.accessor.getClippingPlanes(); int[][] map = clippingPlanes[ourBot.myPlayer().getZ()].getTileFlags(); ourBot.client.accessor.getCurrentRegion().getTiles().toString(); ArrayList<Position> reachablePositions = new ArrayList<Position>(); ArrayList<Position> allTiles = new ArrayList<Position>(); int localX = local.getPosition().getLocalX(ourBot.bot); int localY = local.getPosition().getLocalY(ourBot.bot); for(int i = 0; i < map.length;i++){ for(int j = 0; j < map[i].length; j++){ if((i>(localX-20) && i<(localX+20)) && (j>(localY-20) && j<(localY+20))) if(isWalkable(map[i][j])) reachablePositions.add(new Position(i,j,ourBot.myPlayer().getZ())); } } if(reachablePositions.size()>0) { for(int x=-20;x<20;x++) { for(int y=-20;y<20;y++) { Position tPos = new Position(local.getX()+x,local.getY()+y,ourBot.myPlayer().getZ()); if(tPos.isOnMiniMap(ourBot.bot)) { if(reachablePositions.size()>0) { localX = tPos.getLocalX(ourBot.bot); localY = tPos.getLocalY(ourBot.bot); Position tLocalG = new Position(localX,localY,0); if(reachablePositions.contains(tLocalG)) allTiles.add(tPos); } } } } } reachablePositions = allTiles; ourBot.log(allTiles.toString()); int z = 2; if(z==1) return false; Position bestTile = null; if(posReach(reachablePositions, point)){ double bestDist = 999; for(Position coord : reachablePositions){ if(!coord.equals(point)) coord = coord.translate(Script.random(-2,2), Script.random(-2,2)); //This adds differences int tempDist = (int) coord.distance(point); if(coord.distance(point)<=bestDist){ boolean isOnMap = coord.isOnMiniMap(ourBot.bot); if(isOnMap){ bestTile = coord; bestDist = tempDist; } } } } else if(forceSteps){ //Force double bestDist = 999; for(Position coord : reachablePositions){ coord = coord.translate(Script.random(-2,2), Script.random(-2,2)); int tempDist = (int) coord.distance(point); if(coord.distance(point)<=bestDist){ boolean isOnMap = coord.isOnMiniMap(ourBot.bot); if(isOnMap){ bestTile = coord; bestDist = tempDist; } } } } if(bestTile != null){ return ourBot.map.walking.walk(bestTile) && Sleep.sleepUntil(() -> (!local.isMoving()), 2000); } return false; }
  11. if you google zasz runescape im the first 6 results. LUL this is my first post in the 6 years of joining
×
×
  • Create New...