item member like item.RegisteredForSpeechEvent
Posted: Fri Apr 27, 2007 10:44 pm
I have loop
I need something to know if I can send event also to item near instead only to NPCS becouse also item can process SPEECH EVENT with "RegisterForSpeechEvents()" command.
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