Page 1 of 1

A moving merchant window box

Posted: Tue Aug 12, 2014 7:44 pm
by Romplayer
What what be the best way to keep a merchant box open with a merchant that moves around? If the merchant moves too far the box closes and the bot gets stuck.

Right now I just include in the buying loop Kinda slows it down

Code: Select all

player:openStore(npcname);
Is there a way to tell if the store box closes then just reopen it with player:openStore(npcname);

Or can I make the bot follow the guy so the box doesn't close?

Re: A moving merchant window box

Posted: Tue Aug 12, 2014 11:01 pm
by lisa
If you aren't worried about people seeing you "teleport" you can use this userfunction.
http://www.solarstrike.net/phpBB3/viewt ... 668#p36668

Otherwise yeah you could just do up some code in your WP to make sure you stay within XX distance of the NPC.