57 lines
2.1 KiB
Plaintext
57 lines
2.1 KiB
Plaintext
|
#include "x2_inc_switches"
|
||
|
void main()
|
||
|
{
|
||
|
// Check if we have the correct event firing the script
|
||
|
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||
|
|
||
|
object oItem=GetItemActivated();
|
||
|
object oActivator=GetItemActivator();
|
||
|
object oPlayer = GetItemActivator();
|
||
|
object target = GetItemActivatedTarget();
|
||
|
string tag = GetTag(oItem);
|
||
|
|
||
|
SetLocalString(GetModule(), "NWNX!RESETPLUGIN!SHUTDOWN", "1");
|
||
|
|
||
|
|
||
|
/* DISABLED
|
||
|
if(GetIsDM(oActivator) != TRUE)
|
||
|
{
|
||
|
object oTest = GetFirstPC();
|
||
|
string sTestName = GetPCPlayerName(oActivator);
|
||
|
int nFound = FALSE;
|
||
|
while (GetIsObjectValid(oTest) && (! nFound))
|
||
|
{
|
||
|
if (GetPCPlayerName(oTest) == sTestName)
|
||
|
if(GetIsDM(oTest))
|
||
|
nFound = TRUE;
|
||
|
else
|
||
|
{
|
||
|
DestroyObject(oItem);
|
||
|
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
oTest=GetNextPC();
|
||
|
}
|
||
|
string dmname = GetPCPlayerName(oActivator);
|
||
|
SendMessageToAllDMs("Armageddon Staff Activated by " + dmname);
|
||
|
WriteTimestampedLogEntry("Armageddon Staff Activated by " + dmname);
|
||
|
//Not needed any more..
|
||
|
//SetLocalInt(GetModule(), "loadtimer", 2597) ;
|
||
|
string time = IntToString(GetLocalInt(GetModule(), "loadtimer"));
|
||
|
WriteTimestampedLogEntry("Timekeeper = " + time);
|
||
|
object oWarn = GetFirstPC();
|
||
|
while ((oWarn != OBJECT_INVALID))
|
||
|
{
|
||
|
location lVis = GetLocation(oWarn);
|
||
|
SendMessageToPC(oWarn, "Emergency Reload Sequence Activated");
|
||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_DISPEL_DISJUNCTION), lVis, 5.0);
|
||
|
oWarn = GetNextPC();
|
||
|
}
|
||
|
|
||
|
//Reload the module..
|
||
|
DelayCommand(10.0, StartNewModule(GetName(GetModule())));
|
||
|
*/
|
||
|
|
||
|
}
|