include library.create; include library.ai_lib; trigger OnInitialize() { string setting = getConfigSetting("EventTeam", "lifeday"); if(setting == null || setting == "") return SCRIPT_CONTINUE; if (setting == "true" || setting == "1") { string spawn = getStringObjVar (self, "spawns"); obj_id celeb = create.object (spawn, getLocation(self)); if(!isIdValid(celeb) ) return SCRIPT_CONTINUE; setInvulnerable(celeb, true); ai_lib.setDefaultCalmBehavior( celeb, ai_lib.BEHAVIOR_SENTINEL ); if (hasObjVar (self, "quest_script")) { string script = getStringObjVar (self, "quest_script"); attachScript (celeb, script); } if (hasObjVar (self, "quest_table")) { string table = getStringObjVar (self, "quest_table"); setObjVar (celeb, "quest_table", table); } if (hasObjVar (self, "npc_name")) { string name = getStringObjVar (self, "npc_name"); if (name != null) { if (name != "") { setName (celeb, name); } } } } else return SCRIPT_OVERRIDE; return SCRIPT_CONTINUE; }