ID:2092515
 
(See the best response by Ter13.)
Code:
verb
say(msg as text)
world << "[usr]: [msg]"


Problem description: Should I define verbs like the above under mob or under client? I got some others like attack() (attack another player), teleport() (to a specific tile), etc. For now, as I test it, it works for both mob and client, but is there any difference between them two?
Thanks

In general, I think it makes sense to put most of your verbs on the mob rather than the client. Most of them will have a lot more to do with the mob itself than with the client, so it's just a better fit.
Best response
Rules of thumb for verbs on the client or on the mob.

* If the verb has to do with controls in the interface, such as on-resize, on-show, on-hide, on-close, on-press hooks: /client

* If the verb has to do with macros: /client refire to a /mob proc if the verb has to do with mob control.

* If the verb is something that behaves differently between mob subtypes or is unavailable when in a certain control state -> /mob

* If the verb is something that the player doesn't have access to right away when they connect, you can define it under an arbitrary prototype and add it to the mob later.