DMH-Online

Dungeon Masters Helper · Est. 2005

Misc Scripts

NWN Script: climbing.htm

Author Sticky: Post Working Scripts Here
Nuke Posted: Monday, 24 June 03:32AM
Has anybody done a climbing script yet? Well here's one anyway heh. Its best launched from a conversation file with a placeable object, presumable a pile of rocks or something like that. The script works flawlessly for me every time.

NWScript:
void main() 
{
    object oPlayer = GetPCSpeaker();
    int nStrMod = GetAbilityModifier (ABILITY_STRENGTH, oPlayer);
    effect eDamage = EffectDamage (d3(1), DAMAGE_TYPE_BLUDGEONING);
    int nRoll = d20();

    if ( (nRoll + nStrMod) >= 17)
    {
        object oWaypoint = GetWaypointByTag ("ClimbPoint");
        AssignCommand (oPlayer, ActionJumpToObject (oWaypoint));
        ActionSpeakString ("You've managed to climb out of the pit", TALKVOLUME_TALK);
    }
    else
    if ( (nRoll + nStrMod) <= 16 && (nRoll + nStrMod) >= 12)
    {
        ActionSpeakString ("You've failed to climb the rock face", TALKVOLUME_TALK);
    }
    else
    {
        ApplyEffectToObject (DURATION_TYPE_INSTANT, eDamage, oPlayer);
        ActionSpeakString ("You've fallen and suffered injuries", TALKVOLUME_TALK);
    }
 }
⌂ All Scripts ← PreviousNext → 👁 Category List

All Misc Scripts

📄 arena 📄 cast_bless_on_PC 📄 change_music 📄 chess_game 📄 climbing 📄 climbing_002 📄 common_includes_002 📄 cone_aoe 📄 cron 📄 cross_country_travel 📄 daoc_style_graves 📄 determine_time 📄 effects 📄 escort 📄 ez_respawn 📄 faction 📄 floating_text 📄 function_includes 📄 gambling 📄 include_sounds 📄 include_time_date 📄 jail 📄 jail_system 📄 journal_entry 📄 logbook 📄 manage_action_queue 📄 mmorpg_vault 📄 mod_intro 📄 mod_intro_002 📄 mod_intro_003 📄 mod_intro_005 📄 pers_world_database 📄 pers_world_database_002 📄 piller_of_fire 📄 plot_item 📄 portal_system 📄 portal_system_002 📄 puking 📄 quest_escort 📄 rep_per 📄 reward_rp 📄 rotation 📄 save_pc_location_002 📄 save_pc_location_003 📄 skill_checks 📄 skill_checks_002 📄 slot_machine 📄 story 📄 swimming 📄 take20_bypass 📄 vis_waypoint 📄 working_temple 📄 working_temple_002 📄 xp_gold_loss 📄 xp_gold_loss_002 📄 xp_loss_action