check if the bot is stuck macro

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

Message
Author
User avatar
fadreus
The Kore Devil
The Kore Devil
Posts: 724
Joined: 17 Nov 2017, 23:32
Noob?: No
Location: Genting Highland, Malaysia
Contact:

Re: check if the bot is stuck macro

#11 Post by fadreus »

Yup, simply like that.
For me, I use

Code: Select all

console /NPC dialog/
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 :D

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

iRO Supporter.
Read before you ask is the wisest thing human can do.
Unless you're a cat.
Image

kamirie
Plain Yogurt
Plain Yogurt
Posts: 98
Joined: 22 Jul 2009, 23:19
Noob?: Yes

Re: check if the bot is stuck macro

#12 Post by kamirie »

Thanks fadreus i'll stick with the macro first to test :D

kamirie
Plain Yogurt
Plain Yogurt
Posts: 98
Joined: 22 Jul 2009, 23:19
Noob?: Yes

Re: check if the bot is stuck macro

#13 Post 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

User avatar
fadreus
The Kore Devil
The Kore Devil
Posts: 724
Joined: 17 Nov 2017, 23:32
Noob?: No
Location: Genting Highland, Malaysia
Contact:

Re: check if the bot is stuck macro

#14 Post 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. :D

Btw, about idle state, why not use teleportAuto_idle 1

iRO Supporter.
Read before you ask is the wisest thing human can do.
Unless you're a cat.
Image

kamirie
Plain Yogurt
Plain Yogurt
Posts: 98
Joined: 22 Jul 2009, 23:19
Noob?: Yes

Re: check if the bot is stuck macro

#15 Post 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 .
Check this out.
http://forums.openkore.com/viewtopic.php?f=32&t=15913
There's useuful stuff you might wanna try.
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. :D
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

kamirie
Plain Yogurt
Plain Yogurt
Posts: 98
Joined: 22 Jul 2009, 23:19
Noob?: Yes

Re: check if the bot is stuck macro

#16 Post 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
}

User avatar
fadreus
The Kore Devil
The Kore Devil
Posts: 724
Joined: 17 Nov 2017, 23:32
Noob?: No
Location: Genting Highland, Malaysia
Contact:

Re: check if the bot is stuck macro

#17 Post 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. :lol:

Btw, if you get mobbed until you can't move why not set teleportAuto_minAggressives ? :?

iRO Supporter.
Read before you ask is the wisest thing human can do.
Unless you're a cat.
Image

kamirie
Plain Yogurt
Plain Yogurt
Posts: 98
Joined: 22 Jul 2009, 23:19
Noob?: Yes

Re: check if the bot is stuck macro

#18 Post 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. :lol:

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.

Post Reply