80 lines
3.0 KiB
Plaintext
80 lines
3.0 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Default:On Death
|
|
//:: NW_C2_DEFAULT7
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Shouts to allies that they have been killed
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Preston Watamaniuk
|
|
//:: Created On: Oct 25, 2001
|
|
//:://////////////////////////////////////////////
|
|
#include "NW_I0_GENERIC"
|
|
#include "nw_i0_tool"
|
|
#include "NW_O2_CONINCLUDE"
|
|
void main()
|
|
{
|
|
object oKiller = GetLastKiller();
|
|
object oAlter = GetObjectByTag("kreger_coffin");
|
|
object oItem = OBJECT_INVALID;
|
|
|
|
GenerateLowTreasure(oKiller, oAlter);
|
|
GenerateMediumTreasure(oKiller, oAlter);
|
|
{int nRandom = d8(1);
|
|
int nTreasureType = 1;
|
|
if (nRandom == 1){
|
|
CreateItemOnObject("NW_AARCL006", oAlter, 1);
|
|
CreateItemOnObject("NW_WSWLS001", oAlter, 1);
|
|
CreateItemOnObject("NW_IT_GOLD001", oAlter, 120);}
|
|
else if (nRandom == 2){
|
|
CreateItemOnObject("NW_AARCL006", oAlter, 1);
|
|
CreateItemOnObject("NW_WSWLS001", oAlter, 1);
|
|
CreateItemOnObject("NW_IT_GOLD001", oAlter, 113);}
|
|
else if (nRandom == 3){
|
|
CreateItemOnObject("NW_AARCL006", oAlter, 1);
|
|
CreateItemOnObject("NW_WSWLS001", oAlter, 1);
|
|
CreateItemOnObject("NW_IT_GOLD001", oAlter, 140);}
|
|
else if (nRandom == 4){
|
|
CreateItemOnObject("NW_AARCL006", oAlter, 1);
|
|
CreateItemOnObject("NW_WSWLS001", oAlter, 1);
|
|
CreateItemOnObject("NW_IT_GOLD001", oAlter, 178);}
|
|
else if (nRandom == 5){
|
|
CreateItemOnObject("NW_AARCL006", oAlter, 1);
|
|
CreateItemOnObject("NW_WSWLS001", oAlter, 1);
|
|
CreateItemOnObject("NW_IT_GOLD001", oAlter, 162);}
|
|
else if (nRandom == 6){
|
|
CreateItemOnObject("NW_AARCL006", oAlter, 1);
|
|
CreateItemOnObject("NW_WSWLS001", oAlter, 1);
|
|
CreateItemOnObject("NW_IT_GOLD001", oAlter, 154);}
|
|
else if (nRandom == 7){
|
|
CreateItemOnObject("maarcl053", oAlter, 1);
|
|
CreateItemOnObject("NW_WSWMLS002", oAlter, 1);
|
|
CreateItemOnObject("NW_IT_GOLD001", oAlter, 137);}
|
|
else if (nRandom == 8){
|
|
CreateItemOnObject("maarcl053", oAlter, 1);
|
|
CreateItemOnObject("NW_WSWMLS002", oAlter, 1);
|
|
CreateItemOnObject("NW_IT_GOLD001", oAlter, 139);}}
|
|
|
|
int nClass = GetLevelByClass(CLASS_TYPE_COMMONER);
|
|
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
|
|
if(nClass > 0 && (nAlign == ALIGNMENT_GOOD || nAlign == ALIGNMENT_NEUTRAL))
|
|
{
|
|
object oKiller = GetLastKiller();
|
|
AdjustAlignment(oKiller, ALIGNMENT_EVIL, 5);
|
|
}
|
|
|
|
SpeakString("NW_I_AM_DEAD", TALKVOLUME_SILENT_TALK);
|
|
//Shout Attack my target, only works with the On Spawn In setup
|
|
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
|
|
if(GetSpawnInCondition(NW_FLAG_DEATH_EVENT))
|
|
{
|
|
SignalEvent(OBJECT_SELF, EventUserDefined(1007));
|
|
}
|
|
string sText;
|
|
sText = "I shall rise again. The throne will be mine...";
|
|
ActionSpeakString (sText, TALKVOLUME_TALK);
|
|
//ExecuteScript("sha_xpsystem", OBJECT_SELF); //:: Replaced by PWFXP
|
|
DelayCommand(0.0f, ExecuteScript("pwfxp", OBJECT_SELF));
|
|
}
|