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
44 메뉴 KGC - 커스텀 메뉴 커멘드 (번역) 1 듀란테 2015.07.27 1077
43 메뉴 Etude87's Menu Editor for VX 25 습작 2015.01.14 1461
42 메뉴 Etude87_Ace_Style_Formation_Change ver.1.01 습작 2014.10.05 758
41 메뉴 MOG - Scroll Bar for VX file 습작 2014.07.06 1115
40 메뉴 기본메인 메뉴 아이콘 추가 10 아방스 2010.12.11 4573
39 메뉴 kgc 파라미터 배분 09/07/25 13 시트르산 2010.09.24 2327
38 메뉴 자작 메뉴 스크립트 for VX(L's Simple Custom Menu VX ver.) 5 Alkaid 2010.09.02 4705
37 메뉴 스타일 크로노 트리거 메뉴 31 file 콩밥 2010.07.19 4536
36 메뉴 매우 간단명료한 메뉴. 32 file 비극ㆍ 2010.04.23 6618
35 메뉴 Final Fantasy VII Menu System 8 비극ㆍ 2010.04.19 3506
34 메뉴 몬스터도감(유즈미짱님의엘카르디아같은종류) 1 작은샛별 2010.03.07 4199
33 메뉴 윈도우 색변경 스크립트 7 file 비극ㆍ 2010.03.01 2598
32 메뉴 전투 결과 상세 표시 스크립트 (한글화) 15 file 강진수 2010.02.26 3344
31 메뉴 YERD - 커먼 이벤트 메뉴 4 file 훈덕 2009.11.08 3849
30 메뉴 YERD - 시스템 옵션 5 file 훈덕 2009.11.08 3135
29 메뉴 확장 스테이터스 화면 - KGC 23 file 카르와푸딩의아틀리에 2009.08.19 5057
28 메뉴 전투결과 상세 표시 스크립트 24 file 카르와푸딩의아틀리에 2009.07.07 4143
27 메뉴 전투 결과 팝업 스크립트 12 file 카르와푸딩의아틀리에 2009.06.30 3381
26 메뉴 몬스터도감 심플버전! 52 file 카르와푸딩의아틀리에 2009.06.30 6906
» 메뉴 전투승리시 아이템 경험치팝업창 스크립트 18 file 카르와푸딩의아틀리에 2009.06.23 3760
Board Pagination Prev 1 2 3 Next
/ 3