:use_teleport
  js this.clearReservedChoices();

  if $gamePlayer.isRiding()
    js this.addChoice("Just Jump Off");
  end

  js Tools.Teleport.addTeleportLocations(this);
  + this.addChoice('Nowhere');

  Player ("Where will I teleport to?", "Nowhere")

  if response == "Nowhere"
    return
  end

  if response == "Just Jump Off"
    js $gamePlayer.getOffRide();
    return
  end

  js Tools.Teleport.doTeleportAnimation();
  wait 30
  fade out
  js Tools.Teleport.performTeleport(response);
  wait 1
  fade in

:use_sleep_anywhere
  include player_start_sleeping

  wait 30
  js $gameSystem.sleepStanding();
  include continue_sleep_anywhere

:continue_sleep_anywhere
  if $gameSystem.isPlayerSleepingStanding
    js window.tiredAnimationEvent.setDirection(Direction.RIGHT);
    + window.tiredAnimationEvent.setPattern(0);
    wait 30
  end

  if $gameSystem.isPlayerSleepingStanding
    wait 30
  end
  if $gameSystem.isPlayerSleepingStanding
    wait 30
  end
  
  if $gameSystem.isPlayerSleepingStanding
    js window.tiredAnimationEvent.setPattern(1);
    wait 30
  end
  if $gameSystem.isPlayerSleepingStanding
    wait 30
  end
  if $gameSystem.isPlayerSleepingStanding
    wait 30
  end
  
  if $gameSystem.isPlayerSleepingStanding
    js window.tiredAnimationEvent.setPattern(2);
    wait 30
  end
  if $gameSystem.isPlayerSleepingStanding
    wait 30
  end
  if $gameSystem.isPlayerSleepingStanding
    wait 30
  end
  
  if $gameSystem.isPlayerSleepingStanding
    js window.tiredAnimationEvent.setDirection(Direction.UP);
    + window.tiredAnimationEvent.setPattern(0);
    wait 30
  end
  if $gameSystem.isPlayerSleepingStanding
    wait 30
  end
  if $gameSystem.isPlayerSleepingStanding
    wait 30
  end
  
  if $gameSystem.isPlayerSleepingStanding
    js window.tiredAnimationEvent.setPattern(1);
    wait 30
  end
  if $gameSystem.isPlayerSleepingStanding
    wait 30
  end
  if $gameSystem.isPlayerSleepingStanding
    wait 30
  end
  
  if $gameSystem.isPlayerSleepingStanding
    js window.tiredAnimationEvent.setPattern(2);
    wait 30
  end
  if $gameSystem.isPlayerSleepingStanding
    wait 30
  end
  if $gameSystem.isPlayerSleepingStanding
    wait 30
  end

  if $gameSystem.isPlayerSleepingStanding    
    play continue_sleep_anywhere
  else
    include player_stop_sleeping
  end