Initial upload
Initial upload
This commit is contained in:
34
_module/nss/doorbash.nss
Normal file
34
_module/nss/doorbash.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Default On Heartbeat
|
||||
//:: NW_C2_DEFAULTE
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
This will cause blocked creatures to open
|
||||
or smash down doors depending on int and
|
||||
str.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Nov 23, 2001
|
||||
//:: Modified By: Dalantriel Jul 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
object oDoor = GetBlockingDoor();
|
||||
|
||||
if(GetAbilityScore(OBJECT_SELF, ABILITY_INTELLIGENCE) >= 3)
|
||||
{
|
||||
// Modified INT requirement to 20 to ensure no Horde creature can open doors
|
||||
if(GetIsDoorActionPossible(oDoor, DOOR_ACTION_OPEN) && GetAbilityScore(OBJECT_SELF, ABILITY_INTELLIGENCE) >= 20 )
|
||||
{
|
||||
DoDoorAction(oDoor, DOOR_ACTION_OPEN);
|
||||
}
|
||||
else if(GetIsDoorActionPossible(oDoor, DOOR_ACTION_BASH))
|
||||
{
|
||||
ActionEquipMostDamagingMelee();
|
||||
DoDoorAction(oDoor, DOOR_ACTION_BASH);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user