How can I use sura skill "Dash like a bullet" on route?
Moderators: Moderators, Documentation Writers
How can I use sura skill "Dash like a bullet" on route?
I want to use sura skill "Dash like a bullet" on long move route
example 50,50 to 300,300
But map "wall" or "river" that me fail
Now I have no idea
How can I use "macros" or "config-onAction route?" or "plugins" to do?
Thank you very much
example 50,50 to 300,300
But map "wall" or "river" that me fail
Now I have no idea
How can I use "macros" or "config-onAction route?" or "plugins" to do?
Thank you very much
Re: How can I use sura skill "Dash like a bullet" on route?
Code: Select all
$i = @eval (Misc::checkLineWalkable ({x => <your x position>, y => <your y position>}, {x => <target x>, y => <target y>},0))
u need to change message from your previous post:
Code: Select all
message TF("%s steps to destination at x=%s y=%s\n", $stepsleft, $self->{new_x}, $self->{new_y}), "info";
Code: Select all
20 steps to destination at x=300 y=300
Code: Select all
blablabla
console /(\d*) steps to destination at x=(\d*) y=(\d*)/i
blablabla
call{
blablabla
$i = @eval (Misc::checkLineWalkable ({x => $::char->{pos}{x}, y => $::char->{pos}{y}}, {x => $.lastMatch2, y => $.lastMatch3},0))
if ($i == 1){
<do sms you need>
}}
Last edited by Mortimal on 07 Feb 2017, 21:53, edited 1 time in total.
Please use pin function for uploading your file contents!
Re: How can I use sura skill "Dash like a bullet" on route?
Thank you!!Mortimal wrote:Code: Select all
$i = @eval (Misc::checkLineWalkable ({x => <your x position>, y => <your y position>}, {x => <target x>, y => <target y>},0))
But I got a error message@@
Code: Select all
move 94 65
[route] Calculating route to: geffen: 94, 65
[info] 4 steps to destination at x=94 y=65
[macro] [macro] automacro dashroute triggered.
[macro] [macro] dashroute.call error: error in 0: @eval (Misc::checkLineWalkable ({x => $::char->{pos}{x}, y => <$::char->{pos}{y}}, {x => $.lastMatch2, y => $.lastMatch3},0)) failed
[info] 3 steps to destination at x=94 y=65
[macro] [macro] automacro dashroute triggered.
[macro] [macro] dashroute.call error: error in 0: @eval (Misc::checkLineWalkable ({x => $::char->{pos}{x}, y => <$::char->{pos}{y}}, {x => $.lastMatch2, y => $.lastMatch3},0)) failed
Code: Select all
automacro dashroute {
console /(\d*) steps to destination at x=(\d*) y=(\d*)/i
exclusive 1
call {
$i = @eval (Misc::checkLineWalkable ({x => $::char->{pos}{x}, y => <$::char->{pos}{y}}, {x => $.lastMatch2, y => $.lastMatch3},0))
if ($i == 1){
do sl 264 $.lastMatch2 $.lastMatch3 1
}
}
}
I don't know where is wrong with me@@
Re: How can I use sura skill "Dash like a bullet" on route?
try
Code: Select all
automacro dashroute {
console /(\d*) steps to destination at x=(\d*) y=(\d*)/i
exclusive 1
call {
$x = $.lastMatch2
$y = $.lastMatch3
$i = @eval (Misc::checkLineWalkable ({x => $::char->{pos}{x}, y => $::char->{pos}{y}}, {x => $x, y => $y},0))
if ($i == 1){
do sl 264 $.lastMatch2 $.lastMatch3 1
}
}
}
Last edited by Mortimal on 07 Feb 2017, 21:53, edited 1 time in total.
Please use pin function for uploading your file contents!
Re: How can I use sura skill "Dash like a bullet" on route?
the same error
maybe wrong in my src/misc.pm?
here is my misc https://drive.google.com/file/d/0B0llpH ... sp=sharing
my openkore version is r8871,a little old@@
thank you!
Code: Select all
move 201 95
[route] Calculating route to: amatsu: 201, 95
[info] 7 steps to destination at x=201 y=95
[macro] [macro] automacro dashroute triggered.
[macro] [macro] dashroute.call error: error in 2: @eval (Misc::checkLineWalkable ({x => $::char->{pos}{x}, y => <$::char->{pos}{y}}, {x => $x, y => $y},0)) failed
[info] 6 steps to destination at x=201 y=95
[macro] [macro] automacro dashroute triggered.
[macro] [macro] dashroute.call error: error in 2: @eval (Misc::checkLineWalkable ({x => $::char->{pos}{x}, y => <$::char->{pos}{y}}, {x => $x, y => $y},0)) failed
[info] 3 steps to destination at x=201 y=95
[macro] [macro] automacro dashroute triggered.
[macro] [macro] dashroute.call error: error in 2: @eval (Misc::checkLineWalkable ({x => $::char->{pos}{x}, y => <$::char->{pos}{y}}, {x => $x, y => $y},0)) failed
here is my misc https://drive.google.com/file/d/0B0llpH ... sp=sharing
my openkore version is r8871,a little old@@
thank you!
Re: How can I use sura skill "Dash like a bullet" on route?
OMG!!!!
F********NG typo!
$i = @eval (Misc::checkLineWalkable ({x => $::char->{pos}{x}, y => <$::char->{pos}{y}}, {x => $.lastMatch2, y => $.lastMatch3},0))
try this x)
F********NG typo!
$i = @eval (Misc::checkLineWalkable ({x => $::char->{pos}{x}, y => <$::char->{pos}{y}}, {x => $.lastMatch2, y => $.lastMatch3},0))
try this x)
Code: Select all
$i = @eval (Misc::checkLineWalkable ({x => $::char->{pos}{x}, y => $::char->{pos}{y}}, {x => $x, y => $y},0))
Please use pin function for uploading your file contents!
Re: How can I use sura skill "Dash like a bullet" on route?
Now it's workedMortimal wrote:Code: Select all
$i = @eval (Misc::checkLineWalkable ({x => $::char->{pos}{x}, y => $::char->{pos}{y}}, {x => $x, y => $y},0))
Thank you very much