Page 1 of 1

Scritping the Vvardenfell bank to close yet be lock-pickable

PostPosted: Thu Aug 27, 2009 3:15 pm
by Tes96
So I have the INDY bank mod v2.4 and the bank closes at night and opens in the morning, which is great. But when I click on the door at night, it just says that the bank is closed and it gives me the hours. I can't pick it or anything. I want to be able to have it lock at night and unlock in the morning, kinda like how in Living Cities of Vvardenfell. I want to be able to pick it so I can break in at night.

Here is the script

begin BankDoor

if ( OnActivate == 1 )
       if ( GameHour >= 8 )
               if ( GameHour < 18 )
                       Activate
                       return
               endif
       endif
       if ( Bank_Nighttime < 0 )
               Activate
               return
       endif
       MessageBox "Bank is closed. Working hours 8am -- 6pm"
       PlaySound3D "LockedDoor"
endif

end



What would I have to change in it to make it have a lock level on the door instead of a message box?

Re: Scritping the Vvardenfell bank to close yet be lock-pick

PostPosted: Thu Aug 27, 2009 9:44 pm
by Fliggerty
Try this:

Code: Select all
begin BankDoor

short doonce

      if ( GameHour >= 8 )
              if ( GameHour < 18 )
                   set doonce to 0
                   if ( GetLocked == 1 )
                        Unlock
                   endif
              else
                   if ( doonce == 0 )
                        Lock 100
                        set doonce to 1
                   endif
              endif
      else
              if ( doonce == 0 )
                   Lock 100
                   set doonce to 1
              endif
      endif

if ( GetLocked == 1 )
    if ( OnActivate == 1 )
         MessageBox "Bank is closed. Working hours 8am -- 6pm"
         PlaySound3D "LockedDoor"
    endif
endif

end