Jump to content

Walking to nearest object


progamerz

Recommended Posts

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?
Link to comment
Share on other sites

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
Link to comment
Share on other sites

 

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 :)

Link to comment
Share on other sites

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
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...