Scripts

TR_m4_q_TTSGilmaso_scrpt

TR_Mainland.esm
Variables 10
Local Variables
TR_Map
control
controlQ
nolore
DoOnce
DayTarget
T_Local_NPC
T_Local_NoLore
HourTarget
GameHourCheck
Source
1Begin TR_m4_q_TTSGilmaso_scrpt 2 3short TR_Map 4short control 5short controlQ 6short nolore 7short DoOnce 8short DayTarget 9float HourTarget 10float GameHourCheck 11short T_Local_NPC 12short T_Local_NoLore 13 14if ( TR_Map != 4 ) 15 set TR_Map to 4 16endif 17 18if ( MenuMode ) 19 return 20endif 21 22if ( GetJournalIndex "TR_m4_wil_TribunalTS" < 60 ) ;Disables before/ in certain scenarios 23 if ( GetDisabled ) 24 return 25 else 26 Disable 27 endif 28elseif ( GetJournalIndex "TR_m4_wil_TribunalTS" == 75 ) 29 if ( GetDisabled ) 30 return 31 else 32 Disable 33 endif 34elseif ( GetJournalIndex "TR_m4_wil_TribunalTS" == 130 ) 35 if ( GetDisabled ) 36 return 37 else 38 Disable 39 endif 40elseif ( Control == 0 ) 41 if ( GetDisabled ) 42 Enable 43 set Control to 1 44 endif 45endif 46 47if ( DoOnce == 0 ) 48 if ( GetJournalIndex "TR_m4_wil_TribunalTS" >= 60 ) 49 if ( GetJournalIndex "TR_m4_wil_TribunalTS" < 98 ) 50 if ( GetLOS player == 1 ) 51 forcegreeting 52 set DoOnce to 1 53 endif 54 endif 55 endif 56endif 57 58 59if ( GetJournalIndex "TR_m4_wil_TribunalTS" < 60 ) 60 return 61elseif ( DayTarget > DaysPassed ) 62 return 63elseif ( DayTarget == DaysPassed ) 64 if ( GameHour <= HourTarget ) 65 return 66 endif 67endif 68 69if ( DayTarget == 0 ) 70 set DayTarget to ( DaysPassed + 1 ) 71 set HourTarget to ( GameHour ) 72 return 73endif 74 75if ( GetJournalIndex "TR_m4_wil_TribunalTS" < 98 ) 76 return 77elseif ( GetJournalIndex "TR_m4_wil_TribunalTS" == 130 ) 78 return 79elseif ( GetDisabled ) 80 return 81elseif ( CellChanged ) 82 if ( GetInterior ) 83 Disable 84 return 85 else 86 ;do not disable when crossing exterior cell borders 87 set GameHourCheck to ( ( GameHour - GameHourCheck ) * 30 / TimeScale ) 88 if ( GameHourCheck < 0 ) 89 set GameHourCheck to ( -1 * GameHourCheck ) 90 endif 91 if ( GameHourCheck < 0.01 ) 92 if ( GetDistance, player < 6500 ) 93 return 94 endif 95 endif 96 Disable 97 endif 98endif 99 100set GameHourCheck to GameHour 101 102End