mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-29 23:15:55 -04:00
27 lines
614 B
Plaintext
27 lines
614 B
Plaintext
include library.regions;
|
|
|
|
trigger OnHearSpeech (obj_id speaker, string text)
|
|
{
|
|
if (!hasObjVar (speaker, "gm"))
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
if (text == "test")
|
|
{
|
|
location here = getLocation(self);
|
|
obj_id bldg = getTopMostContainer (self);
|
|
debugSpeakMsg (self, "I'm contained by " + bldg);
|
|
location there = getLocation (bldg);
|
|
location target = new location();
|
|
region[] rgnFoos = getRegionsWithGeographicalAtPoint(there, regions.GEO_CITY);
|
|
if(rgnFoos==null)
|
|
{
|
|
debugSpeakMsg(self, "NULL FOOS");
|
|
return SCRIPT_CONTINUE;
|
|
|
|
}
|
|
region quest = rgnFoos[0];
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
} |