Scripts

TR_m4_IL_Bookscript

TR_Mainland.esm
Variables 2
Local Variables
OnPCEquip
PCSkipEquip
Source
1begin TR_m4_IL_Bookscript 2 3short OnPCEquip 4short PCSkipEquip 5 6set PCSkipEquip to 0 7; any actions that might end the script must be placed lower than this line 8 9; Activating from the inventory 10if ( MenuMode ) 11 set PCSkipEquip to 1 12 13 if ( OnPCEquip ) 14 15 ; place actions for when the player opened the book from the inventory here 16 if ( GetJournalIndex TR_m4_IL_Agentb < 5 ) 17 Journal TR_m4_IL_Agentb 5 18 addtopic "Raynil's Ledger" 19 endif 20 set OnPCEquip to 0 21 set PCSkipEquip to 0 22 Activate 23 endif 24 25 return 26endif 27 28; Activating in the world 29if ( OnActivate ) 30 31 ; place actions for when the player opened the book from the world here 32 if ( GetJournalIndex TR_m4_IL_Agentb < 5 ) 33 Journal TR_m4_IL_Agentb 5 34 addtopic "Raynil's Ledger" 35 endif 36 Activate 37endif 38 39end