Smaug 1.4a Mobile Prog - Gold

Posted by Arithorn on Sun 12 Jun 2005 06:41 AM — 5 posts, 17,071 views.

#0
I've got a mob program that gives the player some gold if they succeed in killing a mob...in this case, a newbie area - ant...

>give_prog corpse An ant
say Excellent work $n, here is your reward.
give 20 coins to $n
mpjunk corpse

The program works fine, but I've noticed that he will eventually run out of money.

How do I get him to recreate he money in his INV or otherwise add money to him in a reset so that he doesn't run out?

Thanks
USA #1
Before it gives the money, simply add this line:
mpmset self gold 20
USA #2
or, you could just before the line that gives the gold insert a mpwithdraw 20
#3
Thanks very much to the both of you.

The mpmset command bugged till I removed the proto flag off the mob, but that's ok.

The mpwithdraw doesn't work but I -think- that might be because I haven't set an economy up for the area yet.
USA #4
Yes, mpmset needs the mob to not be prototyped and mpwithdraw needs the area to have an economy.. take whichever seems the lesser evil for you. ;)