RPGXP 스크립트
2013.09.24 08:08

경험치 표시 스크립트

조회 수 747 추천 수 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
번호 분류 제목 글쓴이 날짜 조회 수 추천 수
160 RPGXP 스크립트 물가에가면 캐릭터를 반사시켜주는 스크립트 4 file 창조도시 2007.12.02 4994 7
159 RPGXP 스크립트 물가에가면 캐릭터를 반사시켜주는 스크립트 4 file 창조도시 2007.12.02 4490 6
158 RPGXP 스크립트 대화창에 이름&얼굴 띄우기 새로운방식. file 창조도시 2007.11.06 3594 3
157 RPGXP 스크립트 대화창에 이름&얼굴 띄우기 새로운방식. file 창조도시 2007.11.06 3476 3
156 RPGXP 스크립트 안티 렉 스크립트 2 2013.09.26 3327 1
155 RPGXP 스크립트 퀘스트 스크립트 21  운 2013.10.12 3101 2
154 RPGXP 스크립트 특정범위내에들어오면이동하기 2 file A.M.S 2010.10.14 3082 0
153 RPGXP 스크립트 2D 마인크래프트 프로젝트 7 2013.09.26 3048 2
152 RPGXP 스크립트 대화창에 얼굴 띄우기& 대화창 명령어 모음. 1 file 창조도시 2008.12.31 2822 1
151 RPGXP 스크립트 3D스크립트!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 6 공박사 2014.01.18 2805 2
150 RPGXP 스크립트 부활 스크립트 2 2013.10.01 2766 0
149 RPGXP 스크립트 이름조합스크립트 16 Scissor 2013.10.27 2764 0
148 RPGXP 스크립트 그레고리우스력 원리. 협객 2011.06.22 2752 0
147 RPGXP 스크립트 맵 이름을 화면 상단에 띄우기. 1 file 창조도시 2008.10.12 2735 1
146 RPGXP 스크립트 아이템 조합 스크립트 7  운 2013.12.06 2712 0
145 RPGXP 스크립트 한글이름입력기 v1.76 1 1 창조도시 2008.07.24 2698 2
144 RPGXP 스크립트 퀘스트스크립트 2 file A.M.S 2010.10.24 2633 1
143 RPGXP 스크립트 [무한응용]스위치/변수 임시 저장/로딩하기 카리스 2010.04.10 2633 1
142 RPGXP 스크립트 새로운 게임 시작/로드 시 미묘한 연출 추가. 창조도시 2007.12.01 2604 1
141 RPGXP 스크립트 [무한응용]스위치/변수 임시 저장/로딩하기 1 카리스 2010.04.10 2594 1
Board Pagination Prev 1 2 3 4 5 6 7 8 Next
/ 8






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

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