ID:144950
 
Code:
mob
Helper
icon = 'npc.dmi'
icon_state = "helper"
density = 1
verb
Talk()
alert("Hello.")


Problem description: I want it so you right click the helper and you can talk to him. Then an alert comes up saying hello. It doesn't work how I have it here. Please help.

~DarkD3vil~

mob
Helper
icon = 'npc.dmi'
icon_state = "helper"
density = 1
verb
Talk()
usr<<alert("Hello.")//Use "usr", in this case usr is you, and src is the helper.
In response to Evidence
Thank you but it still doesn't work. There's no talk button when I come up to him. Any idea why?

~DarkD3vil~
In response to Evidence
Uhh, no. There is not any need for the <code>usr<<...</code>. Just <code>alert("Hello")</code> works fine: it automatically displays the pop-up to the user.

O-matic
I'm not entirely sure of what you mean, but I think what you want is the verb to appear in the verbpanel.

mob
Helper
icon = 'npc.dmi'
icon_state = "helper"
density = 1
verb
Talk()
set src in view(1) // if you are one tile near mob/Helper, the verb will appear in your verb panel. Change it to any amount of tiles you want.
alert("Hello.")


O-matic
In response to O-matic
Yes, you solved the problem. Thanks.