Spoiler
begin dragonstaffscript
short PCSkipEquip
short OnPCEquip
short scrollState
short button
short wasActivated
if ( GetDisabled == 1 )
Return
endif
if ( scrollState == 0 )
;set up PCSkipEquip for first use
Set PCSkipEquip to 1
Set scrollState to 1
endif
if ( OnActivate == 1 )
Set wasActivated to 1
;handle activate method of reading books
endif
if ( wasActivated == 1 )
if ( scrollState == 1 )
Player->AddItem testowalaska 1
Set scrollState to 0
Set wasActivated to 0
Disable
Return
endif
;if ( scrollState == SOMETHING ELSE )
Activate
endif
if ( OnPCEquip == 0 )
Set button to -1
Return
endif
if ( scrollState == 1 )
MessageBox "DRAGONS STAFF" "EQUIP" "DESCRIPTION"
Set scrollState to 2
endif
if ( scrollState == 2 )
set button to GetButtonPressed
if ( button == 0 )
Set scrollState to 3
Set OnPCEquip to 0
Set PCSkipEquip to 0
player->Equip, dragonstaff
;unseal it and set global
elseif ( button == 1 )
Set scrollState to 1
Set PCSkipEquip to 1
Set OnPCEquip to 0
MessageBox "A long long time ago a mysterious red dragon burned in flames blah blah blah" "OK"
endif
Return
endif
if ( scrollState == 3 )
Set scrollState to 1
Set PCSkipEquip to 1
Return
endif
end
short PCSkipEquip
short OnPCEquip
short scrollState
short button
short wasActivated
if ( GetDisabled == 1 )
Return
endif
if ( scrollState == 0 )
;set up PCSkipEquip for first use
Set PCSkipEquip to 1
Set scrollState to 1
endif
if ( OnActivate == 1 )
Set wasActivated to 1
;handle activate method of reading books
endif
if ( wasActivated == 1 )
if ( scrollState == 1 )
Player->AddItem testowalaska 1
Set scrollState to 0
Set wasActivated to 0
Disable
Return
endif
;if ( scrollState == SOMETHING ELSE )
Activate
endif
if ( OnPCEquip == 0 )
Set button to -1
Return
endif
if ( scrollState == 1 )
MessageBox "DRAGONS STAFF" "EQUIP" "DESCRIPTION"
Set scrollState to 2
endif
if ( scrollState == 2 )
set button to GetButtonPressed
if ( button == 0 )
Set scrollState to 3
Set OnPCEquip to 0
Set PCSkipEquip to 0
player->Equip, dragonstaff
;unseal it and set global
elseif ( button == 1 )
Set scrollState to 1
Set PCSkipEquip to 1
Set OnPCEquip to 0
MessageBox "A long long time ago a mysterious red dragon burned in flames blah blah blah" "OK"
endif
Return
endif
if ( scrollState == 3 )
Set scrollState to 1
Set PCSkipEquip to 1
Return
endif
end
The second script is very similar (I also used Treasure Script as a example). I managed to prepare book relevant to Oghma Infinitum. Player will pick up the book and while being in MenuMode 'equpping' the book will show MessageBox with options [READ] [DON'T READ]. Don't read won't do anything. Read option should execute dialogue window after exiting the MenuMode. I stuck
Spoiler
begin Oghmascript
short PCSkipEquip
short OnPCEquip
short scrollState
short button
short wasActivated
if ( GetDisabled == 1 )
Return
endif
if ( scrollState == 0 )
;set up PCSkipEquip for first use
Set PCSkipEquip to 1
Set scrollState to 1
endif
if ( OnActivate == 1 )
Set wasActivated to 1
;handle activate method of reading books
endif
if ( wasActivated == 1 )
if ( scrollState == 1 )
Player->AddItem ohgmabook 1
Set scrollState to 0
Set wasActivated to 0
Disable
Return
endif
;if ( scrollState == SOMETHING ELSE )
Activate
endif
if ( OnPCEquip == 0 )
Set button to -1
Return
endif
if ( scrollState == 1 )
MessageBox "What do you want to do? "Read Oghma Infinitum" "Leave it alone"
Set scrollState to 2
endif
if ( scrollState == 2 )
set button to GetButtonPressed
if ( button == 0 )
; I DONT HAVE ANY IDEA WHAT SHOULD BE IN THIS PLACE TO EXECUTE DIALOGUE BOX AFTER LEAVING MENU
elseif ( button == 1 )
Set scrollState to 1
Set PCSkipEquip to 1
Set OnPCEquip to 0
endif
Return
endif
; REST OF CODE INCOMPLETED BECOUSE I GOT MAD
end
short PCSkipEquip
short OnPCEquip
short scrollState
short button
short wasActivated
if ( GetDisabled == 1 )
Return
endif
if ( scrollState == 0 )
;set up PCSkipEquip for first use
Set PCSkipEquip to 1
Set scrollState to 1
endif
if ( OnActivate == 1 )
Set wasActivated to 1
;handle activate method of reading books
endif
if ( wasActivated == 1 )
if ( scrollState == 1 )
Player->AddItem ohgmabook 1
Set scrollState to 0
Set wasActivated to 0
Disable
Return
endif
;if ( scrollState == SOMETHING ELSE )
Activate
endif
if ( OnPCEquip == 0 )
Set button to -1
Return
endif
if ( scrollState == 1 )
MessageBox "What do you want to do? "Read Oghma Infinitum" "Leave it alone"
Set scrollState to 2
endif
if ( scrollState == 2 )
set button to GetButtonPressed
if ( button == 0 )
; I DONT HAVE ANY IDEA WHAT SHOULD BE IN THIS PLACE TO EXECUTE DIALOGUE BOX AFTER LEAVING MENU
elseif ( button == 1 )
Set scrollState to 1
Set PCSkipEquip to 1
Set OnPCEquip to 0
endif
Return
endif
; REST OF CODE INCOMPLETED BECOUSE I GOT MAD
end