_buy_single_item.qsrc 596 B

123456789101112131415161718
  1. # $buy_single_item
  2. !! This buys an item and sets the value of the underlying variable to the specific value
  3. !! For example, buying a plasma tv sets tv = 2
  4. !! ARGS 0 is the value to set the variable to
  5. !! ARGS 1 is the item description
  6. !! ARGS 2 is the price
  7. !! ARGS 3 is the variable name for the item
  8. !! ARGS 4 is the location to go back to
  9. !! ARGS 5 is $metka
  10. dynamic "set <<$ARGS[3]>> = <<ARGS[0]>>"
  11. set money -= ARGS[2]
  12. $message = '<center><font color="green">You bought a <b><<$ARGS[1]>></b>.</font></center>'
  13. gt $ARGS[4], $ARGS[5]
  14. --- $buy_single_item ---------------------------------