*label myShop
*choice
#Buy Arvan's Sword
*if (gold > 20)
*set gold (gold - 20)
*set item_54_location 1
You bought Arvan's Sword!
*comment This item will now appear in your inventory (the default id for which is '1')!
*goto myShop
You do not have enough gold!
*goto myShop
#Buy all Ten Potions
*if (gold > (10*potion_price)
*set gold (gold - (10*potion_price)
*set para1 20
*set para2 30
*set para3 1
*gosub function_changeItemRangeLoc
You bought all ten of Arvan's potions!
*comment items 20-30 (our potions) are now in our inventory (container '1')
*goto myShop
You don't have enough money!
*goto myShop
*temp potion_count
*set potion_count 10
*temp current_potion
*set current_potion 20
*label myShop
*choice
#Buy 1 Potion
*if (gold > 20) and (potion_count > 0)
*set gold (gold - 20)
*setref ("item_"¤t_potion)&"_location" 1 //- Syntax "might" be wrong here
*set current_potion (current_potion + 1)
*set potion_count (potion_count - 1)
You bought a potion!
*goto myShop
*if (potion_count > 0)
You don't have enough gold!
*goto myShop
*if (gold > 20)
There are no potions left to buy!
*goto myShop
You don't have enough gold and there are no potions left to buy!
*goto myShop
*set take_value 5
*gosub function_getItem
*set take_value 5
*gosub function_getItem
${item_name}
${item_active}
${item_size}
It looks like you're new here. If you want to get involved, click one of these buttons!