Scripts

TR_m4_Om_AncientBowl_sc

TR_Mainland.esm
Variables 4
Local Variables
MessageProgress
Button
control
OnPCDrop
Source
1Begin TR_m4_Om_AncientBowl_sc 2; Remnants of Resdayn quest; script for the cursed Indoril bowl in Etana Egg Mine 3 4short MessageProgress 5short Button 6short control 7short OnPCDrop 8 9if ( GetDisabled ) 10 ; prevents sound from playing etc. if the bowl has been disabled 11 return 12endif 13 14if ( TR_m4_Om_ReRe_Ordinators ) 15 ; the Ordinators removed it 16 Disable 17 return 18endif 19 20; This monstrosity sets up a message asking whether you want to pick up the cursed bowl. 21if ( OnActivate == 1 ) 22 if ( MessageProgress == 0 ) 23 MessageBox, "Do you wish to pick up the Ancient Bowl?", "Yes", "No" 24 Set MessageProgress to 1 25 elseif ( MessageProgress > 1 ) 26 Activate 27 return 28 endif 29endif 30 31if ( GetJournalIndex "TR_m4_Om_RemnantsPath3" >= 30 ) 32 if ( MessageProgress < 2 ) 33 Set MessageProgress to 2 34 endif 35 return 36endif 37 38; Play a haunting tune. 39if ( GetSoundPlaying, "Haunted" == 0 ) 40 PlaySound3D, "Haunted" 41endif 42 43if ( MessageProgress == 1 ) 44 Set Button to GetButtonPressed 45 if ( Button == 0 ) 46 if ( ScriptRunning "TR_m4_Om_ReRe_OrdinatorWait" ) 47 ; the Ordinators won't come if the player decides to pick up the bowl 48 StopScript "TR_m4_Om_ReRe_OrdinatorWait" 49 endif 50 StartScript, "TR_m4_Om_ReRe_Teleport" 51 PlaySound, "T_SndEnv_Woosh01" 52 Activate 53 Set MessageProgress to 2 54 return 55 elseif ( Button == 1 ) 56 Set MessageProgress to 0 57 return 58 endif 59endif 60 61if ( OnPCDrop ) 62 Disable 63 Player->AddItem "TR_m4_Om_AncientBowl" 1 64 MessageBox "A powerful force is preventing you from dropping the bowl." 65endif 66 67End