ID:269185
 
the thing won't work, i thank n1ghtw1ng for his help, but i tried everyhting to get it to work.. i have
mob
var
given
mob
Jimmy
icon='person.dmi'
icon_state="cleric_m"
verb
Give()
set src in oview(1)
if(!src.given)
src<<"Hello, heres 50 gold"
src.gold+=50
src.given=1
else
src<<"Scram!"

i dont know what the problem is.. the thing i want is for me to be able to double click him (DblClick()) and he talks, then he gives you gold, then the next time you talk to him, hes like 'no more gold for you' or 'scram!!' or something liek that... plz someone read this n help
mob
var
given = 0
mob
Jimmy
icon='person.dmi'
icon_state="cleric_m"
verb
Give()
set src in oview(1)
if(src.given = 0)
src<<"Hello, heres 50 gold"
src.gold+=50
src.given=1
else
src<<"Scram!"


try that instead
In response to Sheepywoolyfluff
The way he had it was fine. He only asked how to make it if you double click the mob it will give you gold the first time then say scram.

mob
var
given = 0
mob
Jimmy
icon='person.dmi'
icon_state="cleric_m"
DblClick()
set src in oview(1)
if(!usr.given)
usr<<"Hello, heres 50 gold"
usr.gold+=50
usr.given=1
else
usr<<"Scram!"


You have to change src in all except for set src in oview(1) because you do not want the mob to give gold to it self, now do you?
In response to XxDragonFlarexX
It should be noted that the src setting doesn't do anything in procs (unless they are used as verbs). If you only want people in a certain range to get the money, you can use get_dist().

Also, this mob will only had out money once. If this is a multiplayer game and you want him to hand out money to each person once, then you'd want to replace the given variable with a list. Then, you'd check for the player's name in the list when they DblClick()ed him, if it wasn't, give them the money and add their name to the list. =)