Scripts

TR_m1_q_GilenNote_sc

TR_Mainland.esm
Variables 2
Local Variables
OnPCEquip
PCSkipEquip
Source
1Begin TR_m1_q_GilenNote_sc 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 10 11if ( MenuMode ) 12 13 ; the vanilla engine fails to set PCSkipEquip under certain 14 ; conditions, so we must do it ourselves for 15 ; OnPCEquip to work properly 16 17 set PCSkipEquip to 1 18 if ( OnPCEquip ) 19 20 ; place actions for when the player opened the book from the inventory here 21 if ( GetJournalIndex "TR_m1_TT_7" >= 10 ) 22 if ( GetJournalIndex "TR_m1_TT_7" < 40 ) 23 Journal TR_m1_TT_7 40 24 endif 25 endif 26 27 set OnPCEquip to 0 28 set PCSkipEquip to 0 ; OpenMW fails to open the book without this line 29 Activate 30 endif 31 32 ; this return is important 33 ; we must make sure OnActivate secton is only accessed outside of MenuMode 34 ; or the vanilla engine fails to take the book if opened from the world 35 return 36endif 37 38; Activating in the world 39if ( OnActivate ) 40 41 ; place actions for when the player opened the book from the world here 42 if ( GetJournalIndex "TR_m1_TT_7" >= 10 ) 43 if ( GetJournalIndex "TR_m1_TT_7" < 40 ) 44 Journal TR_m1_TT_7 40 45 endif 46 endif 47 48 Activate 49endif 50 51End