//////////////////////////////////////////////////////////////////////////////// // // // // 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 #include "_kb_loot_corpse" void main() { //This line has been added to support Scrotok's Lootable Corpses script LeaveCorpse(); //FOF: Sparks a RETREAT_CHECK among allies upon death via //a shout. if (GetLocalInt(OBJECT_SELF,"FIGHT_OR_FLIGHT") == 1 && GetLocalInt(OBJECT_SELF,"RETREATED") == 0) { //The int is to help make sure dead creatures lying on //the ground are not counted toward f_OurCR. SetLocalInt(OBJECT_SELF,"FOF_DEAD",1); SpeakString("RETREAT_CHECK",TALKVOLUME_SILENT_TALK); } if(GetSpawnInCondition(NW_FLAG_DEATH_EVENT)) { SignalEvent(OBJECT_SELF, EventUserDefined(1007)); //FOF: Sparks a RETREAT_CHECK among allies upon death via //a shout. if (GetLocalInt(OBJECT_SELF,"FIGHT_OR_FLIGHT") == 1 && GetLocalInt(OBJECT_SELF,"RETREATED") == 0) { //The int is to help make sure dead creatures lying on //the ground are not counted toward f_OurCR. SetLocalInt(OBJECT_SELF,"FOF_DEAD",1); SpeakString("RETREAT_CHECK",TALKVOLUME_SILENT_TALK); } if(GetSpawnInCondition(NW_FLAG_DEATH_EVENT)) { SignalEvent(OBJECT_SELF, EventUserDefined(1007)); } }}