Pick-Proof Door Locks

Post » Fri Dec 25, 2009 3:37 am

I'm trying to script a series of doors that will only allow the PC entry if the PC has the proper key(s). Problem is, the door(s) will not save with the scripts I created, which are clones of the script used to keep the PC out of Antonius Nuncius' cabinet in Fort Frostmoth.

Is there a different kind of script I should be using for the doors I'm creating, or is there something else going on that I don't know about?
User avatar
Charles Mckinna
 
Posts: 3511
Joined: Mon Nov 12, 2007 6:51 am

Post » Fri Dec 25, 2009 2:50 am

It would help if you posted the script you're using. This should work though:

Begin DoorscriptIf (OnActivate == 1 )	If ( Player->getitemcount "youritemkey" >= 1 )		activate	Else		Return	EndIfEndIfEnd Doorscript


Just change the name of the script and the name of the item you're using for a key.
User avatar
(G-yen)
 
Posts: 3385
Joined: Thu Oct 11, 2007 11:10 pm

Post » Thu Dec 24, 2009 9:51 pm

Tocatta had this example given in different post, and its awesome. It makes doors only open-able with the correct key, and it is generic for any/all doors. See link here:

http://www.gamesas.com/index.php?/topic/1111129-atomatic-locking-door/page__p__16294274__fromsearch__1&#entry16294274

ST
User avatar
joseluis perez
 
Posts: 3507
Joined: Thu Nov 22, 2007 7:51 am

Post » Thu Dec 24, 2009 8:29 pm

That is cool indeed!
User avatar
Miranda Taylor
 
Posts: 3406
Joined: Sat Feb 24, 2007 3:39 pm

Post » Thu Dec 24, 2009 10:12 pm

TOPIC RECYCLED! *calms down*

Ok, then........It's yet another "Oblivion-like" question, one that's probably already been answered in some form or another, and long-forgotten.

The Temple shrines & Imperial altars in the various areas of the game are capable of bestowing any number or restorative or amplifying effects upon the character when activated. However, the blessings are more of a hindrance for characters who have the birthsign of the Atronach, or are wearing any sort of armor or clothing that has CE Spell Absorption - namely, the blessings are almost always automatically absorbed, forcing the player to accept a blessing more than once.

The question I have for today is: Is it possible to rewrite the shrine & altar scripts so that they completely ignore Spell Absorption?

Example (there are more than a few Temple shrines in the world, so I'm posting only the Imperial Cult Altar version):

Begin shrineImperial;on Furn_imp_altar_cure_01short buttonshort donationshort QuestionStateif ( menumode == 1 )    returnendifif ( OnActivate == 0 )    if ( QuestionState == 0 )        Return    endifendif;set donation amountif ( player->GetPCRank "Imperial Cult" >= 2 )            ;member of rank 2 or above    Set donation to 0elseif ( player->GetPCRank "Imperial Cult" >= 0 )        ;member below rank 2    Set donation to 10else                                                                ;not a member    Set donation to 25endifif ( Player->GetItemCount Gold_001 < donation )    MessageBox "You do not have enough gold to make a donation." "OK"    Returnendifif ( QuestionState == 0 )    MessageBox "Would you like to make a donation of %.0f and receive a blessing?" donation "Yes" "No"    set QuestionState to 10endif;Ask second question if ( QuestionState == 10 )    Set button to GetButtonPressed    if ( button == 0 )        MessageBox "What blessing do you ask for?" "Cure Disease" "Cure Blight" "Cure Poison" "Restore Attributes"        set QuestionState to 20    elseif ( button == 1 )        set QuestionState to 0    endif    Returnendif;perform cure or give messageif ( QuestionState == 20 )        Set button to GetButtonPressed    if ( button == 0 )        if ( Player->GetCommonDisease == 1 )            Cast "Cure Common Disease Other" Player            if ( donation == 25 )                Player->RemoveItem Gold_001 25            elseif ( donation == 10 )                Player->RemoveItem Gold_001 10            endif        else            MessageBox "You are not afflicted with a common disease." "OK"        endif        Set QuestionState to 0    endif        if ( button == 1 )        if ( Player->GetBlightDisease == 1 )            Cast "Cure Blight Disease" Player            if ( donation == 25 )                Player->RemoveItem Gold_001 25            elseif ( donation == 10 )                Player->RemoveItem Gold_001 10            endif        else            MessageBox "You are not afflicted with a blight disease." "OK"        endif        Set QuestionState to 0    endif    if ( button == 2 )        if ( Player->GetEffect sEffectPoison == 1 )                ;check for poison effect on player            Cast "Cure Poison Touch" Player            if ( donation == 25 )                Player->RemoveItem Gold_001 25            elseif ( donation == 10 )                Player->RemoveItem Gold_001 10            endif        else            MessageBox "You are not poisoned." "OK"        endif        Set QuestionState to 0    endif        if ( button == 3 )        Cast "Restore Attributes" Player                            ;restore eight attributes        Cast "Restore Fighter" Player                    ;restore eight fighter skills        Cast "Restore Mage" Player                    ;restore eight mage skills        Cast "Restore Stealth" Player                    ;restore eight stealth skills        Cast "Restore Other" Player                    ;restore three other skills        if ( donation == 25 )            Player->RemoveItem Gold_001 25        elseif ( donation == 10 )            Player->RemoveItem Gold_001 10        endif        Set QuestionState to 0    endifendifend

User avatar
Jonathan Windmon
 
Posts: 3410
Joined: Wed Oct 10, 2007 12:23 pm

Post » Thu Dec 24, 2009 6:10 pm

I think it would be possible. After a donation is made, check to see if the player has the spell absorption ability, and if so, remove it for a few seconds before the restorative spell is cast. It sounds like a great idea, but probably a lot of players with the atronach birthsign find it more beneficial to get refilled Magicka. I have seen a mod where the spell absorption ability can be toggled on and off. That may be something of interest.
User avatar
Cartoon
 
Posts: 3350
Joined: Mon Jun 25, 2007 4:31 pm


Return to III - Morrowind