XP 스크립트

맵에 들어갔을 때 맵 이름이 표시된 창을 띄우는 스크립트입니다.  이벤트에서 불러낼 때는 이벤트 명령->스크립트에서 $game_temp.show_mapname = true 라고 하면 됩니다.

#==============================================================================
# ** Show Map Name
#------------------------------------------------------------------------------
# Slipknot
# 1.0
# 03.31.06
#==============================================================================

SDK.log('Show_Map_Name', 'Slipknot', '1.0', '03.31.06')

#--------------------------------------------------------------------------
# Begin SDK Enabled Check
#--------------------------------------------------------------------------
if SDK.enable('Show_Map_Name')
#--------------------------------------------------------------------------

$data_mapinfos = load_data('Data/MapInfos.rxdata')

module Show_Map_Name
#--------------------------------------------------------------------------
Show_Frames = 30
Back_Opacity = 160
Y = 32
#--------------------------------------------------------------------------
end

#------------------------------------------------------------------------------
# Begin Game_Map Edit
#------------------------------------------------------------------------------
class Game_Map
#--------------------------------------------------------------------------
alias slipknot_showmapname_gamemap_setupmapid setup_map_id
alias slipknot_showmapname_gamemap_update update
#--------------------------------------------------------------------------
def setup_map_id(map_id)
slipknot_showmapname_gamemap_setupmapid(map_id)
if $game_temp.show_mapname
@window_mapname = Window_MapName.new(map_id)
$game_temp.show_mapname = false
end
end
#--------------------------------------------------------------------------
def dispose_window_mapname
unless @window_mapname.nil? or @window_mapname.disposed?
@window_mapname.dispose
end
end
#--------------------------------------------------------------------------
def update
slipknot_showmapname_gamemap_update
unless @window_mapname.nil? or @window_mapname.disposed?
@window_mapname.update
end
end
end
#------------------------------------------------------------------------------
# End Game_Map Edit
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# Begin Scene_Map Edit
#------------------------------------------------------------------------------
class Scene_Map
#--------------------------------------------------------------------------
alias slipknot_showmapname_scenemap_maindispose main_dispose
#--------------------------------------------------------------------------
def main_dispose
slipknot_showmapname_scenemap_maindispose
$game_map.dispose_window_mapname
end
end
#------------------------------------------------------------------------------
# End Scene_Map Edit
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# Begin Game_Temp Edit
#------------------------------------------------------------------------------
class Game_Temp
#--------------------------------------------------------------------------
attr_accessor(:show_mapname)
#--------------------------------------------------------------------------
alias slipknot_showmapname_gametemp_init initialize
#--------------------------------------------------------------------------
def initialize
slipknot_showmapname_gametemp_init
@show_mapname = false
end
end
#------------------------------------------------------------------------------
# End Game_Temp Edit
#------------------------------------------------------------------------------

class Window_MapName < Window_Base
#--------------------------------------------------------------------------
include(Show_Map_Name)
#--------------------------------------------------------------------------
def initialize(map_id)
name = $data_mapinfos[map_id].name
dumb = Bitmap.new(128, 32)
width = dumb.text_size(name).width + 32
dumb.dispose
super(320 - width / 2, Y, width, 64)
self.contents = Bitmap.new(width - 32, 32)
self.contents.draw_text(0, 0, width - 32, 32, name, 1)
self.opacity = 0
self.back_opacity = Back_Opacity
@phase = 1
@otime = 4
@time = Show_Frames
end
#--------------------------------------------------------------------------
def opacity=(val)
super(val)
self.contents_opacity = val
end
#--------------------------------------------------------------------------
def update
if @otime > 0
@otime -= 1
return
end
if @phase == 1 and opacity < 255
self.opacity += 32
return
elsif @phase == 1 and opacity == 255
@phase = 2
return
end
if @time > 0
@time -= 1
else
if self.opacity == 0
self.dispose
return
end
self.opacity -= 48
end
end
end

#--------------------------------------------------------------------------
# End SDK Enabled Test
#--------------------------------------------------------------------------
end
#--------------------------------------------------------------------------

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6203
621 전투 S.G DamageShield Script 백호 2009.02.22 935
620 메시지 ◆메세지 윈도우 개조 -KGC_MessageAlter◆ 3 백호 2009.02.22 3422
619 메시지 말 거는 텍스트 작게 만들끼~!! 4 file 백호 2009.02.22 3214
618 기타 Damage Reductions by SephirothSpawn (SDK호환) 1 백호 2009.02.22 779
617 기타 카운트 3초 1 file 백호 2009.02.22 1296
616 기타 참 시스템 완성! 1 file 백호 2009.02.22 1523
615 변수/스위치 무기변수 스크립트 1 file 백호 2009.02.22 1614
614 기타 필드에서 경험치%를 표시합니다. 4 file 백호 2009.02.22 1448
613 기타 자동미로 12 file 백호 2009.02.22 2031
612 변수/스위치 메뉴변수표시 스크립트 1 file 백호 2009.02.22 1645
611 아이템 [신기술 체험] 인벤토리 8 file 백호 2009.02.22 2963
610 이동 및 탈것 비공정 스크립트 5 file 백호 2009.02.22 1506
609 맵/타일 World Map version 1.2 11 백호 2009.02.22 2962
608 전투 매턴 자동 회복이나 도트힐 3 file 백호 2009.02.22 1352
607 기타 [신기술 체험] 페스트 채팅 17 file 백호 2009.02.22 2412
606 기타 [신기술 체험] 마우스 클릭 드래그 드롭 7 file 백호 2009.02.22 2246
605 메뉴 Options System by slipknot 3 file 백호 2009.02.22 2101
604 이동 및 탈것 하이 대쉬 시스템 ver.1.0 15 백호 2009.02.22 2365
603 이동 및 탈것 대쉬 밑에 꺼 MP가 깍기는거 1 백호 2009.02.22 1467
602 저장 심플 세이브 로드(1개의 세이브 사용하기) 3 백호 2009.02.22 1972
Board Pagination Prev 1 ... 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ... 52 Next
/ 52