Scripts

TR_m4_q_TTSAncestral_scrpt

TR_Mainland.esm
Variables 6
Local Variables
DoOnce
DeathCheck
State
control
timer
GameHourCheck
Source
1begin TR_m4_q_TTSAncestral_scrpt 2 3short DoOnce 4short DeathCheck 5short State 6short control 7float timer 8float GameHourCheck 9 10 11if ( MenuMode ) 12 return 13endif 14 15if ( GetJournalIndex "TR_m4_wil_TribunalTS" >= 98 ) 16 if ( GetDisabled == 0 ) 17 disable 18 endif 19 return 20endif 21 22if ( GetJournalIndex "TR_m4_wil_TribunalTS" < 30 ) ; to disable it before the quest. 23 if ( GetDisabled ) 24 return 25 else 26 Disable 27 endif 28elseif ( GetDisabled ) 29 Enable 30endif 31 32 33if ( State == 0 ) 34 if ( GetJournalIndex "TR_m4_wil_TribunalTS" >= 50 ) ;start combat if pc gets too far 35 if ( GetJournalIndex "TR_m4_wil_TribunalTS" < 55 ) 36 if ( GetPCCell "Olthan Ancestral Tomb" ) 37 if ( GetDistance Player >= 1028 ) 38 StartCombat player 39 SetFight 100 40 if ( TR_m4_q_TTSCombatState == 0 ) 41 PlaceAtMe TR_m4_q_TTSBoneWalker 2 256 0 42 set TR_m4_q_TTSCombatState to 3 43 endif 44 set Control to 1 45 journal TR_m4_wil_TribunalTS 75 46 set state to 20 47 endif 48 endif 49 endif 50 endif 51endif 52 53 54if ( OnDeath ) ;if it dies during the process of getting the amulet by PC or NPC 55 journal TR_m4_wil_TribunalTS 83 56 set TR_m4_q_TTSGhostDead to 1 57 set TR_m4_q_TTSCombatState to ( TR_m4_q_TTSCombatState - 1 ) 58endif 59 60if ( Control == 0 ) 61 if ( GetJournalIndex "TR_m4_wil_TribunalTS" < 75 ) 62 if ( GetAttacked ) 63 set Control to 1 64 StartCombat player 65 SetFight 100 66 if ( TR_m4_q_TTSCombatState == 0 ) 67 PlaceAtMe TR_m4_q_TTSBoneWalker 2 256 0 68 set TR_m4_q_TTSCombatState to 3 69 endif 70 endif 71 endif 72endif 73 74if ( DoOnce != 1 ) ;forcegreeting for the amulet 75 if ( GetJournalIndex "TR_m4_wil_TribunalTS" == 30 ) 76 if ( GetDistance Player <= 510 ) 77 if ( TR_m4_q_TTSCombatState != 1 ) 78 forcegreeting 79 set DoOnce to 1 80 endif 81 endif 82 elseif ( GetJournalIndex "TR_m4_wil_TribunalTS" == 35 ) 83 if ( GetDistance Player <= 510 ) 84 if ( TR_m4_q_TTSCombatState != 1 ) 85 forcegreeting 86 set DoOnce to 1 87 endif 88 endif 89 endif 90endif 91 92 93End