85 lines
2.4 KiB
Plaintext
85 lines
2.4 KiB
Plaintext
void main()
|
|
{
|
|
object oPC = GetEnteringObject();
|
|
int nHuldaBreachFail = GetLocalInt(oPC,"nHuldaBreachFail");
|
|
|
|
if (nHuldaBreachFail = 1) return;
|
|
|
|
AssignCommand(oPC,ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW, 1.0f, 0.75f));
|
|
|
|
FloatingTextStringOnCreature("To pass through this crevice will require will and fortitude", oPC);
|
|
|
|
int iWillDC = 16;
|
|
int iPCWillSave;
|
|
string sWillSaveResult;
|
|
|
|
iPCWillSave = WillSave(oPC, iWillDC);
|
|
|
|
switch(iPCWillSave)
|
|
{
|
|
case 0:
|
|
{
|
|
sWillSaveResult = "FAILURE";
|
|
break;
|
|
}
|
|
case 1:
|
|
{
|
|
sWillSaveResult = "SUCCESS";
|
|
break;
|
|
}
|
|
case 2:
|
|
{
|
|
sWillSaveResult = "IMMUNE";
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (sWillSaveResult == "FAILURE")
|
|
{
|
|
DelayCommand(1.0,PlaySound("as_na_rockcavsm2"));
|
|
DelayCommand(3.0,PlayVoiceChat(VOICE_CHAT_CUSS,oPC));
|
|
DelayCommand(6.0,FloatingTextStringOnCreature("You lack the will to persevere", oPC));
|
|
SetLocalInt(oPC,"nHuldaBreachFail",1);
|
|
}
|
|
|
|
int iFortitudeDC = 16;
|
|
int iPCFortitudeSave;
|
|
string sFortitudeSaveResult;
|
|
|
|
iPCFortitudeSave = FortitudeSave(oPC, iFortitudeDC);
|
|
|
|
switch(iPCFortitudeSave)
|
|
{
|
|
case 0:
|
|
{
|
|
sFortitudeSaveResult = "FAILURE";
|
|
break;
|
|
}
|
|
case 1:
|
|
{
|
|
sFortitudeSaveResult = "SUCCESS";
|
|
break;
|
|
}
|
|
case 2:
|
|
{
|
|
sFortitudeSaveResult = "IMMUNE";
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (sFortitudeSaveResult == "FAILURE")
|
|
{
|
|
DelayCommand(1.0,PlaySound("as_na_rockcavsm2"));
|
|
DelayCommand(3.0,PlayVoiceChat(VOICE_CHAT_CUSS,oPC));
|
|
DelayCommand(6.0,FloatingTextStringOnCreature("You lack the fortitude to persevere", oPC));
|
|
SetLocalInt(oPC,"nHuldaBreachFail",1);
|
|
}
|
|
|
|
if ((sFortitudeSaveResult == "SUCCESS") && (GetLocalInt(oPC,"nHuldaBreachFail")!=1))
|
|
{
|
|
DelayCommand(1.0,PlaySound("as_na_rockcavsm2"));
|
|
AssignCommand(oPC, ActionJumpToObject(GetObjectByTag("WP_HuldaEBreach")));
|
|
}
|
|
|
|
}
|