[Request] A script that checks if an item out of stock in your mall shop.

qwertyaznman123

New member
I have a bulk amount of a certain item that I don't want to flood the mall with. I'd like to know if it is possible to check every 30 minutes - 1 hour if an item is out of stock in your mall shop, and, if so, add a few of that item to the mall, some percentage amount below mall price.

Could someone write/help me write this script? I would be very grateful. Thanks!

-qwerty
 

Theraze

Active member
Well, shop_amount is available to you, as is mall_price. So you should be able to knock that out in 5-10 minutes.
 

lostcalpolydude

Developer
Staff member
Looks like shop_amount() doesn't actually recheck to see if the quantity listed has changed. I don't think mafia is the right tool for the mall bot you're trying to make.
 

qwertyaznman123

New member
Looks like shop_amount() doesn't actually recheck to see if the quantity listed has changed. I don't think mafia is the right tool for the mall bot you're trying to make.

Could I just say:

while true;
if shop_amount(item) == 0;
stock 2 item
delay(108000); //assuming delay counts in seconds
end
 

Theraze

Active member
As lost pointed out, mafia won't update shop_amount for you... once it checks, that's the number. But what you'd want otherwise would be something like:
Code:
if (shop_amount(item) == 0) put_shop(2, max(mall_price(item) * .8, autosell_price(item) * 2), item);
cli_execute("waitq 108000");
 
Top