Server Totals
Wilderness - (3)
Mikona - (2)
Elysia - (1)
Visimontium - (1)
Ferrell - (0)
M'Chek - (0)
Le'Or - (0)
Underdark - (0)
Deglos - (0)
Total players: 7

Links Menu

Dealing with bashed in doors...

Moderators: Nighthawk4, Dungeon Masters

Dealing with bashed in doors...

PostAuthor: Maska » Sun Nov 09, 2003 2:17 am

Anyone have a script or funky ideas that would fix bashed doors in a PW?

I was thinking of maybe having some kind of OnDeath event for my doors that when they get killed a carpenter NPC is spawned that walks to the door and fixes (respawns) it ... but am very script n00b so not sure how to proceed....

Whiney Peasant
Posts: 13
Joined: Wed Oct 01, 2003 4:50 pm

Breaking doors

PostAuthor: DM_Tim » Mon Nov 17, 2003 10:18 pm

Actually, I looked into this awhile back. Sadly, damaged and destroyed doors can not be reparied. The work-around I came up with was to create custom doors with hundreds of hit points and to modify thier onDamaged event so that the door keeps track of how many points of damage they've taken. When it exceeds what the doors hit points should be, it unlocks and opens.

I haven't done it myself, but you could simulate "fixing" a door, by setting an action on a delay that would close the door, lock it and set a new damage threshold on the door for unlock/open.

Though eventually the door will be destroyed, just nothing you can do about it, there's no effect that repairs damage to nonliving objects.

Not the best solution, but one that sort-of works.


- DM_Tim
Dead men don't spam.

Posts: 8
Joined: Mon Nov 17, 2003 1:20 am

PostAuthor: Papainhell » Thu Jan 08, 2004 11:38 pm

II have a few examples for ya :)

I build for a nother PW and we use this script on on most of our doors:

-Door is set to plot.
-Door is locked, note the DC of the lock.
-This script goes in the OnPhysicalAttacked Event:
Code: Select all
int DoorBash(object oPC)
object oBasher=GetLastAttacker();
int nLockDC=GetLockUnlockDC(OBJECT_SELF);
int nSTRMod=GetAbilityScore(oBasher,ABILITY_STRENGTH);
int nRoll=d10()+1;
int nSuccess=0;
if (GetIsPC(oBasher))
SendMessageToPC(oBasher,IntToString(nRoll)+" (roll) + "+IntToString(nSTRMod)+" (STR mod) versus DC "+IntToString(nLockDC));
if (nLockDC<=(nRoll+nSTRMod))
return nSuccess;
void main()
int nSuccessAttempts=0;
object oAttacker=GetLastAttacker();
if (!GetWeaponRanged(GetLastWeaponUsed(oAttacker)))
        case 0:
        case 1:
          SendMessageToPC(oAttacker,"You fail to bash the door in.");
          SendMessageToPC(oAttacker,"You manage to bash the door open.");
          SetLocked(OBJECT_SELF, FALSE);
    SendMessageToPC(oAttacker,"You cannot bash a door with a missle weapon, silly!");


To close the door and relock it:

This goes in the OnOpen event of the door:
Code: Select all
void main()
    DelayCommand(10.0, ActionCloseDoor(OBJECT_SELF));
    DelayCommand(10.5, ActionDoCommand(SetLocked(OBJECT_SELF, TRUE)));

Now, this requires that you do the following:
- Door is set to plot
- Door is set to locked. (( The DC of the lock is the DC of the STR check for the door bash)) Upon a failed doorbash, the attacker will be knocked to his knees,ass.

What ever you set the door lock DC as will be the door bash DC. The door bash DC is overcome by a STR check with this as the check:
STR check for door bash- a d10 plus your str modifier, so if you had a str of 12 and you were trying to bash a door that had a lock DC of 20 you would need to attack the door and a door bash check would be made. This doorbash check would equal a roll od 1d10 plus your STR modifier ((12= plus 1)) IF you rolled an 8 on your roll plus your STR modifier of plus 1 you would be knocked to your ass for 5 seconds.

If you need further explanation, let me know via PM and I'll help ya out :)
Playing as:
Master Odel Helmsplitter
Odel Helmsplitter- Hammer Fist Stylist, monk of The Order of The Dragon.
User avatar
Posts: 2141
Joined: Wed Oct 01, 2003 1:09 am
Location: Kodiak, Alaska (for now)
Timezone: Time?

PostAuthor: sinn » Fri Jan 09, 2004 6:38 am

well has anybody here even hung a real door? of the hardest thing todo... you can build wall..easy..a floor..easy.. but hanging a door... a really big one.....thats where the work is, making it fit in the frames.. making sure it dont rub... and dont even go into closers*sighs*
you can run all your life, but not go anywhere.
User avatar
Elder Sage
Posts: 4135
Joined: Thu Nov 13, 2003 4:58 pm
Location: CA, USA (GMT - 8 hours)

PostAuthor: ashzz » Fri Jan 09, 2004 8:09 am

reminds me of the time a buddy of mine and me fixed a door that someone broke at a party, had to fix it before his dad came home and found out we had a party so he didnt get in DOOR

what a pain in the ASS to get it to fit!
Disobedience is the true foundation of liberty. The obedient must be slaves.

Posts: 1033
Joined: Wed Mar 26, 2003 7:49 am
Location: Canadian stuck in Germany

Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Google [Bot]