Amon_PRC8/_module/nss/di_clifffall.nss

17 lines
624 B
Plaintext
Raw Permalink Normal View History

2025-04-03 19:00:46 -04:00
void main()
{
// ______________________________________________________________
// Wandered too close to the edge of the cliff means you fall.
object oPC = GetEnteringObject();
if(GetIsPC(oPC))
{
int iHeight = StringToInt(GetStringRight(GetTag(GetArea(oPC)), 1));
int falldmg = d8(iHeight * 10);
SetLocalString(oPC, "di_fallstring", "You have fallen from the edge of the cliff!");
SetLocalInt(oPC, "di_falldmg", falldmg);
object oTarget = GetObjectByTag("ihavefallen");// eventually this needs softcoded
AssignCommand(oPC, JumpToObject(oTarget));
}
}