ID:151119
 
how would i give some money to another mob.the amount of gold that is given would be defined through a text box that pops up asking how much money they would like to give
heres my var for money
mob/var/gold
how would i give some money to another mob.the amount of gold that is given would be defined through a text box that pops up asking how much money they would like to give
heres my var for money
mob/var/gold

See the Reference for the input() proc. I think it would look like this:

mob/verb/give_money(mob/M as mob in view(usr, 1))
var/amount = input("Amount to give?") as num
if(amount > gold) src << "You don't have that much!"
else
gold -= amount
M.gold += amount