Shargast_PRC8/_module/Chapter 1/nss/mm_onact_item.nss
Jaysyn904 66a0a3e043 Initial commit
Initial commit.
2024-08-03 14:13:18 -04:00

47 lines
1.4 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Example XP2 OnActivate Script Script
//:: x2_mod_def_act
//:: (c) 2003 Bioware Corp.
//:://////////////////////////////////////////////
/*
Put into: OnItemActivate Event
*/
#include "nw_i0_plot"
#include "x2_inc_switches"
#include "se_inc_pc_loc"
void main()
{{
//IsRecall is defined in nw_i0_plot
IsRecall();
}
//CNR addon
ExecuteScript("cnr_module_onact",OBJECT_SELF);
//End CNR addon
//Shayans Subrace addon
object oItem = GetItemActivated();
ExecuteScript("sha_on_itemactiv", GetModule());
//End Shayans Subrace addon
// * Generic Item Script Execution Code
// * If MODULE_SWITCH_EXECUTE_TAGBASED_SCRIPTS is set to TRUE on the module,
// * it will execute a script that has the same name as the item's tag
// * inside this script you can manage scripts for all events by checking against
// * GetUserDefinedItemEventNumber(). See x2_it_example.nss
if (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE)
{
SetUserDefinedItemEventNumber(X2_ITEM_EVENT_ACTIVATE);
int nRet = ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oItem),OBJECT_SELF);
if (nRet == X2_EXECUTE_SCRIPT_END)
//Sir Elrics Persistent Player Location addon
SE_SaveLocation(GetItemActivator());
{
return;
//End Sir Elrics Persistent Player Location addon
}
}
}