DMH-Online

Dungeon Masters Helper · Est. 2005

Areas Scripts

NWN Script: restrict_access.htm

Script Name: Level Restricted Area

Purpose: Restrict access to areas by PC level

Placement: Place in OnAreaTransitionClick on Doors

Note: You can change the level restriction by setting the 2 vaules (5 & 10) to anything you like within range 1-20.

The Script:


[.nwscript]
// Script Name: Level Restricted Area
// Purpose: Restrict access to areas by PC level
// Placement: Place in OnAreaTransitionClick on Doors
// Author: Qobra, with help from Adam_wasserman & Janus-SOK
// Created: 22 July 2002
// NOTE: You can change the level restriction by setting the 2 vaules (5 & 10)
// to anything you like within range 1-20.


void main() {

object oClicker = GetClickingObject();
object oTarget = GetTransitionTarget( OBJECT_SELF );
location lLoc = GetLocation( oTarget );
if ((GetHitDice(oClicker) >= 5) && (GetHitDice(oClicker) <= 10)) {
AssignCommand( oClicker, JumpToLocation( lLoc ) );
} else {
SpeakString( "You do not meet level requirements to access this area " + "." );
}
}
[./nwscript]

_________________
/Qobra
Grid World Project
www.qnull.com/gwn/

⌂ All Scripts ← PreviousNext → 👁 Category List

All Areas Scripts

📄 ambient_npc_ani 📄 area_spawner 📄 change_lighting 📄 clean_trash_001 📄 clean_trash_002 📄 clean_trash_003 📄 despawn_mobs 📄 despawn_mobs_002 📄 disable_sound 📄 full_edge_transition_001 📄 full_edge_transition_002 📄 full_edge_transition_003 📄 full_edge_transition_004 📄 full_edge_transition_004a 📄 get_pcs 📄 guard_patrols 📄 keyed_transitions 📄 random_enc_001 📄 random_enc_002 📄 random_enc_003 📄 random_enc_004 📄 random_enc_006 📄 random_enc_009 📄 random_encounter_005 📄 random_interiors 📄 random_interiors_001a 📄 restrict_access 📄 sitting_area