Scripts

TR_m7_q_GnaeusLetter_sc

TR_Mainland.esm
Variables 2
Local Variables
OnPCEquip
PCSkipEquip
Source
1Begin TR_m7_q_GnaeusLetter_sc 2 3; Script on letter TR_m7_q_GnaeusLetter for Hlan Oek misc quest 4; TR_m7_HO_MissingFriend. 5 6short OnPCEquip 7short PCSkipEquip 8 9set PCSkipEquip to 0 10; any actions that might end the script must be placed lower than this line 11 12; Activating from the inventory 13 14if ( MenuMode ) 15 16 ; the vanilla engine fails to set PCSkipEquip under certain 17 ; conditions, so we must do it ourselves for 18 ; OnPCEquip to work properly 19 20 set PCSkipEquip to 1 21 if ( OnPCEquip ) 22 23 ; place actions for when the player opened the book from the inventory here 24 if ( GetJournalIndex "TR_m7_HO_MissingFriend" < 10 ) 25 if ( GetDeadCount "TR_m3_Nodgar" == 0 ) 26 Journal TR_m7_HO_MissingFriend 90 27 addTopic "Gnaeus Barossa" 28 addTopic "Nodgar" 29 endif 30 endif 31 32 set OnPCEquip to 0 33 set PCSkipEquip to 0 ; OpenMW fails to open the book without this line 34 Activate 35 endif 36 37 ; this return is important 38 ; we must make sure OnActivate secton is only accessed outside of MenuMode 39 ; or the vanilla engine fails to take the book if opened from the world 40 return 41endif 42 43; Activating in the world 44if ( OnActivate ) 45 46 ; place actions for when the player opened the book from the world here 47 if ( GetJournalIndex "TR_m7_HO_MissingFriend" < 10 ) 48 if ( GetDeadCount "TR_m3_Nodgar" == 0 ) 49 Journal TR_m7_HO_MissingFriend 90 50 addTopic "Gnaeus Barossa" 51 addTopic "Nodgar" 52 endif 53 endif 54 55 Activate 56endif 57 58End