39 lines
956 B
Plaintext
39 lines
956 B
Plaintext
|
void main()
|
||
|
{
|
||
|
object oPC = GetEnteringObject();
|
||
|
object oInv = GetObjectByTag("by_iwd_fallmsg");
|
||
|
|
||
|
if (GetIsPC(oPC)== TRUE)
|
||
|
{
|
||
|
int nDex = GetAbilityModifier(ABILITY_DEXTERITY, oPC);
|
||
|
|
||
|
if(nDex + d20(1) >= 30)
|
||
|
{
|
||
|
SendMessageToPC(oPC, "You manage to avoid the opening trap door!");
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
object oDrop = GetWaypointByTag("fr_iwd_ogre_cave");
|
||
|
|
||
|
string sName = GetName(oPC);
|
||
|
int nSex = GetGender(oPC);
|
||
|
|
||
|
string sSex;
|
||
|
|
||
|
if(nSex == 1)
|
||
|
{
|
||
|
string sSex = "her";
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
string sSex = "his";
|
||
|
}
|
||
|
|
||
|
string sFall = "[The ground under " + sName + "'s feet opens suddenly!]";
|
||
|
AssignCommand(oInv, SpeakString(sFall, TALKVOLUME_TALK));
|
||
|
SendMessageToPC(oPC, "The floor suddenly moves bellow you and you fall into a pit.");
|
||
|
AssignCommand (oPC,JumpToObject(oDrop));
|
||
|
}
|
||
|
}
|
||
|
}
|