ID:178884
![]() Mar 22 2002, 10:08 pm
|
|
i seem to be having trouble making both verbs can someone help me?
|
![]() Mar 22 2002, 10:10 pm
|
|
What kind of trouble?
|
well i guess i need a example of how you add gold into another person and how to give a item in your inventory to another person
|
if(amount<1) return
What ever you do don't miss this mistakes all NooBs make with this verb first time around. Otherwise you can give negative gold to people. LJR |
mob/verb/Give(obj/O as obj in usr.contents, mob/M as mob in range(1)) That's basically how you do it. |
mob
verb Give_Money(atom/M as mob in world) set category = "Commands" var/amount = input("How Much to [M]?") as null|num if(amount <=0 || isnull(amount)) alert("Please eneter in a sufficient amount.") return 0 if(amount > usr.credits) alert("Please eneter in a sufficient amount.") return 0 else M:credits += amount M << "[usr] gave you [amount] Gold!" usr.credits -= amount usr << "you gave [M], [amount] gold!" Rae |