Scripts

TR_NecMQ_AlcedoChestScript

TR_Mainland.esm
Variables 2
Local Variables
button
controlQ
Source
1Begin TR_NecMQ_AlcedoChestScript 2 3; this script goes on Alcedo Nirol's chest and controls what the PC does with the evidence in there 4; 6+ 5 6Short button 7Short controlQ 8 9if ( MenuMode == 1 ) 10 Return 11endif 12 13; update the journal about what the PC just did with the documents 14 15if ( controlQ == 5 ) 16 Journal TR_NecMQ_Schemer 35 17 Set controlQ to 6 18 19elseif ( controlQ == 4 ) 20 Journal TR_NecMQ_Schemer 25 21 Set controlQ to 6 22 23; choice between tampering with and burning the documents 24 25elseif ( controlQ == 3 ) 26 Set button to GetButtonPressed 27 if ( button == 0 ) 28 Player -> RemoveItem TR_NecMQ_ICDocuments 1 29 Player -> AddItem TR_NecMQ_ICFakeDocuments 1 30 Set controlQ to 4 31 elseif ( button == 1 ) 32 Player -> RemoveItem TR_NecMQ_ICDocuments 1 33 Set controlQ to 5 34 else 35 Return 36 endif 37 38; as soon as the IC documents are in the PC's possession, give them a choice 39 40elseif ( controlQ == 2 ) 41 if ( GetDeadCount "TR_NecMQ_Alcedo_Tavern" == 0 ) ; no point in doing it if you've killed Alcedo instead 42 if ( GetJournalIndex TR_NecMQ_Schemer > 20 ) 43 Set controlQ to 6 44 else 45 if ( Player -> GetItemCount TR_NecMQ_ICDocuments > 0 ) 46 MessageBox "Do you want to change the documents as Ladia Tunifus wished or do you want to destroy them?" "Change documents" "Destroy documents" 47 Set controlQ to 3 48 endif 49 endif 50 endif 51 52; enable the chest alongside Alcedo Nirol himself 53 54elseif ( controlQ == 1 ) 55 if ( GetJournalIndex TR_NecMQ_Schemer == 20 ) 56 if ( GetDisabled == 1 ) 57 Enable 58 else 59 Set controlQ to 2 60 endif 61 endif 62 63; chest starts off disabled 64 65elseif ( controlQ == 0 ) 66 if ( GetDisabled == 0 ) 67 Disable 68 else 69 Set controlQ to 1 70 endif 71 72endif 73 74End