Jump to content

i need one more thing help with script


combat_acc

Recommended Posts

As you really didn't specify where you want it to walk, I needed to get creative, there might be a better way to do this, but it should work.

if(myPlayer().getPosition().getY() > 3678){
    ArrayList<Position> closestTile = new ArrayList<Position>();
    if(closestTile.size() <= 383){
        for(int i = 0; i <= 383; i++){
            closestTile.add(new Position(3678, 2946 + i, 0));
        }
    }else{
        closestTile.sort(new Comparator<Position>() {
            public int compare(Position entry1, Position entry2) {
                return entry1.distance(myPlayer()) - entry2.distance(myPlayer());
            }
        });
        getWalking().webWalk(closestTile.get(0));
    }
}else{
    //do tele
}
Edited by Vilius
Link to comment
Share on other sites

 

As you really didn't specify where you want it to walk, I needed to get creative, there might be a better way to do this, but it should work.

if(myPlayer().getPosition().getY() > 3678){
    ArrayList<Position> closestTile = new ArrayList<Position>();
    if(closestTile.size() <= 383){
        for(int i = 0; i <= 383; i++){
            closestTile.add(new Position(3678, 2946 + i, 0));
        }
    }else{
        closestTile.sort(new Comparator<Position>() {
            public int compare(Position entry1, Position entry2) {
                return entry1.distance(myPlayer()) - entry2.distance(myPlayer());
            }
        });
        getWalking().webWalk(closestTile.get(0));
    }
}else{
    //do tele
}

 

if(map.getWildernessLevel() > 20) {

      getWalking().walk(new Position(myPosition().getX(), myPosition().getY() - 5, myPosition.getZ());

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...