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
번호 분류 제목 글쓴이 날짜 조회 수 추천 수
188 RPGXP 스크립트 동료가 기차처럼 따라오는 스크립트 청담 2013.09.24 1119 0
187 RPGXP 스크립트 지정한 아이템 갯수 제한 스크립트 청담 2013.09.24 1136 0
186 RPGXP 스크립트 복권 스크립트 5 2013.10.01 1146 0
185 RPGXP 스크립트 FPS 표시 스크립트 7  운 2013.09.27 1166 0
184 RPGXP 스크립트 로고 스크립트 1  운 2014.12.10 1179 1
183 RPGMV 플러그인 화면 다중 분할 플러그인(Multiple Viewports) 러닝은빛 2016.08.25 1180 0
182 RPGVX Ace 스크립트 RPG Maker VX Ace용 로고 스크립트 3 HUR 2014.08.04 1182 0
181 RPGXP 스크립트 모든 글자에 외곽선 넣는 스크립트 청담 2013.09.20 1186 0
180 RPGXP 스크립트 얼굴표시/문장을 한글자씩 나타내주는 스크립트 (출처-히페리온) 4 시르카 2014.06.22 1191 0
179 RPGMV 플러그인 게임에서 제공해주는 노래가 아닌 외부에서 다운받고 안에 넣어쓰려면 어떻게 해야하나요? 3 BigOrca 2019.07.26 1198 0
178 RPGMV 플러그인 한글 데미지 표시 file 러닝은빛 2018.07.09 1206 0
177 RPGMV 플러그인 점프 액션 플러그인. 3 file plam 2015.11.07 1219 0
176 RPGMV 플러그인 Wav 파일 암호화 도구 - RMMV 1 file 러닝은빛 2016.11.30 1236 1
175 RPGXP 스크립트 RPG 만들기 XP의 숨겨진 모듈/클래스 재정의 스크립트 모음 2013.10.01 1241 0
174 RPGMV 플러그인 Ellye's Simple ATB (RPG Maker MV) 2 file 파란별빛 2015.10.24 1249 1
173 RPGXP 스크립트 게임도중에 글씨체를 바꿔보자. 창조도시 2008.12.31 1266 1
172 RPGVX 스크립트 3D 그래픽 파티클 스크립트 1 청담 2013.09.29 1272 0
171 RPGVX Ace 스크립트 RPG Maker VX Ace용 640*480 리사이징 스크립트 3 HUR 2014.08.04 1272 0
170 RPGMV 플러그인 전투 도중 멤버교체가 가능해지는 플러그인 2 file Wailer 2016.01.13 1301 0
169 RPGXP 스크립트 빠른 길찾기 2 휴리드 2013.09.30 1337 0
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(김원배) | 사신지(김병국)