2.0.7 | Bot Standing upon entering portal

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderators: Moderators, Developers

Message
Author
jadjad
Plain Yogurt
Plain Yogurt
Posts: 53
Joined: 25 Mar 2009, 22:20
Noob?: No
Location: in front of my computer

2.0.7 | Bot Standing upon entering portal

#1 Post by jadjad »

hi,

i apologize because i dont know how to read or write in perl. this "bug" has been seen since 2.0.6. the problem is that the bot just stands upon entering a portal to buy or sell (or for storage if it doesnt have wing).

im not sure if this helps but this is my logic:

current flow:
bot initiates auto buy/sell>bot calculates npc location>moves to NPC location>bot buys/sells> END
(with this the bot will not respond if it enters a portal)

suggested flow:

bot initiates auto buy/sell >bot calculates npc location>moves to NPC location>>

>>IF: bot enters portal>load map>bot initiates auto buy/sell (o initiates last command)>bot calculates npc location>moves to NPC location>>

>>bot buys/sells> END

(with this, on every map, the bot will recall its last command on queue. thus makes the bot move again)


** the current flow is just based on my own observation on how the bot runs. i wasn't able to look deeply into the OK codes because i do not know how to read perl syntax**

this is just a suggestion for our developers to check.
btw, im using 2.0.7

Thanks!
Image

midnytblu
Developers
Developers
Posts: 90
Joined: 14 Apr 2008, 09:37
Noob?: No
Location: prt_fild08 134 362

Re: 2.0.7 | Bot Standing upon entering portal

#2 Post by midnytblu »

btdt.

tip: if there is a need to enter a portal to buy/sell stuff (i.e. alberta town), you should utilize the 'standpoint' option rather than 'distance'.

jadjad
Plain Yogurt
Plain Yogurt
Posts: 53
Joined: 25 Mar 2009, 22:20
Noob?: No
Location: in front of my computer

Re: 2.0.7 | Bot Standing upon entering portal

#3 Post by jadjad »

yup but that's still not a fix. that can solve some problems but it does not fix the issue... i hope u get what i mean ;)
Image

midnytblu
Developers
Developers
Posts: 90
Joined: 14 Apr 2008, 09:37
Noob?: No
Location: prt_fild08 134 362

Re: 2.0.7 | Bot Standing upon entering portal

#4 Post by midnytblu »

^yef... i know what you mean ;)

Mushroom
Perl Monk
Perl Monk
Posts: 427
Joined: 04 Apr 2008, 14:04
Noob?: No
Location: Brazil

Re: 2.0.7 | Bot Standing upon entering portal

#5 Post by Mushroom »

I'm not sure if I understood well, but I was getting the same bug but using teleport.
Like, we are on lockMap and teleporting to saveMap to do autobuy, but after teleporting, it "forgets" that was autobuying and calculate route to lockMap again, causing a loop. I found this reference in the TalkToLockMap plugin from Thaize.

Code: Select all

## This is a fucking hack, for some reason when autoBuy is called
## @ai_seq is getting cleared so the bot will automatically trigger
## processLockMap.. causing an infinite loop until the timing of
## the autobuy check falls during the idle period after warp.
sub on_teleport_send{
	if (AI::action eq "buyAuto" && @_[1]->{level} eq 2){
		message "buyAuto is queued and we are teleporting, setting the TalkToLockMap variable.\n";
		$buyAuto = 1;
	} else {
		## Shouldn't be needed; will remove after sufficient testing.
	$buyAuto = 0;
	}
}
Quit.

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: 2.0.7 | Bot Standing upon entering portal

#6 Post by EternalHarvest »

teleportAuto_allPlayers, teleportAuto_hp/sp, teleport from monster by mon_control, teleportAuto_idle, teleportAuto_portal
- as one of these triggers, $ai_v{temp}{clear_aiQueue} is set.

When $ai_v{temp}{clear_aiQueue} is set, map_change packet handler clears AI, but doesn't reset this flag. So every map change will clear AI.

Currently it's being reset only with autoRestart, autoBreakTime.

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: 2.0.7 | Bot Standing upon entering portal

#7 Post by kLabMouse »

EternalHarvest wrote:So every map change will clear AI.
This is not Really good Idea, to clean Up whole AI sequence.
Some of the Entries must stay like: MapRoute (from map to map), AutoBuy, AutoSell. ans such things.

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: 2.0.7 | Bot Standing upon entering portal

#8 Post by EternalHarvest »

I was wrong, initMapChangeVars erases ai_v{temp}.

Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: 2.0.7 | Bot Standing upon entering portal

#9 Post by Technology »

Bot Standing upon entering portal
Not sure if it is related but i've experienced the bot standing BEFORE a portal, turned out the portal in portals.txt had a slightly wrong location.

If that is not the case, read on...
Ok, to be honest i (and others) don't have a clue what is going on, so we'll need a lot more information...

First of all, describe every step in great detail of the process starting from lockmap to where the bot gets stuck.

these commands are useful to see what the AI is doing, use them

Code: Select all

ai ai_v
ai print
aiv
also post the entire config.txt (you won't get trashed, i promise :P )

EDIT:
i've also noticed the bot standing for a while after having entered a portal, is this what you mean?
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: 2.0.7 | Bot Standing upon entering portal

#10 Post by kLabMouse »

Up.

Isa Fixed ?

Locked