_buy_item.qsrc 562 B

123456789101112131415161718192021
  1. # $buy_item
  2. !! call this to actually buy an item from a store
  3. !! ARGS 0 is the value to set the variable to
  4. !! ARGS 1 is the item description
  5. !! ARGS 2 is the price
  6. !! ARGS 3 is the variable name for the item
  7. !! ARGS 4 is the location to go back to
  8. !! ARGS 5 is $metka
  9. count = ARGS[0]
  10. $item = $ARGS[1]
  11. price = ARGS[2]
  12. $variable_name = $ARGS[3]
  13. dynamic "set <<$variable_name>> += <<count>>"
  14. $message = '<center><font color="green">You bought <<count>> <b><<$item>></b>.</font></center>'
  15. gt $ARGS[4], $ARGS[5]
  16. --- $buy_item ---------------------------------