Scripts

TR_NecMQ_SavileTherasScript

TR_Mainland.esm
Variables 1
Local Variables
controlQ
Source
1Begin TR_NecMQ_SavileTherasScript 2 3; this script controls the ghost of Savile Theras who has one of Sul's ringlets 4; 6+ 5 6Short controlQ 7 8if ( MenuMode == 1 ) 9 Return 10endif 11 12; additional death check just for killing her without opening the grate 13 14if ( OnDeath == 1 ) 15 if ( controlQ <= 4 ) 16 MessageBox "As the ghost's bond to the mortal world is broken, you feel a wave of relief wash over you. Suddenly, you experience a memory that is not your own: you see yourself entering your family's ancestral tomb. You locate an urn on top of an ornate altar at the northwestern wall of the central chamber, and you place the ringlet inside it." "Ok" 17 addtopic "Theras Ancestral Tomb" 18 "TR_NecMQ_Bilsa Barus"->moddisposition -25 19 Set controlQ to 5 20 endif 21endif 22 23 24; the quest is over now, ghost can be deleted at this point 25 26if ( controlQ == 10 ) 27 if ( GetDisabled == 0 ) 28 Disable 29 else 30 SetDelete 1 31 endif 32 33elseif ( controlQ == 7 ) 34 if ( GetJournalIndex TR_NecMQ_Destroyer >= 110 ) 35 Set controlQ to 10 36 endif 37 38; add a journal index where to find the ringlet in the tomb 39 40elseif ( controlQ == 6 ) 41 if ( GetJournalIndex TR_NecMQ_2Path == 10 ) 42 Journal TR_NecMQ_Destroyer 90 43 elseif ( GetJournalIndex TR_NecMQ_2Path == 50 ) 44 Journal TR_NecMQ_Destroyer 95 45 endif 46 Set controlQ to 7 47 48; if the player kills the ghost after releasing it, give them a message 49 50elseif ( controlQ == 5 ) 51 Journal TR_NecMQ_Destroyer 50 52 Set controlQ to 6 53 54elseif ( controlQ == 4 ) 55 if ( OnDeath == 1 ) 56 MessageBox "As the ghost's bond to the mortal world is broken, you feel a wave of relief wash over you. Suddenly, you experience a memory that is not your own: you see yourself entering your family's ancestral tomb. You locate an urn on top of an ornate altar at the northwestern wall of the central chamber, and you place the ringlet inside it." "Ok" 57 addtopic "Theras Ancestral Tomb" 58 "TR_NecMQ_Bilsa Barus"->moddisposition -25 59 Set controlQ to 5 60 endif 61 62; wait for the player to either release (and then fight) the ghost or put it in the urn for transport 63 64elseif ( controlQ == 3 ) 65 SetFight 100 66 StartCombat Player 67 Set controlQ to 4 68 69elseif ( controlQ == 2 ) 70 if ( TR_Necrom_VaultPortR == 1 ) 71 Journal TR_NecMQ_Destroyer 45 72 Set controlQ to 3 73 elseif ( GetJournalIndex TR_NecMQ_Destroyer == 60 ) 74 Set controlQ to 10 75 endif 76 77; the quest has started now, enable the ghost 78; if the ghost appears after transporting it in the urn it is enabled as well (and the urn removed) 79 80elseif ( controlQ == 1 ) 81 if ( GetJournalIndex TR_NecMQ_Destroyer >= 60 ) 82 if ( Player -> GetItemCount TR_NecMQ_UrnDestroyer > 0 ) 83 Player -> RemoveItem TR_NecMQ_UrnDestroyer 1 84 endif 85 if ( GetDisabled == 1 ) 86 Enable 87 else 88 Set controlQ to 6 89 endif 90 elseif ( GetJournalIndex TR_NecMQ_Destroyer > 5 ) 91 if ( GetDisabled == 1 ) 92 Enable 93 else 94 Set controlQ to 2 95 endif 96 endif 97 98; disable the ghost before the start of the quest 99 100elseif ( controlQ == 0 ) 101 if ( GetDisabled == 0 ) 102 Disable 103 else 104 Set controlQ to 1 105 endif 106endif 107 108End TR_NecMQ_SavileTherasScript