Some people have been asking a books so I thought I would share a script for people to play with smile.gif use it as you want ...(if you want smile.gif )

CODE
Begin AA_Book_ Test

short ActivateFlag
short EquipFlag
short SkipFlag
short state
short OnPCDrop
short OnPCEquip
short PCSkipEquip

If ( menuMode == 1 ); This makes the Script Return until Close
    if ( EquipFlag == 1 )
;     THIS IS ONLY to Write the MESSAGE as by the time you have 'equipped the book
;     i.e. READ the menu is open    
        MessageBox "You Opened up the Book [OnPCEquip]"; as menu is open now when reading
        set EquipFlag to 2
    endif
    Return
endif

if ( State == 0 )
    Set pcSkipEquip to 1
    If ( ActivateFlag == 0 ); Never Activated
        if ( OnActivate == 1 )
            MessageBox "You Picked up the Book[OnActivate] "; Menu is not open yet
;
;      HERE YOU CAN SUBSTUTE THINGS YOU WANT DONE  WHEN THE BOOK IS READ FOR THE 1ST TIME
;      TELEPORTING - CURSING - ETC
;
            Set ActivateFlag to 1
            set State to 2
            Activate; READ
            Return; Catch MenuMode
        endif
    endif
    if ( OnPCEquip == 1 ); This is for 2nd time around when 'equipped' from inventory
        Set EquipFlag to 1
        set State to 2
;
;     HERE YOU CAN PUT STUFF WHEN THE BOOK IS READ FROM INVENTORY - IT'S EQUIPPED NOW NOT ACTIVATED
;
        Activate; READ
        Return; Catch MenuMode
    endif
endif

If ( State == 2 ); reset for next time around get here when menu closes (close book)
    if ( ActivateFlag == 1 )
;
;     HERE YOU CAN PUT STUFF YOU WANT WHEN BOOK IS CLOSED FOR THE 1ST TIME
;     TELEPORT - CURSE ETC
;
        Set ActivateFlag to 2
        MessageBox "You closed the Book [OnActivate]"
        Set OnPCEquip to 0
        Set PCSkipEquip to 0
    elseif ( EquipFlag == 2 )
;
;      HERE YOU CAN PUT STUFF IF THE BOOK IS CLOSED AFTER READING FROM INVENTORY
;
        Set EquipFlag to 0
        MessageBox "You closed the Book [OnPCEquip]"
        Set OnPCEquip to 0
        Set PCSkipEquip to 0
    endif
    set State to 0; Reset
endif


if ( OnPCDrop == 1 )
;
; HERE YOU CAN PUT STUFF TO HAPPEN IF THE BOOK IS DROPPED
;
    MessageBox "You Dropped the Book [OnPCDrop]"
    set OnPCDrop to 0; have to reset Manually
    Set ActivateFlag to 0
endif

End

Thanks. Free scripts are always a good resource for the modding community.

Thanks exclusiveor77 fing34.gif Maybe I'll be able to get this to work now!
QUOTE(Miles_Acraeus @ Nov 25 2007, 04:07 PM) *
Thanks. Free scripts are always a good resource for the modding community.


I think this is a great community

QUOTE(Sandman101 @ Nov 26 2007, 01:47 AM) *
Thanks exclusiveor77 fing34.gif Maybe I'll be able to get this to work now!


well you are in the 'some people' category so its free to use smile.gif .... obviously I for got to mention delete unnecesaary stuff like the drop etc smile.gif and its easier to read without the commments basically I tested at lot with books and when you 1st pick up a book its activated - when its in your invetory after take it uses PCEquip - so I included both ... so you can just dlete the bits you don't need smile.gif
Submit a Thread