//:://///////////////////////////////////////////// //:: Name x2_def_ondeath //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* Default OnDeath script */ //::////////////////////////////////////////////// //:: Created By: Keith Warner //:: Created On: June 11/03 //::////////////////////////////////////////////// void main() { ExecuteScript("nw_c2_default7", OBJECT_SELF); ExecuteScript("tab_xp_multi", OBJECT_SELF); string sResref = GetResRef(OBJECT_SELF); object oKiller = GetLastKiller(); // Check if the killer is valid if (!GetIsObjectValid(oKiller)) { oKiller = OBJECT_INVALID; } // If the resref is "holo" and the killer is valid if (sResref == "holo" && GetIsObjectValid(oKiller)) { // Check if the killer is a summon or henchman object oMaster = GetMaster(oKiller); // Get the master of the summon/henchman if (GetIsObjectValid(oMaster)) { // If the master is valid, give them the "holynectar" CreateItemOnObject("holynectar", oMaster, 1); } else { // If the killer isn't a summon/henchman (no master), give it to the killer CreateItemOnObject("holynectar", oKiller, 1); } } } /* void main() { ExecuteScript("nw_c2_default7", OBJECT_SELF); ExecuteScript("tab_xp_multi",OBJECT_SELF); string sResref = GetResRef(OBJECT_SELF); object oKiller = GetLastKiller(); if (sResref == "holo") CreateItemOnObject("holyserum", oKiller, 1); } */