mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
90 lines
3.0 KiB
Plaintext
90 lines
3.0 KiB
Plaintext
include library.create;
|
|
include library.utils;
|
|
|
|
trigger OnHearSpeech(obj_id objSpeaker, string strText)
|
|
{
|
|
if(strText=="makePOI")
|
|
{
|
|
debugSpeakMsg(self, "Making lair at your location");
|
|
location locHome = getLocation(self);
|
|
string strLairDifficulty = create.getLairDifficulty( 4, 40, 20);
|
|
obj_id objLair = createObject("object/tangible/lair/npc_lair.iff", locHome);
|
|
setObjVar(objLair, "spawning.intDifficultyLevel", 20);
|
|
setObjVar(objLair, "spawning.lairDifficulty", strLairDifficulty);
|
|
setObjVar(objLair, "spawning.lairType", "evil_tatooine_village");
|
|
messageTo(objLair, "handle_Spawn_Setup_Complete", null, 0, false);
|
|
|
|
|
|
}
|
|
if(strText=="lairTest")
|
|
{
|
|
|
|
debugSpeakMsg(self, "making womprat lair");
|
|
location locHome = getLocation(self);
|
|
string strLairDifficulty = create.getLairDifficulty( 1, 15, 8);
|
|
obj_id objLair = createObject("object/tangible/lair/npc_lair.iff", locHome);
|
|
setObjVar(objLair, "spawning.intDifficultyLevel", 8);
|
|
setObjVar(objLair, "spawning.lairDifficulty", strLairDifficulty);
|
|
setObjVar(objLair, "spawning.lairType", "lesser_desert_womprat");
|
|
setObjVar(objLair, "spawning.target", "object/tangible/lair/base/trash_dark.iff"); // what to explode
|
|
messageTo(objLair, "handle_Spawn_Setup_Complete", null, 0, false);
|
|
|
|
|
|
}
|
|
if(strText=="theaterTest1")
|
|
{
|
|
debugSpeakMsg(self, "Making lair at your location");
|
|
location locHome = getLocation(self);
|
|
string strLairDifficulty = create.getLairDifficulty( 4, 40, 20);
|
|
obj_id objLair = createObject("object/tangible/lair/npc_lair.iff", locHome);
|
|
setObjVar(objLair, "spawning.intDifficultyLevel", 20);
|
|
setObjVar(objLair, "spawning.lairDifficulty", strLairDifficulty);
|
|
setObjVar(objLair, "spawning.lairType", "patrol_test");
|
|
setObjVar(objLair, "spawning.target", "object/installation/battlefield/destructible/shared_bfield_target_power_generator.iff"); // what to explode
|
|
messageTo(objLair, "handle_Spawn_Setup_Complete", null, 0, false);
|
|
|
|
|
|
}
|
|
if(strText=="theaterTest2")
|
|
{
|
|
debugSpeakMsg(self, "Making lair at your location");
|
|
location locHome = getLocation(self);
|
|
string strLairDifficulty = create.getLairDifficulty( 4, 40, 20);
|
|
obj_id objLair = createObject("object/tangible/lair/npc_lair.iff", locHome);
|
|
setObjVar(objLair, "spawning.intDifficultyLevel", 20);
|
|
setObjVar(objLair, "spawning.lairDifficulty", strLairDifficulty);
|
|
setObjVar(objLair, "spawning.lairType", "patrol_test");
|
|
setObjVar(objLair, "spawning.target", "object/installation/battlefield/destructible/shared_bfield_target_power_transformer_2.iff"); // what to explode
|
|
messageTo(objLair, "handle_Spawn_Setup_Complete", null, 0, false);
|
|
|
|
|
|
}
|
|
|
|
if(strText=="sampleHeight")
|
|
{
|
|
|
|
int intI = 0;
|
|
while(intI<9)
|
|
{
|
|
location locHome = getLocation(self);
|
|
|
|
location locTest = utils.getRandomLocationInRing(locHome, 1, 20);
|
|
float fltHeight = getHeightAtLocation(locTest.x, locTest.z);
|
|
debugSpeakMsg(self, "location tested was "+locTest);
|
|
debugSpeakMsg(self, "height at location was "+fltHeight);
|
|
|
|
|
|
intI = intI+1;
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
|
|
|
|
|
|
|
|
}
|