VX 스크립트

메뉴
2009.02.07 17:35

GuiRPG menu시스템

조회 수 4849 추천 수 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 기타 [요청자료] 유즈미짱 님께서 요청한 그림표시 입니다. 5 file 허걱 2009.07.08 2976
276 메시지 [완성]RPG Maker VX용 한글 조사 자동결정 10 file 시릴캣 2009.08.13 4598
275 장비 [스크립트]무기에 옵션을 부가하자 18 아방이 2008.01.29 5380
274 변수/스위치 [무한응용가능]스위치/변수 저장/로딩 스크립트 7 카리스 2010.03.31 2854
273 전투 [덮어씌우기]Window_ActorCommand_EX 4 맛난호빵 2011.03.12 2341
272 기타 [XP / VX 공용] rand() 함수 확장 스크립트 4 허걱 2011.09.13 2362
271 직업 [VX] Blue Mage by Fomar0153 9 WMN 2008.04.06 2785
270 전투 [vx] ATB 시스템. 10 만들어보자꾸나 2008.07.05 4925
269 기타 [VX] Anti-Lag 1.2c by Anaryu[예제첨부] 3 file WMN 2008.04.06 2371
268 스킬 [ultimate series]스킬,아이템 데미지계산식을 자기입맛에 맞게 고치는 스크립트 16 file EuclidE 2010.05.04 4373
267 이름입력 [rpg vx]한글 스크립트(저번 것보단 업그레이드 된 것입니다.^^) 17 file 레시온 2008.03.28 4736
266 전투 [RPG VX]기술에 쿨타임을 부여하는 스크립트 3 스리아씨 2013.12.05 2348
265 스킬 [RPG VX] 턴알 스킬 쿨타임 스크립트! (잘돌아감) 5 듀란테 2015.08.18 1671
264 타이틀/게임오버 [NO.0 간단 스크립트] 타이틀에 제작자 정보 올려보기 14 file NO.0 2011.01.30 3362
263 기타 [KGC]한계돌파 9 방콕족의생활 2008.06.13 3599
262 기타 [kcg] 슬립 데미지 상세화 19 BoneheadedAlien 2009.02.22 3242
261 HUD Zelda Health System 11 file 비극ㆍ 2010.04.18 2850
260 스킬 YERD - 커스텀 스킬 이펙트 13 file 훈덕 2009.11.08 4080
259 상점 YERD - 커먼이벤트 샵 12 file 훈덕 2009.11.08 3961
258 메뉴 YERD - 커먼 이벤트 메뉴 4 file 훈덕 2009.11.08 3849
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