Scripts

TR_m3_fightersduel_1

TR_Mainland.esm
Variables 9
Local Variables
TR_Map
control
controlQ
fightvar
doOnce
T_Local_NPC
NoLore
OnPCHitMe
timer
Source
1Begin TR_m3_fightersduel_1 2; This short script is there to allow dialogue to be filtered on the TR_Map local variable, 3; allowing for regional topics such as "Morrowind Lore" or "Geographic Regions" to be 4; appropriate to the location the NPC is. 5 6short TR_Map 7short control 8short controlQ 9short fightvar 10short doOnce 11float timer 12short T_Local_NPC 13short NoLore 14short OnPCHitMe 15 16if ( MenuMode ) 17 return 18endif 19 20if ( OnDeath ) 21 ModPCCrimeLevel 1000 22 return 23endif 24 25if ( OnPCHitMe ) 26 if ( control == 0 ) 27 set control to 1 28 ModPCCrimeLevel 40 29 endif 30 set OnPCHitMe to 0 31endif 32 33if ( control == 1 ) 34 if ( GetPCCrimeLevel == 0 ) 35 set control to 0 36 endif 37endif 38 39if ( doOnce == 0 ) 40 if ( GetLOS player ) 41 if ( GetDistance player <= 800 ) 42 StartCombat "TR_m3_Jorli" 43 set fightvar to 1 44 set doOnce to 1 45 endif 46 endif 47endif 48 49if ( timer > 20 ) 50 if ( fightvar == 0 ) 51 if ( GetLOS player ) 52 if ( GetDistance player <= 800 ) 53 StartCombat "TR_m3_Jorli" 54 set fightvar to 1 55 set timer to 0 56 endif 57 endif 58 else 59 StopCombat 60 SetHealth 150 61 set fightvar to 0 62 set timer to 0 63 endif 64endif 65 66if ( doOnce == 1 ) 67 set timer to ( timer + GetSecondsPassed ) 68endif 69 70if ( TR_Map == 3 ) 71 return 72endif 73 74set TR_Map to 3 75 76End