XP 스크립트

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


그냥 윈도우 표시 안한거하고 좌표만 바꾼것,,,, ㅠㅠ

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6202
341 기타 Shift Puzzles v2 by SephirothSpawn (SDK호환) 3 file 백호 2009.02.22 1170
340 기타 Shift Puzzles by SephirothSpawn (SDK호환) 1 file 백호 2009.02.22 1390
339 기타 SG_Window Control v2 by sandgolem 백호 2009.02.22 823
338 이동 및 탈것 SG_Wait for Move Completion Fix by sandgolem (SDK호환) 백호 2009.02.22 860
337 기타 SG_Transfer Player Music Fix v2 by sandgolem (SDK호환) 1 백호 2009.02.22 824
336 상태/속성 SG_State Immunity Message by sandgolem (SDK 호환) 백호 2009.02.22 1057
335 스킬 SG_Skill Invoking Battle Items by sandgolem (SDK호환) 백호 2009.02.22 894
334 스킬 SG_Skill Break by sandgolem (SDK호환) 백호 2009.02.22 772
333 기타 SG_Settings Control by sandgolem 백호 2009.02.22 884
332 변수/스위치 SG_Self Variables by sandgolem 백호 2009.02.22 1275
331 기타 SG_Multiple Currencies v3 by sandgolem (SDK호환) 백호 2009.02.22 803
330 맵/타일 SG_Map Pause ver.1 by sandgolem 2 백호 2009.02.22 1290
329 아이템 SG_Item Break by sandgolem (SDK호환) 백호 2009.02.22 898
328 메뉴 SG_Hide zero SP cost by sandgolem (SDK호환) 백호 2009.02.22 1066
327 아이템 SG_Hide free item cose by sandgolem (SDK호환) 백호 2009.02.22 935
326 변수/스위치 SG_Gold Window Variables v2 by sandgolem (SDK호환) 백호 2009.02.22 899
325 스킬 SG_Escape Only Skills by sandgolem (SDK호환) 백호 2009.02.22 753
324 아이템 SG_Escape Only Items by sandgolem (SDK호환) 백호 2009.02.22 850
323 기타 SG_Call Script Fix by sandgolem (SDK호환) 백호 2009.02.22 804
322 저장 SG_Broken Save File Fix by sandgolem (SDK호환) 1 백호 2009.02.22 1068
Board Pagination Prev 1 ... 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 ... 52 Next
/ 52