RPGXP 스크립트
2013.09.24 08:08

경험치 표시 스크립트

조회 수 752 추천 수 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
번호 분류 제목 글쓴이 날짜 조회 수 추천 수
80 RPGXP 스크립트 복권 스크립트 청담 2013.09.24 930 0
79 RPGXP 스크립트 복권 스크립트 5 2013.10.01 1149 0
78 RPGXP 스크립트 밤낮 설정 3 2013.10.01 997 0
77 RPGXP 스크립트 발소리 스크립트 6 2013.10.01 1732 0
76 RPGXP 스크립트 반칸이동 1 1 file A.M.S 2010.07.18 2185 0
75 RPGXP 스크립트 반칸이동 1 file A.M.S 2010.07.18 2448 0
74 RPGXP 스크립트 미니맵 스크립트 2 청담 2013.09.20 1878 0
73 RPGXP 스크립트 미니맵 스크립트 2 2013.10.01 2180 0
72 RPGXP 스크립트 물가에가면 캐릭터를 반사시켜주는 스크립트 4 file 창조도시 2007.12.02 4494 6
71 RPGXP 스크립트 물가에가면 캐릭터를 반사시켜주는 스크립트 4 file 창조도시 2007.12.02 4995 7
70 RPGXP 스크립트 문과 상자를 쉽게 만들수 있는 스크립트 18 2013.10.21 2248 0
69 RPGXP 스크립트 몬스터 도감 1 청담 2013.09.24 1431 0
68 RPGXP 스크립트 모션 스크립트 3  운 2013.12.06 2062 0
67 RPGXP 스크립트 모든 글자에 외곽선을 넣어주는 스크립트 3 2013.09.26 810 1
66 RPGXP 스크립트 모든 글자에 외곽선 넣는 스크립트 청담 2013.09.20 1189 0
65 RPGXP 스크립트 메세지에 얼굴, 이름등 다양한 기능 넣기 UMS 스크립트 1 데노제 2013.12.10 1618 0
64 RPGXP 스크립트 메뉴에서 실제시간 보는 스크립트 4 청담 2013.09.24 609 0
63 RPGXP 스크립트 메뉴에 퀘스트 있는거 2  운 2013.10.12 1965 2
62 RPGXP 스크립트 메뉴에 얼굴 그래픽 표시 청담 2013.09.24 837 0
61 RPGXP 스크립트 메뉴 스크립트 Zer0 CMS 3 2013.10.01 1386 0
Board Pagination Prev 1 2 3 4 5 6 7 8 Next
/ 8






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

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