Scripts

TR_m3_TT_IduraScrollScript

TR_Mainland.esm
Variables 3
Local Variables
OnPCEquip
PCSkipEquip
actionFlag
Source
1begin TR_m3_TT_IduraScrollScript 2 3;global TR_m3_TT_IduraUnseal 4short OnPCEquip 5short PCSkipEquip 6short actionFlag 7 8set PCSkipEquip to 0 9 10if ( actionFlag == 1 ) 11 if ( TR_m3_TT_IduraUnseal == 0 ) 12 set TR_m3_TT_IduraUnseal to 1 13 if ( GetJournalIndex TR_m3_TT_Lloris2 == 20 ) 14 Journal TR_m3_TT_Lloris2 25 15 MessageBox "You carefully break the seal and read the letter." 16 endif 17 endif 18 set actionFlag to 0 19endif 20 21; Activating from the inventory 22if ( MenuMode ) 23 24 ; vanilla engine fails to set PCSkipEquip under certain conditions 25 set PCSkipEquip to 1 26 27 if ( OnPCEquip ) 28 29 set actionFlag to 1 30 31 set OnPCEquip to 0 32 set PCSkipEquip to 0 ; OpenMW fails to open the book without this line 33 Activate 34 endif 35 36 ; never let OnActivate section happen in MenuMode 37 return 38endif 39 40; Activating in the world 41if ( OnActivate ) 42 43 set actionFlag to 1 44 45 Activate 46endif 47 48End