RPGXP 스크립트
2013.09.24 08:08

경험치 표시 스크립트

조회 수 749 추천 수 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
번호 분류 제목 글쓴이 날짜 조회 수 추천 수
108 RPGMV 플러그인 RPG Maker MV 한글 데이타베이스 입니다. 9 file 천무 2015.10.25 1905 3
107 RPGXP 스크립트 요청하신 게이지바 스크립트 입니다. 8 소년영남 2013.10.04 1921 1
106 RPGMV 플러그인 컷신 플러그인 스트레이보우 2020.10.30 1942 0
105 RPGXP 스크립트 선택 메뉴를 가운데 정렬 해보자. 1 file 창조도시 2007.12.02 1955 2
104 RPGXP 스크립트 메뉴에 퀘스트 있는거 2  운 2013.10.12 1959 2
103 RPGXP 스크립트 최초 시작화면에 제작자 정보를 띄워보자. 6 창조도시 2008.04.04 1961 5
102 RPGXP 스크립트 아이템소지 한계돌파 file A.M.S 2010.10.24 1964 0
101 RPGXP 스크립트 AraLab_MultiStartingPoint (다중 출발점 스크립트, 캐릭터 선택 스크립트) ver.0.2beta 3  운 2014.01.21 1974 1
100 RPGVX 스크립트 [VX] 메시지 표시를 한번에 표시로 전환하기 Evangelista 2008.11.28 1975 1
99 RPGMV 플러그인 [ MV ] 심장[체력표시 하트] 플러그인 file 수성의물 2018.07.01 1990 0
98 RPGMV 플러그인 모바일 패드 플러그인입니다! MBS - Mobile DirPad & Action Button 6 willmv 2015.11.07 2007 3
97 RPGVX Ace 스크립트 타이틀 메뉴 위치 바꾸기 vx 및 vx ace 여줄가리 2015.09.21 2007 0
96 RPGVX 스크립트 [VX] 파티 선두 캐릭터 액터ID를 변수에 넣기 Evangelista 2008.11.28 2012 1
95 RPGXP 스크립트 파이널 판타지 7 스타일 메뉴 6 2013.10.01 2026 0
94 RPGMV 플러그인 Kaus Ultimate Overlay v1.03 (강력레이아웃추가! 빛/포그/파노라마/맵) 2 file 파란별빛 2015.11.08 2027 0
93 RPGMV 플러그인 윈도우 시스템 트레이로 최소화 2 file 러닝은빛 2016.01.21 2031 0
92 RPGXP 스크립트 대각선 방향 이동추가로 8방향 이동 만들기. 창조도시 2008.08.14 2043 1
91 RPGXP 스크립트 부드러운화면이동 file A.M.S 2010.10.24 2046 0
90 RPGMV 플러그인 픽쳐 터치 플러그인 1 양갱님 2016.04.17 2052 0
89 RPGXP 스크립트 상점에서 상세정보보여주기 file A.M.S 2010.10.24 2057 0
Board Pagination Prev 1 ... 5 6 7 8 9 10 11 12 13 14 15 Next
/ 15






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

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