/////////////////::////////////////////////////////////////////////// //:: Default On Damaged //:: NW_C2_DEFAULT6 //:: Copyright (c) 2001 Bioware Corp. //:://////////////////////////////////////////////// /* If already fighting then ignore, else determine combat round */ //:://////////////////////////////////////////////// //:: Created By: Preston Watamaniuk //:: Created On: Oct 16, 2001 //:://///////////////////////////////////////////////// #include "NW_I0_GENERIC" // do the voice void DoVoice(); // About to die void DieCall(object oMob = OBJECT_SELF); void main() { object oTarget = GetLastDamager(); SetTarget(oTarget); SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK); if (GetStealthMode(OBJECT_SELF)==STEALTH_MODE_ACTIVATED) { ActionUseSkill(SKILL_HIDE,OBJECT_SELF); } if (GetDetectMode(OBJECT_SELF)) { ActionUseSkill(SKILL_SPOT,OBJECT_SELF); } int nCheckHeal=CheckHeal(); if (nCheckHeal==FALSE) { DieCall(); } if (GetObjectType(oTarget)==OBJECT_TYPE_AREA_OF_EFFECT) { oTarget=GetAreaOfEffectCreator(oTarget); } int nHP=GetMaxHitPoints(); int nDamage=GetTotalDamageDealt(); if ((d2()==1)&&(Random(nHP) (GetMaxHitPoints(oMob)/4)) { // not near dead return; } PlayVoiceChat(VOICE_CHAT_NEARDEATH); SetLocalInt(OBJECT_SELF,"diecall",1); return; }