Scripts

TR_m7_HO_q_Coda_Note_sc

TR_Mainland.esm
Variables 4
Local Variables
OnPCEquip
PCSkipEquip
control
controlQ
Source
1Begin TR_m7_HO_q_Coda_Note_sc 2 3short OnPCEquip 4short PCSkipEquip 5short control 6short controlQ 7 8set PCSkipEquip to 0 9 10if ( TR_m7_HO_q_Coda_Skooma->OnActivate ) 11 TR_m7_HO_q_Coda_Skooma->Activate 12 if ( GetDetected player ) 13 "TR_m7_Maldus Faren"->startcombat player 14 endif 15 if ( controlQ == 1 ) 16 if ( getJournalIndex, "TR_m7_HO_HighAndDry" >= 10 ) 17 if ( getJournalIndex, "TR_m7_HO_HighAndDry" < 20 ) 18 Journal "TR_m7_HO_HighAndDry" 20 19 endif 20 endif 21 else 22 set control to 1 23 endif 24endif 25 26if ( MenuMode ) 27 28 ; the vanilla engine fails to set PCSkipEquip under certain 29 ; conditions, so we must do it ourselves for 30 ; OnPCEquip to work properly 31 32 set PCSkipEquip to 1 33 if ( OnPCEquip ) 34 35 ; place actions for when the player opened the book from the inventory here 36 if ( getJournalIndex, "TR_m7_HO_HighAndDry" >= 10 ) 37 if ( getJournalIndex, "TR_m7_HO_HighAndDry" < 20 ) 38 if ( control == 1 ) 39 Journal "TR_m7_HO_HighAndDry" 20 40 endif 41 endif 42 endif 43 44 set controlQ to 1 45 set OnPCEquip to 0 46 set PCSkipEquip to 0 ; OpenMW fails to open the book without this line 47 Activate 48 endif 49 50 ; this return is important 51 ; we must make sure OnActivate secton is only accessed outside of MenuMode 52 ; or the vanilla engine fails to take the book if opened from the world 53 return 54endif 55 56; Activating in the world 57if ( OnActivate ) 58 59 ; place actions for when the player opened the book from the world here 60 if ( getJournalIndex, "TR_m7_HO_HighAndDry" >= 10 ) 61 if ( getJournalIndex, "TR_m7_HO_HighAndDry" < 20 ) 62 if ( control == 1 ) 63 Journal "TR_m7_HO_HighAndDry" 20 64 endif 65 endif 66 endif 67 68 set controlQ to 1 69 Activate 70endif 71end