//////////////////////////////////////////////////////////////////////////////// // // // // Lootable Corpses: OnDeath script // VERSION 3.3 // // // // // Modified by Scrotok on 9 Feb 03 //////////////////////////// // Thanks to Keron Blackfeld for 99% of the work! // // email Questions and Comments to: jnbplatte@intellisys.net // // // //////////////////////////////////////////////////////////////////////////////// // // // CAUTION: You MUST re-save/compile (F7 key) "nw_c2_default7" whenever // // "_kb_loot_corpse" is modified! // // // // NEWBIES: You don't need to place this script anywhere -- it's already // // taken care of for you (this script IS the default OnDeath script for all // // creatures). // // // // This script works in conjunction with the "_kb_loot_corpse" script. // // Place this script in the OnDeath event for any creature you want to be // // lootable after death. // // // // This script is only slightly modified from the Bioware default. Two // // lines of code have been added - they are noted below. // // // //////////////////////////////////////////////////////////////////////////////// //:://///////////////////////////////////////////// //:: 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" // The following line has been added to support Scrotok's Lootable Corpses script void main() { object oPC = GetLastKiller(); while (GetIsObjectValid(GetMaster(oPC))) { oPC=GetMaster(oPC); } if (!GetIsPC(oPC)) return; int nInt; nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRYfeyri"); if (nInt < 1) return; AddJournalQuestEntry("feyri", 2, oPC, TRUE, FALSE, FALSE); object oTarget; oTarget = OBJECT_SELF; //Visual effects can't be applied to waypoints, so if it is a WP //the VFX will be applied to the WP's location instead nInt = GetObjectType(oTarget); if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oTarget); else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), GetLocation(oTarget)); }