Page 2 of 2
Re: check if the bot is stuck macro
Posted: 25 Sep 2018, 03:04
by fadreus
Yup, simply like that.
For me, I use
Or if you lazy like me, just put in config;
Code: Select all
doCommand warp cancel {
timeout 5
}
Kore will use
warp cancel every 5 sec, eternally.
What more hardcore?
Put timeout to 1
GG
And see how mess up it would be.
On the bright side, you never stuck any more.
Though you might cancel your own normal teleport xD
Hahahaahahaa..
Re: check if the bot is stuck macro
Posted: 25 Sep 2018, 03:46
by kamirie
Thanks fadreus i'll stick with the macro first to test
Re: check if the bot is stuck macro
Posted: 25 Sep 2018, 22:39
by kamirie
kamirie wrote:Good Day,
I always encounter the issue of being stuck while handling ranged monsters. The bot will try to attack but stay's in the same spot then after some time it will be stuck and cannot use any skill. I want to create a macro to check it's position every 5 secs and if the position is the same 5-10 secs ago , it will do a manual move like north , east , south or west . I can use the $.pos
Code: Select all
automacro checkpos {
not location town1,town2,town3
location $lockmap <-- I have a macro the changes the lockmap via console conf
timeout 5
call movepos
}
macro movepos{
$oldpos = $.pos <-- I'm not preety sure how this line will respond , if it saves the current position every 5 secs
if ( $oldpos == $.pos) call move
}
macro move{
$dir = @rand (1,4)
if ($dir == 1) do north
if ($dir == 2) do south
if ($dir == 3) do east
if ($dir == 4) do west
}
@fadreus warp cancel solve most of the issues , but the issue regarding ranged mobs is still present , so I think i really need to do an idle check
. Can I ask for some help on how to do this correctly thanks
Re: check if the bot is stuck macro
Posted: 26 Sep 2018, 01:17
by fadreus
Just to make sure;
You did enable attackCheckLOS right?
And attackUseSkills range is exactly as that certain skill has?
Check this out.
http://forums.openkore.com/viewtopic.php?f=32&t=15913
There's useuful stuff you might wanna try.
Normally regarding stuck when attacking / mobbed, I use set to teleport when dropping target and my timeout to drop target only 3 sec.
If 3 sec didn't reach target/attack, drop > teleport.
Too lazy using macro.
Btw, about idle state, why not use teleportAuto_idle 1
Re: check if the bot is stuck macro
Posted: 26 Sep 2018, 16:02
by kamirie
Just to make sure;
You did enable attackCheckLOS right?
And attackUseSkills range is exactly as that certain skill has?
Yes I set it correctly .
Ok I'll check this
Normally regarding stuck when attacking / mobbed, I use set to teleport when dropping target and my timeout to drop target only 3 sec.
If 3 sec didn't reach target/attack, drop > teleport.
Too lazy using macro.
I'll double check this, I think I already set it this was as your first suggestion
Btw, about idle state, why not use teleportAuto_idle 1
Yes , I'm using this as i'm doing tele search to hunt
I'll check on the evals. I'm very thankfull for the support
Re: check if the bot is stuck macro
Posted: 26 Sep 2018, 22:26
by kamirie
Can I do this ? Or can I simplify this into a single macro/eventMacro block?
Code: Select all
automacro antiidle3 {
location not $savesp
call {
$x = @eval($::char->{pos}{x})
$y = @eval($::char->{pos}{y})
$oldpos = $x,$y
log $oldpos
}
timeout 320
}
automacro antiidle4 {
location not $savesp
call {
$x = @eval($::char->{pos}{x})
$y = @eval($::char->{pos}{y})
$newpos = $x,$y
log $newpos
}
timeout 890
}
automacro changepos {
location not $savesp
exclusive 1
call {
$dir = @random ("north","east","south","west")
if ($oldpos == $newpos) call relog
log $oldpos
log $newpos
log Not Stuck. . .
do $dir
}
timeout 900
}
macro relog{
log $oldpos
log $newpos
log Same spot for 15mins
do relog 10
}
Re: check if the bot is stuck macro
Posted: 28 Sep 2018, 12:58
by fadreus
Hmm, that's not what I mean by checking that link xD Hahaha.. Welp, nvm. At least you tried.
That $x = @eval($::char->{pos}{x}) is for getting X or Y value.
But the way you are using it, it's the same as $.pos
How about like this? It's ugly..
Code: Select all
automacro Test {
location not <map>
timeout 60
call {
:Start
$old = $.pos
log Before $old
do @random ("north","east","south","west")
$new = $.pos
log After $new
if ($old == $new) goto Start
if ($old != $new) goto End
:End
log Moved
stop
}
}
Simple is the best.
Btw, if you get mobbed until you can't move why not set teleportAuto_minAggressives ?
Re: check if the bot is stuck macro
Posted: 30 Sep 2018, 21:36
by kamirie
fadreus wrote:Hmm, that's not what I mean by checking that link xD Hahaha.. Welp, nvm. At least you tried.
That $x = @eval($::char->{pos}{x}) is for getting X or Y value.
But the way you are using it, it's the same as $.pos
How about like this? It's ugly..
Code: Select all
automacro Test {
location not <map>
timeout 60
call {
:Start
$old = $.pos
log Before $old
do @random ("north","east","south","west")
$new = $.pos
log After $new
if ($old == $new) goto Start
if ($old != $new) goto End
:End
log Moved
stop
}
}
Simple is the best.
Btw, if you get mobbed until you can't move why not set teleportAuto_minAggressives ?
Thanks for the optimized script. Somehow using tele clip gets stuck when suddenly mobed hehe.