LoD_PRC8/_module/nss/elv_caveingen.nss
Jaysyn904 94990edc60 Initial Upload
Initial Upload
2023-09-21 21:20:34 -04:00

37 lines
1.6 KiB
Plaintext

#include "X0_I0_SPELLS"
const int SHAKE_EVENT = 100;
const int NEAR_CAVEIN_EVENT = 200;
const int FULL_CAVEIN_EVENT = 300;
void main()
{
//SpeakString(GetName(OBJECT_SELF) + ": User Defined Script", TALKVOLUME_SHOUT);
int nEventType = GetUserDefinedEventNumber();
effect eShake = EffectVisualEffect(356);
switch( nEventType )
{
case SHAKE_EVENT:
//SpeakString(GetName(OBJECT_SELF) + " User Shake", TALKVOLUME_SHOUT);
DelayCommand(GetRandomDelay(0.1, 3.0), ApplyEffectToObject(DURATION_TYPE_INSTANT, eShake, OBJECT_SELF));
break;
case NEAR_CAVEIN_EVENT:
//SpeakString(GetName(OBJECT_SELF) + " User Near Cave-In", TALKVOLUME_SHOUT);
DelayCommand(GetRandomDelay(0.1, 2.0), ApplyEffectToObject(DURATION_TYPE_INSTANT, eShake, OBJECT_SELF));
DelayCommand(GetRandomDelay(0.5, 4.0) + 4.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eShake, OBJECT_SELF));
break;
case FULL_CAVEIN_EVENT:
//SpeakString(GetName(OBJECT_SELF) + " User Cave-In", TALKVOLUME_SHOUT);
DelayCommand(GetRandomDelay(0.1, 2.0), ApplyEffectToObject(DURATION_TYPE_INSTANT, eShake, OBJECT_SELF));
DelayCommand(GetRandomDelay(0.5, 2.0) + 4.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eShake, OBJECT_SELF));
DelayCommand(GetRandomDelay(0.5, 3.0) + 8.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eShake, OBJECT_SELF));
DelayCommand(GetRandomDelay(0.5, 3.0) + 8.0f, ExecuteScript("elv_caveicefall", OBJECT_SELF));
break;
}
}