Scripts

TR_m2_Norem_Sanc_Outl_sc

TR_Mainland.esm
Variables 6
Local Variables
state
TR_Map
control
controlQ
T_Local_NPC
nolore
Source
1Begin TR_m2_Norem_Sanc_Outl_sc 2 3;This script is placed on the two outlaws "TR_m2_o_Herma_Homeless" and "TR_m2_o_Martia_Velurius" 4;in Norem, Sanctuary. it makes them fight the two vampires in the cell. 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 == 3 ) 23 return 24endif 25 26if ( control == 2 ) ;if both vamps dead 27 set control to 3 28 SetFight 100 29 return ;don't run rest of script 30elseif ( state == 0 ) ;initally, determine which NPC this script is placed on 31 if ( GetPos, x > 4350 ) ;NPC is Martia Velurius 32 Set state to 1 ;so toggle to attack Darriss 33 else ;NPC is Herma Homeless 34 Set state to 3 ;so toggle to attack Grath gro-Gakk 35 endif 36elseif ( state == 1 ) ;if toggled to attack Darriss 37 StartCombat, "TR_m2_v_Darriss" ;attack Darriss 38 Set state to 2 39elseif ( state == 2 ) ;if attacking Darriss 40 if ( GetDeadCount "TR_m2_v_Darriss" > 0 ) ;if Darriss is dead 41 Set control to ( control + 1 ) ;note another vamp dead 42 Set state to 3 ;toggle to attack Grath gro-Gakk 43 endif 44elseif ( state == 3 ) ;if toggled to attack Grath gro-Gakk 45 StartCombat, "TR_m2_v_Grath_gro-Gakk" ;attack Grath gro-Gakk 46 Set state to 4 47elseif ( state == 4 ) ;if attacking Grath gro-Gakk 48 if ( GetDeadCount "TR_m2_v_Grath_gro-Gakk" > 0 ) ;if Grath gro-Gakk is dead 49 Set control to ( control + 1 ) ;note another vamp dead 50 Set state to 1 ;toggle to attack Darriss 51 endif 52endif 53 54;standard TR stuff 55if ( TR_Map == 2 ) 56 return 57endif 58 59Set TR_Map to 2 60 61End