Jump to content

Walking to nearest object


Recommended Posts

Posted

Hello can some1 help me fix this?

 

        if (mine != null){
            if (mine.isVisible()){
                if (getMap().canReach(mine)) {
                    mine.interact("Mine");
                    sleep(2000);
                }
            }else {
                getLocalWalker().walk(mine);
            }
        }
 
at the (getlocalwalker().walk(Mine)) it strikes out the walk can some1 help me fix it?
Posted (edited)

http://osbot.org/forum/topic/89606-
 

Changelog:

-Added Walking class

-Deprecated LocalWalker class

-Re-wrote WalkingEvent

-Added WebWalker file handler to booter

-Various Mirror Mode performance improvements

 

Scripters: Hold off on using WebWalkEvent (deprecated), it will undergo pretty large changes.

 

 

 if (mine != null && mine.isVisible() && getMap().canReach(mine)){
                    mine.interact("Mine");
                    sleep(2000);
                }
            else {
        getWalking().walk(mine);
        }
Edited by Assnerd
  • Like 1
Posted

 

http://osbot.org/forum/topic/89606-

 

Changelog:

-Added Walking class

-Deprecated LocalWalker class

-Re-wrote WalkingEvent

-Added WebWalker file handler to booter

-Various Mirror Mode performance improvements

 

Scripters: Hold off on using WebWalkEvent (deprecated), it will undergo pretty large changes.

 

 

 if (mine != null && mine.isVisible() && getMap().canReach(mine)){
                    mine.interact("Mine");
                    sleep(2000);
                }
            else {
        getWalking().walk(mine);
        }

 

TYVM worked :)

Posted

http://osbot.org/forum/topic/89606-

 

Changelog:

-Added Walking class

-Deprecated LocalWalker class

-Re-wrote WalkingEvent

-Added WebWalker file handler to booter

-Various Mirror Mode performance improvements

 

Scripters: Hold off on using WebWalkEvent (deprecated), it will undergo pretty large changes.

 

 

 if (mine != null && mine.isVisible() && getMap().canReach(mine)){

                    mine.interact("Mine");

                    sleep(2000);

                }

            else {

        getWalking().walk(mine);

        }

No need for checking an object visibility cause that's what interaction event does for us. And object.interact (action) come from interactionEvent

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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