//:://///////////////////////////////////////////// //:: Custom User Defined Event //:: FileName //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* */ //::////////////////////////////////////////////// //:: Created By: //:: Created On: //::////////////////////////////////////////////// void main() { ExecuteScript("prc_npc_userdef", OBJECT_SELF); object oAttacker; object oDog; location lLoc; int nUser = GetUserDefinedEventNumber(); if(nUser == 1001) //HEARTBEAT { } else if(nUser == 1002) // PERCEIVE { if ((GetLocalInt(OBJECT_SELF,"hench")!=2)&&(GetIsEnemy(GetLastPerceived(),OBJECT_SELF))) { oAttacker=GetLastPerceived(); lLoc=GetLocation(oAttacker); SetFacingPoint(GetPosition(oAttacker)); PlayAnimation(ANIMATION_FIREFORGET_TAUNT); PlayVoiceChat(VOICE_CHAT_BATTLECRY3); ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2),lLoc); oDog=CreateObject(OBJECT_TYPE_CREATURE,"jw_newgob_dog",lLoc,TRUE); AddHenchman(OBJECT_SELF,oDog); SetLocalInt(OBJECT_SELF,"hench",2); SetLocalObject(OBJECT_SELF,"dog",oDog); AssignCommand(oDog,ActionAttack(oAttacker)); } } else if(nUser == 1003) // END OF COMBAT { } else if(nUser == 1004) // ON DIALOGUE { } else if(nUser == 1005) // ATTACKED { if (GetLocalInt(OBJECT_SELF,"hench")!=2) { oAttacker=GetLastAttacker(); lLoc=GetLocation(oAttacker); SetFacingPoint(GetPosition(oAttacker)); PlayAnimation(ANIMATION_FIREFORGET_TAUNT); PlayVoiceChat(VOICE_CHAT_BATTLECRY3); ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2),lLoc); oDog=CreateObject(OBJECT_TYPE_CREATURE,"jw_newgob_dog",lLoc,TRUE); AddHenchman(OBJECT_SELF,oDog); SetLocalInt(OBJECT_SELF,"hench",2); SetLocalObject(OBJECT_SELF,"dog",oDog); AssignCommand(oDog,ActionAttack(oAttacker)); } } else if(nUser == 1006) // DAMAGED { } else if(nUser == 1007) // DEATH { oDog=GetLocalObject(OBJECT_SELF,"dog"); if (GetIsObjectValid(oDog)) { ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2),GetLocation(oDog)); DestroyObject(oDog); } } else if(nUser == 1008) // DISTURBED { } }