Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
36
_module/nss/ty_fall2pit.nss
Normal file
36
_module/nss/ty_fall2pit.nss
Normal file
@@ -0,0 +1,36 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetEnteringObject();
|
||||
int iDamage = GetMaxHitPoints(oPC);
|
||||
int nDamageAmount = FloatToInt(0.75 * iDamage);
|
||||
effect eFallDamage = EffectDamage(nDamageAmount, DAMAGE_TYPE_BLUDGEONING);
|
||||
int iLuck = d6(1);
|
||||
effect ePierceSpikes = EffectVisualEffect(VFX_IMP_SPIKE_TRAP);
|
||||
effect ePierceDeath = EffectDeath();
|
||||
string sDeath = "Another soul tumbles down into the pit and is suddenly and fatally impaled upon an upward thrust spike.";
|
||||
string sNonDeath = "Another soul tumbles down into the pit and suddenly hits the ground with a painful, crunching thud.";
|
||||
object oLefthand = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC);
|
||||
object oRighthand = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
|
||||
|
||||
if (GetIsDM(oPC) == FALSE)
|
||||
{
|
||||
AssignCommand(oPC, ActionUnequipItem(oLefthand));
|
||||
AssignCommand(oPC, ActionUnequipItem(oRighthand));
|
||||
BlackScreen(oPC);
|
||||
DelayCommand(4.0, FadeFromBlack(oPC, FADE_SPEED_SLOW));
|
||||
|
||||
if (iLuck == 1)
|
||||
{
|
||||
DelayCommand(4.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, ePierceSpikes , GetLocation(GetEnteringObject())));
|
||||
DelayCommand(4.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePierceDeath , GetEnteringObject()));
|
||||
DelayCommand(15.0, FloatingTextStringOnCreature(sDeath, oPC, FALSE));
|
||||
}
|
||||
else
|
||||
{
|
||||
DelayCommand(2.0, PlayVoiceChat(VOICE_CHAT_DEATH, oPC));
|
||||
DelayCommand(4.0, AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_DEAD_FRONT, 1.0, 20.0)));
|
||||
DelayCommand(4.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFallDamage, oPC));
|
||||
DelayCommand(15.0, FloatingTextStringOnCreature(sNonDeath, oPC, FALSE));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user