For completeness I decided to check the universe trader script too (plugin.autotrade.galaxy) but it only calls the local trader script with the range parameter set to null (I think).idgar wrote:plugin.autotrade.sector (v36)
147 if $productprice >= $avgprice ...
plugin.autotrade.local (v24)
242 if $productprice > $avgprice ...
So anyway...
Since the lines following the if statement in the quotes in both the sector and local trader scripts are..
$buystation = null ...
goto label selectware
.. the sector trader will get caught in a loop when trying to buy from a place that sells the "best" ware at average price, like a trading station. This loop will be broken when a better deal is found which could take a while.
@Catra
Traders learn to trade at trading stations at level 2 I believe, and I'm pretty sure that part is caught in the "selectware" part of the scripts.
Edit:
Ok, it was level 3. But yes, that part is covered in the "selectware" part of the scripts, which for the normal sector trader always calls plugin.autotrade.getroute.short (dock/level check is on line 18 of this script). Hmm, lots of scripting stuff here from me, maybe the thread belongs in the scripting forum now.

Sorry for the posting spam and late edit... Now I'll just wait until someone lets me know if I can safely just fix the bug and save the script.