Level One rework
Revamped Level One: North & Level One: Central to be as close to PnP as possible. Added Level One: Latrene 3 area. Added efreeti appearance from CEP3. Revamped efreeti bottle to be like PnP (no wishes, yet)
This commit is contained in:
36
_module/nss/latrene_rope.nss
Normal file
36
_module/nss/latrene_rope.nss
Normal file
@@ -0,0 +1,36 @@
|
||||
// Custom script for the OnUsed event of a placable
|
||||
// Simulates climbing a rope up 20 feet
|
||||
#include "prc_misc_const"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastUsedBy();
|
||||
int nClimbSkill = GetSkillRank(SKILL_CLIMB, oPC);
|
||||
int nClimbDC = 5;
|
||||
|
||||
location locDestination1 = GetLocation(GetWaypointByTag("WP_LATRENE_EXIT"));
|
||||
location locDestination2 = GetLocation(GetWaypointByTag("WP_LATRENE3"));
|
||||
|
||||
// Roll a d20 for the Climb check
|
||||
int nRoll = d20();
|
||||
|
||||
// Add the Climb skill rank to the roll
|
||||
nRoll += nClimbSkill;
|
||||
|
||||
// Check if the roll meets or exceeds the DC
|
||||
if (nRoll >= nClimbDC)
|
||||
{
|
||||
// Successful climb, move the player to the destination
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
AssignCommand(oPC, ActionJumpToLocation(locDestination1));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Failed climb, apply 2d6 bludgeoning damage and move the player back to WP_LATRENE3
|
||||
int nDamage = d6(2); // Roll 2d6 for damage
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage, DAMAGE_TYPE_BLUDGEONING), oPC);
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
AssignCommand(oPC, ActionJumpToLocation(locDestination2));
|
||||
AssignCommand(oPC, SpeakString("Ow!"));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user