Aschbourne_PRC8/_module/nss/leadercrystal.nss

29 lines
901 B
Plaintext
Raw Permalink Normal View History

2024-06-14 10:48:20 -04:00
//ffbj
#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) == "leadercrystal")//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))));
}
}
}