RPGXP 스크립트
2013.09.24 08:08

경험치 표시 스크립트

조회 수 750 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

class Game_Actor < Game_Battler 
  def exp_rate 
    if @exp_list[@level+1] - @exp_list[@level] > 0 
      return (@exp - @exp_list[@level]).to_f / (@exp_list[@level+1] - @exp_list[@level]).to_f 
    else 
      return 0 
    end 
  end 
end 
class Window_ExpRate < Window_Base 
  def initialize 
    super(0, 0, 125, 55) # <- location, size 
    self.contents = Bitmap.new(width - 32, height - 32) 
    
    self.contents.font = Font.new("궁서체", 16) # <- font, size 
    self.opacity = 0 
self.back_opacity = 0 
  end 
  def refresh 
    self.contents.clear 
    self.contents.draw_text(0, 0, 100, 30, @show_text) 
  end 
  def actor 
    $game_party.actors[0] # <- 파티 0번째 
  end 
  def update 
    super 
    text = sprintf("경험치: %d%%", (actor.exp_rate * 100).to_i) 
    if @show_text != text 
      @show_text = text 
      refresh 
    end 
  end 
end 
class Scene_Map 
  alias update_before_map update 
  def update 
    update_before_map 
    @window_exp = Window_ExpRate.new unless @window_exp 
    @window_exp.update 
    unless $scene.is_a?(Scene_Map) 
      @window_exp.dispose 
      @window_exp = nil 
    end 
  end 
end 


출처: 게임공작소

?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수 추천 수
208 RPGVX 스크립트 [VX] 조건분기로 키입력의 처리 실행 1 Evangelista 2008.11.28 2131 1
207 RPGXP 스크립트 직업명 표시 file A.M.S 2010.10.24 2103 0
206 RPGMV 플러그인 이벤트 이름 표시하기 8 file 러닝은빛 2016.04.05 2098 1
205 RPGMV 플러그인 Keyboard Event - RPG Maker MV 1 러닝은빛 2017.01.03 2088 0
204 RPGXP 스크립트 대화창에 얼굴 띄우기& 대화창 명령어 모음. 1 file 창조도시 2008.12.31 2083 1
203 RPGXP 스크립트 맵 이름을 화면 상단에 띄우기. 1 1 file 창조도시 2008.10.12 2083 1
202 RPGVX 스크립트 액터선택지이벤트제작 간편화 스크립트 1 Evangelista 2009.04.30 2078 3
201 RPGXP 스크립트 모션 스크립트 3  운 2013.12.06 2060 0
200 RPGMV 플러그인 픽쳐 터치 플러그인 1 양갱님 2016.04.17 2060 0
199 RPGXP 스크립트 상점에서 상세정보보여주기 file A.M.S 2010.10.24 2057 0
198 RPGXP 스크립트 부드러운화면이동 file A.M.S 2010.10.24 2046 0
197 RPGXP 스크립트 대각선 방향 이동추가로 8방향 이동 만들기. 창조도시 2008.08.14 2044 1
196 RPGMV 플러그인 Kaus Ultimate Overlay v1.03 (강력레이아웃추가! 빛/포그/파노라마/맵) 2 file 파란별빛 2015.11.08 2032 0
195 RPGMV 플러그인 윈도우 시스템 트레이로 최소화 2 file 러닝은빛 2016.01.21 2031 0
194 RPGXP 스크립트 파이널 판타지 7 스타일 메뉴 6 2013.10.01 2028 0
193 RPGVX Ace 스크립트 타이틀 메뉴 위치 바꾸기 vx 및 vx ace 여줄가리 2015.09.21 2016 0
192 RPGVX 스크립트 [VX] 파티 선두 캐릭터 액터ID를 변수에 넣기 Evangelista 2008.11.28 2014 1
191 RPGMV 플러그인 모바일 패드 플러그인입니다! MBS - Mobile DirPad & Action Button 6 willmv 2015.11.07 2008 3
190 RPGMV 플러그인 [ MV ] 심장[체력표시 하트] 플러그인 file 수성의물 2018.07.01 1997 0
189 RPGVX 스크립트 [VX] 메시지 표시를 한번에 표시로 전환하기 Evangelista 2008.11.28 1975 1
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 15 Next
/ 15






[개인정보취급방침] | [이용약관] | [제휴문의] | [후원창구] | [인디사이드연혁]

Copyright © 1999 - 2016 INdiSide.com/(주)씨엘쓰리디 All Rights Reserved.
인디사이드 운영자 : 천무(이지선) | kernys(김원배) | 사신지(김병국)