# $buy_item
!! call this to actually buy an item from a store

!! ARGS 0 is the value to set the variable to
!! ARGS 1 is the item description
!! ARGS 2 is the price
!! ARGS 3 is the variable name for the item
!! ARGS 4 is the location to go back to
!! ARGS 5 is $metka

count = ARGS[0]
$item = $ARGS[1]
price = ARGS[2]
$variable_name = $ARGS[3]

dynamic "set <<$variable_name>> += <<count>>"
set money -= price
$message = '<center><font color="green">You bought <<count>> <b><<$item>></b>.</font></center>'
gt $ARGS[4], $ARGS[5]

--- $buy_item ---------------------------------

