Hi All,
I'm trying to script a function for the Best Buy/sell locator, because the default one doesn't really play very well with OCR.
I was wondering where exactly this is located in the game's code? Is it hard-coded somewhere or is there a script command being run I could look at? I want to basiclaly just reformat the info already presented, and log it to a file, same as my trade script.
Thanks for any insights.
Locating Code for Best Buy/Sell
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 295
- Joined: Fri, 20. Mar 09, 16:38
Re: Locating Code for Best Buy/Sell
Maybe this can help you : viewtopic.php?t=223503 .
Re: Locating Code for Best Buy/Sell
the best buys/sells locator simply gets all the products/resources in sector, and display the one with the best price.
you can create the same functionality via a script.
create an array of ware wares in sector, then for each ware create 2 arrays, one with the station and one with the price. Sort both arrays using the price array as the data one (sort the station array first).
Then simply grab the first entry from each array and log it
you can create the same functionality via a script.
create an array of ware wares in sector, then for each ware create 2 arrays, one with the station and one with the price. Sort both arrays using the price array as the data one (sort the station array first).
Then simply grab the first entry from each array and log it