Scripts

TR_m4_BarendrethFight2

TR_Mainland.esm
Variables 5
Local Variables
TR_Map
control
controlQ
T_Local_NPC
NoLore
Source
1Begin TR_m4_BarendrethFight2 2; ordinator TR_m4_Drivos Llarys 3; 1. attack TR_m4_V_Barendreth_Low4 4; 2. afterwards, attack TR_m4_V_Barendreth_Low5 5 6short TR_Map 7short control 8short controlQ 9short T_Local_NPC 10short NoLore 11 12if ( controlQ == -1 ) 13 return 14endif 15 16if ( OnDeath ) 17 set TR_m4_Barendreth_DeadOrd to ( TR_m4_Barendreth_DeadOrd + 1 ) 18 set controlQ to -1 19 return 20endif 21 22if ( PCVampire == -1 ) 23 ; become peaceful if you cured your vampirism 24 if ( control < 2 ) 25 set control to 2 26 setfight 30 27 endif 28elseif ( PCVampire ) 29 ; attack on sight if you're a vampire 30 if ( control == 0 ) 31 set control to 1 32 setfight 100 33 endif 34endif 35 36if ( controlQ == 0 ) 37 if ( GetLOS player ) 38 set controlQ to 1 39 if ( GetDeadCount TR_m4_V_Barendreth_Low4 == 0 ) 40 startcombat TR_m4_V_Barendreth_Low4 41 TR_m4_V_Barendreth_Low4->startcombat "TR_m4_Drivos Llarys" 42 endif 43 return 44 endif 45elseif ( controlQ == 1 ) 46 if ( GetDeadCount TR_m4_V_Barendreth_Low4 >= 1 ) 47 set controlQ to 2 48 return 49 endif 50elseif ( controlQ == 2 ) 51 set controlQ to 3 52 if ( GetDeadCount TR_m4_Barendreth_DreLow == 0 ) 53 startcombat TR_m4_Barendreth_DreLow 54 TR_m4_Barendreth_DreLow->startcombat "TR_m4_Drivos Llarys" 55 endif 56 return 57elseif ( controlQ == 3 ) 58 if ( GetDeadCount TR_m4_Barendreth_DreLow >= 1 ) 59 set controlQ to 4 60 AiWander 512 0 0 61 endif 62endif 63 64if ( TR_Map ) 65 return 66endif 67 68set TR_Map to 4 69 70End