As far as I know you're the only one who has ever wanted that. Something like this I guess.
Code:
int [item] nosell;
batch_open();
foreach it,x in get_shop()
if(shop_price(it) == 999999999) {
nosell[it] = x;
take_shop(it);
}
batch_close();
batch_open();
foreach it, x in nosell;
autosell(x, it);
batch_close();
Many many thanks. Weird that nobody has wanted to do this before. I wonder if there's something I'm missing on my logic - which is basically that if things are selling at mall minimums, I should be able to easily re-buy anything that's sold....
On to running the script. It looks to me like that's ASH as opposed to a regular script, so I threw it in a file.ash and tried to load it. "Unknown variable 'x' on line 13", i.e. in the second batch. I've looked at the ASH scripting guide and tried a couple of things (like putting the whole thing in a main(); trying to declare x as a global variable) and.... uh... I'm kinda stuck. I speak PHP, but this is more C-like, and I'm a bit lost. :/
If it's not a simple thing that you see, don't worry about it, I'll sit down with the ASH scripting guide and try to basically work out how to re-write this. Probably won't be pretty, but that's okay.
I don't want to be a hassle, especially when you basically wrote a solution for me.