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 메뉴 SG_Artifact Colors by sandgolem (SDK 호환) 1 백호 2009.02.22 1003
920 그래픽 Drago - Custom Resolution II 1 Alkaid 2014.09.10 1004
919 기타 프레임 적용 스크립트 1 file 백호 2009.02.21 1007
918 스킬 Equipment Skills 2.0 by SephirothSpawn file 백호 2009.02.22 1007
917 전투 랜덤 전투음악 by Fomar0153@rmxp.org 1 백호 2009.02.22 1008
916 기타 분류 별로 윈도우 스킨 다르게 사용하기 file 백호 2009.02.21 1015
915 기타 강제 종료시키기 1 file 백호 2009.02.22 1015
914 전투 방어시에 속성 저항,스테이트무시 스크립트 1 백호 2009.02.22 1017
913 기타 제련시스템 수정본입니다. 3 file 백호 2009.02.21 1020
912 기타 능력치 무한대 스크립트 (따로 넣을필요없음) 2 백호 2009.02.21 1027
911 전투 SG_Auto battle by sandgolem (SDK호환) 백호 2009.02.22 1031
910 아이템 아이템을 사용하여 기술 습득하기 (기술문서 아이템) 2 file 백호 2009.02.21 1033
909 기타 Random Character Generator by SephirothSpawn (SDK호환) 1 백호 2009.02.22 1040
908 타이틀/게임오버 타이틀과 타이틀 BGM 랜덤으로 변경하는 스크립트 2 file 백호 2009.02.21 1045
907 기타 기본설정 강화ㄴ 1 백호 2009.02.21 1047
906 이동 및 탈것 이동루트에 애니메이션커맨드 추가 1 file 백호 2009.02.21 1047
905 파티 파티원 포션 나눠먹기 스크립트 1 file 백호 2009.02.22 1047
904 기타 [KGC] 개요 스크립트 2 백호 2009.02.21 1049
903 메뉴 링메뉴+음악도입스크립트 백호 2009.02.21 1051
902 저장 [KGC] 스크립트 저장된 리셋 불어오기 [스샷첨부] 1 file 백호 2009.02.22 1052
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