
// Credit: Daxter, Kays, Lucindrea, Harmonixer, 00din
// Hurricane script Improved by Willy
define EPIC_OFFSETX_POS = 6
define EPIC_OFFSETZ_POS = 3
define ROTATION_OF_EPIC = 8

global CinemaFinish = 0
/* What I change:
	I made CinemaFinish a global Variable because local varibles can change value sometimes global varibles will not. 
*/

define script HurricaneScript
define script HurricaneCinemaControl(oHurricane)

begin script HurricaneCinemaControl(oHurricane)
         
          hEpic = get SCRIPT_OBJECT_TYPE_WONDER EPIC_WONDER_NUMBER_HURRICANE at {Town1} radius 300
          hEpicFoc = marker at {hEpic}+{0,-0,0}
          HurricanePos = marker at hand position
          Hurricane = marker at future position of epic miracle oHurricane with time 0 seconds
          EpicZOffsetHur = marker at (EPIC_OFFSETZ_POS * {hEpic})
start
begin loop
   if CinemaFinish == 0
		begin cinema
                           
			wait 2 seconds
                                move camera focus to {HurricanePos} time 5
                                move camera position to {HurricanePos} time 5
			wait 2 seconds
                                set fade red 255 green 255 blue 255 time 2
			wait 2 seconds
                                set fade in time 1
                                set camera focus to {hEpicFoc}+{0,10,0}
                                set camera position to {hEpic}+{EPIC_OFFSETX_POS * ROTATION_OF_EPIC/2, 10,EpicZOffsetHur}
			wait 7 seconds
                                move camera focus to {hEpic}+{0,30,0} time 13
                                move camera position to {hEpic}+{EPIC_OFFSETX_POS * ROTATION_OF_EPIC/2,30,EpicZOffsetHur} time 13
			wait 14 seconds
                                move camera focus to {hEpic}+{0,140,3} time 1
			wait 2 seconds
                                set fade red 255 green 255 blue 255 time 1
			wait 1 second
                                set camera focus to {HurricanePos}
                                set camera position to {HurricanePos}+{0,250,180}
								set fade in time 1
			wait 4 seconds
                                set camera focus follow oHurricane offset {0,240,0}
                                set camera position follow oHurricane offset {80,240,130}
			wait 5 seconds
                                set camera focus follow oHurricane
                                set camera position follow oHurricane offset {40,100,60}
			wait 6 seconds
                                set camera position to {oHurricane}+{80,30,0}
                                set camera focus to {oHurricane}+{10,30,0}
			wait 4 seconds
                                set camera focus follow oHurricane
                                set camera position follow oHurricane offset {40,200,-150}
			wait 5 seconds
                                set camera focus follow oHurricane
                                set camera position follow oHurricane offset {40,100,60}
			wait 12 seconds
                                
               			enable predefined sky "mainsky" time 5
			wait 5 seconds
        end cinema
		CinemaFinish = 1
	else
		CinemaFinish = 0
	end if
	until CinemaFinish == 1 or key KB_ESC down

    if key KB_ESC down
		skip current cutscene
		wait 2 seconds
    end if	
end loop
end script HurricaneCinemaControl

begin script HurricaneScript

// Other Variables
hEpic = 0
oVisual = 0
oVisual2 = 0
oVisual3 = 0

// Hurricane Specific variables
HurricanePhysics = 0
HurricanePos = 0
HurricaneReady = 0
oHurricane = 0
HurricaneHeld = 0

// Visual effects to replace wonder's miracle
Rock1 = 0
HurricaneSeed = 0

// Camera variables to put cam directly in front of wonder
RelativePos = 0
hEpicPos = 0
hEpicFoc = 0

start
begin loop
	oHurricane = 0
	hEpic = get SCRIPT_OBJECT_TYPE_WONDER EPIC_WONDER_NUMBER_HURRICANE at {Town1} radius 300
        RelativePos = marker at get world position from hEpic to {hEpic}
        hEpicPos = marker at {hEpic}+(hEpic * {RelativePos}+{-20,10,hEpic})
        hEpicFoc = marker at {hEpic}+{0,-0,0}
      if hEpic exists and SCRIPT_OBJECT_PROPERTY_TYPE_BUILT_PERCENTAGE of hEpic == 1.0
        wait 1 second
        if hEpic right clicked and wonder in hand or hEpic left clicked and wonder in hand
        empty player hand
         wait 0.2 seconds
         Rock1 = create SCRIPT_OBJECT_TYPE_MOBILE_STATIC MOBILE_STATIC_INFO_BOULDER_ROUND at hand position
         HurricaneSeed = create visual effect VISUAL_EFFECT_HURRICANE_SEED on Rock1 time -1
         set Rock1 in player 0 hand
         HurricaneHeld = get object held
         HurricaneHeld = Rock1
             wait 1 second
		begin loop
              if bindable action BINDABLE_ACTION_TYPE_ACTION performed
                HurricanePos = marker at hand position
                oHurricane = create hurricane at {HurricanePos} player 0 direction {125,0,223}
                     clear player 0 spell charging
                     stop visual effect HurricaneSeed
                     delete Rock1
			run background script HurricaneCinemaControl(oHurricane)
                                wait 7 seconds
                                play string sound "SCRIPT1_VEPIC_FLAMETHROWERWHOOSH4"
                                start music "egypt_chant"
                                wait 5 seconds
                                invoke hEpic EPIC_WONDER_STAGE_1
                                play string sound "SCRIPT3_HEPIC_SYNTH3"
                                play string sound "SCRIPT1_VEPIC_BEAMOFLIGHTLOOP10"
                                wait 5 seconds
                                invoke hEpic EPIC_WONDER_STAGE_2
                                play string sound "SCRIPT3_HEPIC_SYNTH3"
                                play string sound "SCRIPT1_VEPIC_BEAMOFLIGHTLOOP10"
                                wait 1 second
                                enable predefined sky "hurricane" time 5
                                wait 3 seconds
                                play string sound "SCRIPT3_HEPIC_SYNTH3"
                                play string sound "SCRIPT1_VEPIC_BEAMOFLIGHTLOOP10"
                                invoke hEpic EPIC_WONDER_STAGE_3
                                invoke hEpic EPIC_WONDER_STAGE_4
                                invoke hEpic EPIC_WONDER_STAGE_5
                                invoke hEpic EPIC_WONDER_STAGE_6
                                invoke hEpic EPIC_WONDER_STAGE_7
                                invoke hEpic EPIC_WONDER_STAGE_8
                                play string sound "SCRIPT4_SEPIC_BEAMOFLIGHTLOOP7"
                                wait 2 seconds
                                play string sound "HURRICANELIGHTNING3"
                                play string sound "SCRIPT3_HEPIC_SYNTH3"
                                invoke hEpic EPIC_WONDER_STAGE_9
                                invoke hEpic EPIC_WONDER_STAGE_10
                                wait 3 seconds
                                stop sound "SCRIPT4_SEPIC_BEAMOFLIGHTLOOP7"
                                wait 1 second
                                oVisual = create visual effect VISUAL_EFFECT_HURRICANE_BEAM on hEpic time 1
                                oVisual2 = create visual effect VISUAL_EFFECT_HURRICANE_PULSE on hEpic time 1
                                play string sound "SCRIPT3_HEPIC_HURRICANELIGHTNING1"
                                stop sound "HURRICANELIGHTNING2"
                                wait 2 seconds
                                wait 1 second
                                set fade in time 1
                                invoke oHurricane EPIC_WONDER_STAGE_START_BEAM
                                oVisual3 = create visual effect VISUAL_EFFECT_HURRICANE_BEAM at {HurricanePos} time -1
                                play string sound "SCRIPT2_EEPIC_BEAMOFLIGHTSTART1"
                                stop sound "SCRIPT3_HEPIC_SYNTH2"
                                stop sound "SCRIPT3_HEPIC_SYNTH3"
                                stop sound "SCRIPT1_VEPIC_BEAMOFLIGHTLOOP10"
                                invoke oHurricane EPIC_WONDER_STAGE_END_BEAM
                                stop music with fadetime 1
                                start music "hurricane_music"
				invoke oHurricane EPIC_CREATE_CLOUDS
				invoke oHurricane EPIC_SET_CLOUDS_STORM
				invoke oHurricane EPIC_ENTER_TORNADO
                                wait 0.3 seconds
                                invoke oHurricane EPIC_START_GROUND_SWIRL
				invoke oHurricane EPIC_START_TOP_SWIRL
                                stop visual effect oVisual3
                                wait 9 seconds
                                invoke oHurricane EPIC_MOVE_TORNADO
				invoke oHurricane EPIC_CRUMBLE_BUILDINGS
				invoke oHurricane EPIC_ENABLE_TORNADO_DESTRUCTION
                                wait 28 seconds                                
				invoke oHurricane EPIC_DISABLE_TORNADO_DESTRUCTION
				invoke oHurricane EPIC_STOP_TORNADO
				invoke oHurricane EPIC_EXIT_TORNADO
				invoke oHurricane EPIC_CLEAR_CLOUDS
				invoke oHurricane EPIC_END_TORNADO
				delete oHurricane
                                enable predefined sky "mainsky" time 5
                                wait 5 seconds
                                stop music with fadetime 2
                                delete oHurricane
                                invoke hEpic EPIC_WONDER_STAGE_LAST
                                clear right clicked object
                                clear right clicked position
                                clear left clicked object
                                clear left clicked position
				oHurricane = 1
                           elsif HurricaneHeld != Rock1 or bindable action BINDABLE_ACTION_TYPE_CANCEL_CURRENT_ACTION performed
                                skip current cutscene
                                stop visual effect HurricaneSeed
                                delete Rock1
                                stop spell oHurricane
                                delete oHurricane
                                wait 1 second 
			end if
            until oHurricane == 1
		 end loop
            end if
       end if
end loop
// this loop isn't that important but it works 
end script HurricaneScript

// Credit: Daxter, Kays, Lucindrea, Harmonixer, 00din
// Volcano script Improved by Willy
/* What I change:
	I made Volcinema a global Variable because local varibles can change value sometimes global varibles will not. 
*/
global Volcinema = 0

define EPIC_OFFSETX_POS2 = 6
define EPIC_OFFSETZ_POS2 = 5
define ROTATION_OF_EPIC2 = 10
// if you are using the hurricane script as well the define stuff is the same for both so you need to add 2s on the end of them.

define script VolcanoCinemaControl
define script VolcanoScript

begin script VolcanoCinemaControl
          vEpic = get SCRIPT_OBJECT_TYPE_WONDER EPIC_WONDER_NUMBER_VOLCANO at {Town1} radius 300
          vEpicFoc = marker at {vEpic}+{0,-0,0}
          VolcanoPos = marker at hand position
          oVolcano = 0
          Volcano = marker at future position of epic miracle oVolcano with time 0 seconds
          EpicZOffsetVol = marker at (EPIC_OFFSETZ_POS2 * {vEpic})
start
   if Volcinema == 0
          oVolcano = get spell EPIC_WONDER_NUMBER_VOLCANO at {VolcanoPos} radius 5
               begin cinema
                 wait 2 seconds
               move camera focus to {VolcanoPos} time 5
               move camera position to {VolcanoPos} time 5
                 wait 2 seconds
               set fade red 255 green 255 blue 255 time 1
                 wait 1 second
               play string sound "SCRIPT1_VEPIC_FLAMETHROWERWHOOSH4"
               set fade in time 1
               enable fixed camera rotation at {vEpic}
               start music "norse_chant_vocal"
               play string sound "SCRIPT1_VEPIC_EPICTOWERELECTRIC2"
               set camera focus to {vEpicFoc}+{0,10,0}
               set camera position to {vEpic}+{EPIC_OFFSETX_POS2 * ROTATION_OF_EPIC2/2,10, EpicZOffsetVol}
                 wait 7 seconds
               move camera focus to {vEpic}+{0,30,0} time 13
               move camera position to {vEpic}+{EPIC_OFFSETX_POS2 * ROTATION_OF_EPIC2/2,30, EpicZOffsetVol} time 13 
                 wait 1.5 seconds
               enable predefined sky "volcano" time 5
                 wait 10.5 seconds
               move camera focus to {vEpic}+{0,170,5} time 1
               disable fixed camera rotation at {vEpic}
                 wait 2 seconds
               set fade red 255 green 255 blue 255 time 1
                 wait 1 second
               set camera focus to {VolcanoPos}+{0,50,0}
               set camera position to {VolcanoPos}+{0,90,80}
               set fade in time 3
                 wait 2 seconds
               move camera focus to {VolcanoPos} time 5
               stop music with fadetime -5
                 wait 8 seconds
               set camera roll 30 time -1
               set camera position to {VolcanoPos}+{8,180,46}
                 wait 6 seconds
               set camera roll 0 time -10
               set camera focus to {VolcanoPos}+{0,60,0}
               set camera position to {VolcanoPos}+{0,60,43}
		wait 3.5 seconds
               shake camera strength 6.3
                 wait 3.5 seconds
               set camera focus to {VolcanoPos}
               set camera position to {VolcanoPos}+{0,90,40}
                 wait 4.5 seconds
               stop camera shake
               set camera focus to {VolcanoPos}+{30,0,0}
               set camera position to {VolcanoPos}+{0,50,40}
                 wait 7.5 seconds
               set camera position to {VolcanoPos}+{0,120,120}
               set camera roll 0 time -100
                 wait 9 seconds
               enable predefined sky "mainsky" time 5
                 wait 5 seconds
               end cinema
                     clear right clicked object
                     clear right clicked position
                     clear left clicked object
                     clear left clicked position
               Volcinema = 1
               else
               Volcinema = 0
               end if
             until Volcinema == 1 or key KB_ESC down

		if key KB_ESC down
		skip current cutscene
		wait 2 seconds
    end if
end script VolcanoCinemaControl

begin script VolcanoScript

oTown = 0
vEpic = 0
oVolcano = 0

// Visual effects for the Volcano - 1 to 12
oVisual = 0
oVisual2 = 0
oVisual3 = 0
oVisual3Pos = 0
oVisual4 = 0
oVisual5 = 0
oVisual6 = 0
oVisual7 = 0
oVisual8 = 0
oVisual9 = 0
oVisual10 = 0
oVisual11 = 0
oVisual12 = 0

// Visual effects for the Volcano - 13 to 26
oVisual13 = 0
oVisual14 = 0
oVisual15 = 0
oVisual16 = 0
oVisual17 = 0
oVisual18 = 0
oVisual19 = 0
oVisual20 = 0
oVisual21 = 0
oVisual22 = 0
oVisual23 = 0
oVisual24 = 0
oVisual25 = 0
oVisual26 = 0

// Unused variables
VolcanoPos = 0
VolcanoMixer = 0
VolcanoWorldPos = 0
Sound = 0

// Volcano Epic Positions and focuses
vEpicFoc = 0
vEpicPos = 0
RelativePos = 0
Cam = marker at camera position
PosX = 0
PosZ = 0

// Front of Wonder Pos
WonderPos = 0

start
WonderPos = 0

begin loop
	oVolcano = 0
	vEpic = get SCRIPT_OBJECT_TYPE_WONDER EPIC_WONDER_NUMBER_VOLCANO at {Town1} radius 300
        PosX = marker at {vEpic}+{-20,0,0}
        PosZ = marker at (vEpic * {0,0,10})
        RelativePos = marker at get world position from vEpic to {vEpic}
        vEpicPos = marker at {vEpic}+(vEpicPos * {RelativePos})
        vEpicFoc = marker at {vEpic}+{0,-0,0}
	if vEpic left clicked or vEpic right clicked
		wait 1 second
		if wonder in hand
		begin loop
			if wonder fire near hand position radius 0.5
                                VolcanoPos = marker at hand position
		    oVolcano = create volcano at {VolcanoPos} player 0
                            run background script VolcanoCinemaControl
                                wait 5 seconds
                                start music "norse_chant_vocal"
                                play string sound "SCRIPT1_VEPIC_SYNTH2"
                                wait 5 seconds
                                invoke vEpic EPIC_WONDER_STAGE_1
                                play string sound "SCRIPT1_SEPIC_SYNTH2"
                                play string sound "SCRIPT1_VEPIC_FLAMETHROWERWHOOSH4"
                                wait 4 seconds
                                play string sound "SCRIPT1_SEPIC_SYNTH2"
                                play string sound "SCRIPT1_VEPIC_FLAMETHROWERWHOOSH2"
                                invoke vEpic EPIC_WONDER_STAGE_2
                                wait 4.2 seconds
                                play string sound "SCRIPT1_SEPIC_SYNTH2"
                                play string sound "SCRIPT1_VEPIC_FLAMETHROWERWHOOSH1"
                                invoke vEpic EPIC_WONDER_STAGE_3
                                invoke vEpic EPIC_WONDER_STAGE_4
                                wait 2.5 seconds
                                invoke vEpic EPIC_WONDER_STAGE_5
                                invoke vEpic EPIC_WONDER_STAGE_6
                                invoke vEpic EPIC_WONDER_STAGE_7
                                wait 2 seconds
                                invoke vEpic EPIC_WONDER_STAGE_8
                                invoke vEpic EPIC_WONDER_STAGE_9
                                invoke vEpic EPIC_WONDER_STAGE_10
                                invoke vEpic EPIC_WONDER_STAGE_START_BEAM
                                wait 1.5 seconds
                                oVisual = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM on vEpic time 1
                                oVisual20 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM on vEpic time 1
                                oVisual2 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_UP at {vEpic} time 1
                                oVisual16 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_UP at {vEpic}+{0,5,0} time 1
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                stop sound "SCRIPT1_SEPIC_SYNTH2"
                                wait 2 seconds
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 1 second
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 2 seconds
                                stop visual effect oVisual
                                stop visual effect oVisual2
                                stop music with fadetime -5
                                wait 2 seconds
                                oVisual3 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM at {VolcanoPos} time -1
                                play string sound "SCRIPT1_VEPIC_BEAMOFLIGHTSTART1"
                                invoke oVolcano EPIC_START_SWIRL
                                wait 1 second
                                oVisual4 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual10 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 2 seconds
                                oVisual5 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual11 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 2 seconds
                                oVisual6 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual12 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                invoke oVolcano EPIC_START_SHOCKWAVE
                                start music "volcano_music"
                                wait 1 second
				invoke oVolcano EPIC_START_RISING
                                invoke oVolcano EPIC_START_SMOKE
                                wait 1 second
                                oVisual7 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual13 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 2 seconds
                                oVisual7 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual13 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 2 seconds
                                oVisual8 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual14 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 2 seconds
                                oVisual9 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual15 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
				wait 2 seconds
                                oVisual21 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual22 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 3 seconds
                                oVisual25 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual26 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                play string sound "SCRIPT1_VEPIC_VOLCANOSHOCKWAVHIGHPITCHED"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
                                oVisual16 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual17 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 2 seconds
                                oVisual23 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual24 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 3.5 seconds
                                stop visual effect oVisual3
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
				invoke oVolcano EPIC_START_BUBBLING_LAVA
				invoke oVolcano EPIC_START_LAVA
                                wait 6 seconds
				invoke oVolcano EPIC_START_ASH
				invoke oVolcano EPIC_START_SMOKE
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
                                wait 0.2 seconds
				invoke oVolcano EPIC_START_ROCK_SHOWER
				invoke oVolcano EPIC_SPAWN_ROCKS
                                wait 4 seconds
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
                                wait 4.2 seconds
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
                                wait 5 seconds
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
                                enable predefined sky "mainsky" time 5
                                wait 5 seconds
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
                                wait 2 seconds
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
                                wait 2 seconds
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
				wait 28 seconds
				invoke oVolcano EPIC_STOP_ASH
				invoke oVolcano EPIC_STOP_SMOKE
				invoke oVolcano EPIC_END_ROCK_SHOWER
				invoke oVolcano EPIC_START_FALLING
				invoke oVolcano EPIC_STOP_BUBBLING_LAVA
				wait 10 seconds
				invoke oVolcano EPIC_STOP_LAVA
				wait 5 seconds
				delete oVolcano
                                invoke vEpic EPIC_WONDER_STAGE_LAST
                                clear right clicked object
                                clear right clicked position
                                clear left clicked object
                                clear left clicked position
                               oVolcano = 1
                               else oVolcano = 0
                               end if
                              until oVolcano == 1
		      end loop
		end if
	end if
if oVolcano == 1
release loop
end if
end loop
end script VolcanoScript

\\ I hope I didn't forget anything