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
321 기타 Sphere Grid System file 백호 2009.02.21 765
320 메뉴 제가 쓰는 메뉴 14 file 백호 2009.02.21 2318
319 HUD 새로운방법의 맵이름 표시 31 file 백호 2009.02.21 4617
318 전투 횡스크롤형식의 스크립트 7 백호 2009.02.21 2972
317 기타 말걸면그림천천히뜨기 4 file 백호 2009.02.21 1102
316 전투 A-battle 수정 file 백호 2009.02.21 1155
» HUD 직업명띄우기 스크립트 2 백호 2009.02.21 1123
314 기타 무기& 방어구 레벨제한 스크립트 23 file 백호 2009.02.21 1880
313 아이템 아이템 정리기능 S크립T 1 file 백호 2009.02.21 1081
312 기타 [KGC]HP&SP게이지 색다른것(글씨와 게이지가 안겹침) 10 file 백호 2009.02.21 2732
311 장비 [KGC]장비 제한(레벨,완력등등) 7 file 백호 2009.02.21 1780
310 메뉴 Tales Of Symphonia Menu 8 file 백호 2009.02.21 1744
309 이동 및 탈것 젤다 스타일 맵스크롤 5 file 백호 2009.02.21 1839
308 메시지 문자 메세지 띄우기 스크립트 10 file 백호 2009.02.21 3069
307 이동 및 탈것 Mouse_move 호환 100%강화버전 4 file 백호 2009.02.21 1512
306 기타 레벨9999스크립트 4 백호 2009.02.21 1151
305 이동 및 탈것 Mouse_move 호환버전 1 file 백호 2009.02.21 1059
304 전투 시뮬레이션 턴알 3 file 백호 2009.02.21 3054
303 이동 및 탈것 마우스 이동 조금 뜯어봤습니다. file 백호 2009.02.21 1680
302 기타 [KGC]강화스크립트 백호 2009.02.21 1667
Board Pagination Prev 1 ... 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 ... 52 Next
/ 52