Ogłoszenie 

Uwaga! To forum jest w trybie offline.
Wszelką pomoc uzyskasz pod adresem
forum.ultimateam.pl


Administracja Forum


Poprzedni temat «» Następny temat
Window CMS
Autor Wiadomość
shiwt 




Preferowany:
RPG Maker XP

Pomógł: 13 razy
Dołączył: 02 Lip 2010
Posty: 131
Skąd: z Polski
Wysłany: Sob 03 Lip, 2010 18:56
Window CMS
Zrobiłem tego CMS'a 4 miesiące temu ... Dam od razu poprawiona wersję 1.1. Okienka płynnie wchodzą.

Spoiler:

Kod:

# Autor - Gatoz (shiwt). Szczególne podziękowania dla Thieffer'a. Egrimowi i
# HellKillerowi też dzięki za pomoc przy malutkim błędzie ;)
# Jest mój pierwszy CMS więc proszę o wyrozumiałość :]

#-------------------------------Window CMS 1.1----------------------------------

# Dodałem możliwość zmiany przezroczystości, czcionki i jej rozmiaru, kilka
# napisów znajdujących się w menu, tj. czas gry, kroki i inne. Szybkość
# wchodzenia okienek. Zmienna odpowiadającej za reputację i szybka możliwość
# zmiany poszczególnych nazw w reputacji.

Szybkość = 5 # UWAGA! Szybkość wchodzenia okienek może wynosić TYLKO 1, 2 albo 5
Przezroczystość = 127
Zmienna = 0001
Czcionka = "Arial"
Rozmiar = 24
Napis_u_góry_ekranu = "  Menu"
Liczba_kroków = "Liczba kroków"
Czas_gry = "Czas gry"
Poziom_1 = "Wieśniak"
Poziom_2 = "Chłop"
Poziom_3 = "Obywatel"
Poziom_4 = "Rycerz"
Poziom_5 = "Szlachcic"
Poziom_6 = "Król"

#-------------------------------------------------------------------------------
# Scene_Menu -------------------------------------------------------------------
#-------------------------------------------------------------------------------
class Scene_Menu
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def main
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Zapisz"
    s6 = "Wczytaj"
    s7 = "Wyjście"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    @command_window.x = -160 - @command_window.width / 30
    @command_window.y = 58 - @command_window.height / 30
    @command_window.back_opacity = Przezroczystość
    if $game_party.actors.size == 0
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    if $game_system.save_disabled
      @command_window.disable_item(4)
    end
#-------------------------------------------------------------------------------
# Wchodzenie okienek -----------------------------------------------------------
#-------------------------------------------------------------------------------
    @okno1 = Window_Gold2.new
    @okno2 = Window_Steps2.new
    @okno3 = Window_PlayTime2.new
    @okno4 = Window_Napis.new
    @status_window = Window_Postać.new
    @okno6 = Window_Lokacja.new
    @okno7 = Window_Reputacja.new
    @okno1.x = 640
    @okno1.y = 50
    @okno2.x = 640
    @okno2.y = 114
    @okno3.x = 640
    @okno3.y = 210
    @okno4.x = 0
    @okno4.y = -50
    @status_window.x = 0
    @status_window.y = 480
    @okno6.x = 640
    @okno6.y = 306
    @okno7.x = -165
    @okno7.y = 306
    @spriteset = Spriteset_Map.new
    @appearing = true
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @okno1.dispose
    @okno2.dispose
    @okno3.dispose
    @okno4.dispose
    @status_window.dispose
    @okno6.dispose
    @command_window.dispose
    @spriteset.dispose
    @okno7.dispose
  end
 
  def appear
    @okno1.x -= Szybkość if @okno1.x > 480
    @okno2.x -= Szybkość if @okno2.x > 480
    @okno3.x -= Szybkość  if @okno3.x > 480
    @okno4.y += Szybkość if @okno4.y < 0
    @status_window.y -= Szybkość if @status_window.y > 370
    @okno6.x -= Szybkość if @okno6.x > 480
    @command_window.x += Szybkość if @command_window.x < 0
    @okno7.x += Szybkość if @okno7.x < 0
    if @okno1.x == 480 and @okno2.x == 480 and @okno3.x == 480 and @okno4.y == 0 and @status_window.y == 370 and @okno6.x == 480 and @command_window.x == 0 and @okno7.x == 0
      @appearing = false
    end
  end
  def update
    if @appearing
      appear
    end
    @okno1.update
    @okno2.update
    @okno3.update
    @okno4.update
    @status_window.update
    @okno6.update
    @command_window.update
    @spriteset.update
    @okno7.update
#-------------------------------------------------------------------------------
# Reszta Scene_Menu ------------------------------------------------------------
#-------------------------------------------------------------------------------
    if @command_window.active
      update_command
      return
    end
    if @status_window.active
      update_status
      return
    end
  end
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::C)
      if $game_party.actors.size == 0 and @command_window.index < 4
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0  # item
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Item.new
      when 1  # skill
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # save
        if $game_system.save_disabled
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Save.new
      when 5  # load
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Loading.new
      when 6  # end game       
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_End.new
      end
      return
    end
  end
  def update_status
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 1  # skill
        if $game_party.actors[@status_window.index].restriction >= 2
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end
#-------------------------------------------------------------------------------
# Window_Selectable2 -----------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Selectable2 < Window_Base
  attr_reader   :index                   
  attr_reader   :help_window         
  def initialize(x, y, width, height)
    super(x, y, width, height)
    @item_max = 1
    @column_max = 4
    @index = -1
  end
  def index=(index)
    @index = index
    if self.active and @help_window != nil
      update_help
    end
    update_cursor_rect
  end
  def row_max
    return (@item_max + @column_max - 1) / @column_max
  end
  def top_row
    return self.ox / 32
  end
  def top_row=(row)
    if row < 0
      row = 0
    end
    if row > row_max - 1
      row = row_max - 1
    end
    self.ox = row * 32
  end
  def page_row_max
    return (self.height - 32) / 32
  end
  def page_item_max
    return page_row_max * @column_max
  end
  def help_window=(help_window)
    @help_window = help_window
    if self.active and @help_window != nil
      update_help
    end
  end
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
      return
    end
    row = @index / @column_max
    if row < self.top_row
      self.top_row = row
    end
    if row > self.top_row + (self.page_row_max - 1)
      self.top_row = row - (self.page_row_max - 1)
    end
    cursor_width = self.width / @column_max - 32
    y = @index % @column_max * (cursor_width + 32)
    x = @index / @column_max * 32 - self.oy
    self.cursor_rect.set(x, y, cursor_width, 32)
  end
  def update
    super
    if self.active and @item_max > 0 and @index >= 0
      if Input.repeat?(Input::DOWN)
        if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
           @index < @item_max - @column_max
          $game_system.se_play($data_system.cursor_se)
          @index = (@index + @column_max) % @item_max
        end
      end
      if Input.repeat?(Input::UP)
        if (@column_max == 1 and Input.trigger?(Input::UP)) or
           @index >= @column_max
          $game_system.se_play($data_system.cursor_se)
          @index = (@index - @column_max + @item_max) % @item_max
        end
      end
      if Input.repeat?(Input::RIGHT)
        if @column_max >= 2 and @index < @item_max - 1
          $game_system.se_play($data_system.cursor_se)
          @index += 1
        end
      end
      if Input.repeat?(Input::LEFT)
        if @column_max >= 2 and @index > 0
          $game_system.se_play($data_system.cursor_se)
          @index -= 1
        end
      end
      if Input.repeat?(Input::R)
        if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
          $game_system.se_play($data_system.cursor_se)
          @index = [@index + self.page_item_max, @item_max - 1].min
          self.top_row += self.page_row_max
        end
      end
      if Input.repeat?(Input::L)
        if self.top_row > 0
          $game_system.se_play($data_system.cursor_se)
          @index = [@index - self.page_item_max, 0].max
          self.top_row -= self.page_row_max
        end
      end
    end
    if self.active and @help_window != nil
      update_help
    end
    update_cursor_rect
  end
end
#-------------------------------------------------------------------------------
# Scene_Loading ----------------------------------------------------------------
#-------------------------------------------------------------------------------
class Scene_Loading < Scene_File
  def initialize
    $game_temp = Game_Temp.new
    $game_temp.last_file_index = 0
    latest_time = Time.at(0)
    for i in 0..3
      filename = make_filename(i)
      if FileTest.exist?(filename)
        file = File.open(filename, "r")
        if file.mtime > latest_time
          latest_time = file.mtime
          $game_temp.last_file_index = i
        end
        file.close
      end
    end
    super("Czy chcesz wczytać grę?")
  end
  def on_decision(filename)
    unless FileTest.exist?(filename)
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    $game_system.se_play($data_system.load_se)
    file = File.open(filename, "rb")
    read_save_data(file)
    file.close
    $game_system.bgm_play($game_system.playing_bgm)
    $game_system.bgs_play($game_system.playing_bgs)
    $game_map.update
    $scene = Scene_Map.new
  end
  def on_cancel
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Menu.new(5)
  end
  def read_save_data(file)
    characters = Marshal.load(file)
    Graphics.frame_count = Marshal.load(file)
    $game_system        = Marshal.load(file)
    $game_switches      = Marshal.load(file)
    $game_variables     = Marshal.load(file)
    $game_self_switches = Marshal.load(file)
    $game_screen        = Marshal.load(file)
    $game_actors        = Marshal.load(file)
    $game_party         = Marshal.load(file)
    $game_troop         = Marshal.load(file)
    $game_map           = Marshal.load(file)
    $game_player        = Marshal.load(file)
    if $game_system.magic_number != $data_system.magic_number
      $game_map.setup($game_map.map_id)
      $game_player.center($game_player.x, $game_player.y)
    end
    $game_party.refresh
  end
end
#-------------------------------------------------------------------------------
# Scene_End --------------------------------------------------------------------
#-------------------------------------------------------------------------------
class Scene_End
alias oldupdate update
  def update
    @command_window.update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(6)
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0  # to title
        command_to_title
      when 1  # shutdown
        command_shutdown
      when 2  # quit
        command_cancel
        $scene = Scene_Menu.new(6)
      end
      return
      oldupdate
    end
  end
end
#-------------------------------------------------------------------------------
# Window_Postać (Status Menu) --------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Postać < Window_Selectable2
  def initialize
    super(0, 480, 640, 110)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    refresh
    self.active = false
    self.index = -1
    self.back_opacity = Przezroczystość
  end
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = i * 160
      y = 0
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x + 100, y + 65)
      draw_actor_name(actor, x, y)
      draw_actor_state(actor, x, y + 32)
    end
  end
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(@index * 160, 0, self.height + 18, 78)
    end
  end
end
#-------------------------------------------------------------------------------
# Napis "Menu" u góry ekranu ---------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Napis < Window_Base
  def initialize
    super(0, -50, 640, 50)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.draw_text(100, -3, 400, 25, Napis_u_góry_ekranu, 1)
  end
end
#-------------------------------------------------------------------------------
# Window_Lokacja ---------------------------------------------------------------
#-------------------------------------------------------------------------------
class Game_Map
  def name
    $map_infos[@map_id]
  end
end

class Scene_Title
  $map_infos = load_data("Data/MapInfos.rxdata")
  for key in $map_infos.keys
    $map_infos[key] = $map_infos[key].name
  end
end

class Window_Lokacja < Window_Base
  def initialize
    super(640, 306, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    cx = contents.text_size($game_map.name).width
    self.contents.draw_text(124-cx, 0, cx, 32, $game_map.name, 1)
  end
end
#-------------------------------------------------------------------------------
# Window_Gold ------------------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Gold2 < Window_Base
  def initialize
    super(0, 0, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
  end
end
#-------------------------------------------------------------------------------
# Window_Steps -----------------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Steps2 < Window_Base
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, Liczba_kroków)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2)
  end
end
#-------------------------------------------------------------------------------
# Window_PlayTime --------------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_PlayTime2 < Window_Base
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, Czas_gry)
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, text, 2)
  end
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end
#-------------------------------------------------------------------------------
# Window_Reputacja -------------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Reputacja < Window_Base
  def initialize
    super(640, 306, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    @reputacja = $game_variables[Zmienna]
    if @reputacja == 0
      self.contents.draw_text(0, 0, 124, 32, Poziom_1, 1)
    end   
    if @reputacja == 10
      self.contents.draw_text(0, 0, 124, 32, Poziom_2, 1)
    end
    if @reputacja == 30
      self.contents.draw_text(0, 0, 124, 32, Poziom_3, 1)
    end
    if @reputacja == 50
      self.contents.draw_text(0, 0, 124, 32, Poziom_4, 1)
    end
    if @reputacja == 85
      self.contents.draw_text(0, 0, 124, 32, Poziom_5, 1)
    end
    if @reputacja == 100
      self.contents.draw_text(0, 0, 124, 32, Poziom_6, 1)
    end
  end
end

Spoiler:



http://www.box.net/shared/vo62ncpsmb
Ostatnio zmieniony przez Nhadala Pon 05 Lip, 2010 18:51, w całości zmieniany 1 raz  
 
 
Agumon 




Preferowany:
RPG Maker VX

Ranga RM:
1 gra

Pomógł: 53 razy
Dołączył: 30 Gru 2009
Posty: 515
Skąd: Ruda Śląska
Wysłany: Sro 07 Lip, 2010 18:31
Bardzo fajny skrypt. Na pewno się przyda.Ale małe pytanko. Czy te postacie w tym menu można ustawić żeby tak chodziły lub stały??
________________________
Pomogłem? Daj ""
Piszę poprawnie po polsku

 
 
shiwt 




Preferowany:
RPG Maker XP

Pomógł: 13 razy
Dołączył: 02 Lip 2010
Posty: 131
Skąd: z Polski
Wysłany: Sro 07 Lip, 2010 19:49
Postacie nie są animowane, ale na pewno jakoś można to zrobić, tyle że ja nie wiem jak :/
Ciesze się że ktoś go wykorzysta ;)
________________________

http://www.ultimateam.pl/viewtopic.php?t=6177

http://www.ultimateam.pl/...p?p=61308#61308

http://www.ultimateam.pl/...p?p=73767#73767
 
 
Ayene 




Ranga RM:
4 gry

Pomogła: 232 razy
Dołączyła: 18 Wrz 2007
Posty: 2424
Wysłany: Czw 08 Lip, 2010 20:40
Wersja z animowanymi postaciami ;-)
Spoiler:

Kod:
# Autor - Gatoz (shiwt). Szczególne podziękowania dla Thieffer'a. Egrimowi i
# HellKillerowi też dzięki za pomoc przy malutkim błędzie ;)
# Jest mój pierwszy CMS więc proszę o wyrozumiałość :]

#-------------------------------Window CMS 1.1----------------------------------

# Dodałem możliwość zmiany przezroczystości, czcionki i jej rozmiaru, kilka
# napisów znajdujących się w menu, tj. czas gry, kroki i inne. Szybkość
# wchodzenia okienek. Zmienna odpowiadającej za reputację i szybka możliwość
# zmiany poszczególnych nazw w reputacji.

Szybkość = 5 # UWAGA! Szybkość wchodzenia okienek może wynosić TYLKO 1, 2 albo 5
Przezroczystość = 127
Zmienna = 0001
Czcionka = "Arial"
Rozmiar = 24
Napis_u_góry_ekranu = "  Menu"
Liczba_kroków = "Liczba kroków"
Czas_gry = "Czas gry"
Poziom_1 = "Wieśniak"
Poziom_2 = "Chłop"
Poziom_3 = "Obywatel"
Poziom_4 = "Rycerz"
Poziom_5 = "Szlachcic"
Poziom_6 = "Król"

#-------------------------------------------------------------------------------
# Scene_Menu -------------------------------------------------------------------
#-------------------------------------------------------------------------------
class Scene_Menu
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def main
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Zapisz"
    s6 = "Wczytaj"
    s7 = "Wyjście"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    @command_window.x = -160 - @command_window.width / 30
    @command_window.y = 58 - @command_window.height / 30
    @command_window.back_opacity = Przezroczystość
    if $game_party.actors.size == 0
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    if $game_system.save_disabled
      @command_window.disable_item(4)
    end
#-------------------------------------------------------------------------------
# Wchodzenie okienek -----------------------------------------------------------
#-------------------------------------------------------------------------------
    @okno1 = Window_Gold2.new
    @okno2 = Window_Steps2.new
    @okno3 = Window_PlayTime2.new
    @okno4 = Window_Napis.new
    @status_window = Window_Postać.new
    @okno6 = Window_Lokacja.new
    @okno7 = Window_Reputacja.new
    @okno1.x = 640
    @okno1.y = 50
    @okno2.x = 640
    @okno2.y = 114
    @okno3.x = 640
    @okno3.y = 210
    @okno4.x = 0
    @okno4.y = -50
    @status_window.x = 0
    @status_window.y = 480
    @okno6.x = 640
    @okno6.y = 306
    @okno7.x = -165
    @okno7.y = 306
    @spriteset = Spriteset_Map.new
    @appearing = true
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @okno1.dispose
    @okno2.dispose
    @okno3.dispose
    @okno4.dispose
    @status_window.dispose
    @okno6.dispose
    @command_window.dispose
    @spriteset.dispose
    @okno7.dispose
  end
 
  def appear
    @okno1.x -= Szybkość if @okno1.x > 480
    @okno2.x -= Szybkość if @okno2.x > 480
    @okno3.x -= Szybkość  if @okno3.x > 480
    @okno4.y += Szybkość if @okno4.y < 0
    @status_window.y -= Szybkość if @status_window.y > 370
    @okno6.x -= Szybkość if @okno6.x > 480
    @command_window.x += Szybkość if @command_window.x < 0
    @okno7.x += Szybkość if @okno7.x < 0
    if @okno1.x == 480 and @okno2.x == 480 and @okno3.x == 480 and @okno4.y == 0 and @status_window.y == 370 and @okno6.x == 480 and @command_window.x == 0 and @okno7.x == 0
      @appearing = false
    end
  end
  def update
    if @appearing
      appear
    end
    @okno1.update
    @okno2.update
    @okno3.update
    @okno4.update
    @status_window.update
    @okno6.update
    @command_window.update
    @spriteset.update
    @okno7.update
#-------------------------------------------------------------------------------
# Reszta Scene_Menu ------------------------------------------------------------
#-------------------------------------------------------------------------------
    if @command_window.active
      update_command
      return
    end
    if @status_window.active
      update_status
      return
    end
  end
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::C)
      if $game_party.actors.size == 0 and @command_window.index < 4
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0  # item
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Item.new
      when 1  # skill
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # save
        if $game_system.save_disabled
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Save.new
      when 5  # load
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Loading.new
      when 6  # end game       
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_End.new
      end
      return
    end
  end
  def update_status
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 1  # skill
        if $game_party.actors[@status_window.index].restriction >= 2
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end
#-------------------------------------------------------------------------------
# Window_Selectable2 -----------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Selectable2 < Window_Base
  attr_reader   :index                   
  attr_reader   :help_window         
  def initialize(x, y, width, height)
    super(x, y, width, height)
    @item_max = 1
    @column_max = 4
    @index = -1
  end
  def index=(index)
    @index = index
    if self.active and @help_window != nil
      update_help
    end
    update_cursor_rect
  end
  def row_max
    return (@item_max + @column_max - 1) / @column_max
  end
  def top_row
    return self.ox / 32
  end
  def top_row=(row)
    if row < 0
      row = 0
    end
    if row > row_max - 1
      row = row_max - 1
    end
    self.ox = row * 32
  end
  def page_row_max
    return (self.height - 32) / 32
  end
  def page_item_max
    return page_row_max * @column_max
  end
  def help_window=(help_window)
    @help_window = help_window
    if self.active and @help_window != nil
      update_help
    end
  end
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
      return
    end
    row = @index / @column_max
    if row < self.top_row
      self.top_row = row
    end
    if row > self.top_row + (self.page_row_max - 1)
      self.top_row = row - (self.page_row_max - 1)
    end
    cursor_width = self.width / @column_max - 32
    y = @index % @column_max * (cursor_width + 32)
    x = @index / @column_max * 32 - self.oy
    self.cursor_rect.set(x, y, cursor_width, 32)
  end
  def update
    super
    if self.active and @item_max > 0 and @index >= 0
      if Input.repeat?(Input::DOWN)
        if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
           @index < @item_max - @column_max
          $game_system.se_play($data_system.cursor_se)
          @index = (@index + @column_max) % @item_max
        end
      end
      if Input.repeat?(Input::UP)
        if (@column_max == 1 and Input.trigger?(Input::UP)) or
           @index >= @column_max
          $game_system.se_play($data_system.cursor_se)
          @index = (@index - @column_max + @item_max) % @item_max
        end
      end
      if Input.repeat?(Input::RIGHT)
        if @column_max >= 2 and @index < @item_max - 1
          $game_system.se_play($data_system.cursor_se)
          @index += 1
        end
      end
      if Input.repeat?(Input::LEFT)
        if @column_max >= 2 and @index > 0
          $game_system.se_play($data_system.cursor_se)
          @index -= 1
        end
      end
      if Input.repeat?(Input::R)
        if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
          $game_system.se_play($data_system.cursor_se)
          @index = [@index + self.page_item_max, @item_max - 1].min
          self.top_row += self.page_row_max
        end
      end
      if Input.repeat?(Input::L)
        if self.top_row > 0
          $game_system.se_play($data_system.cursor_se)
          @index = [@index - self.page_item_max, 0].max
          self.top_row -= self.page_row_max
        end
      end
    end
    if self.active and @help_window != nil
      update_help
    end
    update_cursor_rect
  end
end
#-------------------------------------------------------------------------------
# Scene_Loading ----------------------------------------------------------------
#-------------------------------------------------------------------------------
class Scene_Loading < Scene_File
  def initialize
    $game_temp = Game_Temp.new
    $game_temp.last_file_index = 0
    latest_time = Time.at(0)
    for i in 0..3
      filename = make_filename(i)
      if FileTest.exist?(filename)
        file = File.open(filename, "r")
        if file.mtime > latest_time
          latest_time = file.mtime
          $game_temp.last_file_index = i
        end
        file.close
      end
    end
    super("Czy chcesz wczytać grę?")
  end
  def on_decision(filename)
    unless FileTest.exist?(filename)
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    $game_system.se_play($data_system.load_se)
    file = File.open(filename, "rb")
    read_save_data(file)
    file.close
    $game_system.bgm_play($game_system.playing_bgm)
    $game_system.bgs_play($game_system.playing_bgs)
    $game_map.update
    $scene = Scene_Map.new
  end
  def on_cancel
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Menu.new(5)
  end
  def read_save_data(file)
    characters = Marshal.load(file)
    Graphics.frame_count = Marshal.load(file)
    $game_system        = Marshal.load(file)
    $game_switches      = Marshal.load(file)
    $game_variables     = Marshal.load(file)
    $game_self_switches = Marshal.load(file)
    $game_screen        = Marshal.load(file)
    $game_actors        = Marshal.load(file)
    $game_party         = Marshal.load(file)
    $game_troop         = Marshal.load(file)
    $game_map           = Marshal.load(file)
    $game_player        = Marshal.load(file)
    if $game_system.magic_number != $data_system.magic_number
      $game_map.setup($game_map.map_id)
      $game_player.center($game_player.x, $game_player.y)
    end
    $game_party.refresh
  end
end
#-------------------------------------------------------------------------------
# Scene_End --------------------------------------------------------------------
#-------------------------------------------------------------------------------
class Scene_End
alias oldupdate update
  def update
    @command_window.update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(6)
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0  # to title
        command_to_title
      when 1  # shutdown
        command_shutdown
      when 2  # quit
        command_cancel
        $scene = Scene_Menu.new(6)
      end
      return
      oldupdate
    end
  end
end
#-------------------------------------------------------------------------------
# Window_Postać (Status Menu) --------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Postać < Window_Selectable2
  def initialize
    super(0, 480, 640, 110)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    @frame = 0
    refresh
    self.active = false
    self.index = -1
    self.back_opacity = Przezroczystość
  end
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = i * 160
      y = 0
      actor = $game_party.actors[i]
      draw_actor_sprite(actor, x + 90, y + 10)
      draw_actor_name(actor, x, y)
      draw_actor_state(actor, x, y + 32)
    end
  end
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(@index * 160, 0, self.height + 18, 78)
    end
  end
  def draw_actor_sprite (actor, x, y)
    bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
    src_rect = Rect.new(bitmap.width / 4 * @frame, 0, bitmap.width / 4, bitmap.height / 4)
    cw = bitmap.width / 4
    ch = bitmap.height / 4
    self.contents.stretch_blt(Rect.new(x, y, cw, ch), bitmap, src_rect) 
  end
  def update
    super       
    if Graphics.frame_count % 10 == 0
      @frame == 3 ? @frame = 0 : @frame += 1     
      refresh
    end
  end
end
#-------------------------------------------------------------------------------
# Napis "Menu" u góry ekranu ---------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Napis < Window_Base
  def initialize
    super(0, -50, 640, 50)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.draw_text(100, -3, 400, 25, Napis_u_góry_ekranu, 1)
  end
end
#-------------------------------------------------------------------------------
# Window_Lokacja ---------------------------------------------------------------
#-------------------------------------------------------------------------------
class Game_Map
  def name
    $map_infos[@map_id]
  end
end

class Scene_Title
  $map_infos = load_data("Data/MapInfos.rxdata")
  for key in $map_infos.keys
    $map_infos[key] = $map_infos[key].name
  end
end

class Window_Lokacja < Window_Base
  def initialize
    super(640, 306, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    cx = contents.text_size($game_map.name).width
    self.contents.draw_text(124-cx, 0, cx, 32, $game_map.name, 1)
  end
end
#-------------------------------------------------------------------------------
# Window_Gold ------------------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Gold2 < Window_Base
  def initialize
    super(0, 0, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
  end
end
#-------------------------------------------------------------------------------
# Window_Steps -----------------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Steps2 < Window_Base
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, Liczba_kroków)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2)
  end
end
#-------------------------------------------------------------------------------
# Window_PlayTime --------------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_PlayTime2 < Window_Base
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, Czas_gry)
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, text, 2)
  end
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end
#-------------------------------------------------------------------------------
# Window_Reputacja -------------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Reputacja < Window_Base
  def initialize
    super(640, 306, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    @reputacja = $game_variables[Zmienna]
    if @reputacja == 0
      self.contents.draw_text(0, 0, 124, 32, Poziom_1, 1)
    end   
    if @reputacja == 10
      self.contents.draw_text(0, 0, 124, 32, Poziom_2, 1)
    end
    if @reputacja == 30
      self.contents.draw_text(0, 0, 124, 32, Poziom_3, 1)
    end
    if @reputacja == 50
      self.contents.draw_text(0, 0, 124, 32, Poziom_4, 1)
    end
    if @reputacja == 85
      self.contents.draw_text(0, 0, 124, 32, Poziom_5, 1)
    end
    if @reputacja == 100
      self.contents.draw_text(0, 0, 124, 32, Poziom_6, 1)
    end
  end
end

________________________


 
 
 
shiwt 




Preferowany:
RPG Maker XP

Pomógł: 13 razy
Dołączył: 02 Lip 2010
Posty: 131
Skąd: z Polski
Wysłany: Czw 08 Lip, 2010 21:42
Dzięki Ayene :) Zawsze byłem ciekaw jak takie coś zrobić ...
A jaka jest komenda żeby stały bokiem ? np. w lewo
 
 
Ayene 




Ranga RM:
4 gry

Pomogła: 232 razy
Dołączyła: 18 Wrz 2007
Posty: 2424
Wysłany: Pią 09 Lip, 2010 06:45
Wystarczy, że w linijce:
Kod:
src_rect = Rect.new(bitmap.width / 4 * @frame, 0, bitmap.width / 4, bitmap.height / 4)

Zmienisz 0 np. na 48.
Ewentualnie można podmienić ten kod z:
Kod:
obrot = bitmap.height / 4
src_rect = Rect.new(bitmap.width / 4 * @frame, obrot, bitmap.width / 4, bitmap.height / 4)
________________________


 
 
 
Izaya 




Pomógł: 2 razy
Dołączył: 20 Mar 2010
Posty: 127
Skąd: z Netaa !
Wysłany: Sro 14 Lip, 2010 19:47
Fajny CMS :-)
Mam pytanie: na Screenie widać "Wieśniak"
jest to Klasa bohatera?
Pozdrawiam :papa:
________________________
Padł mi laptop ... wszystko, RPG Maker i projekty, wszystko się skończyło. Nie bawię się już w RPGM'a, Zmieniam wizerunek.

Nowa strona, szukam tłumaczy, edytorów, korektorów i HTMLowców ! :D

P.S.: Aga Organization rlz ! =>
 
 
 
shiwt 




Preferowany:
RPG Maker XP

Pomógł: 13 razy
Dołączył: 02 Lip 2010
Posty: 131
Skąd: z Polski
Wysłany: Sro 14 Lip, 2010 21:09
Jest to reputacja. Na początku skryptu się wybiara6 możliwych do wybrania. Jeżeli jakas zmienna będzie wynosić ileś, to ta reputacja się zmieni. Gdzieś na końcu skryptu musisz sprawdzić ile ustawiłem. Oczywiście możesz to dowolnie z edytować.
________________________

http://www.ultimateam.pl/viewtopic.php?t=6177

http://www.ultimateam.pl/...p?p=61308#61308

http://www.ultimateam.pl/...p?p=73767#73767
 
 
R.I.P. 




Preferowany:
RPG Maker XP

Pomógł: 9 razy
Dołączył: 28 Mar 2010
Posty: 173
Skąd: Warszawa
Wysłany: Czw 15 Lip, 2010 19:27
W tej linijce mam nadzieje że Mogę zmienić nazwe "Reputacji" :

Spoiler:

Przezroczystość = 127
Zmienna = 0001
Czcionka = "Arial"
Rozmiar = 24
Napis_u_góry_ekranu = " Menu"
Liczba_kroków = "Liczba kroków"
Czas_gry = "Czas gry"
Poziom_1 = "Wieśniak"
Poziom_2 = "Chłop"
Poziom_3 = "Obywatel"
Poziom_4 = "Rycerz"
Poziom_5 = "Szlachcic"
Poziom_6 = "Król"



P.S

Skrypt fajny i łatwy w obsłudze :->
 
 
shiwt 




Preferowany:
RPG Maker XP

Pomógł: 13 razy
Dołączył: 02 Lip 2010
Posty: 131
Skąd: z Polski
Wysłany: Czw 15 Lip, 2010 20:31
możesz na początku skryptu ... Jest napisane poziom_1 itd.
________________________

http://www.ultimateam.pl/viewtopic.php?t=6177

http://www.ultimateam.pl/...p?p=61308#61308

http://www.ultimateam.pl/...p?p=73767#73767
 
 
R.I.P. 




Preferowany:
RPG Maker XP

Pomógł: 9 razy
Dołączył: 28 Mar 2010
Posty: 173
Skąd: Warszawa
Wysłany: Czw 15 Lip, 2010 22:16
A da się jakoś zrobić takie zdarzenie?

Przykład:

Strażnik Wejścia Do Zamku:
Nie możesz wejść!, nie masz odpowiednich uprawnień, żeby odwiedzić Króla Lukiana musisz mieć Reputacje: Giermek.


Da się coś takiego zrobić żeby czytało jaką mam reputacje w Zdarzeniach?.
 
 
Sprocik 




Preferowany:
RPG Maker XP

Pomógł: 1 raz
Dołączył: 20 Maj 2010
Posty: 60
Skąd: Wrocław
Wysłany: Czw 15 Lip, 2010 22:42
Fajny i ładny skrypt na pewno go wykorzystam

P.S R.I.P. tez na to wpadłem zanim przeczytałem twój post to by było dobre też do misji, że trzeba mieć jakąś rep. by ukończyć lub rozpocząć misję
________________________
''Non omnis moriar''
''Cogito ergo sum''

Spoiler:



^^ New animation by me� ^^

 
 
 
pw115 



Preferowany:
RPG Maker XP

Pomógł: 10 razy
Dołączył: 19 Lut 2010
Posty: 235
Skąd: Katowice
Wysłany: Pią 16 Lip, 2010 09:33
Te rangi są oparte na zmiennej prawda ?
Wiec można to zrobić na zasadzie ustawienia warunku ze zmienna XXX(ta od rang) wynosi 2 lub wyżej, wtedy strażnik nas wpuszcza jeśli nie mówi nam że potrzebna nam ranga 2.
________________________
Pomocy:
http://pw115.myminicity.com/




 
 
shiwt 




Preferowany:
RPG Maker XP

Pomógł: 13 razy
Dołączył: 02 Lip 2010
Posty: 131
Skąd: z Polski
Wysłany: Pią 16 Lip, 2010 12:19
UWAGA !!!
W tej chwili wpadł mi pomysł do głowy co do systemu reputacji i jest troszeczkę łatwiejszy w obsłudze.
Mój zwykły poprawiony kod:
Spoiler:

Kod:

# Autor - Gatoz. Szczególne podziękowania dla Thieffer'a. Egrimowi i
# HellKillerowi też dzięki za pomoc przy malutkim błedzie ;)
# Jest mój pierwszy CMS więc proszę o wyrozumiałość :]


#-------------------------------Window CMS 1.0----------------------------------

# Na końcu skryptu można z edytować pozycje w reputacji i inne rzeczy.
# Do dodawania reputacji są potrzebne 2 zmienne. Zmienna [0001] Odpowaiada za
# reputację, dlatego dodajemy tylko do zmiennej [0002] punkty. Ustawiamy typowe
# zdarzenie, że jak zmienna [0002] jest równa np. 30 to zmienna [0001] też jest
# równa 30. Wszystko jest ok. Jak ktoś nie rozumie to proszę ściągną demko ;]
# Data powstania skryptu: 1 marca 17:38

#-------------------------------Window CMS 1.1----------------------------------

# Dodałem możliwość zmiany przezroczystości, czcionki i jej rozmiaru, kilka
# napisów znajdujących się w menu, tj. czas gry, kroki i inne. Szybkość
# wchodzenia okienek. Zmienna odpowiadającej za reputację i szybka możliwość
# zmiany poszczególnych nazw w reputacji.

Szybkość = 5 # UWAGA! Szybkość wchodzenia okienek może wynosić TYLKO 1, 2 albo 5
Przezroczystość = 127
Zmienna = 0001
Czcionka = "Arial"
Rozmiar = 24
Napis_u_góry_ekranu = "  Menu"
Liczba_kroków = "Liczba kroków"
Czas_gry = "Czas gry"
Poziom_1 = "Wieśniak"
Poziom_2 = "Chłop"
Poziom_3 = "Obywatel"
Poziom_4 = "Rycerz"
Poziom_5 = "Szlachcic"
Poziom_6 = "Król"

#-------------------------------------------------------------------------------
# Scene_Menu -------------------------------------------------------------------
#-------------------------------------------------------------------------------
class Scene_Menu
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def main
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Zapisz"
    s6 = "Wczytaj"
    s7 = "Wyjście"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    @command_window.x = -160 - @command_window.width / 30
    @command_window.y = 58 - @command_window.height / 30
    @command_window.back_opacity = Przezroczystość
    if $game_party.actors.size == 0
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    if $game_system.save_disabled
      @command_window.disable_item(4)
    end
#-------------------------------------------------------------------------------
# Wchodzenie okienek -----------------------------------------------------------
#-------------------------------------------------------------------------------
    @okno1 = Window_Gold2.new
    @okno2 = Window_Steps2.new
    @okno3 = Window_PlayTime2.new
    @okno4 = Window_Napis.new
    @status_window = Window_Postać.new
    @okno6 = Window_Lokacja.new
    @okno7 = Window_Reputacja.new
    @okno1.x = 640
    @okno1.y = 50
    @okno2.x = 640
    @okno2.y = 114
    @okno3.x = 640
    @okno3.y = 210
    @okno4.x = 0
    @okno4.y = -50
    @status_window.x = 0
    @status_window.y = 480
    @okno6.x = 640
    @okno6.y = 306
    @okno7.x = -165
    @okno7.y = 306
    @spriteset = Spriteset_Map.new
    @appearing = true
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @okno1.dispose
    @okno2.dispose
    @okno3.dispose
    @okno4.dispose
    @status_window.dispose
    @okno6.dispose
    @command_window.dispose
    @spriteset.dispose
    @okno7.dispose
  end
 
  def appear
    @okno1.x -= Szybkość if @okno1.x > 480
    @okno2.x -= Szybkość if @okno2.x > 480
    @okno3.x -= Szybkość  if @okno3.x > 480
    @okno4.y += Szybkość if @okno4.y < 0
    @status_window.y -= Szybkość if @status_window.y > 370
    @okno6.x -= Szybkość if @okno6.x > 480
    @command_window.x += Szybkość if @command_window.x < 0
    @okno7.x += Szybkość if @okno7.x < 0
    if @okno1.x == 480 and @okno2.x == 480 and @okno3.x == 480 and @okno4.y == 0 and @status_window.y == 370 and @okno6.x == 480 and @command_window.x == 0 and @okno7.x == 0
      @appearing = false
    end
  end
  def update
    if @appearing
      appear
    end
    @okno1.update
    @okno2.update
    @okno3.update
    @okno4.update
    @status_window.update
    @okno6.update
    @command_window.update
    @spriteset.update
    @okno7.update
#-------------------------------------------------------------------------------
# Reszta Scene_Menu ------------------------------------------------------------
#-------------------------------------------------------------------------------
    if @command_window.active
      update_command
      return
    end
    if @status_window.active
      update_status
      return
    end
  end
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::C)
      if $game_party.actors.size == 0 and @command_window.index < 4
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0  # item
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Item.new
      when 1  # skill
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # save
        if $game_system.save_disabled
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Save.new
      when 5  # load
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Loading.new
      when 6  # end game       
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_End.new
      end
      return
    end
  end
  def update_status
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 1  # skill
        if $game_party.actors[@status_window.index].restriction >= 2
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end
#-------------------------------------------------------------------------------
# Window_Selectable2 -----------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Selectable2 < Window_Base
  attr_reader   :index                   
  attr_reader   :help_window         
  def initialize(x, y, width, height)
    super(x, y, width, height)
    @item_max = 1
    @column_max = 4
    @index = -1
  end
  def index=(index)
    @index = index
    if self.active and @help_window != nil
      update_help
    end
    update_cursor_rect
  end
  def row_max
    return (@item_max + @column_max - 1) / @column_max
  end
  def top_row
    return self.ox / 32
  end
  def top_row=(row)
    if row < 0
      row = 0
    end
    if row > row_max - 1
      row = row_max - 1
    end
    self.ox = row * 32
  end
  def page_row_max
    return (self.height - 32) / 32
  end
  def page_item_max
    return page_row_max * @column_max
  end
  def help_window=(help_window)
    @help_window = help_window
    if self.active and @help_window != nil
      update_help
    end
  end
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
      return
    end
    row = @index / @column_max
    if row < self.top_row
      self.top_row = row
    end
    if row > self.top_row + (self.page_row_max - 1)
      self.top_row = row - (self.page_row_max - 1)
    end
    cursor_width = self.width / @column_max - 32
    y = @index % @column_max * (cursor_width + 32)
    x = @index / @column_max * 32 - self.oy
    self.cursor_rect.set(x, y, cursor_width, 32)
  end
  def update
    super
    if self.active and @item_max > 0 and @index >= 0
      if Input.repeat?(Input::DOWN)
        if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
           @index < @item_max - @column_max
          $game_system.se_play($data_system.cursor_se)
          @index = (@index + @column_max) % @item_max
        end
      end
      if Input.repeat?(Input::UP)
        if (@column_max == 1 and Input.trigger?(Input::UP)) or
           @index >= @column_max
          $game_system.se_play($data_system.cursor_se)
          @index = (@index - @column_max + @item_max) % @item_max
        end
      end
      if Input.repeat?(Input::RIGHT)
        if @column_max >= 2 and @index < @item_max - 1
          $game_system.se_play($data_system.cursor_se)
          @index += 1
        end
      end
      if Input.repeat?(Input::LEFT)
        if @column_max >= 2 and @index > 0
          $game_system.se_play($data_system.cursor_se)
          @index -= 1
        end
      end
      if Input.repeat?(Input::R)
        if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
          $game_system.se_play($data_system.cursor_se)
          @index = [@index + self.page_item_max, @item_max - 1].min
          self.top_row += self.page_row_max
        end
      end
      if Input.repeat?(Input::L)
        if self.top_row > 0
          $game_system.se_play($data_system.cursor_se)
          @index = [@index - self.page_item_max, 0].max
          self.top_row -= self.page_row_max
        end
      end
    end
    if self.active and @help_window != nil
      update_help
    end
    update_cursor_rect
  end
end
#-------------------------------------------------------------------------------
# Scene_Loading ----------------------------------------------------------------
#-------------------------------------------------------------------------------
class Scene_Loading < Scene_File
  def initialize
    $game_temp = Game_Temp.new
    $game_temp.last_file_index = 0
    latest_time = Time.at(0)
    for i in 0..3
      filename = make_filename(i)
      if FileTest.exist?(filename)
        file = File.open(filename, "r")
        if file.mtime > latest_time
          latest_time = file.mtime
          $game_temp.last_file_index = i
        end
        file.close
      end
    end
    super("Czy chcesz wczytać grę?")
  end
  def on_decision(filename)
    unless FileTest.exist?(filename)
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    $game_system.se_play($data_system.load_se)
    file = File.open(filename, "rb")
    read_save_data(file)
    file.close
    $game_system.bgm_play($game_system.playing_bgm)
    $game_system.bgs_play($game_system.playing_bgs)
    $game_map.update
    $scene = Scene_Map.new
  end
  def on_cancel
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Menu.new(5)
  end
  def read_save_data(file)
    characters = Marshal.load(file)
    Graphics.frame_count = Marshal.load(file)
    $game_system        = Marshal.load(file)
    $game_switches      = Marshal.load(file)
    $game_variables     = Marshal.load(file)
    $game_self_switches = Marshal.load(file)
    $game_screen        = Marshal.load(file)
    $game_actors        = Marshal.load(file)
    $game_party         = Marshal.load(file)
    $game_troop         = Marshal.load(file)
    $game_map           = Marshal.load(file)
    $game_player        = Marshal.load(file)
    if $game_system.magic_number != $data_system.magic_number
      $game_map.setup($game_map.map_id)
      $game_player.center($game_player.x, $game_player.y)
    end
    $game_party.refresh
  end
end
#-------------------------------------------------------------------------------
# Scene_End --------------------------------------------------------------------
#-------------------------------------------------------------------------------
class Scene_End
alias oldupdate update
  def update
    @command_window.update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(6)
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0  # to title
        command_to_title
      when 1  # shutdown
        command_shutdown
      when 2  # quit
        command_cancel
        $scene = Scene_Menu.new(6)
      end
      return
      oldupdate
    end
  end
end
#-------------------------------------------------------------------------------
# Window_Postać (Status Menu) --------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Postać < Window_Selectable2
  def initialize
    super(0, 480, 640, 110)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    refresh
    self.active = false
    self.index = -1
    self.back_opacity = Przezroczystość
  end
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = i * 160
      y = 0
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x + 100, y + 65)
      draw_actor_name(actor, x, y)
      draw_actor_state(actor, x, y + 32)
    end
  end
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(@index * 160, 0, self.height + 18, 78)
    end
  end
end
#-------------------------------------------------------------------------------
# Napis "Menu" u góry ekranu ---------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Napis < Window_Base
  def initialize
    super(0, -50, 640, 50)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.draw_text(100, -3, 400, 25, Napis_u_góry_ekranu, 1)
  end
end
#-------------------------------------------------------------------------------
# Window_Lokacja ---------------------------------------------------------------
#-------------------------------------------------------------------------------
class Game_Map
  def name
    $map_infos[@map_id]
  end
end

class Scene_Title
  $map_infos = load_data("Data/MapInfos.rxdata")
  for key in $map_infos.keys
    $map_infos[key] = $map_infos[key].name
  end
end

class Window_Lokacja < Window_Base
  def initialize
    super(640, 306, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    cx = contents.text_size($game_map.name).width
    self.contents.draw_text(124-cx, 0, cx, 32, $game_map.name, 1)
  end
end
#-------------------------------------------------------------------------------
# Window_Gold ------------------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Gold2 < Window_Base
  def initialize
    super(0, 0, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
  end
end
#-------------------------------------------------------------------------------
# Window_Steps -----------------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Steps2 < Window_Base
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, Liczba_kroków)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2)
  end
end
#-------------------------------------------------------------------------------
# Window_PlayTime --------------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_PlayTime2 < Window_Base
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, Czas_gry)
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, text, 2)
  end
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end
#-------------------------------------------------------------------------------
# Window_Reputacja -------------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Reputacja < Window_Base
  def initialize
    super(640, 306, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    @reputacja = $game_variables[Zmienna]
    if @reputacja >= 0
      self.contents.draw_text(0, 0, 124, 32, Poziom_1, 1)
    end   
    if @reputacja >= 10
      self.contents.clear
      self.contents.draw_text(0, 0, 124, 32, Poziom_2, 1)
    end
    if @reputacja >= 30
      self.contents.clear
      self.contents.draw_text(0, 0, 124, 32, Poziom_3, 1)
    end
    if @reputacja >= 50
      self.contents.clear
      self.contents.draw_text(0, 0, 124, 32, Poziom_4, 1)
    end
    if @reputacja >= 85
      self.contents.clear
      self.contents.draw_text(0, 0, 124, 32, Poziom_5, 1)
    end
    if @reputacja >= 100
      self.contents.clear
      self.contents.draw_text(0, 0, 124, 32, Poziom_6, 1)
    end
  end
end



Kod z poruszającymi postaciami, który zamieściła Ayene:
Spoiler:

Kod:
# Autor - Gatoz (shiwt). Szczególne podziękowania dla Thieffer'a. Egrimowi i
# HellKillerowi też dzięki za pomoc przy malutkim błędzie ;)
# Jest mój pierwszy CMS więc proszę o wyrozumiałość :]

#-------------------------------Window CMS 1.1----------------------------------

# Dodałem możliwość zmiany przezroczystości, czcionki i jej rozmiaru, kilka
# napisów znajdujących się w menu, tj. czas gry, kroki i inne. Szybkość
# wchodzenia okienek. Zmienna odpowiadającej za reputację i szybka możliwość
# zmiany poszczególnych nazw w reputacji.

Szybkość = 5 # UWAGA! Szybkość wchodzenia okienek może wynosić TYLKO 1, 2 albo 5
Przezroczystość = 127
Zmienna = 0001
Czcionka = "Arial"
Rozmiar = 24
Napis_u_góry_ekranu = "  Menu"
Liczba_kroków = "Liczba kroków"
Czas_gry = "Czas gry"
Poziom_1 = "Wieśniak"
Poziom_2 = "Chłop"
Poziom_3 = "Obywatel"
Poziom_4 = "Rycerz"
Poziom_5 = "Szlachcic"
Poziom_6 = "Król"

#-------------------------------------------------------------------------------
# Scene_Menu -------------------------------------------------------------------
#-------------------------------------------------------------------------------
class Scene_Menu
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def main
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Zapisz"
    s6 = "Wczytaj"
    s7 = "Wyjście"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    @command_window.x = -160 - @command_window.width / 30
    @command_window.y = 58 - @command_window.height / 30
    @command_window.back_opacity = Przezroczystość
    if $game_party.actors.size == 0
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    if $game_system.save_disabled
      @command_window.disable_item(4)
    end
#-------------------------------------------------------------------------------
# Wchodzenie okienek -----------------------------------------------------------
#-------------------------------------------------------------------------------
    @okno1 = Window_Gold2.new
    @okno2 = Window_Steps2.new
    @okno3 = Window_PlayTime2.new
    @okno4 = Window_Napis.new
    @status_window = Window_Postać.new
    @okno6 = Window_Lokacja.new
    @okno7 = Window_Reputacja.new
    @okno1.x = 640
    @okno1.y = 50
    @okno2.x = 640
    @okno2.y = 114
    @okno3.x = 640
    @okno3.y = 210
    @okno4.x = 0
    @okno4.y = -50
    @status_window.x = 0
    @status_window.y = 480
    @okno6.x = 640
    @okno6.y = 306
    @okno7.x = -165
    @okno7.y = 306
    @spriteset = Spriteset_Map.new
    @appearing = true
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @okno1.dispose
    @okno2.dispose
    @okno3.dispose
    @okno4.dispose
    @status_window.dispose
    @okno6.dispose
    @command_window.dispose
    @spriteset.dispose
    @okno7.dispose
  end
 
  def appear
    @okno1.x -= Szybkość if @okno1.x > 480
    @okno2.x -= Szybkość if @okno2.x > 480
    @okno3.x -= Szybkość  if @okno3.x > 480
    @okno4.y += Szybkość if @okno4.y < 0
    @status_window.y -= Szybkość if @status_window.y > 370
    @okno6.x -= Szybkość if @okno6.x > 480
    @command_window.x += Szybkość if @command_window.x < 0
    @okno7.x += Szybkość if @okno7.x < 0
    if @okno1.x == 480 and @okno2.x == 480 and @okno3.x == 480 and @okno4.y == 0 and @status_window.y == 370 and @okno6.x == 480 and @command_window.x == 0 and @okno7.x == 0
      @appearing = false
    end
  end
  def update
    if @appearing
      appear
    end
    @okno1.update
    @okno2.update
    @okno3.update
    @okno4.update
    @status_window.update
    @okno6.update
    @command_window.update
    @spriteset.update
    @okno7.update
#-------------------------------------------------------------------------------
# Reszta Scene_Menu ------------------------------------------------------------
#-------------------------------------------------------------------------------
    if @command_window.active
      update_command
      return
    end
    if @status_window.active
      update_status
      return
    end
  end
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::C)
      if $game_party.actors.size == 0 and @command_window.index < 4
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0  # item
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Item.new
      when 1  # skill
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # save
        if $game_system.save_disabled
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Save.new
      when 5  # load
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Loading.new
      when 6  # end game       
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_End.new
      end
      return
    end
  end
  def update_status
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 1  # skill
        if $game_party.actors[@status_window.index].restriction >= 2
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end
#-------------------------------------------------------------------------------
# Window_Selectable2 -----------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Selectable2 < Window_Base
  attr_reader   :index                   
  attr_reader   :help_window         
  def initialize(x, y, width, height)
    super(x, y, width, height)
    @item_max = 1
    @column_max = 4
    @index = -1
  end
  def index=(index)
    @index = index
    if self.active and @help_window != nil
      update_help
    end
    update_cursor_rect
  end
  def row_max
    return (@item_max + @column_max - 1) / @column_max
  end
  def top_row
    return self.ox / 32
  end
  def top_row=(row)
    if row < 0
      row = 0
    end
    if row > row_max - 1
      row = row_max - 1
    end
    self.ox = row * 32
  end
  def page_row_max
    return (self.height - 32) / 32
  end
  def page_item_max
    return page_row_max * @column_max
  end
  def help_window=(help_window)
    @help_window = help_window
    if self.active and @help_window != nil
      update_help
    end
  end
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
      return
    end
    row = @index / @column_max
    if row < self.top_row
      self.top_row = row
    end
    if row > self.top_row + (self.page_row_max - 1)
      self.top_row = row - (self.page_row_max - 1)
    end
    cursor_width = self.width / @column_max - 32
    y = @index % @column_max * (cursor_width + 32)
    x = @index / @column_max * 32 - self.oy
    self.cursor_rect.set(x, y, cursor_width, 32)
  end
  def update
    super
    if self.active and @item_max > 0 and @index >= 0
      if Input.repeat?(Input::DOWN)
        if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
           @index < @item_max - @column_max
          $game_system.se_play($data_system.cursor_se)
          @index = (@index + @column_max) % @item_max
        end
      end
      if Input.repeat?(Input::UP)
        if (@column_max == 1 and Input.trigger?(Input::UP)) or
           @index >= @column_max
          $game_system.se_play($data_system.cursor_se)
          @index = (@index - @column_max + @item_max) % @item_max
        end
      end
      if Input.repeat?(Input::RIGHT)
        if @column_max >= 2 and @index < @item_max - 1
          $game_system.se_play($data_system.cursor_se)
          @index += 1
        end
      end
      if Input.repeat?(Input::LEFT)
        if @column_max >= 2 and @index > 0
          $game_system.se_play($data_system.cursor_se)
          @index -= 1
        end
      end
      if Input.repeat?(Input::R)
        if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
          $game_system.se_play($data_system.cursor_se)
          @index = [@index + self.page_item_max, @item_max - 1].min
          self.top_row += self.page_row_max
        end
      end
      if Input.repeat?(Input::L)
        if self.top_row > 0
          $game_system.se_play($data_system.cursor_se)
          @index = [@index - self.page_item_max, 0].max
          self.top_row -= self.page_row_max
        end
      end
    end
    if self.active and @help_window != nil
      update_help
    end
    update_cursor_rect
  end
end
#-------------------------------------------------------------------------------
# Scene_Loading ----------------------------------------------------------------
#-------------------------------------------------------------------------------
class Scene_Loading < Scene_File
  def initialize
    $game_temp = Game_Temp.new
    $game_temp.last_file_index = 0
    latest_time = Time.at(0)
    for i in 0..3
      filename = make_filename(i)
      if FileTest.exist?(filename)
        file = File.open(filename, "r")
        if file.mtime > latest_time
          latest_time = file.mtime
          $game_temp.last_file_index = i
        end
        file.close
      end
    end
    super("Czy chcesz wczytać grę?")
  end
  def on_decision(filename)
    unless FileTest.exist?(filename)
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    $game_system.se_play($data_system.load_se)
    file = File.open(filename, "rb")
    read_save_data(file)
    file.close
    $game_system.bgm_play($game_system.playing_bgm)
    $game_system.bgs_play($game_system.playing_bgs)
    $game_map.update
    $scene = Scene_Map.new
  end
  def on_cancel
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Menu.new(5)
  end
  def read_save_data(file)
    characters = Marshal.load(file)
    Graphics.frame_count = Marshal.load(file)
    $game_system        = Marshal.load(file)
    $game_switches      = Marshal.load(file)
    $game_variables     = Marshal.load(file)
    $game_self_switches = Marshal.load(file)
    $game_screen        = Marshal.load(file)
    $game_actors        = Marshal.load(file)
    $game_party         = Marshal.load(file)
    $game_troop         = Marshal.load(file)
    $game_map           = Marshal.load(file)
    $game_player        = Marshal.load(file)
    if $game_system.magic_number != $data_system.magic_number
      $game_map.setup($game_map.map_id)
      $game_player.center($game_player.x, $game_player.y)
    end
    $game_party.refresh
  end
end
#-------------------------------------------------------------------------------
# Scene_End --------------------------------------------------------------------
#-------------------------------------------------------------------------------
class Scene_End
alias oldupdate update
  def update
    @command_window.update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(6)
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0  # to title
        command_to_title
      when 1  # shutdown
        command_shutdown
      when 2  # quit
        command_cancel
        $scene = Scene_Menu.new(6)
      end
      return
      oldupdate
    end
  end
end
#-------------------------------------------------------------------------------
# Window_Postać (Status Menu) --------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Postać < Window_Selectable2
  def initialize
    super(0, 480, 640, 110)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    @frame = 0
    refresh
    self.active = false
    self.index = -1
    self.back_opacity = Przezroczystość
  end
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = i * 160
      y = 0
      actor = $game_party.actors[i]
      draw_actor_sprite(actor, x + 90, y + 10)
      draw_actor_name(actor, x, y)
      draw_actor_state(actor, x, y + 32)
    end
  end
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(@index * 160, 0, self.height + 18, 78)
    end
  end
  def draw_actor_sprite (actor, x, y)
    bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
    src_rect = Rect.new(bitmap.width / 4 * @frame, 0, bitmap.width / 4, bitmap.height / 4)
    cw = bitmap.width / 4
    ch = bitmap.height / 4
    self.contents.stretch_blt(Rect.new(x, y, cw, ch), bitmap, src_rect)
  end
  def update
    super       
    if Graphics.frame_count % 10 == 0
      @frame == 3 ? @frame = 0 : @frame += 1     
      refresh
    end
  end
end
#-------------------------------------------------------------------------------
# Napis "Menu" u góry ekranu ---------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Napis < Window_Base
  def initialize
    super(0, -50, 640, 50)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.draw_text(100, -3, 400, 25, Napis_u_góry_ekranu, 1)
  end
end
#-------------------------------------------------------------------------------
# Window_Lokacja ---------------------------------------------------------------
#-------------------------------------------------------------------------------
class Game_Map
  def name
    $map_infos[@map_id]
  end
end

class Scene_Title
  $map_infos = load_data("Data/MapInfos.rxdata")
  for key in $map_infos.keys
    $map_infos[key] = $map_infos[key].name
  end
end

class Window_Lokacja < Window_Base
  def initialize
    super(640, 306, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    cx = contents.text_size($game_map.name).width
    self.contents.draw_text(124-cx, 0, cx, 32, $game_map.name, 1)
  end
end
#-------------------------------------------------------------------------------
# Window_Gold ------------------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Gold2 < Window_Base
  def initialize
    super(0, 0, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
  end
end
#-------------------------------------------------------------------------------
# Window_Steps -----------------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Steps2 < Window_Base
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, Liczba_kroków)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2)
  end
end
#-------------------------------------------------------------------------------
# Window_PlayTime --------------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_PlayTime2 < Window_Base
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, Czas_gry)
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, text, 2)
  end
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end
#-------------------------------------------------------------------------------
# Window_Reputacja -------------------------------------------------------------
#-------------------------------------------------------------------------------
class Window_Reputacja < Window_Base
  def initialize
    super(640, 306, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = Czcionka
    self.contents.font.size = Rozmiar
    self.back_opacity = Przezroczystość
    refresh
  end
  def refresh
    self.contents.clear
    @reputacja = $game_variables[Zmienna]
    if @reputacja == 0
      self.contents.draw_text(0, 0, 124, 32, Poziom_1, 1)
    end   
    self.contents.clear
    if @reputacja == 10
      self.contents.draw_text(0, 0, 124, 32, Poziom_2, 1)
    end
    self.contents.clear
    if @reputacja == 30
      self.contents.draw_text(0, 0, 124, 32, Poziom_3, 1)
    end
    self.contents.clear
    if @reputacja == 50
      self.contents.draw_text(0, 0, 124, 32, Poziom_4, 1)
    end
    self.contents.clear
    if @reputacja == 85
      self.contents.draw_text(0, 0, 124, 32, Poziom_5, 1)
    end
    self.contents.clear
    if @reputacja == 100
      self.contents.draw_text(0, 0, 124, 32, Poziom_6, 1)
    end
  end
end




Napiszę wam dokładną instrukcję bo mi się nie chce dema robić.
1. Na początku skryptu można wybrać zmienną odpowiadającą oraz 6 rang.
2. Na samym dole skryptu mamy napisane:
Spoiler:

Kod:

if @reputacja >= 0
      self.contents.draw_text(0, 0, 124, 32, Poziom_1, 1)
    end   
    if @reputacja >= 10
      self.contents.draw_text(0, 0, 124, 32, Poziom_2, 1)
    end
    if @reputacja >= 30
      self.contents.draw_text(0, 0, 124, 32, Poziom_3, 1)
    end
    if @reputacja >= 50
      self.contents.draw_text(0, 0, 124, 32, Poziom_4, 1)
    end
    if @reputacja >= 85
      self.contents.draw_text(0, 0, 124, 32, Poziom_5, 1)
    end
    if @reputacja >= 100
      self.contents.draw_text(0, 0, 124, 32, Poziom_6, 1)
    end


Kod:
if @reputacja >= 0
      self.contents.draw_text(0, 0, 124, 32, Poziom_1, 1)

jeżeli zmienna X będzie wynosić 0, to będzie ranga ta co ustaliłeś na górze pod nazwą Poziom_1.
I tak dalej robicie.
Oczywiście jak jest np.
Kod:
if @reputacja == 100
- to to 100 można zmienić na inną liczbę która będzie wam odpowiadać.
3. Teraz po jakimś wykonanym zadaniu dajecie:
zmienna X + 1 czy ile chcecie
a przy tym strażniku dajecie:
czy zmienna X jest równa albo większa od np. 10 - to on was wpuszcza.
________________________

http://www.ultimateam.pl/viewtopic.php?t=6177

http://www.ultimateam.pl/...p?p=61308#61308

http://www.ultimateam.pl/...p?p=73767#73767
 
 
pw115 



Preferowany:
RPG Maker XP

Pomógł: 10 razy
Dołączył: 19 Lut 2010
Posty: 235
Skąd: Katowice
Wysłany: Pią 16 Lip, 2010 12:52
Napisałeś dokładnie to samo co ja w poście wyżej...
Czytaj!!!!
________________________
Pomocy:
http://pw115.myminicity.com/




 
 
Wyświetl posty z ostatnich:   
Odpowiedz do tematu
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Nie możesz załączać plików na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Powered by phpBB modified by Przemo © 2003 phpBB Group | Template Klam by Ayene