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 5408
44 메뉴 확장 스테이터스 화면 - KGC 23 file 카르와푸딩의아틀리에 2009.08.19 5057
43 메뉴 헬프 윈도우 중앙표시 스크립트 11 file 양념통닼 2008.06.10 3348
42 메뉴 파이날 판타지 IX 메뉴. 12 file 할렘 2009.02.06 6287
41 메뉴 커서 모양 바꾸는 스크립트 16 아방스 2009.01.20 3959
40 메뉴 캐릭터설명을 심플하게! 스크립트. 13 file 할렘 2009.02.03 4848
39 메뉴 창 크기 변경 스크립트 6 file Incubus 2008.05.25 5945
38 메뉴 지난 메뉴 스크립트에 이은 스테이터스 스크립트! 5 file 독사 2008.06.29 3545
» 메뉴 전투승리시 아이템 경험치팝업창 스크립트 18 file 카르와푸딩의아틀리에 2009.06.23 3760
36 메뉴 전투결과 상세 표시 스크립트 24 file 카르와푸딩의아틀리에 2009.07.07 4143
35 메뉴 전투 결과 팝업 스크립트 12 file 카르와푸딩의아틀리에 2009.06.30 3381
34 메뉴 전투 결과 상세 표시 스크립트 (한글화) 15 file 강진수 2010.02.26 3344
33 메뉴 자작 메뉴 스크립트 for VX(L's Simple Custom Menu VX ver.) 5 Alkaid 2010.09.02 4705
32 메뉴 일본에서 만든 멋있는메뉴변경 스크립트 (한글 VX에서 쓰시면 자동으로 바뀜) 45 유칸지 2008.04.09 8861
31 메뉴 윈도우창 크기 조절 스크립트 0.3 5 아방스 2008.01.30 3038
30 메뉴 윈도우 색변경 스크립트 7 file 비극ㆍ 2010.03.01 2598
29 메뉴 시스템 옵션 스크립트의 사용방법 6 아방스 2009.06.04 2834
28 메뉴 스테이터스 화면 개조 - 커스텀 버전 13 file 훈덕 2009.06.15 4932
27 메뉴 스테이터스 창을 멋있게 쿨하게~!전신을 보여주자. 24 file 할렘 2009.02.06 6236
26 메뉴 스타일 크로노 트리거 메뉴 31 file 콩밥 2010.07.19 4536
25 메뉴 몬스터도감(유즈미짱님의엘카르디아같은종류) 1 작은샛별 2010.03.07 4201
Board Pagination Prev 1 2 3 Next
/ 3