Page 1 of 2

2.0.7 | Bot Standing upon entering portal

Posted: 01 Sep 2009, 21:56
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!

Re: 2.0.7 | Bot Standing upon entering portal

Posted: 02 Sep 2009, 21:22
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'.

Re: 2.0.7 | Bot Standing upon entering portal

Posted: 03 Sep 2009, 06:16
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 ;)

Re: 2.0.7 | Bot Standing upon entering portal

Posted: 03 Sep 2009, 21:22
by midnytblu
^yef... i know what you mean ;)

Re: 2.0.7 | Bot Standing upon entering portal

Posted: 23 Sep 2009, 21:26
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;
	}
}

Re: 2.0.7 | Bot Standing upon entering portal

Posted: 24 Dec 2009, 17:43
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.

Re: 2.0.7 | Bot Standing upon entering portal

Posted: 24 Dec 2009, 18:06
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.

Re: 2.0.7 | Bot Standing upon entering portal

Posted: 25 Dec 2009, 00:32
by EternalHarvest
I was wrong, initMapChangeVars erases ai_v{temp}.

Re: 2.0.7 | Bot Standing upon entering portal

Posted: 28 Dec 2009, 12:39
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?

Re: 2.0.7 | Bot Standing upon entering portal

Posted: 09 Apr 2010, 10:00
by kLabMouse
Up.

Isa Fixed ?