102 lines
2.4 KiB
Plaintext
102 lines
2.4 KiB
Plaintext
|
//::///////////////////////////////////////////////
|
||
|
//:: Name x2_def_userdef
|
||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||
|
//:://////////////////////////////////////////////
|
||
|
/*
|
||
|
Default On User Defined Event script
|
||
|
*/
|
||
|
//:://////////////////////////////////////////////
|
||
|
//:: Created By: Keith Warner
|
||
|
//:: Created On: June 11/03
|
||
|
//:://////////////////////////////////////////////
|
||
|
#include "NW_I0_GENERIC"
|
||
|
const int EVENT_USER_DEFINED_PRESPAWN = 1510;
|
||
|
const int EVENT_USER_DEFINED_POSTSPAWN = 1511;
|
||
|
void main()
|
||
|
{
|
||
|
int nUser = GetUserDefinedEventNumber();
|
||
|
|
||
|
if(nUser == EVENT_HEARTBEAT ) //HEARTBEAT
|
||
|
{
|
||
|
|
||
|
}
|
||
|
else if(nUser == EVENT_PERCEIVE) // PERCEIVE
|
||
|
{
|
||
|
|
||
|
}
|
||
|
else if(nUser == EVENT_END_COMBAT_ROUND) // END OF COMBAT
|
||
|
{
|
||
|
/*
|
||
|
if (d3()!=1)
|
||
|
{
|
||
|
return;
|
||
|
}
|
||
|
PlaySound("as_an_sludggurg2");
|
||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_UNSUMMON),OBJECT_SELF);
|
||
|
|
||
|
if (GetAppearanceType(OBJECT_SELF)!=469)
|
||
|
{
|
||
|
//SpeakString("doing chest");
|
||
|
SetCreatureAppearanceType(OBJECT_SELF,469);
|
||
|
return;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
int nAppearance=469;
|
||
|
int nRandom=d3();
|
||
|
switch (nRandom)
|
||
|
{
|
||
|
case 1: nAppearance=431; // chair
|
||
|
//SpeakString("doing chair");
|
||
|
break;
|
||
|
case 2: nAppearance=201; // combat dummy
|
||
|
//SpeakString("doing chest");
|
||
|
break;
|
||
|
case 3: nAppearance=220; // beggar
|
||
|
//SpeakString("doing chest");
|
||
|
break;
|
||
|
|
||
|
}
|
||
|
SetCreatureAppearanceType(OBJECT_SELF,nAppearance);
|
||
|
}
|
||
|
|
||
|
*/
|
||
|
}
|
||
|
else if(nUser == EVENT_DIALOGUE) // ON DIALOGUE
|
||
|
{
|
||
|
|
||
|
}
|
||
|
else if(nUser == EVENT_ATTACKED) // ATTACKED
|
||
|
{
|
||
|
|
||
|
}
|
||
|
else if(nUser == EVENT_DAMAGED) // DAMAGED
|
||
|
{
|
||
|
|
||
|
}
|
||
|
else if(nUser == 1007) // DEATH - do not use for critical code, does not fire reliably all the time
|
||
|
{
|
||
|
PlaySound("as_an_sludggurg2");
|
||
|
//ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(122),OBJECT_SELF); // cloud
|
||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(234),OBJECT_SELF); // imp destruction
|
||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(263),OBJECT_SELF);
|
||
|
DelayCommand(0.3,ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(134),OBJECT_SELF));
|
||
|
}
|
||
|
else if(nUser == EVENT_DISTURBED) // DISTURBED
|
||
|
{
|
||
|
|
||
|
}
|
||
|
else if (nUser == EVENT_USER_DEFINED_PRESPAWN)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
else if (nUser == EVENT_USER_DEFINED_POSTSPAWN)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
|