Scripts

TR_m3_NPC_IdrenieOdalyn_sc

TR_Mainland.esm
Variables 6
Local Variables
TR_Map
control
controlQ
T_Local_NPC
NoLore
endDay
Source
1Begin TR_m3_NPC_IdrenieOdalyn_sc 2; Combo of base script and logic to set journal if TR_m2_Ak_CantKill started and Idrenie dies 3 4short TR_Map 5short control 6short controlQ 7short T_Local_NPC 8short NoLore 9short endDay 10 11if ( onDeath ) 12 set TR_m3_Sa_IdrenieDead to 1 13 ; update journal if killed during quest 14 if ( GetJournalIndex "TR_m2_Ak_CantKill" > 0 ) 15 if ( GetJournalIndex "TR_m2_Ak_CantKill" < 100 ) 16 Journal "TR_m2_Ak_CantKill" 40 17 endif 18 endif 19 ; set treram to forcegreet/attack if you leave through the door 20 set TR_m3_Sa_TreramAlert to 1 21endif 22 23if ( TR_m3_Sa_IdrenieDead > 0 ) 24 return 25endif 26 27; if she's in hiding, update her days gone 28if ( GetDisabled == 1 ) 29 ; unhide her if time has passed and... 30 if ( daysPassed >= endDay ) 31 ; Hrothdor is gone... 32 if ( "TR_m2_Hrothdor"->GetDisabled == 1 ) 33 Set TR_m2_Ak_HrothdorMad to 2 34 ; OR Hrothdor is dead 35 elseif ( TR_m2_Ak_HrothdorDead > 0 ) 36 Set TR_m2_Ak_HrothdorMad to 2 37 endif 38 endif 39endif 40 41if ( CellChanged == 1 ) 42 ; disable her on cell change if you warn her about the writ 43 if ( TR_m2_Ak_HrothdorMad < 2 ) 44 if ( GetJournalIndex "TR_m2_Ak_CantKill" == 110 ) 45 if ( GetDisabled == 0 ) 46 Disable 47 endif 48 endif 49 ; enable her when TR_m2_Ak_HrothdorMad == 2 50 ; a week has passed and hrothdor is gone/dead 51 elseif ( GetDisabled == 1 ) 52 Enable 53 endif 54endif 55 56;set day she plans to return from hiding the first frame it's needed 57if ( endDay == 0 ) 58 if ( GetJournalIndex "TR_m2_Ak_CantKill" == 110 ) 59 set endDay to ( daysPassed + 7 ) 60 endif 61endif 62 63if ( TR_Map ) 64 return 65endif 66 67set TR_Map to 3 68 69End