Scripts

TR_m3_q_6_poetry_activate

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