#include "no_lib_priority" void main() { //clean up variables on dying creature int iCnt; //don't proceed if we're alive again if ( GetIsDead( OBJECT_SELF ) || GetLocalInt( OBJECT_SELF, "TEMPDIE" ) ) { //clear teleporter status variable DeleteLocalInt( OBJECT_SELF, "TELEPORTER" ); //clear balor death throes variable DeleteLocalInt( OBJECT_SELF, "BALORDEATH" ); //clear dragon flight variables DeleteLocalInt( OBJECT_SELF, "FLIER" ); DeleteLocalInt( OBJECT_SELF, "DRAGONFLIGHTDEL" ); //dragon fear variable DeleteLocalInt( OBJECT_SELF, "#DRAGFEAR" ); //clear caster flag DeleteLocalInt( OBJECT_SELF, "#CASTER" ); //clear avoid melee trackers DeleteLocalLocation( OBJECT_SELF, "#LASTHOTSPOT" ); DeleteLocalFloat( OBJECT_SELF, "#LASTAMANGLE" ); DeleteLocalInt( OBJECT_SELF, "#LASTHSRETRIES" ); DeleteLocalInt( OBJECT_SELF, "#LASTDEST" ); DeleteLocalLocation( OBJECT_SELF, "#LASTDEST" ); //clear dragon breath weapon delay flag DeleteLocalInt( OBJECT_SELF, "#BDEL" ); //clear BC_HEAL anti-spam flag DeleteLocalInt( OBJECT_SELF, "#HEALDEL" ); //delete combat setting DeleteLocalInt( OBJECT_SELF, "#INCOMBAT" ); //delete last combat round end broadcast timestamp DeleteLocalInt( OBJECT_SELF, "#LASTCREBC" ); //clear tail of summon chain variable DeleteLocalObject( OBJECT_SELF, "MASTCHAIN" ); //clear vision flags DeleteLocalInt( OBJECT_SELF, "#DARKNESS" ); DeleteLocalInt( OBJECT_SELF, "#VANISHED" ); DeleteLocalObject( OBJECT_SELF, "#VISION" ); //clear last rest marker DeleteLocalInt( OBJECT_SELF, "#LASTREST" ); //clear fast buffer markers DeleteLocalInt( OBJECT_SELF, "#FASTBUFFER" ); DeleteLocalInt( OBJECT_SELF, "#FASTBUFFED" ); //delete activity marker DeleteLocalInt( OBJECT_SELF, "#ACTIVE" ); DeleteLocalInt( OBJECT_SELF, "#QUEUESHUTDOWN" ); //delete logged spawn point DeleteLocalInt( OBJECT_SELF, "#RETSPNLOC" ); DeleteLocalLocation( OBJECT_SELF, "#SPAWNLOC" ); //delete stand ground variables DeleteLocalInt( OBJECT_SELF, "#STANDGROUND" ); DeleteLocalLocation( OBJECT_SELF, "#SGLOC" ); //delete corpse decay delay variable DeleteLocalFloat( OBJECT_SELF, "#DECAYDELAY" ); //clear spell list and fastbuff list //these shouldn't be necessary, but just in case there is an interruption iCnt = 1; while ( GetLocalInt( OBJECT_SELF, "#SPL_" + IntToString( iCnt ) ) ) { DeleteLocalInt( OBJECT_SELF, "#SPL_" + IntToString( iCnt++ ) ); } iCnt = 1; while ( GetLocalInt( OBJECT_SELF, "#SPL_FB" + IntToString( iCnt ) ) ) { DeleteLocalInt( OBJECT_SELF, "#SPL_FB" + IntToString( iCnt++ ) ); } iCnt = 1; while ( GetLocalInt( OBJECT_SELF, "#SPN_FB" + IntToString( iCnt ) ) ) { DeleteLocalInt( OBJECT_SELF, "#SPN_FB" + IntToString( iCnt++ ) ); } iCnt = 1; while ( GetLocalInt( OBJECT_SELF, "#FEAT_" + IntToString( iCnt ) ) ) { DeleteLocalInt( OBJECT_SELF, "#FEAT_" + IntToString( iCnt++ ) ); } //clear priority lists DeleteLocalInt( OBJECT_SELF, "PRITOTAL" ); iCnt = 1; while ( GetLocalInt( OBJECT_SELF, "PRIC_" + IntToString( iCnt ) ) ) { DeleteLocalString( OBJECT_SELF, "PRID_" + IntToString( iCnt ) ); DeleteLocalInt( OBJECT_SELF, "PRIC_" + IntToString( iCnt++ ) ); } } }