ID:173789
 
Is there a way to force the activation of a verb?
for example
Mob
verb
alert("Ok")
is there a way to force the activation instead of clicking the command?Like a walkover...
The call proc can be used for things like this. I use it a lot for mob AI.

mob/verb/say(T as text) // simple say verb
world << "[src]: T"

mob/verb/poke()
set src in oview(1) // src must be within oview(1) of the usr
call(src,"say")("Don't poke me you idiot") // calls the say verb of the src, with the necessary argument


In this example, if you used the poke verb on a mob, it would cause the mob to use their say verb as if they had typed 'say "Don't poke me you idiot"'. You could use this for any verb, essentially, provided you supply the appropriate arguments.