Jaysyn904 7b9e44ebbb 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.
2024-03-11 23:44:08 -04:00

33 lines
981 B
Plaintext

void main()
{
object oPC = GetLastUsedBy();
int nDamageAmount = d6(1);
effect eFallDamage = EffectDamage(nDamageAmount, DAMAGE_TYPE_BLUDGEONING);
if (GetIsPC(oPC)== TRUE)
{
int nDex = GetAbilityScore(oPC, ABILITY_CONSTITUTION);
if(nDex + d20(1) >= 20)
{
object oDrop = GetWaypointByTag("fr_iwd_ogre_caveup");
SendMessageToPC(oPC, "You manage to swim out.");
AssignCommand (oPC,JumpToObject(oDrop));
}
else
{
SendMessageToPC(oPC, "You ran out of air and are forced to return.");
BlackScreen(oPC);
DelayCommand(2.0, FadeFromBlack(oPC, FADE_SPEED_SLOW));
DelayCommand(2.0, PlayVoiceChat(VOICE_CHAT_PAIN3, oPC));
DelayCommand(2.0, PlaySound("as_na_splash1"));
DelayCommand(4.0, AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_MEDITATE, 1.0, 20.0)));
DelayCommand(4.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFallDamage, oPC));
}
}
}