function E0090()
    MNA()CMU("XXXX")FAI(0)
end
function E0091()
    MNA()CMU("XXXX")FAI(1)
end
function E0092()
    MNA()CMU("XXXX")FAI(2)
end
function E0093()
    MNA()CMU("XXXX")FAI(3)
end
function E0094()
    MNA()CMU("XXXX")FAI(4)
end

function GoSoapCastleStair()
    PRI()FAO(2)TRA("CS_soapcastle_stair","E0090",46,8,0,32)
end

function CheckRedBook()
    PRI()
    MS3("A book lying on the ground,")NOD()
    CAT("\nThe title reads 'How to Raise Dragon Fish'")NOD()
    CAT("\nAuthor unknown.")NOD()
end

function CheckPurpleBook()
    PRI()
    MS3("A book lying on the ground,")NOD()
    CAT("\nThe title reads 'How to Control Magic'")NOD()
    CAT("\nThe author is Misery.")NOD()
end

function HidePuppy()
    KEY()
    CMU("CS_Vivi")
    FAC("curly_happy")MS3("Look! Quote")NOD()
    CAT("\nI found a good spot~")NOD()CLO()
    MOV(8,15,MCI("CS_mychar_curly"))SLR(1,MCI("CS_mychar_curly"))
    MOV(10,15,MCI("CS_mychar_quote"))SLR(0,MCI("CS_mychar_quote"))
    FAI(3)
    WAI(30)
    FAC("curly_normal")MS3("Puppy~")NOD()
    CAT("\nYou rest here for now.")NOD()
    CAT("\nThey'll come pick you up later.")NOD()CLO()
    FAO(2)TRA("CS_peace_town_hotel","KazumaAndSue",6,13)
end

function ContinueRescue()
    KEY()
    CMU("CS_Vivi")
    MOV(8,15,MCI("CS_mychar_curly"))SLR(1,MCI("CS_mychar_curly"))
    MOV(10,15,MCI("CS_mychar_quote"))SLR(0,MCI("CS_mychar_quote"))
    FAI(2)
    FAC("curly_normal")MS3("Sue and the others replied")
    CAT("\nthat they've sent a rescue team")
    CAT("\nthis way.")NOD()CLR()
    CAT("No time to waste")
    CAT("\nLet's hurry and save everyone!")NOD()
end

function Puppy1()
    KEY()
    MS3("\nIt's fast asleep...")NOD()
end

function ProfessorBoosterSavePuppy()
    KEY()
    FAI(1)
    WAI(16)
    SNP("CS_bluerobot_animate",32,16,0,"mainLayer","BlueRobot1")
    ANP("BlueRobot1","walk",0)
    WAI(96)
    ANP("BlueRobot1","normal",0)
    WAI(16)
    MS3("\n[Rescue target located!]")NOD()CLR()
    FAC("professorbooster_normal")MS3("Really?!")NOD()
    CAT("\nI'm coming right now!")NOD()CLO()
    SNP("CS_professor_booster_animate",32,16,0,"mainLayer","ProfessorBooster1")
    WAI(16)
    ANP("ProfessorBooster1","walk",0)
    WAI(32)
    SNP("CS_bluerobot_animate",32,16,0,"mainLayer","BlueRobot2")
    ANP("BlueRobot2","walk",0)
    WAI(32)
    FAO(1)
    MNP("BlueRobot1",8,15,1)
    ANP("BlueRobot1","normal",1)
    MNP("BlueRobot2",23,16,1)
    ANP("BlueRobot2","normal",1)
    MNP("ProfessorBooster1",10,15,0)
    ANP("ProfessorBooster1","normal",0)
    FAI(3)
    WAI(32)
    FAC("professorbooster_normal")MS3("It seems to be just sleeping,")
    CAT("\nnothing serious.")NOD()CLR()
    CAT("Rescue Bot 1, pick it up")
    CAT("\nand take it back to the ship...")NOD()CLR()
    FAC()CAT("\n[Roger that!]")NOD()CLO()
    FAO(1)
    DNP("BlueRobot1")
    DNP("Puppy1")
    FLP("PuppySaved")
    TRA("CS_soapcastle_kingbedroom","ProfessorBoosterPickBook",32,16)
end

function ProfessorBoosterPickBook()
    KEY()
    SNP("CS_professor_booster_animate",14,16,0,"mainLayer","ProfessorBooster1")
    ANP("ProfessorBooster1","walk",1)
    SNP("CS_bluerobot_animate",23,16,1,"mainLayer","BlueRobot2")
    FAI(3)
    WAI(64)
    ANP("ProfessorBooster1","normal",1)
    WAI(32)
    FAC("professorbooster_normal")MS3("Hmm..")NOD()
    CAT("\nThere's actually a book here.")NOD()CLO()
    ANP("ProfessorBooster1","walk",1)
    WAI(16)
    ANP("ProfessorBooster1","back",1)
    WAI(32)
    FAC("professorbooster_normal")MS3("It says [How to Control Magic]")
    CAT("\nby Misery.")NOD()CLR()
    CAT("A book written by that witch,")NOD()
    CAT("\nbut I'm not interested in magic...")NOD()CLO()
    ANP("ProfessorBooster1","walk",1)
    WAI(16)
    ANP("BlueRobot2","walk",1)
    WAI(32)
    ANP("ProfessorBooster1","normal",1)
    WAI(32)
    ANP("BlueRobot2","normal",0)
    WAI(16)
    FAC("professorbooster_normal")MS3("Though considering")
    CAT("\nhow slow our aircraft is,")NOD()
    CAT("\nI might as well take the book") 
    CAT("\nto pass the time...")NOD()CLO()
    ANP("ProfessorBooster1","walk",0)
    WAI(48)
    ANP("ProfessorBooster1","back",0)
    WAI(16)
    DNP("CheckPurpleBook")
    WAI(32)
    ANP("ProfessorBooster1","walk",1)
    WAI(64)
    FAO(1)
    TRA("CS_soapcastle_golemhall","ProfessorBoosterGetWand",3,18)
end