Code: Select all
var event := Struct { "type" := SYSEVENT_SPEECH, "source" := me, "text" := "ciao" };
foreach mobile in (ListMobilesNearLocation(who.x, who.y, who.z, MAX_DIST_EVENT, who.realm))
if (mobile.isA(POLCLASS_NPC))
SendEvent(mobile, event)
endif
endforeach