I don't think the max_price works correctly. I set it to 3000, yet it still bought cards at 14k:
Using cached search results for Alice's Army Cleric...
Purchasing Alice's Army Cleric (1 @ 13,800)...
You acquire an item: Alice's Army Cleric
Purchases complete.
I tested this out afterwards, and set the meat per credit to 2550, it bought 6 Guards at 2550 each, traded them in, then stopped.> call scripts\StoreCredit.ash
Checking for updates (running Store Credit ver. 1.0)...
_version_BalesStoreCredit => 1.0
You have a current version of Store Credit.
You have 463 credits.
Alice's Army Guard is too expensive at 2550 meat.
Is the script checking the mall prices, then not trading in any cards I have that are under ther meat per credit limit or something, or was that a feature someone was hoping for in the thread and I'm now confused?> call scripts\StoreCredit.ash
You have 463 credits.
Searching for "alice's army guard"...
Search complete.
Purchasing Alice's Army Guard (7 @ 2,550)...
You acquire Alice's Army Guard (7)
Purchases complete.
Trading in 6 Alice's Army Guards for credit.
You have 469 credits.
Alice's Army Halberder is too expensive at 2640 meat.
I did already alter the script so it doesn't try to keep one of each in my inventory, so it's not that.
The script will trade cards if their mall price is less than your meat per credit price. It just seems silly to trade cards if you could simply sell them for enough meat to purchase cheaper cards that'd give you the same number of credits.
Ah. I had been going off of post #9, which just altered line #41. What all would I need to be changing on 81, 82 & 91? I'm not certain what I should be looking for.There are several places where you need to make such a change. I suspect you missed one of them. You'd need to make a change on lines 81, 82 & 91
if(item_amount(c) > 1 && credits < max_credit && price_per(c) <= max_price)
trade_card(item_amount(c) - 1, c);
#else print(c+": "+item_amount(c)+ " @ "+ price_per(c));
int value;
while(card < count(list) && price_per(list[card]) <= max_price && credits < max_credit
&& my_meat() >= mall_price(list[card])) {
value = rarity(list[card]);
if(value > 1)
print("Trying to buy "+list[card].plural+ ". They are worth "+value+ " credits each"+(value > 50? "!": "."), (value > 50? "green": "black"));
if(buy(max(1, floor((max_credit - credits)/ value)), list[card], min(mall_price(list[card+1]), max_price * value)) > 0) {
q = max(item_amount(list[card]) - 1, 0);
if(item_amount(c) > 0 && credits < max_credit && price_per(c) <= max_price)
trade_card(item_amount(c), c);
#else print(c+": "+item_amount(c)+ " @ "+ price_per(c));
int value;
while(card < count(list) && price_per(list[card]) <= max_price && credits < max_credit
&& my_meat() >= mall_price(list[card])) {
value = rarity(list[card]);
if(value > 1)
print("Trying to buy "+list[card].plural+ ". They are worth "+value+ " credits each"+(value > 50? "!": "."), (value > 50? "green": "black"));
if(buy(max(1, floor((max_credit - credits)/ value)), list[card], min(mall_price(list[card+1]), max_price * value)) > 0) {
q = item_amount(list[card]);
Whoa! I didn't realize anyone still cared about this program!
I'd have to write a function to value packs of cards based on average chance of each possible card. Lets see, 4 random commons Plus 1 uncommon or rare (90% uncommon, 10% rare). Seems quite doable. Maybe I'll revisit this program if people are using it. You actually use it?
Considering it a little more, things are simpler than I first though: Each pack should produce an average of 13.5 credits so I can rate it as a card which returns that many credits.