Scripts

TR_m4_NPC_Als_Bavani

TR_Mainland.esm
Variables 7
Local Variables
TR_Map
control
controlQ
T_Local_NPC
T_Local_NoLore
NoLore
timer
Source
1Begin TR_m4_NPC_Als_Bavani 2 3; control states 4; 1 = Switch to melee weapons 5; 2 = Make no changes to skills (melee mode) 6; 3 = Switch to ranged weapons 7; 4 = Make no changes to skills (ranged mode) 8 9; controlQ states 10; 1 = Sibling just died, begin fleeing 11; 2 = Wait 5 seconds to stop fleeing, stop combat with player 12; 3 = Will not begin fleeing again 13; 4 = Back at Monastery, remove equipment 14; 5 = post Monastery state 15 16float timer 17short TR_Map 18short control 19short controlQ 20short T_Local_NPC 21short T_Local_NoLore 22short NoLore 23 24if ( OnDeath == 1 ) 25 set control to 4 26 set controlQ to 3 27 if ( GetJournalIndex "TR_m4_TT_StAralor_Q3" >= 10 ) 28 if ( GetJournalIndex "TR_m4_TT_StAralor_Q3" < 100 ) 29 Journal "TR_m4_TT_StAralor_Q3" 30 30 endif 31 endif 32endif 33 34if ( GetJournalIndex "TR_m4_TT_StAralor_Q3" >= 110 ) 35 if ( controlQ < 4 ) 36 set controlQ to 4 37 endif 38elseif ( GetJournalIndex "TR_m4_TT_StAralor_Q3" >= 31 ) 39 if ( controlQ == 0 ) 40 set controlQ to 1 41 endif 42endif 43 44if ( controlQ == 1 ) 45 SetFlee 100 46 set controlQ to 2 47elseif ( controlQ == 2 ) 48 set timer to ( timer + GetSecondsPassed ) 49 if ( timer > 5 ) 50 StopCombat 51 SetFlee 30 52 set controlQ to 3 53 SetFight 30 54 endif 55elseif ( controlQ == 4 ) 56 RemoveItem "T_De_AlitHide_Cuirass_01" 1 57 RemoveItem "chitin pauldron - left" 1 58 RemoveItem "chitin pauldron - right" 1 59 RemoveItem "T_De_AlitHide_Greaves_01" 1 60 RemoveItem "chitin boots" 1 61 RemoveItem "netch_leather_gauntlet_left" 1 62 RemoveItem "netch_leather_gauntlet_right" 1 63 RemoveItem "TR_m4_AlsBavani_staff" 1 64 RemoveItem "T_Dwe_Regular_Longbow_01" 1 65 RemoveItem "T_Dwe_Regular_Arrow_01" 20 66 RemoveItem "TR_m4_AlsBavani_arrow" 15 67 set controlQ to 5 68endif 69 70if ( GetHealthGetRatio >= 0.6 ) 71 if ( control == 2 ) 72 return 73 else 74 set control to 1 75 endif 76elseif ( GetHealthGetRatio < 0.6 ) 77 if ( control == 4 ) 78 return 79 else 80 set control to 3 81 endif 82endif 83 84if ( control == 1 ) 85 ;MessageBox "Als 1" 86 SetBluntWeapon 100 87 SetMarksman 0 88 set control to 2 89elseif ( control == 3 ) 90 ;MessageBox "Als 3" 91 SetMarksman 100 92 SetBluntWeapon 75 93 set control to 4 94endif 95 96if ( TR_Map == 4 ) 97 return 98endif 99 100set TR_Map to 4 101 102End