VX 스크립트

메뉴
2009.02.07 17:35

GuiRPG menu시스템

조회 수 4848 추천 수 0 댓글 13
Atachment
첨부 '1'

이런식의메뉴입니다.
   

#----------------------------------------------------------------
#----------------------------------------------------------------
#                        Menu GuiRPG 1.0
#----------------------------------------------------------------
# Criado por: GuiRPG - Guilherme Santiago
# Versão: 1.0
#  
# Esse Script faz uma pequena modificação no Menu, deixando o
# Menu mais clássico, cobrindo toda a tela e mostrando informações
# Adicionais como Mapa e Tempo de Jogo
#
# Fórum: rpgmakertotal.ipbfree.com
#
# MSN: guilhermesantiagosilva@hotmail.com
#
#----------------------------------------------------------------



class Scene_Menu < Scene_Base
  
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  
  def start
    super
    create_menu_background
    create_command_window
    @status_window = Window_MenuStatus.new(0, 80)
    @window_local = Window_Local.new(120,416)
    @time = Window_Time.new(360,416)
    @gold_window = Window_Gold2.new(0, 416)
  end
  
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @status_window.dispose
    @window_local.dispose
    @time.dispose
    @gold_window.dispose
  end
  
  def update
    super
    update_menu_background
    @command_window.update
    @status_window.update
    @gold_window.update
    @window_local.update
    @time.update

    @window_local.y -= 5
    if @window_local.y <= 366
      @window_local.y = 366
    end
    @time.y -= 5
    if @time.y <= 366
      @time.y = 366
    end
    @gold_window.y -= 5
    if @gold_window.y <= 366
      @gold_window.y = 366
    end
    
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    @command_window = Window_Command.new(544, [s1, s2, s3, s4, s5, s6],3)
    @command_window.index = @menu_index
    if $game_party.members.size == 0          
      @command_window.draw_item(0, false)    
      @command_window.draw_item(1, false)    
      @command_window.draw_item(2, false)    
      @command_window.draw_item(3, false)    
    end
    if $game_system.save_disabled            
      @command_window.draw_item(4, false)    
    end
  end
  
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0    
        $scene = Scene_Item.new
      when 1,2,3  
        start_actor_selection
      when 4      
        $scene = Scene_File.new(true, false, false)
      when 5      
        $scene = Scene_End.new
      end
    end
  end

  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end

  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1  
        $scene = Scene_Skill.new(@status_window.index)
      when 2
        $scene = Scene_Equip.new(@status_window.index)
      when 3  
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end

class Window_MenuStatus < Window_Selectable
  
  def initialize(x, y)
    super(x, y, 544, 288)
    @column_max = 2
    refresh
    self.active = false
    self.index = -1
  end

  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for actor in $game_party.members
      x = actor.index % @column_max * self.width/2 + 96
      y = actor.index / @column_max * 96 + WLH / 2
      draw_actor_face(actor, x - 96, y, 92)
      draw_actor_name(actor, x, y)
      draw_actor_level(actor, x + 80, y)
      draw_actor_hp(actor, x , y + WLH * 1)
      draw_actor_mp(actor, x , y + WLH * 2 - 6)
    end
  end
  
  def update_cursor
    case @index
    when -1
      self.cursor_rect.empty
    when 0, 1, 2, 3
      self.cursor_rect.set(@index % @column_max * self.width/2 - 4, index / @column_max * 96 + WLH / 2 - 4, self.width / 2 - 32 +4, 96+4)
    else
      self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
    end
  end
end

class Game_Map
   attr_reader   :map_id
   def namemap  
     $name_map = load_data("Data/MapInfos.rvdata")
     $name_map[@map_id].name
   end
end

class Window_Local < Window_Base
  
    def initialize(x,y)
    super(x, y, 240, WLH + 26)
    refresh
  end
  
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -8, 200, 32, "Local:")
    self.contents.font.color = normal_color
    self.contents.draw_text(59, -8, 210, 32, $game_map.namemap.to_s)
end
end

class Window_Gold2 < Window_Base
  
  def initialize(x, y)
    super(x, y, 120, WLH + 26)
    refresh
  end
    
  def refresh
    self.contents.clear
    draw_currency_value($game_party.gold, 6, -4, 80)
  end
end

class Window_Time < Window_Base
  
  def initialize(x, y)
    super(x, y, 184, WLH + 26)
    refresh
  end
  
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -8, 200, 32, "Tempo:")
    @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(69, -8, 200, 32, text)
  end
  
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end
Comment '13'
  • ?
    쿠쿠. 2009.02.07 23:44
    그닥...
  • ?
    할렘 2009.02.08 11:26
    저도 마음에 안들지만 없는메뉴시스템이라서 그냥 올려뒀습니다.
  • ?
    허걱 2009.02.08 17:16
    전 맘에 드는데요...1인용 메뉴로 살짝 바꿔서 써도 될듯...감사합니다~
  • ?
    백년술사 2009.02.10 18:12
    맘에 들긴하지만...
    그..뭐라해야나...
    순서...?같은게 제가 원하는게 아니라...ㄳ합니다.
  • ?
    Man.... 2009.02.17 21:52
    스클크립트가 다  이쪽으로이동했네...
  • ?
    드랍 2009.06.06 12:47
    좋긴 한데 스텟배분이 없어져서...
  • ?
    mymy 2009.11.14 19:40

    드랍님 말듣고 고개돌린 1ㅅ

    이유:내게임은 스킬장착,스텟배분등등이있어서

  • ?
    VX MANIA 2010.01.29 11:19

    별 좋진 않은듯...

    하지만 약간 좋다.

  • ?
    엑셀 2010.07.23 09:35

    좋기는 좋내요...

  • ?
    포인트팡팡 2010.07.23 09:35
    축하합니다. 엑셀님은 50포인트에 당첨되셨습니다
  • ?
    김브레이커 2010.07.28 13:50

    오오 좋네요.. 만들고 있는 게임에 적용시켰습니다.

    좋은 자료 감사합니다. ㅇㅂㅇ

  • ?
    구제가능 2011.07.24 12:37

    Local 부분만 없애고 적용시켰음

  • ?
    조총병 2011.09.22 20:08

    좋습니다!


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
277 타이틀/게임오버 륀느님 요청] 전투 전멸후 Game over없이 특정위치로 이동 10 Last H 2009.02.24 2834
276 스킬 미완성 구버전. 2칸 위에 있는 글을 이용해주세요. 7 Last H 2009.02.23 1925
275 기타 [kcg] 슬립 데미지 상세화 19 BoneheadedAlien 2009.02.22 3242
274 기타 아키루냥님 요청 스크립트(자작) 4 file Last H 2009.02.22 2753
273 영상 동영상 재생 스크립트.-Game_Film II-(테스트) 7 할렘 2009.02.22 3741
272 기타 태양 스크립트. 15 file 할렘 2009.02.20 4463
271 메뉴 CogWheelBars 시스템. 13 file 할렘 2009.02.20 4362
270 메뉴 모그메뉴 스킨입니다. 1 file 아부리 2009.02.16 6866
269 기타 Kylock 밤낮 스크립트 부분 한글화 + 달력 모드 (모드는 자작) 31 file RMdude 2009.02.15 4100
268 HUD 변수 표시 HUD 8 Tofuman 2009.02.15 2469
267 메시지 여러항목 선택지 ... Scene처리.. 23 file 허걱 2009.02.14 5277
266 기타 게임시간&밤낮 54 file 허걱 2009.02.14 6111
265 이동 및 탈것 Wachunga님의 XP용 MapLink VX용으로 개조 6 file 허걱 2009.02.13 3039
264 기타 심플 마우스 시스템 1.5 애드온 11 file RMdude 2009.02.11 4325
263 메뉴 (모그메뉴 풀세트팩 SEL Style.) 유니크급 자료 147 file 할렘 2009.02.07 9558
262 기타 데이터베이스 자체 제한 해체 스크립트 [Database Limit Breaker] 13 file 할렘 2009.02.07 3562
» 메뉴 GuiRPG menu시스템 13 file 할렘 2009.02.07 4848
260 전투 방패가없어? 그럼 방어못하게하는 스크립트. 16 file 할렘 2009.02.07 3425
259 전투 Requiem SBABS (Requiem Squad Based Battle System) 14 vk 2009.02.07 7541
258 기타 라이트 이펙트 스크립트 12 file 아방스 2009.02.07 3262
Board Pagination Prev 1 ... 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 ... 32 Next
/ 32