Scripts

TR_m4_NPC_AnbarysGuard

TR_Mainland.esm
Variables 10
Local Variables
TR_Map
control
controlQ
NoLore
T_Local_NPC
T_Local_NoLore
TR_m4_AnbarysGuard
doOnce
setDisable
frameHour
Source
1Begin TR_m4_NPC_AnbarysGuard 2; script for Anbarys Irathi's guards 3 4short TR_Map 5short control 6short controlQ 7short NoLore 8short T_Local_NPC 9short T_Local_NoLore 10short TR_m4_AnbarysGuard ; identifier 11short doOnce 12short setDisable 13float frameHour ; timestamp of previous timeframe 14 15if ( MenuMode ) 16 return 17endif 18 19if ( GetHealth < 1 ) 20 return 21endif 22 23if ( doOnce == 0 ) 24 ; disable if convinced Anbarys to leave 25 if ( TR_m4_HH_SaboteurAction == 1 ) 26 if ( CellChanged ) 27 Set setDisable to 1 28 elseif ( GameHour >= ( frameHour + 1 ) ) ; player rested 29 Set setDisable to 1 30 elseif ( GameHour < frameHour ) 31 if ( GameHour >= ( frameHour - 23 ) ) 32 Set setDisable to 1 33 endif 34 endif 35 36 if ( setDisable ) 37 Set doOnce to 1 38 if ( GetDeadCount "TR_m4_Anbarys Irathi" == 0 ) 39 ; don't disable if Anbarys is dead 40 Disable 41 endif 42 endif 43 endif 44endif 45 46Set frameHour to GameHour 47 48if ( TR_Map > 0 ) 49 return 50endif 51 52Set TR_Map to 4 53 54End