Advertisement
Guest User

Untitled

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