1
0

_buy_item 377 B

12345678910111213141516
  1. # $buy_item
  2. !! call this to actually buy an item from a store
  3. count = ARGS[0]
  4. $item = $ARGS[1]
  5. price = ARGS[2]
  6. $variable_name = $ARGS[3]
  7. $location = $ARGS[4]
  8. dynamic "set <<$variable_name>> += <<count>>"
  9. set money -= price
  10. $message = '<font color="green">You bought <<count>> <b><<$item>></b>.</font>'
  11. gt $location, $message
  12. --- $buy_item ---------------------------------