XP 스크립트



우선 멀티넷스크립트에있는 Game_temp* 밑에 것들을 추가합니다 :

attr_accessor :chat

그리고 def initialize
안에
@chat = false
를 넣습니다.



그리고 이것을 Main 위에 추가합니다 :


class Scene_Map
alias netplay_main main
alias netplay_update update
def main
@input_window = Window_ChatInput.new
@chat_window = Window_Chat.new

netplay_main

@input_window.dispose
@chat_window.dispose
end
def update
@input_window.update
@chat_window.update
$network.update
if Input.trigger?(Input::F5)
$game_temp.chat = true
$scene = Scene_Chat.new
end
netplay_update
end
end



그리고 Scene_Chat에 가서 밑에것을 추가시킵니다 :
$game_temp.chat = false => Input.getkey 아래에

그러면 이렇게 될것입니다 :

if Input.getkey(27)
$game_temp.chat = false
$scene = Scene_Map.new
end



마지막으로, Window_Chat 과 ChatInput에 덮어씌웁니다.


우선 Window_Chat


#==============================================================================
# ¡ Window_Chat
#------------------------------------------------------------------------------
# @Displays chat messages.
#==============================================================================

class Window_Chat < Window_Base

#--------------------------------------------------------------------------
# œ Initializes chat window.
#--------------------------------------------------------------------------
def initialize
super(0, 480-132, 640, 132)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 16
self.opacity = 160
refresh
end
#--------------------------------------------------------------------------
# œ Refreshes chat window.
#--------------------------------------------------------------------------
def refresh
$game_temp.chat_log.delete_at(0) while $game_temp.chat_log.size > 5
self.contents.clear
for i in 0..$game_temp.chat_log.size - 1
self.contents.draw_text(0, i * 16 - 8, 640, 32, $game_temp.chat_log[i])
end
$game_temp.chat_refresh = false
end

#--------------------------------------------------------------------------
# œ Updates chat window.
#--------------------------------------------------------------------------
def update
refresh if $game_temp.chat_refresh
super
end
end



그리고 Window_ChatInput

#==============================================================================
# ¡ Window_ChatInput Originally created by: Cybersam
#------------------------------------------------------------------------------
# @Based on the Full-Keyboard Input script-x created by Cybersam.
#==============================================================================

class Window_ChatInput < Window_Base

#--------------------------------------------------------------------------
# œ Initializes chat input window.
#--------------------------------------------------------------------------
def initialize
super(0, 480-48, 640, 48)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 16
self.opacity = 0
@text = []
refresh
end

#--------------------------------------------------------------------------
# œ Refreshes chat input window.
#--------------------------------------------------------------------------
def refresh
@log = @text.to_s
self.contents.clear
self.contents.draw_text(0, -16, 620, 48, @text.to_s + "_")
end

#--------------------------------------------------------------------------
# œ Refreshes chat input window.
#--------------------------------------------------------------------------
def add(char)
if @text.size >= 80
$game_system.se_play($data_system.buzzer_se)
else
@text.push(char.to_s)
refresh
end
end
#--------------------------------------------------------------------------
# œ Updates input chat window.
#--------------------------------------------------------------------------
def update
if $game_temp.chat == true
# Sends chat message.
if Input.getkey(13)
if @text.size == 0
$game_system.se_play($data_system.buzzer_se)
else
$network.socket.send("CHAT:<#{$game_party.actors[0].name}) #{@text.to_s}>rn")
@text.clear
refresh
end
end
# Removes last entry in test.
if Input.getkey(8)
if @text.size == 0
$game_system.se_play($data_system.buzzer_se)
else
@text.delete_at(-1)
refresh
end
end
# Adds a pressed key.
if Input.getstate(16)
add("A") if Input.getkey(65)
add("B") if Input.getkey(66)
add("C") if Input.getkey(67)
add("D") if Input.getkey(68)
add("E") if Input.getkey(69)
add("F") if Input.getkey(70)
add("G") if Input.getkey(71)
add("H") if Input.getkey(72)
add("I") if Input.getkey(73)
add("J") if Input.getkey(74)
add("K") if Input.getkey(75)
add("L") if Input.getkey(76)
add("M") if Input.getkey(77)
add("N") if Input.getkey(78)
add("O") if Input.getkey(79)
add("P") if Input.getkey(80)
add("Q") if Input.getkey(81)
add("R") if Input.getkey(82)
add("S") if Input.getkey(83)
add("T") if Input.getkey(84)
add("U") if Input.getkey(85)
add("V") if Input.getkey(86)
add("W") if Input.getkey(87)
add("X") if Input.getkey(88)
add("Y") if Input.getkey(89)
add("Z") if Input.getkey(90)
add(")") if Input.getkey(48)
add("!") if Input.getkey(49)
add("@") if Input.getkey(50)
add("#") if Input.getkey(51)
add("$") if Input.getkey(52)
add("%") if Input.getkey(53)
add("^") if Input.getkey(54)
add("&") if Input.getkey(55)
add("*") if Input.getkey(56)
add("(") if Input.getkey(57)
add(":") if Input.getkey(186)
add("+") if Input.getkey(187)
add("<") if Input.getkey(188)
add("_") if Input.getkey(189)
add(">") if Input.getkey(190)
add("?") if Input.getkey(191)
add("{") if Input.getkey(219)
add("|") if Input.getkey(220)
add("}") if Input.getkey(221)
add(""") if Input.getkey(222)
else
add("a") if Input.getkey(65)
add("b") if Input.getkey(66)
add("c") if Input.getkey(67)
add("d") if Input.getkey(68)
add("e") if Input.getkey(69)
add("f") if Input.getkey(70)
add("g") if Input.getkey(71)
add("h") if Input.getkey(72)
add("i") if Input.getkey(73)
add("j") if Input.getkey(74)
add("k") if Input.getkey(75)
add("l") if Input.getkey(76)
add("m") if Input.getkey(77)
add("n") if Input.getkey(78)
add("o") if Input.getkey(79)
add("p") if Input.getkey(80)
add("q") if Input.getkey(81)
add("r") if Input.getkey(82)
add("s") if Input.getkey(83)
add("t") if Input.getkey(84)
add("u") if Input.getkey(85)
add("v") if Input.getkey(86)
add("w") if Input.getkey(87)
add("x") if Input.getkey(88)
add("y") if Input.getkey(89)
add("z") if Input.getkey(90)
add("0") if Input.getkey(48)
add("1") if Input.getkey(49)
add("2") if Input.getkey(50)
add("3") if Input.getkey(51)
add("4") if Input.getkey(52)
add("5") if Input.getkey(53)
add("6") if Input.getkey(54)
add("7") if Input.getkey(55)
add("8") if Input.getkey(56)
add("9") if Input.getkey(57)
add(";") if Input.getkey(186)
add("=") if Input.getkey(187)
add(",") if Input.getkey(188)
add("-") if Input.getkey(189)
add(".") if Input.getkey(190)
add("/") if Input.getkey(191)
add("[") if Input.getkey(219)
add("\") if Input.getkey(220)
add("]") if Input.getkey(221)
add("'") if Input.getkey(222)
end
add(" ") if Input.getkey(32)
add("*") if Input.getkey(106)
add("+") if Input.getkey(107)
add("-") if Input.getkey(109)
add("/") if Input.getkey(111)
end
end
end

Who's 백호

?

이상혁입니다.

http://elab.kr

Atachment
첨부 '1'
Comment '8'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
» 온라인 멀티넷스크립트 => 채팅보완 스크립트 8 file 백호 2009.02.22 2931
800 스킬 패시브 스킬 (출처 RPGXP 포럼 - 후우님) 18 백호 2009.02.21 2915
799 HUD 맵이름 스크립트 1 file 긔염둥이♥ 2012.05.19 2914
798 메뉴 수정, 추가 링메뉴 10 file 백호 2009.02.22 2912
797 기타 스탭 롤 9 file 허걱 2009.08.13 2905
796 전투 에너미 HP&SP 스크립트 4 파이널판타지 2011.08.16 2902
795 이동 및 탈것 도트이동 5 file 허걱 2009.08.19 2889
794 HUD 맵 이름 표시 스크립트 수정하기 (계속 뜨게 하기, 위치 바꾸기 등) 3 뮤리온。 2011.10.08 2886
793 온라인 NetRPGXP Client Core 일부분임 8 백호 2009.10.06 2883
792 기타 몬스터도감 - 개량형 ? 7 file 백호 2009.02.22 2883
791 스킬 [RTAB] 스킬영창시간 7 file 백호 2009.02.22 2872
790 전투 쿼터뷰 전투 스크립트 3 file 백호 2009.02.21 2870
789 전투 XAS_Hero_3_6 24 ok하승헌 2010.02.18 2868
788 기타 폰트 자동 설치 스크립트 12 file 백호 2009.02.22 2865
787 온라인 Multi-Netplay Extended (신버전) 10 백호 2009.02.22 2864
786 메뉴 링메뉴 New 9 sdjfl465 2008.09.27 2861
785 메뉴 메뉴바꾸기 4 file ureazy 2012.07.23 2845
784 직업 직업 10 file 이안 2010.01.17 2839
783 아이템 CSSR14-아이템 합성 3 file 백호 2009.02.22 2833
782 전투 전투링메뉴.(턴알) 7 백호 2009.02.21 2821
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ... 52 Next
/ 52