Reverted old changes to Event Promoter spawner and moved location of Coronet spawner to avoid an NPC positioning conflict.

This commit is contained in:
Cekis
2016-08-09 00:35:26 +01:00
parent 836f71b7be
commit aaaf1ffe30
@@ -1,15 +1,9 @@
package script.systems.event_perk;
import script.*;
import script.base_class.*;
import script.combat_engine.*;
import java.util.Arrays;
import java.util.Hashtable;
import java.util.Vector;
import script.base_script;
import script.library.create;
import script.library.locations;
import script.location;
import script.obj_id;
public class promoter_hotel_spawner extends script.base_script
{
@@ -21,7 +15,7 @@ public class promoter_hotel_spawner extends script.base_script
if (!hasObjVar(self, "event_perk.promoter"))
{
location here = getLocation(self);
String myPlanet = getCurrentSceneName();
// String myPlanet = getCurrentSceneName();
String myCity = locations.getCityName(here);
obj_id spawnCell = getCellId(self, "r10");
location spawnPoint = getLocation(self);
@@ -33,16 +27,14 @@ public class promoter_hotel_spawner extends script.base_script
{
return SCRIPT_CONTINUE;
}
obj_id template = create.object("object/tangible/ground_spawning/area_spawner.iff", spawnPoint);
// there's a special NPC (Zekka Thyne) in the Coronet hotel so avoid spawning the promoter on top of him.
if(myCity.equals("coronet")) {
spawnPoint.x = -25.3f;
spawnPoint.y = 1.6f;
spawnPoint.z = -5.5f;
}
obj_id template = create.object("object/tangible/spawning/static_npc/event_promoter_neutral.iff", spawnPoint);
setObjVar(self, "event_perk.promoter", template);
setObjVar(template, "spawns", "commoner");
setObjVar(template, "npc_name", "An Event Promoter");
setObjVar(template, "quest_script", "systems.event_perk.promoter");
setObjVar(template, "promoter_type", "neutral");
String spawnerObjName = "spawning: hotel_promoter_spawner_neutral";
setName(template, spawnerObjName);
attachScript(template, "systems.event_perk.promoter_spawner");
return SCRIPT_CONTINUE;
}
return SCRIPT_CONTINUE;
}