Files
dsrc/sku.0/sys.server/compiled/game/script/event/lifeday/city_spawner.script
T
2013-09-10 23:17:15 -07:00

37 lines
868 B
Plaintext

include library.create;
const int[] LOCS = { 131, 52, -5384, // tatooine 0-2
-5545, 23, -6177, // corellia 3-5
-5557, -150, 0 // naboo 6-8
};
trigger OnInitialize()
{
if(!hasObjVar(self, "event.lifeday.spawned"))
{
string myPlanet = getCurrentSceneName();
if(!myPlanet.equals("tatooine") && !myPlanet.equals("corellia") && !myPlanet.equals("naboo"))
return SCRIPT_CONTINUE;
int locStart = 0;
if(myPlanet.equals("corellia"))
locStart = 3;
if(myPlanet.equals("naboo"))
locStart = 6;
location male1Spawn = new location(LOCS[locStart], LOCS[locStart+1], LOCS[locStart+2], myPlanet);
obj_id male1 = create.object("object/tangible/spawning/static_npc/wookiee_lifeday_male1.iff", male1Spawn);
setObjVar(self, "event.lifeday.spawned", 1);
setObjVar(self, "event.lifeday.male1", male1);
}
return SCRIPT_CONTINUE;
}