29 lines
841 B
Plaintext
29 lines
841 B
Plaintext
|
#include "x2_inc_switches"
|
||
|
void main()
|
||
|
{
|
||
|
int nEvent =GetUserDefinedItemEventNumber();
|
||
|
|
||
|
if (nEvent ==X2_ITEM_EVENT_UNEQUIP) return;
|
||
|
if (nEvent ==X2_ITEM_EVENT_EQUIP) return;
|
||
|
|
||
|
if (GetIsInCombat(GetItemActivator()))
|
||
|
{
|
||
|
SendMessageToPC(GetItemActivator(), "Cannot use this in combat!");
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
if (GetTag(GetItemActivated()) == "stealth_cloak")
|
||
|
{
|
||
|
object oPC = GetItemActivator();
|
||
|
effect eVis = EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY);
|
||
|
effect eVis2 = EffectEthereal();
|
||
|
AssignCommand(oPC, ClearAllActions());
|
||
|
|
||
|
DelayCommand(1.0, AssignCommand(oPC, PlaySound("sim_shwngmind01")));
|
||
|
DelayCommand(1.1, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oPC, 45.0));
|
||
|
DelayCommand(1.2, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis2, oPC, 45.0));
|
||
|
DelayCommand(1.5, PlayVoiceChat(VOICE_CHAT_LAUGH, oPC));
|
||
|
|
||
|
}
|
||
|
}
|