Files
HeroesStone_PRC8/_removed/corpse_spellhook.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

32 lines
715 B
Plaintext

#include "x2_inc_switches"
#include "corpse_lib"
void main()
{
string script = GetUserSpellHookScript();
int stop = X2_EXECUTE_SCRIPT_CONTINUE;
DeleteLocalInt(OBJECT_SELF,CorpseSpellHookReturnValue);
if(GetTag(GetArea(OBJECT_SELF)) == CorpseCryptTag)
{
stop = X2_EXECUTE_SCRIPT_END;
}
SetLocalInt(OBJECT_SELF,CorpseSpellHookReturnValue,stop);
if(script != "")
{
int retval = ExecuteScriptAndReturnInt(script,OBJECT_SELF);
if(stop == X2_EXECUTE_SCRIPT_END || retval == X2_EXECUTE_SCRIPT_END)
{
SetExecutedScriptReturnValue(X2_EXECUTE_SCRIPT_END);
}
}
else
{
SetExecutedScriptReturnValue(stop);
}
}