Jump to content

Setting the journal through a book


Recommended Posts

When the player reads a certain book or note I want to set the journal so that the quest can progress. The only way I have been able to do this is with the OnPCAdd Function but I want the journal to be set only when the player reads the note.

what functions should I use in my script to set the journal upon reading?

Thank you in advance.

Link to comment
Share on other sites

Here is an instance of my usual book/note script. It works if the book is activated while still in the world, or if it is equipped from the player's inventory. You may not require the journal index check before updating the player's journal. It can be removed leaving just the journal update. It can be used to do things other than updating the journal: add an item, display a message, give the player a disease - the possibilities are endless.

Begin lgnpc_fq_JobashaBookScript2
 
; Attached to unique book "lgnpc_fq_TLNote2"
; Updates journal when player reads note.
 
short readNote
short PCSkipEquip
short OnPCEquip
 
if ( readNote == 1 )
     return
endif
 
if ( menumode == 0 )
     return
endif
 
set PCSkipEquip to 0
 
if ( OnActivate == 1 ) ; if note is in world
     if ( GetJournalIndex "lgnpc_fq_Jobasha2" == 10 )
          Journal "lgnpc_fq_Jobasha2" 20
          set readNote to 1
     endif
     Activate
     return
endif
 
set PCSkipEquip to 1
 
if ( OnPCEquip == 1 ) ; if note is equipped from inventory
     if ( GetJournalIndex "lgnpc_fq_Jobasha2" == 10 )
          Journal "lgnpc_fq_Jobasha2" 20
          set readNote to 1
     endif
     set OnPCEquip to 0
     set PCSkipEquip to 0
     Activate
endif
 
End lgnpc_fq_JobashaBookScript2
Link to comment
Share on other sites

Finally got it to work, I had to make some adjustements to "lgnpc_fq_JobashaBookScript2" to make it work

 

Here is my script:

 

-----------------------------------------------------------------------------------------------------------------------------------------------------

 

Begin ABE_Lettertomertenscript

short readNote
short PCSkipEquip
short OnPCEquip

if ( readNote == 1 )
return
endif

set PCSkipEquip to 0

if ( OnActivate == 1 ) ; if note is in world
Journal "ABE_ACM" 80
set readNote to 1
Activate
endif

set PCSkipEquip to 1

if ( OnPCEquip == 1 ) ; if note is equipped from inventory
Journal "ABE_ACM" 80
set readNote to 1
set OnPCEquip to 0
set PCSkipEquip to 0
Activate
endif

End

 

-----------------------------------------------------------------------------------------------------------------------------------------------------

I had to get rid the of the menumode section in order to pick up the note on the first try.

I also removed the GetJournalIndex requirement so that the journal will always be set when the Player reads the note.

 

Thank you for your help!

Edited by Eluwil
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...