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

function RoomInit()
    if(FLJ("HeroBack")) then
        ANP("Computer1","linked")
        ANP("Teleporter1","on")
    elseif(FLJ("ExploreEscapeRoutes")) then
        ANP("Computer1","no_link")
        ANP("Teleporter1","empty")
    end
end

function GoSoapCastle()
    PRI()FAO(3)TRA("CS_soapcastle","E0091",33,30)
end

function SwimSoapCastleJail()
    PRI()FAO(2)TRA("CS_soapcastle_jail","E0090",38,1)
end

function SwimSoapCastleStoreRoom()
    PRI()FAO(0)TRA("CS_soapcastle_storeroom","E0092",38,21)
end

function Computer1()
    if(FLJ("HeroBack")) then
        PRI()
        MS4("\nThe screen displays:")NOD()CLR()
        TUR()CAT("\n[Connected to the black market.]")NOD()
    elseif(FLJ("ExploreEscapeRoutes")) then
        PRI()
        MS4("\nThe screen displays:")NOD()CLR()
        TUR()CAT("\n[No destination available for teleportation.]")NOD()
    else
        PRI()
        MS4("Looking at this size")
        CAT("\nit must be a computer used by giants.")NOD()CLR()
        FAC("jack_normal")CAT("\nI think so too...")NOD()
    end
end

function SetTeleporter()
    if(FLJ("HeroBack")) then
        PRI()
        MS4("\nTransport to [Black Market]?")YNJ()
        if(YES()) then
            CLO()
            KEY()
            AMC("normal")
            WAI(60)
            SOU("CS_029_teleport")
            ANP("TeleporterBase1","light_on")
            AMC("teleport_out")
            WAI(100)
            FAO(0)
            if(FLJ("BackTalaRoom")) then
                TRA("CS_gaudi_blackmaket_teleport","QuoteCurlyArrive",10,14)
            else
                TRA("CS_gaudi_blackmaket","TheTrade",16,19)
            end
        end
    elseif(FLJ("ExploreEscapeRoutes")) then
        PRI()
        MS4("\nThe teleporter is in standby mode.")NOD()
    else
        PRI()
        MS4("This is a large teleporter,")NOD()
        CAT("\ncurrently powered off.")NOD()
    end
end

function QuoteCurlyArrive()
    KEY()
    RoomInit()
    CMU("CS_Vivi")
    FAI(2)
    WAI(60)
    ANP("TeleporterBase1","light_on")
    MOV(29,14,MCI("CS_mychar_quote"))
    MOV(31,14,MCI("CS_mychar_curly"))
    SLR(1)
    SOU("CS_029_teleport")
    AMC("teleport_in")
    WAI(100)
    ANP("TeleporterBase1","light_off")
end

function DryIronhead()
    KEY()
    SNP("CS_soapwalker_animate",23,15,1,"mainLayer","Tala1")
    ANP("Tala1","back")
    ANP("Computer1","special")
    ANP("Teleporter1","special")
    SNP("CS_redhead_animate",30,12,0,"mainLayer","Ironhead1")
    FAI(2)
    WAI(32)
    FAC("soapwalker_normal")MS3("This should do it,")NOD()
    ANP("Tala1","normal")
    CAT("\nDry up quickly now~")NOD()CLR()
    CAT("Though you might end up")
    CAT("\nlike grilled fish...")NOD()CLO()
    FAO(0)
    TRA("CS_soapcastle_waterfall","SoapKingGoResturant",3,17)
end