Scripts

TR_m7_AM_Guard_Train2_sc

TR_Mainland.esm
Variables 10
Local Variables
TR_Map
control
controlQ
T_Local_NPC
T_Local_NoLore
NoLore
fightvar
doOnce
OnPCHitMe
timer
Source
1Begin TR_m7_AM_Guard_Train2_sc 2 3short TR_Map 4short control 5short controlQ 6short T_Local_NPC 7short T_Local_NoLore 8short NoLore 9short fightvar 10short doOnce 11short OnPCHitMe 12float timer 13 14if ( MenuMode ) 15 return 16endif 17 18if ( OnDeath ) 19 ModPCCrimeLevel 1000 20 return 21endif 22 23if ( OnPCHitMe ) 24 if ( control == 0 ) 25 set control to 1 26 ModPCCrimeLevel 40 27 endif 28 set OnPCHitMe to 0 29endif 30 31if ( control == 1 ) 32 if ( GetPCCrimeLevel == 0 ) 33 set control to 0 34 endif 35endif 36 37if ( doOnce == 0 ) 38 if ( GetLOS player ) 39 if ( GetDistance player <= 950 ) 40 StartCombat "TR_m7_Senil Thelas" 41 set fightvar to 1 42 set doOnce to 1 43 endif 44 endif 45endif 46 47if ( timer > 20 ) 48 if ( fightvar == 0 ) 49 if ( GetLOS player ) 50 if ( GetDistance player <= 950 ) 51 StartCombat "TR_m7_Senil Thelas" 52 set fightvar to 1 53 set timer to 0 54 endif 55 endif 56 else 57 StopCombat 58 SetHealth 150 59 set fightvar to 0 60 set timer to 0 61 endif 62endif 63 64if ( doOnce == 1 ) 65 set timer to ( timer + GetSecondsPassed ) 66endif 67 68if ( TR_Map == 7 ) 69 return 70endif 71 72set TR_Map to 7 73 74End