if Yap = 0 {
GameCam.direction = direction+180
x = SierrGroundMark.x
y = SierrGroundMark.y
z = GroundZ
Rick.x = SierrGroundMark.x+80
Rick.y = SierrGroundMark.y+256
if GameCam.direction>360 GameCam.direction = GameCam.direction-360
GameCam.x = x+96*sin((GameCam.direction+270)*pi/180)
GameCam.y = y+96*cos((GameCam.direction+270)*pi/180)
GameCam.z = z+12
Rick.visible = 0
MsgBox.Msg="Very impressive, "+global.Name+".           #...however, as I already told you, you cannot stop me #from taking the princess...      #Behold! Your princess!"
}

if Yap = 1 {
Rick.Talk = 1
MsgBox.Msg="?."
MsgBox.Act = 0
MsgBox.Dist = 0
alarm[4] =60
Yap = 4
GameCam.direction = direction+180
if GameCam.direction>360 GameCam.direction = GameCam.direction-360
GameCam.x = CrystalPrison.x+144*sin((GameCam.direction+270)*pi/180)
GameCam.y = CrystalPrison.y+144*cos((GameCam.direction+270)*pi/180)
GameCam.z = CrystalPrison.z-104
Rick.direction = point_direction(Rick.x,Rick.y,CrystalPrison.x,CrystalPrison.y)
CrystalPrison.ZSpeed = -2
MsgBox.Letter = 1
}

if Yap = 5 {
CrystalPrison.ZSpeed = 0
Focus = 0
MsgBox.Msg = "#Shut up, you stupid monster!       #I'm a girl, not an object!"
}

if Yap =6{
Focus = 0
Rick.visible = 1
visible = 1
x = SierrGroundMark.x
y = SierrGroundMark.y
GameCam.x = Rick.x-48
GameCam.y = Rick.y-128
GameCam.direction =point_direction(GameCam.x,GameCam.y,Rick.x,Rick.y)
GameCam.z = z+12
MsgBox.Msg = "#Why are you taking her, Verne?"
}

if Yap =7{
Focus = 1
GameCam.direction =direction+192
Rick.visible = 0
Rick.Talk = 0
GameCam.x = x+96*sin((GameCam.direction+270)*pi/180)
GameCam.y = y+96*cos((GameCam.direction+270)*pi/180)
GameCam.z = z+16
MsgBox.Msg = "You don't really know about this princess, do you?          #She's more than what she seems. Yes, she IS a #princess, but she's also the daughter of the Great #Fairy Yura..."
}

if Yap =8{
Focus = 0
Rick.visible = 0
MsgBox.Msg = "#...and I am the son of Ghidra, the Great Dragon!!         #Together, we will end humanity!"
}

if Yap =9{
Focus = 0
MsgBox.Msg = "However, I'm a sporting man, so I'll give you the #benefit of the doubt... If you could reach the #Mountain of Illusion, I'll let you fight me for her #freedom."
}

if Yap =10{
Focus = 0
GameCam.direction =45
Rick.visible = 0
Rick.Talk = 1
Talk=0
GameCam.x = x+128*sin((GameCam.direction+270)*pi/180)
GameCam.y = y+128*cos((GameCam.direction+270)*pi/180)
GameCam.z = 128
MsgBox.Msg = "#NO! I WON'T help you, you freak!           #And quit talking about me like I'm some object!"
}

if Yap =11{
Focus = 0
GameCam.direction =direction
Rick.visible = 0
Rick.Talk = 0
GameCam.x = x+96*sin((GameCam.direction+270)*pi/180)
GameCam.y = y+96*cos((GameCam.direction+270)*pi/180)
GameCam.z = z+16
Talk=1
MsgBox.Msg = "#You have no choice, young lady. Besides, you're in a #shiny rock, so that's close enough, princess."
}

if Yap =12{
direction = direction+180
if direction > 360 direction = direction-360
MsgBox.Msg = "Anyway, "+global.Name+", as I said, I'll give you a #chance to reach the Mountain of Illusion.                   #I'll even give you a chance to find some more toys #before we meet again."
}

if Yap =13{
MsgBox.Msg = "#She'll be safe...            #until then, at any rate..."
}

if Yap =14{
Talk =0
CrystalPrison.ZSpeed = 8
ZSpeed = 4
z = z+1
Targeted =0
Mood = 2
sprite_index = VerneFlapD
image_speed =.5
Rick.visible = 1
alarm[4] = 30
Yap = 15
MsgBox.Letter = 1
MsgBox.Act = 0
MsgBox.Dist = 0
MsgBox.Msg = "?."
GameCam.x = x+144*sin((GameCam.direction+270)*pi/180)
GameCam.y = y+144*cos((GameCam.direction+270)*pi/180)
GameCam.z = 128
sound_fade(FinalBossA,0,5000)
}

if Yap =16{
global.Story += 1
global.CreateZ = z
instance_create(x,y,BigHeartToGet)
MsgBox.Letter = 1
MsgBox.Act = 0
MsgBox.Dist = 0
MsgBox.Msg = "?."
alarm[4] = 30
Yap = 17
}


if Yap =18{
MsgBox.Voice = 1
if point_distance(SierrGroundMark.x,SierrGroundMark.y,Rick.x,Rick.y) > 64{
GameCam.x = x
GameCam.y = y
GameCam.z = Rick.z+48
GameCam.direction = point_direction(GameCam.x,GameCam.y,Rick.x,Rick.y)
}
else{
GameCam.direction = random(360)
GameCam.x = Rick.x+128*sin((GameCam.direction+270)*pi/180)
GameCam.y = Rick.y+128*cos((GameCam.direction+270)*pi/180)
GameCam.z = 24
}
sound_loop(YuraBGM)
MsgBox.Msg = global.Name+"...          #I saw this event come to pass.          #Though I have foreseen these events, I could not #prevent them..."
}

if Yap =19{
MsgBox.Msg = "Do not worry, "+global.Name+"...              #I am here to help.             #If you wish to save my daughter, you must #find the Four Witches' Amulets."
}

if Yap =20{
MsgBox.Msg = "Much like the Witches themselves, they have been #scattered across the land by Wyverne Balzoda.           #They grant a greater power to the Witches, one that #can only be amplified by this very room."
}

if Yap =21{
MsgBox.Msg = "Once you have all Four Amulets, you must return to #this room.             #The Four will then help you reach the lair of the evil #Dragonian with their powers..."
}

if Yap =22{
MsgBox.Msg = "...but first, you must go to Vapora village.      #Once you're there, head for a cave in the north.           #I will explain everything there..."
}

if Yap =23{
MsgBox.Msg = "!"
GameCam.direction = Rick.direction
GameCam.CineMode = 0
Rick.Auto = 0
sound_volume(FinalBossA,1)
}
