// # Name: Auto PvP Mystery Mini Mall Stocker # Version: 1.1 # Authour: alexbishops # This script will go through every item ID from 1 to 5792 and purchase items under 1000 meat and stock them for 999 meat in your mall. # It was created by the player alexbishops who will be very appreciative of any thanks bestowed upon him. # Please use this script in other projects; it is appricated but not compulsary to credit alexbishops. # TODO: # This script will run sligtly faster if you use a list of valid item IDs instead of a for loop. This would also fix the next two points. # Will currently purchase gift items from NPC stores if they cost less than 1000 meat. This wastes an tiny amount of meat and time. # Currently tries to sell quest items in the mall. # Initializing this script by refreshing your store inventory will reduce errors. //This lets alexbishops know your using this script. Feel free to disable it. // notify alexbishops; //This iterates though every item. for y from 1 to 5792 { //Prints item ID. print ( y ); //Converts int from for loop into item ID. item x = to_item( y ); //This checks if it is a valid ID and skips it if it isn't. if ( x != $item[ none ] ) { //This checks if you have the item already in your mall. if ( shop_amount ( x ) < 1 ) { //Checks if mall price is below 1000 meat. if (mall_price( x ) < 1000 ) { //This checks if you already have this item in your inventory. if (item_amount( x ) < 2) { //Purchases 1 item. buy( 1 , x ); //Puts 1 item in shop for 999 meat (should not affect items in inventory). put_shop( 999 , 1, 1 , x); } //This will put all but one of the items from your inventory into the mall. else { int a = item_amount( x ) - 1; put_shop( 999 , 1, a , x); } } } } }