Scripts

TR_m2_Norem_Inte_Outl1_sc

TR_Mainland.esm
Variables 6
Local Variables
state
TR_Map
control
controlQ
T_Local_NPC
nolore
Source
1Begin TR_m2_Norem_Inte_Outl1_sc 2 3;This script is placed on "TR_m2_o_Gakken_gro-Gay" and "TR_m2_o_Hascolm" 4;in Norem, Interior. It makes them attack the 3 vampires in front of them. 5 6Short state 7Short TR_Map 8Short control ;counts number of dead vamps 9Short controlQ 10short T_Local_NPC 11short nolore 12 13if ( controlQ == 1 ) 14 return 15endif 16 17if ( OnDeath ) 18 set controlQ to 1 19 return 20endif 21 22if ( control == 4 ) 23 return 24endif 25 26if ( control == 3 ) ;if all 3 vamps dead 27 set control to 4 28 SetFight 100 29 return ;don't run script. 30elseif ( state == 0 ) ;this determines which NPC the script is placed on 31 if ( GetPos, x > 3350 ) ;NPC is Gakken gro-Gayash 32 Set state to 1 ;so toggle to attack Samera Varrus 33 else ;NPC is Hasley 34 Set state to 3 ;so toggle to attack Sathas Marvayn 35 endif 36elseif ( state == 1 ) ;if toggled to attack Samera Varrus 37 StartCombat, "TR_m2_v_Samera_Varrus" ;attack Samera Varrus 38 Set state to 2 39elseif ( state == 2 ) ;if attacking Samera Varrus 40 if ( GetDeadCount "TR_m2_v_Samera_Varrus" > 0 ) ;if Samera Varrus is dead 41 Set control to ( control + 1 ) ;note another vampire has died 42 Set state to 3 ;toggle to attack Sathas Marvayn 43 endif 44elseif ( state == 3 ) ;if toggled to attack Sathas Marvayn 45 StartCombat, "TR_m2_v_Sathas_Marvayn" ;attack Sathas Marvayn 46 Set state to 4 47elseif ( state == 4 ) ;if attacking Sathas Marvayn 48 if ( GetDeadCount "TR_m2_v_Sathas_Marvayn" > 0 ) ;if Sathas Marvayn is dead 49 Set control to ( control + 1 ) ;note another vampire has died 50 Set state to 5 ;toggle to attack Waylor 51 endif 52elseif ( state == 5 ) ;if toggled to attack Waylor 53 StartCombat, "TR_m2_v_Waylor" ;attack Waylor 54 Set state to 6 55elseif ( state == 6 ) ;if attacking Waylor 56 if ( GetDeadCount "TR_m2_v_Waylor" > 0 ) ;if Waylor is dead 57 Set control to ( control + 1 ) ;note another vampire has died 58 Set state to 1 ;attack Samera Varrus 59 endif 60endif 61 62;standard TR stuff 63if ( TR_Map == 2 ) 64 return 65endif 66 67Set TR_Map to 2 68 69End