Scripts

TR_m7_HO_TT_npc_UlsHeranoScp

TR_Mainland.esm
Variables 13
Local Variables
NoLore
T_Local_NoLore
T_Local_NPC
control
controlQ
controlQ1
controlV
TR_Map
doonce
done
attackstate
OnPCHitMe
timer
Source
1begin TR_m7_HO_TT_npc_UlsHeranoScp 2 3short NoLore 4short T_Local_NoLore 5short T_Local_NPC 6short control 7short controlQ 8short controlQ1 9short controlV 10short TR_Map 11short doonce 12short done 13float timer 14short attackstate 15short OnPCHitMe 16 17if ( OnPCHitMe == 1 ) 18 set attackstate to 1 19 set OnPCHitMe to 0 20endif 21 22if (attackstate == 1) 23 set timer to ( timer + GetSecondsPassed) 24 if ( timer >= 1 ) 25 set timer to 0 26 "TR_m7_q_Fala Onmar"->StartCombat Player 27 "TR_m7_q_Anden Suth"->StartCombat Player 28 set attackstate to 0 29 set ControlV to 1 30 endif 31endif 32 33if ( OnDeath == 1 ) 34 set control to 1 35endif 36 37if ( TR_Map == 0 ) 38 set TR_Map to 7 39endif 40 41; this needs to be here so he dies instead of moaning endlessly. no, I don't understand why. 42if ( done == 0 ) 43 if ( GetHealth < 1 ) 44 SetParalysis 0 45 SetFatigue 0 46 set done to 1 47 return 48 endif 49 setfatigue -20 50 if ( GetParalysis == 0 ) 51 SetParalysis 0 52 elseif ( Random100 > 66 ) 53 SetParalysis 0 54 endif 55endif 56 57 58if ( MenuMode == 1 ) 59 return 60endif 61 62if ( "TR_m7_q_Anden Suth"->GetDistance player <= 256 ) 63 if ( ControlV == 0 ) ; don't talk if the player is the aggressor 64 if ( controlQ == 0 ) 65 if ( GetJournalIndex TR_m7_HO_TT_02 == 10 ) 66 "TR_m7_q_Anden Suth"->Forcegreeting 67 set controlQ to 1 68 endif 69 endif 70 endif 71endif 72 73if ( GetJournalIndex TR_m7_HO_TT_02 == 0 ) 74 if ( GetDisabled == 0 ) 75 Disable 76 "TR_m7_q_Anden Suth"->Disable 77 "TR_m7_q_Fala Onmar"->Disable 78 endif 79elseif ( GetJournalIndex TR_m7_HO_TT_02 >= 100 ) 80 if ( GetDisabled == 0 ) 81 if ( control == 0 ) 82 Disable 83 endif 84 endif 85else 86 if ( GetDisabled == 1 ) 87 Enable 88 endif 89endif 90 91if ( doonce == 0 ) 92 positioncell 4345 3515 15603 13000 "Hlan Oek, Temple" 93endif 94 95if ( getDeadCount "TR_m7_q_Uls Herano_slp" == 0 ) 96 if ( OnActivate == 1 ) 97 "TR_m7_q_Uls Herano"->ForceGreeting 98 endif 99endif 100 101 102; allowed to activate the actual body once dead 103if ( getDeadCount "TR_m7_q_Uls Herano_slp" == 1 ) 104 if ( OnActivate == 1 ) 105 Activate 106 endif 107endif 108 109if ( doonce == 0 ) 110 if ( GetEffect sEffectRestoreHealth == 1 ) 111 if ( GetJournalIndex TR_m7_HO_TT_02 >= 80 ) 112 Journal TR_m7_HO_TT_02 90 113 set doonce to 1 114 else 115 Journal TR_m7_HO_TT_02 50 116 "TR_m7_q_Fala Onmar"->StartCombat player 117 "TR_m7_q_Anden Suth"->StartCombat player 118 set doonce to 1 119 endif 120 endif 121endif 122 123if ( ControlQ1 == 0 ) 124 if ( ControlV == 0 ) ; don't stop if the player is the aggressor 125 if ( GetJournalIndex TR_m7_HO_TT_02 == 50 ) 126 if ( "TR_m7_q_Anden Suth"->GetHealthGetRatio < 0.5 ) 127 "TR_m7_q_Anden Suth"->Forcegreeting 128 set ControlQ1 to 1 129 endif 130 if ( "TR_m7_q_Fala Onmar"->GetHealthGetRatio < 0.5 ) 131 "TR_m7_q_Anden Suth"->Forcegreeting 132 set ControlQ1 to 1 133 endif 134 endif 135 endif 136endif 137 138end