Scripts

TR_m4_Bal_Cr_KutagMal_Sc

TR_Mainland.esm
Variables 3
Local Variables
controlQ
OnPCHitMe
timer
Source
1begin TR_m4_Bal_Cr_KutagMal_Sc 2 3; Baluath Questline 4; Script running on High Priest Kutag-Mal. 5 6short controlQ 7float timer 8short OnPCHitMe 9 10if ( OnDeath ) 11 if ( controlQ == 1 ) 12 ; some extra death handling 13 ; wait -> resurrect -> forcegreet -> die 14 "TR_m4_Bal_LairStatue"->Cast "flamebolt" "TR_m4_Bal_KutagMalResurrect" 15 set controlQ to 2 16 endif 17endif 18 19if ( MenuMode ) 20 return 21endif 22 23if ( GetJournalIndex "TR_m4_Bal2_Lair" < 10 ) 24 25 ; disable before the relevant quest 26 if ( GetDisabled ) 27 return 28 else 29 disable 30 endif 31 32elseif ( GetJournalIndex "TR_m4_Bal2_Lair" < 50 ) 33 34 ; enable during the quest 35 if ( GetDisabled ) 36 enable 37 endif 38 39 if ( controlQ == 0 ) 40 if ( PCVampire == 1 ) 41 42 ; forcegreet for initial interaction 43 set controlQ to 1 44 ForceGreeting 45 46 endif 47 elseif ( controlQ == 2 ) 48 if ( PCVampire == 1 ) 49 50 ; forcegreet and begin Molag Bal's speech if defeated 51 set timer to ( timer + GetSecondsPassed ) 52 if ( timer > 0.5 ) 53 Resurrect 54 SetFight 0 55 StopCombat 56 set OnPCHitMe to 0 57 set controlQ to 2 58 PositionCell 332 5662 956 0 "Ald Balaal, Shrine" ; TR_m4_MARK_Bal_KutagMal 59 AIWander 0 0 0 60 set timer to 0 61 ForceGreeting 62 endif 63 64 endif 65 endif 66 67elseif ( GetJournalIndex "TR_m4_Bal2_Lair" >= 80 ) 68 69 ; disable after Ald Balaal is conquered 70 if ( GetDisabled ) 71 return 72 else 73 disable 74 endif 75 76endif 77 78end