XP 스크립트

아래 스크립트는 헬악이님이 올려주셨습니다.


사용법:main스크립트 에다 마우스오른쪽버튼 누르면 삽입 나오는데 클릭

그럼 빈공간이 생김. 이 스크립트 복사해서 그 빈공간 에다 붙여넣기.

그리고 제목 짓고. 끝















# ▼▲▼ XRXS20. 맵명 표시 윈도우 ver.1.04 ▼▲▼
# by , 앵아 재흙, fukuyama
#
# 맵명의 선두에 피리어드 「.」이 있으면(자) 맵명을 표시하지 않는다.
#
module XRXS20_Config
  # true (이)라면 전투후 , 맵으로 돌아왔을 경우도 표시한다
  SCENE_BATTLE_TO_SCENE_MAP = true
end

#==============================================================================
# ■ Window_Map_Name
#------------------------------------------------------------------------------
#  맵명을 표시하는 윈도우입니다.
#==============================================================================
class Window_Map_Name < Window_Base
  attr_accessor :text

  #--------------------------------------------------------------------------
  # ● 오브젝트 초기
  #--------------------------------------------------------------------------
  def initialize
    super(8, -8, 640, 64)
    self.contents = Bitmap.new(self.width - 32, self.height - 32)
    @align = 2
    @showing_time = -1
    @text_color   = Color.new(255, 255, 0, 255)      # 지명:묘사 문자색
  end
  #--------------------------------------------------------------------------
  # ● 텍스트 설정
  # text : 윈도우에 표시하는 캐릭터 라인
  # align : alignment (0..왼쪽 가지런히 해1..centering ,2..오른쪽맞춤)
  #--------------------------------------------------------------------------
  def set_text(text, align = 2)
    # 텍스트와 alignment의 적어도 한편이 전회와 다른 경우
    if text != @text or align != @align
      @text = text
      @align = align
      if text.empty? or text =~ /^./
        @showing_time = -1
        self.contents_opacity = 0
        self.visible = false
      else
        @showing_time = 100
        self.contents_opacity = 255
        self.visible = true
        self.contents.clear
        x = 4
        y = 0
        width = self.contents.width - 8
        str = "-"+@text+"-"
        self.contents.font.color = Color.new(  0,  0,  0, 192)
        self.contents.draw_text(x+2, y+2, width, 32, str, @align)
        self.contents.font.color = Color.new( 64, 64, 64, 192)
        self.contents.draw_text(x-1, y-1, width, 32, str, @align)
        self.contents.draw_text(x+1, y-1, width, 32, str, @align)
        self.contents.draw_text(x-1, y+1, width, 32, str, @align)
        self.contents.draw_text(x+1, y+1, width, 32, str, @align)
        self.contents.font.color = @text_color
        self.contents.draw_text(x,   y,   width, 32, str, @align)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 재묘화
  #--------------------------------------------------------------------------
  def update
    return if @showing_time < 0
    @showing_time -= 1
    if @showing_time < 16
      # 페이드아웃 하기 시작하는
      self.contents_opacity = @showing_time * 16
      if @showing_time == 0
        self.visible = false
        self.contents.clear
        return
      end
    end
#이 부분을 지워주면 맵 이름이 사라지지 않습니다.
  end
end
#==============================================================================
# ■ Scene_Map
#==============================================================================
class Scene_Map
  def initialize_map_name_window(text = nil)
    if @map_name_window.nil?
      @map_name_window = Window_Map_Name.new
      @map_name_window.opacity = 0
      @map_name_window.text = text if not text.nil?
    end
  end
  #--------------------------------------------------------------------------
  # ● 메인 처리
  #--------------------------------------------------------------------------
  alias xrxs20_main main
  def main
    # 지명 윈도우를 작성
    initialize_map_name_window
    # 되돌리는
    xrxs20_main
    # 지명 윈도우를 해방
    @map_name_window.dispose
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  alias xrxs20_update update
  def update
    # 지명 윈도우의 갱신
    @map_name_window.set_text($game_map.name)
    @map_name_window.update
    xrxs20_update
  end
end
#==============================================================================
# ■ Game_Map
#==============================================================================
class Game_Map
  #--------------------------------------------------------------------------
  # ● 맵명을 취득
  #--------------------------------------------------------------------------
  def name
    $map_infos = load_data("Data/MapInfos.rxdata") if $map_infos.nil?
    $map_infos[@map_id].name
  end
end
#==============================================================================
# ■ Scene_Battle
#==============================================================================
class Scene_Battle
  #--------------------------------------------------------------------------
  # ● 메인 처리
  #--------------------------------------------------------------------------
  alias xrxs20_main main
  def main
    xrxs20_main
    if $scene.is_a?(Scene_Map) and (not XRXS20_Config::SCENE_BATTLE_TO_SCENE_MAP)
      $scene.initialize_map_name_window($game_map.name)
    end
  end
end

Who's 아방스

profile
Atachment
첨부 '1'
Comment '16'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6202
421 파티 메뉴커맨드로 파티 멤버들 순서 바꾸기 by Yargovish 1 백호 2009.02.22 1622
420 기타 Dynamic Stores by Astro_mech@rmxp.net 1 file 백호 2009.02.22 878
419 스킬 약간 수정한 심플액알(크리티컬,스킬) 10 백호 2009.02.22 3836
418 메뉴 Event Spawner 1 file 백호 2009.02.22 980
417 메뉴 새로운 cms 4 file 백호 2009.02.22 2118
416 기타 KGC - RMXP 스크립트 개발용 프로젝트 1.01 4 file 백호 2009.02.22 1515
415 기타 Random Character Generator by SephirothSpawn (SDK호환) 1 백호 2009.02.22 1040
414 전투 마법검 스크립트 1 백호 2009.02.22 1426
413 기타 Terrain Encounter Areas by SephirothSpawn 백호 2009.02.22 778
412 타이틀/게임오버 타이틀 아주 미묘한 효과 5 백호 2009.02.22 1857
411 메시지 1문자식 표시랑 따랑소리 나는 스크립트 8 백호 2009.02.22 2306
410 기타 Multiple Currencies(여러 개의 통화단위 사용) 2 백호 2009.02.22 1124
409 기타 Text Scroll by Dubealex (Release 3) 2 file 백호 2009.02.22 940
408 기타 Near Fantastica's SDK Test Bed 3 file 백호 2009.02.22 885
407 기타 멋진...제작자 정보를 그림으로 1 백호 2009.02.22 1233
406 전투 배틀 포인트 1 백호 2009.02.22 918
405 전투 배틀샵 스크립트 1 백호 2009.02.22 1126
404 온라인 멀티넷스크립트 => 채팅보완 스크립트 8 file 백호 2009.02.22 2931
403 저장 멀티넷스크립트 -> 아이피 세이브,로드 스크립트 9 file 백호 2009.02.22 2206
402 HUD Advanced HUD Script 3 file 백호 2009.02.22 1341
Board Pagination Prev 1 ... 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 ... 52 Next
/ 52