Scripts

TR_m3_q_5_journal_script

TR_Mainland.esm
Variables 4
Local Variables
OnPCEquip
PCSkipEquip
doOnce
actionFlag
Source
1begin TR_m3_q_5_journal_script 2 3short OnPCEquip 4short PCSkipEquip 5short doOnce 6short actionFlag 7 8set PCSkipEquip to 0 9 10if ( actionFlag == 1 ) 11 if ( doOnce == 0 ) 12 if ( GetJournalIndex "TR_m3_Go_Guard1" >= 10 ) 13 Journal "TR_m3_Go_Guard2" 10 14 addtopic "foreign hawker" 15 set doOnce to 1 16 elseif ( GetJournalIndex "TR_m3_Go_Guard1" < 10 ) 17 set "TR_m3_q_5_Journal_Read" to 1 18 set doOnce to 1 19 endif 20 endif 21 set actionFlag to 0 22endif 23 24; Activating from the inventory 25if ( MenuMode ) 26 27 ; vanilla engine fails to set PCSkipEquip under certain conditions 28 set PCSkipEquip to 1 29 30 if ( OnPCEquip ) 31 32 set actionFlag to 1 33 34 set OnPCEquip to 0 35 set PCSkipEquip to 0 ; OpenMW fails to open the book without this line 36 Activate 37 endif 38 39 ; never let OnActivate section happen in MenuMode 40 return 41endif 42 43; Activating in the world 44if ( OnActivate ) 45 46 set actionFlag to 1 47 48 Activate 49endif 50 51end