generated from Jaysyn/ModuleTemplate
32 lines
715 B
Plaintext
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);
|
|
}
|
|
}
|