//This is the default header for most items converted to the new //tagbased system. //Remember to create 2 scripts, one using the template, and name this //script ac_"tagnameofitemgoeshere" (without the "") #include "x2_inc_switches" void main() { // Check if we have the correct event firing the script if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return; //Define Variables object oItem=GetItemActivated(); object oActivator=GetItemActivator(); object oPlayer = GetItemActivator(); object target = GetItemActivatedTarget(); string tag = GetTag(oItem); //You main script function goes under this line. { 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); 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(); } } }