zarqon
Well-known member
Many coinmasters are only accessible in a certain outfit, which means that repeated calls to the coinmaster versions of buy() or sell() can result in many, many outfit changes, unless special handling is written into the script. But it's not always easy to work around.
We could manage it by writing a map or switch function of coinmaster => outfit name, then foreaching all the items and adding qualifying items to a separate map for each coinmaster, then processing those maps one by one with outfit changes before and after. But that's nontrivial and is the part that leads me to this feature request -- I don't think it should be so much easier in ASH to hit the server many times for a given task than it is to hit it few times.
So I'd like to propose that the coinmaster versions of buy() and sell() function with batch_open() and batch_close(). Mafia would group all the sell() calls by coinmaster and perform all the sell operations for each coinmaster consecutively, with a single outfit checkpoint at the beginning and end of the entire batch and individual coinmaster outfit swaps in between as needed. Likewise for buy(). So, despite the fact that you can't buy or sell multiple types of items at once, it would still save as many as two server hits per item.
We could manage it by writing a map or switch function of coinmaster => outfit name, then foreaching all the items and adding qualifying items to a separate map for each coinmaster, then processing those maps one by one with outfit changes before and after. But that's nontrivial and is the part that leads me to this feature request -- I don't think it should be so much easier in ASH to hit the server many times for a given task than it is to hit it few times.
So I'd like to propose that the coinmaster versions of buy() and sell() function with batch_open() and batch_close(). Mafia would group all the sell() calls by coinmaster and perform all the sell operations for each coinmaster consecutively, with a single outfit checkpoint at the beginning and end of the entire batch and individual coinmaster outfit swaps in between as needed. Likewise for buy(). So, despite the fact that you can't buy or sell multiple types of items at once, it would still save as many as two server hits per item.