XP 스크립트

뭔 이상한 말이 잔뜩 써있네;;

 

 

 

 

 

 

 

 

 

# 寃덇쾫寃?XRXS20. ?湲욊링堉??묎툊洹산튆湲ㅺ툊 ver.1.5 寃덇쾫寃?
# by 沅멸톭, ?롫맧 ?る콠

#==============================================================================
# 嫄?湲뉕툣??洹쎄툤?洹쎄튆湲?
#==============================================================================
module XRXS20
  # 湲귢렌源쏄륵湲귥겇洹??묎땅洹?
  WINDOW_FRAME = true
  #
  # 湲꿸툍源쏄르
  #
  FONT_NAME  = "굴림"
  FONT_COLOR = Color.new(255, 255, 0, 255)
  FONT_SIZE  = 18
  #
  # [??묐쟾??
  #
  TIME_FADEIN  =  8 # 湲꿸툋?湲ㅺ렘源?
  TIME_STOP    = 64 # ??묐캙?
  TIME_FADEOUT = 24 # 湲꿸툋?湲ㅺ렉湲귢르
end
  #--------------------------------------------------------------------------
  # 湲↔툕湲싰르由?
  #--------------------------------------------------------------------------
class Window_Map_Name < Window_Base
  def text_model(text)
    return "" + text + "  "
  end
end
#
#[??]
# ?湲욊링堉밴떻癒⑸쾯沅멸릭源뤾툎湲ㅺ콓.嫄먭텞沅뉕래沅?湲욊링堉밴랭??묎땁洹뤾때洹り컘
#
#==============================================================================
# 嫄?Window_Map_Name_Space
#==============================================================================
class Window_Map_Name_Space < Window_Base
  #--------------------------------------------------------------------------
  # 嫄?湲녾립湲숆툋湲뤾르猷딅뵔??
  #--------------------------------------------------------------------------
  def initialize(x, y, w, h)
    super(x-16, y-16, w+32, h+32)
    self.contents = Bitmap.new(w, h)
    self.opacity = 0
    @align = 2
  end
  #--------------------------------------------------------------------------
  # 嫄?湲꿸툍源쏄르
  #--------------------------------------------------------------------------
  def font
    return self.contents.font
  end
  #--------------------------------------------------------------------------
  # 嫄?鍮믩읅洹⑸짆沅?
  #--------------------------------------------------------------------------
  def draw_text(text)
    self.contents.clear
    return if text.nil?
    #r = self.contents.rect
    #self.contents.draw_text(r, text, 1)
    x = 4
    y = 0
    width = self.contents.width
    text_color = self.contents.font.color.dup
    self.contents.font.color = Color.new(  0,  0,  0, 192)
    self.contents.draw_text(x+2, y+2, width, 32, text, @align)
    self.contents.font.color = Color.new( 64, 64, 64, 192)
    self.contents.draw_text(x-1, y-1, width, 32, text, @align)
    self.contents.draw_text(x+1, y-1, width, 32, text, @align)
    self.contents.draw_text(x-1, y+1, width, 32, text, @align)
    self.contents.draw_text(x+1, y+1, width, 32, text, @align)
    self.contents.font.color = text_color
    self.contents.draw_text(x,   y,   width, 32, text, @align)
    self.visible = true
  end
end
#==============================================================================
# 嫄?Window_Map_Name
#------------------------------------------------------------------------------
# ??湲욊링堉밴랭??묎땅洹↔툊洹산튆湲ㅺ툊沅녠땅媛?
#==============================================================================
class Window_Map_Name < Window_Base
  #--------------------------------------------------------------------------
  # 嫄??븍몠洹쎄튆湲?源쏄툣鍮얜╋
  #--------------------------------------------------------------------------
  attr_accessor :text
  #--------------------------------------------------------------------------
  # 嫄?湲녾립湲숆툋湲뤾르猷딅뵔
  #--------------------------------------------------------------------------
  def initialize
    super(152, 8, 480, 40)
    self.opacity = 0
    self.visible = false
    @space = Window_Map_Name_Space.new(self.x, self.y+4, self.width, self.height-8)
    @space.font.name  = XRXS20::FONT_NAME
    @space.font.color = XRXS20::FONT_COLOR
    @space.font.size  = XRXS20::FONT_SIZE
    @space.font.bold  = true
    # 猷딅뵔??
    @fadein_time    = 0
    @showing_time   = 0
    @fadeouut_time  = 0
  end
  #--------------------------------------------------------------------------
  # 嫄?湲↔툕湲싰르癒좊?
  #     text  : 湲귢렌源쏄륵湲귢떳??묎땅洹〓퉺?살€?
  #--------------------------------------------------------------------------
  def set_text(text)
    if text.nil? or text.empty? or text =~ /^./
      @showing_time = -1
      @text = ""
      self.contents_opacity = 0
      self.visible = false
      @space.visible = false
    else
      # 癒좊?
      @text = text_model(text)
      # ?濡?
      @fadein_time    = XRXS20::TIME_FADEIN
      @fadein_amount  = (255.0 / XRXS20::TIME_FADEIN).ceil
      self.width = @space.contents.text_size(@text).width + 24
      @x_indent = 632 - self.width
      self.x = @x_indent - @fadein_time
      @space.draw_text(@text)
      self.visible = XRXS20::WINDOW_FRAME
    end
  end
  #--------------------------------------------------------------------------
  # 嫄??띕볐
  #--------------------------------------------------------------------------
  def dispose
    @space.dispose
    super
  end
  #--------------------------------------------------------------------------
  # 嫄?湲꿸퉺???쏅Ⅷ
  #--------------------------------------------------------------------------
  def update
    #return if @showing_time < 0
    #
    # 湲꿸툋?湲ㅺ렘源?
    #
    if @fadein_time > 0
      @fadein_time -= 1
      @space.contents_opacity += @fadein_amount
      self.opacity = [self.opacity + @fadein_amount*5/8, 160].min
      self.x = @x_indent - @fadein_time
      @space.x = self.x - (512-self.width)
      if @fadein_time == 0
        @showing_time = XRXS20::TIME_STOP
      end
    #
    # 誘낅쪈???
    #
    elsif @showing_time > 0
      @showing_time -= 1
      if @showing_time == 0
        @fadeouut_time  = XRXS20::TIME_FADEOUT
        @fadeout_amount = (255.0 / XRXS20::TIME_FADEOUT).ceil
      end
    #
    # 湲꿸툋?湲ㅺ렉湲귢르
    #
    elsif @fadeouut_time > 0
      @fadeouut_time -= 1
      self.opacity -= @fadeout_amount * 5/8
      @space.contents_opacity -= @fadeout_amount
      self.x = (@x_indent + XRXS20::TIME_FADEOUT) - @fadeouut_time
      @space.x = self.x - (512-self.width)
      if @fadeouut_time == 0
        self.visible = false
        @space.visible = false
      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.text = text if not text.nil?
    end
  end
  #--------------------------------------------------------------------------
  # 嫄?湲쎄렘源쏅즷肉?
  #--------------------------------------------------------------------------
  alias xrxs20_main main
  def main
    # 萸ㅻ섰湲귢렌源쏄륵湲귢랭?용쭫
    initialize_map_name_window
    # 戮j땅
    xrxs20_main
    # 萸ㅻ섰湲귢렌源쏄륵湲귢랭?띕볐
    @map_name_window.dispose
  end
  #--------------------------------------------------------------------------
  # 嫄?湲꿸퉺???쏅Ⅷ
  #--------------------------------------------------------------------------
  alias xrxs20_update update
  def update
    # 萸ㅻ섰湲귢렌源쏄륵湲귢떻?쏅Ⅷ
    @map_name_window.update
    # ?곴톪戮j땅
    xrxs20_update
  end
  #--------------------------------------------------------------------------
  # 嫄?湲듦퉺洹쎄퉪?沅삳ㅎ猷뗫뙴踰?
  #--------------------------------------------------------------------------
  alias xrxs20_transfer_player transfer_player
  def transfer_player
    # ?곴톪戮j땅
    xrxs20_transfer_player
    # 萸ㅻ섰湲귢렌源쏄륵湲귢떻?쏅Ⅷ
    @map_name_window.set_text($game_map.name)
  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


 

Who's 캉쿤

?

배고파요ㅠㅜ

전 댓글을 먹고 살아요ㅠㅜ

댓글 하나만요ㅠㅜ

Comment '6'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6202
101 메뉴 SG_Artifact Colors by sandgolem (SDK 호환) 1 백호 2009.02.22 1003
100 기타 Free Window Demo 1 file 백호 2009.02.22 1002
99 맵/타일 Map Loop Script 백호 2009.02.21 999
98 기타 특수효과 ElseEX 스크립트 file 백호 2009.02.21 995
97 키입력 No F1, F12 and Alt+Return (Kein F1, F12 und Alt+Eingabe) by cremno 습작 2013.04.19 995
96 기타 스크롤되는 파노라마(Autoscrolling Panorama) by RPG Advocate 백호 2009.02.22 993
95 기타 필드에서 마력을 출력합니다. 백호 2009.02.22 989
94 기타 Tetris Attack by trickster 1 file 백호 2009.02.22 986
93 그래픽 Bitmap update 2.0 by Linkin_T 1 백호 2009.02.22 985
92 메뉴 Event Spawner 1 file 백호 2009.02.22 980
91 스킬 랜덤 스킬 스크립트 2 file 백호 2009.02.21 979
90 저장 SG_Automatic Save 백호 2009.02.22 973
89 기타 ATS-Advanced Time System 1 file 백호 2009.02.21 964
88 기타 [All RGSS] File-Ex file Cheapmunk 2014.12.29 964
87 파티 Party & Class Changing script 1 file 백호 2009.02.21 962
86 키입력 Mouse Input Module v5 by Near Fantastica (SDK호환) 2 백호 2009.02.22 962
85 메뉴 1-Scene CMS 1.1 by LegACy@rmxp.org (SDK호환) file 백호 2009.02.22 953
84 기타 Text Scroll by Dubealex (Release 3) 2 file 백호 2009.02.22 940
83 오디오 WinAMP 플러그인을 이용하여 RMXP에서 다른 사운드포맷 지원하기 v3 by Guillame777@rmxp.net 백호 2009.02.22 936
82 아이템 SG_Hide free item cose by sandgolem (SDK호환) 백호 2009.02.22 935
Board Pagination Prev 1 ... 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 Next
/ 52