#=================================================#
# Â Â Â Â Nekos famoses Quick Time Event Script
# Â Â Â Â >>>>>>>>> Version : zwischen 0 und 1
#---------------------------------------------------------------#
# Â Â Â Â (Es ist an Sinnlosigkeit und Simpelheit
#     kaum zu überbieten, deshalbt wird bei
# Â Â Â Â Benutzung um keine Danksagung gebeten.
#=================================================#
Â
class Scene_Geschick < Window_Base
 def initialize(index, zeit)
Â
# Dateinamen der Tasten; (Grafiken sollten 48x48 Pixel messen)
    @Taste_UP = "TasteOben.png"
    @Taste_DOWN = "TasteUnten.png"
    @Taste_LEFT = "TasteLinks.png"
    @Taste_RIGHT = "TasteRechts.png"
    @Taste_OK = "TasteOK.png"
    @Taste_ESC = "TasteEsc.png"
    @Richtige_Eingabe = "TasteDone.png"
    @Rich_Eing_Opacity = 255
# Dateinamen und Blending der Balken;...=["Name", (0=Norm, 1=Add, 2=Sub)]
# (Grafiken sollten 600x30 Pixel messen)
    @Balken_Overlay = ["Geschick-ZeitFüllung.png", 0]
    @Balken_BG = ["Geschick-Zeit.png", 0]
#---------------------------------------------------------------#
Â
  super(0, 310, 640, 80)
  self.contents = Bitmap.new(width - 32, height - 32)
  self.opacity = 0
  self.z = 9998
  @Maximale_Tasten = index
  @Zeit = zeit
  @Zeit_Intervall = 1.00000 / @Zeit / 3
 end
 def main
   @spriteset = Spriteset_Map.new
  $geschick = false
  $tasten_need = []
  @inx = 0
  @show_x = 20
  while @inx < @Maximale_Tasten
  $tasten_need[@inx] = rand(6)
   bitmap = RPG::Cache.picture(@Taste_UP) if $tasten_need[@inx] == 0
   bitmap = RPG::Cache.picture(@Taste_DOWN) if $tasten_need[@inx] == 1
   bitmap = RPG::Cache.picture(@Taste_LEFT) if $tasten_need[@inx] == 2
   bitmap = RPG::Cache.picture(@Taste_RIGHT) if $tasten_need[@inx] == 3
   bitmap = RPG::Cache.picture(@Taste_OK) if $tasten_need[@inx] == 4
   bitmap = RPG::Cache.picture(@Taste_ESC) if $tasten_need[@inx] == 5
  self.contents.blt(@show_x, 0, bitmap, Rect.new(0, 0, 48, 48))
  @inx += 1
  @show_x  += 48
  end
  @inx = 0
  @show_x = 20
  @addition_1 = Sprite.new
  @addition_1.bitmap = RPG::Cache.picture(@Balken_BG[0])
  @addition_1.blend_type = @Balken_BG[1]
  @addition_1.x = 20
  @addition_1.y = y + 10
  @addition_1.z = 9997
  @addition_2 = Sprite.new
  @addition_2.bitmap = RPG::Cache.picture(@Balken_Overlay[0])
  @addition_2.blend_type = @Balken_Overlay[1]
  @addition_2.x = 20
  @addition_2.y = y + 10
  @addition_2.z = 9998
Graphics.transition
   loop do
  Graphics.update
  Input.update
  update
  if $scene != self
    break
  end
  end
  Graphics.freeze
  @addition_1.dispose
  @addition_2.dispose
  @spriteset.dispose
  self.contents.dispose
  self.dispose
 end
 def update
  if Input.trigger?(Input::C)
  if $tasten_need[@inx] == 4
    $game_system.se_play($data_system.cursor_se)
     bitmap = RPG::Cache.picture(@Richtige_Eingabe)
     self.contents.blt(@show_x, 0, bitmap, Rect.new(0, 0, 48, 48), @Rich_Eing_Opacity)
     @inx += 1
     @show_x += 48
   else
     $game_system.se_play($data_system.buzzer_se)
      $geschick = false
      $scene = Scene_Map.new
   end
   elsif Input.trigger?(Input::B)
    if $tasten_need[@inx] == 5
    $game_system.se_play($data_system.cursor_se)
     bitmap = RPG::Cache.picture(@Richtige_Eingabe)
     self.contents.blt(@show_x, 0, bitmap, Rect.new(0, 0, 48, 48), @Rich_Eing_Opacity)
     @inx += 1
     @show_x += 48
   else
     $game_system.se_play($data_system.buzzer_se)
      $geschick = false
      $scene = Scene_Map.new
    end
    elsif Input.trigger?(Input::UP)
    if $tasten_need[@inx] == 0
    $game_system.se_play($data_system.cursor_se)
     bitmap = RPG::Cache.picture(@Richtige_Eingabe)
     self.contents.blt(@show_x, 0, bitmap, Rect.new(0, 0, 48, 48), @Rich_Eing_Opacity)
     @inx += 1
     @show_x += 48
   else
     $game_system.se_play($data_system.buzzer_se)
      $geschick = false
      $scene = Scene_Map.new
    end
    elsif Input.trigger?(Input::DOWN)
    if $tasten_need[@inx] == 1
    $game_system.se_play($data_system.cursor_se)
     bitmap = RPG::Cache.picture(@Richtige_Eingabe)
     self.contents.blt(@show_x, 0, bitmap, Rect.new(0, 0, 48, 48), @Rich_Eing_Opacity)
     @inx += 1
     @show_x += 48
   else
     $game_system.se_play($data_system.buzzer_se)
      $geschick = false
      $scene = Scene_Map.new
    end
    elsif Input.trigger?(Input::LEFT)
    if $tasten_need[@inx] == 2
    $game_system.se_play($data_system.cursor_se)
     bitmap = RPG::Cache.picture(@Richtige_Eingabe)
     self.contents.blt(@show_x, 0, bitmap, Rect.new(0, 0, 48, 48), @Rich_Eing_Opacity)
     @inx += 1
     @show_x += 48
   else
     $game_system.se_play($data_system.buzzer_se)
      $geschick = false
      $scene = Scene_Map.new
    end
    elsif Input.trigger?(Input::RIGHT)
    if $tasten_need[@inx] == 3
    $game_system.se_play($data_system.cursor_se)
     bitmap = RPG::Cache.picture(@Richtige_Eingabe)
     self.contents.blt(@show_x, 0, bitmap, Rect.new(0, 0, 48, 48), @Rich_Eing_Opacity)
     @inx += 1
     @show_x += 48
   else
     $game_system.se_play($data_system.buzzer_se)
      $geschick = false
      $scene = Scene_Map.new
    end
  end
  if @inx >= @Maximale_Tasten
    $game_system.se_play($data_system.decision_se)
    $geschick = true
    $scene = Scene_Map.new
    return
  end
  @addition_1.update
  @spriteset.update
  @addition_2.zoom_x -= @Zeit_Intervall
  @addition_2.update
  if @addition_2.zoom_x <= 0
  $game_system.se_play($data_system.buzzer_se)
  $geschick = false
  $scene = Scene_Map.new
  end
  end
end