76 lines
2.3 KiB
Plaintext
76 lines
2.3 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Name x2_def_ondeath
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Default OnDeath script
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Keith Warner
|
|
//:: Created On: June 11/03
|
|
//::///////////////////////////////////Dark Reaver / Horodrim
|
|
#include "x0_i0_petrify"
|
|
#include "loot"
|
|
#include "rank"
|
|
|
|
void main()
|
|
{
|
|
object oPC = GetLastKiller();
|
|
object oMod = GetModule();
|
|
SetLocalInt(oMod, "sw_dr", 0);
|
|
SetLocalInt(oMod, "ch_dr", 0);
|
|
SetLocalInt(oMod, "gr_xx", 0);
|
|
object oTarget= OBJECT_SELF;
|
|
int iKilled = GetLocalInt(oPC, "iKilled");
|
|
|
|
|
|
int oExploit = GetLocalInt(oMod, "xcheck");
|
|
if (oExploit!=1)
|
|
{
|
|
|
|
if (GetLocalInt(oMod, "hwar_on")==1)
|
|
{
|
|
DelayCommand(3.0, HolyScore(OBJECT_SELF));
|
|
}
|
|
iKilled=iKilled+1;
|
|
SetLocalInt(oPC, "iKilled", iKilled);
|
|
LastHit();
|
|
DeathStats(oPC);
|
|
SetLocalInt(oPC, "doppledead", 1);
|
|
if (GetLocalInt(oMod, "nordock")!=1)
|
|
{
|
|
GetRank(oPC);
|
|
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.5, AssignCommand(oPC, ActionPlayAnimation
|
|
(ANIMATION_FIREFORGET_VICTORY2)));
|
|
FloatingTextStringOnCreature("Victory", oPC);
|
|
|
|
if (GetLocalInt(oMod, "hwar_on")!=1)
|
|
{
|
|
TombSpawn(OBJECT_SELF, oPC);
|
|
CreateGold(OBJECT_SELF, 4500);
|
|
}
|
|
}
|
|
}
|
|
int sw1 = GetLocalInt(oMod, "sw_hw");
|
|
int sw2 = GetLocalInt(oMod, "sw_dr");
|
|
int sw3 = GetLocalInt(oMod, "sw_bl");
|
|
int sw4 = GetLocalInt(oMod, "sw_pf");
|
|
int sw5 = GetLocalInt(oMod, "sw_df");
|
|
int sw6 = GetLocalInt(oMod, "sw_pm");
|
|
int sw7 = GetLocalInt(oMod, "sw_bm");
|
|
int sw8 = GetLocalInt(oMod, "sw_lm");
|
|
int sw9 = GetLocalInt(oMod, "sw_ll");
|
|
if ((sw1==0)&&(sw2==0)&&(sw3==0)&&(sw4==0)&&(sw5==0)&&(sw6==0)
|
|
&&(sw7==0)&&(sw8==0)&&(sw9==0)&&(GetLocalInt(oMod, "hwar_on")!=1))
|
|
{
|
|
SetLocked(GetObjectByTag("arena_gate"), FALSE);
|
|
}
|
|
int nInt;
|
|
nInt = GetObjectType(oTarget);
|
|
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), oTarget);
|
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), GetLocation(oTarget));
|
|
|
|
}
|