Openkore.com

OpenKore Forums
It is currently 20 Oct 2018, 04:54

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: check if the bot is stuck macro
PostPosted: 23 Sep 2018, 20:31 
Offline
Plain Yogurt
Plain Yogurt

Joined: 22 Jul 2009, 23:19
Posts: 87
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:
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
}


Top
 Profile  
 
 Post subject: Re: check if the bot is stuck macro
PostPosted: 23 Sep 2018, 22:24 
Offline
OpenKore Monk
OpenKore Monk
User avatar

Joined: 17 Nov 2017, 23:32
Posts: 431
Location: Genting Highland, Malaysia
Code:
attackCheckLOS

How about this?
or reduce time to drop if can't reach target in timouts.txt?
Then increase time to retry to attack same monster so it will search for other monster?
teleport when dropping target?

kamirie wrote:
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
}


You need to run 2 check;

Example
Code:
$OldPos = $.pos
$NewPos = $.pos

if ($OldPos == $NewPos) then move


Much more simple solution is eventMacro with checkconfigkey.
Just add in config Pos1 and Pos2
Run eventmacro check if config key Pos1 equal Pos2.

Though I didn't try this kind of stuff yet coz I'm too lazy to use eventMacro :lol:

_________________

iRO server supporter.
Wiki & Google are your best allies.
I'll not give answers, I only show you the way to find it.
Image


Top
 Profile  
 
 Post subject: Re: check if the bot is stuck macro
PostPosted: 24 Sep 2018, 02:27 
Offline
Moderators
Moderators
User avatar

Joined: 16 Dec 2011, 02:53
Posts: 1211
Location: Brazil
eval $char->{isIdle} something this way.

_________________
"'There are three things all wise men fear: the sea in storm, a night with no moon, and the anger of a gentle man.'" :P

viewtopic.php?f=10&t=16117

Thanks for this Eternal! =D <3<3


Top
 Profile  
 
 Post subject: Re: check if the bot is stuck macro
PostPosted: 24 Sep 2018, 02:50 
Offline
OpenKore Monk
OpenKore Monk
User avatar

Joined: 17 Nov 2017, 23:32
Posts: 431
Location: Genting Highland, Malaysia
SkylorD wrote:
eval $char->{isIdle} something this way.


I thought he meant the bot is attempt to attack monster but stuck.
So it would be on route,attacking instead of idle.. am I wrong? :?

_________________

iRO server supporter.
Wiki & Google are your best allies.
I'll not give answers, I only show you the way to find it.
Image


Top
 Profile  
 
 Post subject: Re: check if the bot is stuck macro
PostPosted: 24 Sep 2018, 20:45 
Offline
Plain Yogurt
Plain Yogurt

Joined: 22 Jul 2009, 23:19
Posts: 87
SkylorD wrote:
eval $char->{isIdle} something this way.


Can I specify the number of secs ? I'm not quiet familiar yet with eventMacros . .Thanks


Top
 Profile  
 
 Post subject: Re: check if the bot is stuck macro
PostPosted: 24 Sep 2018, 21:46 
Offline
OpenKore Monk
OpenKore Monk
User avatar

Joined: 17 Nov 2017, 23:32
Posts: 431
Location: Genting Highland, Malaysia
eventMacro just like macro.
eventMacro is rework of macro.
Most of it is similar.

_________________

iRO server supporter.
Wiki & Google are your best allies.
I'll not give answers, I only show you the way to find it.
Image


Top
 Profile  
 
 Post subject: Re: check if the bot is stuck macro
PostPosted: 24 Sep 2018, 22:04 
Offline
Plain Yogurt
Plain Yogurt

Joined: 22 Jul 2009, 23:19
Posts: 87
fadreus wrote:
eventMacro just like macro.
eventMacro is rework of macro.
Most of it is similar.


Yes, Yes ,
eval $char->{isIdle} < where do i insert this line with 5 secs check?

Code:
automacro idle {
InLockMap 1
call {
commands
}
timeout 5
}


Top
 Profile  
 
 Post subject: Re: check if the bot is stuck macro
PostPosted: 25 Sep 2018, 02:13 
Offline
Plain Yogurt
Plain Yogurt

Joined: 22 Jul 2009, 23:19
Posts: 87
I think I know why my bot is getting stuck. It's when being mobbed and casting teleport skill , it will initialize the casting but "figuratively" sticks at finishing the teleport , like having the teleport prompt waiting to press enter in-game.


Top
 Profile  
 
 Post subject: Re: check if the bot is stuck macro
PostPosted: 25 Sep 2018, 02:26 
Offline
OpenKore Monk
OpenKore Monk
User avatar

Joined: 17 Nov 2017, 23:32
Posts: 431
Location: Genting Highland, Malaysia
kamirie wrote:
I think I know why my bot is getting stuck. It's when being mobbed and casting teleport skill , it will initialize the casting but "figuratively" sticks at finishing the teleport , like having the teleport prompt waiting to press enter in-game.



Simply use macro warp cancel for that.

_________________

iRO server supporter.
Wiki & Google are your best allies.
I'll not give answers, I only show you the way to find it.
Image


Top
 Profile  
 
 Post subject: Re: check if the bot is stuck macro
PostPosted: 25 Sep 2018, 02:37 
Offline
Plain Yogurt
Plain Yogurt

Joined: 22 Jul 2009, 23:19
Posts: 87
fadreus wrote:
kamirie wrote:
I think I know why my bot is getting stuck. It's when being mobbed and casting teleport skill , it will initialize the casting but "figuratively" sticks at finishing the teleport , like having the teleport prompt waiting to press enter in-game.



Simply use macro warp cancel for that.


Like this?
Code:
automacro warpcancel {
location $lockmap
console /Warp Portal/i
call {
do warp cancel
}
timeout 3
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group