Scripts

TR_m4_NPC_Anbarys_Irathi

TR_Mainland.esm
Variables 7
Local Variables
TR_Map
control
controlQ
NoLore
T_Local_NPC
setDisable
frameHour
Source
1Begin TR_m4_NPC_Anbarys_Irathi 2; Makes sure that Anbarys is disabled after the Caravan Ransom quest + controls some of his behavior 3 4short TR_Map 5short control ; controls some of his dialogue 6short controlQ 7short NoLore 8short T_Local_NPC 9short setDisable 10float frameHour ; timestamp of previous timeframe 11 12if ( MenuMode ) 13 return 14endif 15 16if ( GetHealth < 1 ) 17 return 18endif 19 20if ( GetDisabled == 0 ) 21 ; disable if convinced to leave 22 if ( TR_m4_HH_SaboteurAction == 1 ) 23 if ( CellChanged ) 24 Set setDisable to 1 25 elseif ( GameHour >= ( frameHour + 1 ) ) ; player rested 26 Set setDisable to 1 27 elseif ( GameHour < frameHour ) 28 if ( GameHour >= ( frameHour - 23 ) ) 29 Set setDisable to 1 30 endif 31 endif 32 33 if ( setDisable ) 34 Disable 35 endif 36 endif 37endif 38 39Set frameHour to GameHour 40 41if ( TR_Map > 0 ) 42 return 43endif 44 45Set TR_Map to 4 46 47End