function onBegin()
  disableRetry()
  disableMovement()
  setFlag("intro_blue", true)
  wait(2)
  setFlag("intro_red", true)
  say("AMBERSCHNAKE_ASTERACEAEBARRENS_0_INTRO_A")
  setFlag("intro_red", false)
  wait(0.4)
  setFlag("intro_green", true)
  say("AMBERSCHNAKE_ASTERACEAEBARRENS_0_INTRO_B")
  setFlag("intro_green", false)
  wait(0.4)
  setFlag("intro_red", true)
  say("AMBERSCHNAKE_ASTERACEAEBARRENS_0_INTRO_C")
  setFlag("intro_red", false)
  wait(0.4)
  setFlag("intro_green", true)
  say("AMBERSCHNAKE_ASTERACEAEBARRENS_0_INTRO_D")
  setFlag("intro_green", false)
  wait(0.4)
  setFlag("intro_red", true)
  say("AMBERSCHNAKE_ASTERACEAEBARRENS_0_INTRO_E")
  setFlag("intro_red", false)
  wait(0.4)
  setFlag("intro_green", true)
  say("AMBERSCHNAKE_ASTERACEAEBARRENS_0_INTRO_F")
  setFlag("intro_green", false)
  wait(1.2)
  say("AMBERSCHNAKE_ASTERACEAEBARRENS_0_INTRO_G")
  setFlag("intro_blue", false)
  wait(3)
  say("AMBERSCHNAKE_ASTERACEAEBARRENS_0_INTRO_END")
  setFlag("intro_title_black", true)
  playSound("event:/AmberSchnake_AsteraceaeBarrens_Postcard_in")
  runTo(72, false)
  jump(0.15)
  runTo(128, false)
  jump(0.25)
  runTo(216, false)
  jump(0.35)
  runTo(380, false)
  setFlag("intro_title_text", true)
  playSound("event:/AmberSchnake_AsteraceaeBarrens_Postcard_out")
  wait(1.5)
  playSound("event:/char/badeline/booster_final")
  wait(4.5)
  setFlag("intro_title_text", false)
  instantTeleportTo(336, 16)
  wait(1)
end

function onEnd(room, wasSkipped)
  if (wasSkipped == true) then
    instantTeleportTo(368, 16)
    setFlag("intro_blue", true)
    setFlag("intro_red", false)
    setFlag("intro_green", false)
    setFlag("intro_title_black", true)
    setFlag("intro_title_text", false)
  end
  if (wasSkipped == false) then
    enableRetry()
    enableMovement()
    completeArea(false, false, true)
  end
end