Openkore.com

OpenKore Forums
It is currently 14 Nov 2018, 05:01

All times are UTC - 5 hours [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: How can I get route steps?
PostPosted: 06 Feb 2017, 17:59 
Offline
Noob
Noob

Joined: 15 Feb 2016, 02:09
Posts: 13
I using "debug 1" message can get route steps.

Route 在 API 中 - next step moving to (39, 149), index 15, 314 steps left

Then using macros-console to calculate it.

But using "macro_allowDebug 1" will very lag,so this method not good!

Have other method can get "route steps" into macros variable?
thank you!


Code:
automacro checksteps {
            console /Route 在 API 中 \- next step moving to \((\d+)\, (\d+)\)\, index (\d+)\, (\d+) steps left/i
            location prontera
            run-once 1
            call {
               if ("$.lastMatch4 > "100") {
                    do is @inventory(speedup)
               }
    }
}


Top
 Profile  
 
 Post subject: Re: How can I get route steps?
PostPosted: 06 Feb 2017, 19:14 
Offline
Developers
Developers

Joined: 01 Nov 2008, 15:31
Posts: 361
hmmmmmm it saves that info in intermediate variable....

like that:

src\Task\Route.pm line 309
Code:
my $stepsleft = @{$solution};
blablabla
debug "Route $self->{actor} - next step moving to ($self->{new_x}, $self->{new_y}), index $self->{index}, $stepsleft steps left\n", "route";


no external access...

maybeif create new global variable and resave data there u can use it in AM @eval()

OR

put a line before debug line:
Code:
message TF("%s steps to destination.\n", $stepsleft), "info";


u can connect your AM to this line now without switching debug on. Will work for your purposes...

_________________
Please use pin function for uploading your file contents!


Top
 Profile  
 
 Post subject: Re: How can I get route steps?
PostPosted: 07 Feb 2017, 04:10 
Offline
Noob
Noob

Joined: 15 Feb 2016, 02:09
Posts: 13
It's perfect!!
Thany you :D :D :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group