mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-29 23:15:55 -04:00
101 lines
2.4 KiB
Plaintext
101 lines
2.4 KiB
Plaintext
include library.factions;
|
|
include library.regions;
|
|
|
|
|
|
trigger OnHearSpeech(obj_id objSpeaker, string strText)
|
|
{
|
|
|
|
if(strText=="uber")
|
|
{
|
|
obj_id objLair= createObject("object/tangible/lair/uber_lair.iff", getLocation(self));
|
|
setObjVar(objLair, "spawning.lairType", "imperial_uber_lair_01");
|
|
messageTo(objLair, "handle_Spawn_Setup_Complete", null, 0, false);
|
|
|
|
}
|
|
/*
|
|
if(strText=="kraytuber")
|
|
{
|
|
obj_id objLair= createObject("object/tangible/lair/uber_lair.iff", getLocation(self));
|
|
setObjVar(objLair, "spawning.lairType", "neutral_uber_lair_krayt_01");
|
|
messageTo(objLair, "handle_Spawn_Setup_Complete", null, 0, false);
|
|
|
|
}
|
|
*/
|
|
if(strText=="cleanup")
|
|
{
|
|
obj_id[] objStuff = getObjectsInRange(getLocation(self), 200);
|
|
for(int intI = 0; intI<objStuff.length; intI++)
|
|
{
|
|
if(objStuff[intI]!=self)
|
|
{
|
|
destroyObject(objStuff[intI]);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
if(strText=="imperial")
|
|
{
|
|
factions.awardFactionStanding(self, "Imperial", 500);
|
|
debugSpeakMsg(self, "granted");
|
|
|
|
}
|
|
/*
|
|
if(strText=="message")
|
|
{
|
|
messageTo(self, "testMessage", null, 4, true);
|
|
debugSpeakMsg(self, "Messaged");
|
|
}
|
|
if(strText=="creator")
|
|
{
|
|
obj_id[] objMissionArray = getMissionObjects(self);
|
|
for(int intI = 0; intI <objMissionArray.length; intI++)
|
|
{
|
|
obj_id objMissionData = getMissionData(objMissionArray[intI]);
|
|
obj_id objCreator = getMissionCreator(objMissionData);
|
|
debugSpeakMsg(self, "objCreator for "+objMissionData+" is "+objCreator);
|
|
|
|
}
|
|
|
|
}
|
|
if(strText=="spawnRegion")
|
|
{
|
|
location locTest = getLocation(self);
|
|
string strPlanet = locTest.area;
|
|
region rgnSpawnRegion= getSpawnRegion(self);
|
|
string strRegion = regions.translateGeoToString(rgnSpawnRegion.getGeographicalType());
|
|
string strRegionName = rgnSpawnRegion.getName();
|
|
string strFileName = "";
|
|
if(strRegion=="fictional")
|
|
{
|
|
strFileName = getFictionalRegionFileName(strPlanet, strRegionName);
|
|
}
|
|
else if(strRegion=="overload")
|
|
{
|
|
strFileName = getOverLoadRegionFileName(strRegionName);
|
|
}
|
|
else
|
|
{
|
|
strFileName = "datatables/spawning/spawn_lists/"+strPlanet+"/"+strPlanet+"_"+strRegion+".iff";
|
|
|
|
}
|
|
debugSpeakMsg(self, "strFileName is " +strFileName);
|
|
|
|
|
|
}
|
|
*/
|
|
return SCRIPT_CONTINUE;
|
|
|
|
}
|
|
messageHandler testMessage()
|
|
{
|
|
|
|
debugSpeakMsg(self, "Got message");
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
messageHandler OnAssignMission()
|
|
{
|
|
|
|
debugSpeakMsg(self, "Asssigning missions");
|
|
return SCRIPT_CONTINUE;
|
|
} |