XP 스크립트

제작자 : 준돌

#=================================================
# ■ 직업명 띄우기
#-------------------------------------------------
#  Author: 준돌
#  Desc: 머리위에 직업을 띄웁니다
#
#    비밀소년님의 아이디 스크립트랑 사용하면 좋음
#=================================================

class Game_Player
  alias class_refresh refresh
  def refresh
    class_refresh
    if $game_party.actors.size > 0
      @sprite_class = $game_party.actors[0].class_name
    end
  end
end

class Game_Event < Game_Event
  alias class_refresh refresh
  def refresh
    class_refresh
    text = @event.name.dup
    text.gsub!(/[[Cc][Ll](.+?)]/) do
      @sprite_class = $1
    end
    @sprite_class = nil if @erased
    @sprite_class = nil if @character_name == ""
  end
end

class Game_Character
  attr_accessor :sprite_class
end

class Sprite_Character
  def create_class_sprite(text)
    bitmap = Bitmap.new(160, 16)
    bitmap.font.name = "바탕체"
    bitmap.font.size = 12
    bitmap.font.color.set(0, 0, 0)
    bitmap.draw_text(+1, +1, 160, 16, text, 1)
    bitmap.font.color.set(255, 10, 10)
    bitmap.draw_text(0, 0, 160, 16, text, 1)
    @_class_sprite = Sprite.new(self.viewport)
    @_class_sprite.bitmap = bitmap
    @_class_sprite.ox = 80
    @_class_sprite.oy = 14
    @_class_sprite.x = self.x
    @_class_sprite.y = self.y - self.oy / 2 - 14
    @_class_sprite.z = 3000
    @_class_sprite_visible = true
  end

  def dispose_class_sprite
    @_class_sprite.dispose
    @_class_sprite_visible = false
  end
 
  def update_class_sprite
    if @character.sprite_class != nil
      if not @_class_sprite_visible
        create_class_sprite(@character.sprite_class)
      end
      @_class_sprite.x = self.x
      @_class_sprite.y = self.y - self.oy - 14
    else
      if @_class_sprite_visible
        dispose_class_sprite
      end
    end
  end
     
  alias class_update update
  def update
    class_update
    update_class_sprite
  end
end




#-------------------------------------------------------여기까지





직업명을 띄웁니다.

이벤트도 가능한데요

이벤트명에다가
[CL이름]
이렇게 하시면 됩니다.

비밀소년님의 아이디 스크립트와 혼용해야 좋습니다^^

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
921 기타 Defining Encounter Areas by RPG Advocate (사용법 첨부) file 백호 2009.02.22 1201
920 전투 DerVVulfman's addons for Mr.Mo's ABS file Alkaid 2010.09.10 1645
919 기타 Difficulty Options by SephirothSpawn 백호 2009.02.22 869
918 기타 Drago - Custom Resolution by LiTTleDRAgo Alkaid 2014.02.13 1110
917 그래픽 Drago - Custom Resolution II 1 Alkaid 2014.09.10 1004
916 기타 Dynamic Stores by Astro_mech@rmxp.net 1 file 백호 2009.02.22 878
915 아이템 Easy Item & Gold Gain by SephirothSpawn (SDK호환) 백호 2009.02.22 880
914 기타 Economy System by Nick@Creation Asylum 1 file 백호 2009.02.22 934
913 맵/타일 Editor Tiles by PK8 (XP/VX/VXA) Alkaid 2012.09.11 1868
912 기타 Encounter Control by SephirothSpawn (SDK호환) 4 file 백호 2009.02.22 1157
911 기타 endroll 주석 번역 6 file insertend 2010.05.15 1638
910 스킬 Equipment Skills 2.0 by SephirothSpawn file 백호 2009.02.22 1007
909 장비 Equipment Upgrade System 1.1 by Charlie Fleed Alkaid 2010.11.18 1928
908 기타 Etude87_Bone_Animation_Character ver.1.2 4 습작 2012.07.06 1255
907 전투 Etude87_Custom_Slip_Damage_XP ver.1.0 5 습작 2012.08.26 1857
906 메뉴 Etude87_Horror_Menu_XP ver.1.1 15 file 습작 2012.08.04 2762
905 메시지 Etude87_Item_Choice_XP ver.1.10 13 file 습작 2013.05.19 2178
904 맵/타일 Etude87_Map_Remember_XP ver.1.2 2 습작 2012.07.17 1614
903 변수/스위치 Etude87_Variables_XP 2 습작 2011.12.26 2104
902 메뉴 Event Spawner 1 file 백호 2009.02.22 979
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 52 Next
/ 52