Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2013
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.09 KB | None | 0 0
  1. package Walker;
  2.  
  3. import org.osbot.script.Script;
  4. import org.osbot.script.rs2.map.Position;
  5. import org.osbot.script.rs2.model.Entity;
  6.  
  7. public class PathTile extends Position {
  8.  
  9.     public boolean random;
  10.     public PathTile original;
  11.  
  12.     public PathTile(Entity ent, boolean randomize) {
  13.     super(ent);
  14.     this.random = randomize;
  15.     original = this;
  16.     }
  17.  
  18.     public PathTile(Entity ent) {
  19.     super(ent);
  20.     this.random = true;
  21.     original = this;
  22.     }
  23.  
  24.     public PathTile(int x, int y, int z, boolean randomize) {
  25.     super(x, y, z);
  26.     this.random = randomize;
  27.     original = this;
  28.     }
  29.  
  30.     public PathTile(int x, int y, int z) {
  31.     super(x, y, z);
  32.     this.random = true;
  33.     original = this;
  34.     }
  35.  
  36.     public PathTile(PathTile old, Script scr, int max) {
  37.     super((old.original.getX() + (scr.random(-max, max))), (old.original
  38.         .getY() + (scr.random(-max, max))), old.original.getZ());
  39.     this.random = old.random;
  40.     this.original = old.original;
  41.     }
  42.  
  43.     public PathTile randomize(Script scr, int max) {
  44.     if (this.random) {
  45.         return new PathTile(this, scr, max);
  46.     }
  47.     return this;
  48.     }
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement