//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() { int nEvent =GetUserDefinedItemEventNumber(); if (!nEvent == X2_ITEM_EVENT_ACTIVATE) return; { object oPC = GetItemActivator(); object oItem = GetItemActivated(); if (GetTag(oItem) == "plpotion")//not needed but for clarification. { effect eFly; effect eFlyWind; eFly = EffectDisappear(); eFlyWind = EffectVisualEffect(VFX_IMP_PULSE_WIND); DelayCommand(1.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, eFly, oPC)); DelayCommand(1.2, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFlyWind, GetLocation(oPC))); DelayCommand(2.0, FadeToBlack(oPC, FADE_SPEED_FASTEST)); DelayCommand(3.0, FadeFromBlack(oPC, FADE_SPEED_FASTEST)); DelayCommand(3.5, AssignCommand(oPC, JumpToObject(GetFactionLeader(oPC)))); } } }