VX 스크립트

전투에 승리하면 아래 화면과 같이 경험치와 아이템을 팝업하는 창을 만드는 스크립트입니다.

그냥 붙여넣기만으로도 사용가능합니다.

한글번역(네이버님의도움 ㄳ)했으니 고치실분은 고쳐쓰셔도 될듯...

 

#==============================================================================
# ★RGSS2
# STR11h_XP결과 윈도우 v1.1 08/01/26
# 서포트:http://otsu.cool.ne.jp/strcatyou/
#
# ·트크르 XP식의 결과(전투 결과)를 재현, 이라고 할까 그대로 이식
#
#------------------------------------------------------------------------------
#
# 갱신 이력
# ◇1.0→1.1
# 아이템 입수시에 효과음을 울릴 수 있게 되었다
# 일부 처리를 재구축
#==============================================================================
# ■ STRRGSS2
#==============================================================================
module STRRGSS2
  STR11H_RSKIP = Input::C # 결과 웨이트의 스킵 버튼
  STR11H_WAIT  = 240      # 결과 웨이트(1/60sec)
  STR11H_NOTW  = false    # 키 입력이 있을 때까지 결과를 다물지 않는다
                          # (결과 웨이트를 무효로 한다)
  STR11H_EXP   = "EXP"    # 결과에 표시하는 경험치의 용어
  # 아이템 입수시의 SE ("파일명", 볼륨, 핏치)
  STR11H_ITEM  = RPG::SE.new("Chime2", 80, 100)
end
#==============================================================================
# ■ Scene_Battle
#==============================================================================
class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # ★ 앨리어스(alias)
  #--------------------------------------------------------------------------
  # 종료 처리
  alias terminate_str11h terminate
  def terminate
    @result_window.dispose if @result_window != nil
    terminate_str11h
  end
  #--------------------------------------------------------------------------
  # ★ 재정의
  #--------------------------------------------------------------------------
  # 획득한 드롭 아이템의 표시
  # ※드롭 아이템의 배열을 유지할 방법이 없다(?) 모아 두어 어쩔 수 없이 재정의
  def display_drop_items
    drop_items = $game_troop.make_drop_items
    for item in drop_items
      $game_party.gain_item(item, 1)
    end
    exp = $game_troop.exp_total
    gold = $game_troop.gold_total
    @result_window = Window_BattleResult.new(exp, gold, drop_items)
    STRRGSS2::STR11H_ITEM.play if drop_items != []
    w = STRRGSS2::STR11H_WAIT
    # 웨이트
    while w > 0
      update_basic
      w -= 1 unless STRRGSS2::STR11H_NOTW
      break if Input.trigger?(STRRGSS2::STR11H_RSKIP)
    end
  end
end
#==============================================================================
# ■ Window_BattleResult
#==============================================================================
class Window_BattleResult < Window_Base
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize(exp, gold, treasures)
    super(0, 0, 320, (treasures.size * WLH) + WLH + 32)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.x = 272 - width / 2
    self.y = 144 - height / 2
    self.y = 4 if self.y < 4
    refresh(exp, gold, treasures)
  end
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh(exp, gold, treasures)
    self.contents.clear
    vocabexp = STRRGSS2::STR11H_EXP
    x = 4
    self.contents.font.color = normal_color
    cx = contents.text_size(exp).width
    self.contents.draw_text(x, 0, cx, WLH, exp)
    x += cx + 4
    self.contents.font.color = system_color
    cx = contents.text_size(vocabexp).width
    self.contents.draw_text(x, 0, 64, WLH, vocabexp)
    x += cx + 16
    self.contents.font.color = normal_color
    cx = contents.text_size(gold).width
    self.contents.draw_text(x, 0, cx, WLH, gold)
    x += cx + 4
    self.contents.font.color = system_color
    self.contents.draw_text(x, 0, 128, WLH, Vocab::gold)
    y = WLH
    for item in treasures
      draw_item_name(item, 4, y)
      y += WLH
    end
    Graphics.frame_reset
  end
end

 

Untitled-1 copy.jpg

Who's 카르와푸딩의아틀리에

profile

엘카르디아 제작자 (현재 MV로 리메이크중)

유튜브

https://www.youtube.com/channel/UCMwirNTR-pOEzJNB0jL3y_g

트위터

https://twitter.com/karsis98

블로그

https://blog.naver.com/karsis98

Comment '18'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
117 전투 새로운 전투돌입효과 29 file RPGbooster 2008.10.08 5079
116 타이틀/게임오버 심플한 게임오버화면 28 file RPGbooster 2008.10.08 3328
115 fog[안개] 효과 43 file RPGbooster 2008.10.08 4196
114 아이템 아이템입수 화면 16 file RPGbooster 2008.10.08 4526
113 전투 PRABS 2.0 액션배틀시스템 58 file RPGbooster 2008.10.08 7575
112 전투 Crissaegrim ABS 2.0.5 최신 48 file RPGbooster 2008.10.08 8768
111 전투 GTBS_VX 1.0 택틱컬rpg 14 file RPGbooster 2008.10.08 3352
110 케릭터 텍스트박스 18 file RPGbooster 2008.10.08 4709
109 파티 파티 체인저 3.4 최신 13 file RPGbooster 2008.10.08 3864
108 무기에 초필살기를 장착! 19 file RPGbooster 2008.10.08 4131
107 물반사 효과 32 file RPGbooster 2008.10.08 3723
106 Tankentai SBS 2.8 업데이트 [사이드뷰 배틀시스템 ] 42 file RPGbooster 2008.10.08 5140
105 이름입력 MOG 이름바꾸기 11 file RPGbooster 2008.10.08 3285
104 MOG 스토리 씬 22 file RPGbooster 2008.10.08 3345
103 레벨업시 자세한 능력치화면 31 file RPGbooster 2008.10.08 4181
102 타이틀/게임오버 타이틀에 스토리맵을 달자 26 file RPGbooster 2008.10.08 4829
101 메시지 네오 메시지 시스템 최신 17 file RPGbooster 2008.10.08 4251
100 심플하게 메뉴 띄우기 25 file RPGbooster 2008.10.08 3864
99 탈것을 소환 12 file RPGbooster 2008.10.08 2713
98 깔끔한 링메뉴 45 file RPGbooster 2008.10.08 5000
Board Pagination Prev 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Next
/ 32