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
821 장비 장비창을 다른거로 바꾸기 [헬악이님 제공] 10 file 아방스 2007.11.09 3049
820 전투 심플액알 더더 수정(스위치, 변수) 17 file 백호 2009.02.21 3046
819 타이틀/게임오버 게임오버 화면 에서 커맨드 윈도우 스크립트 12 file 백호 2009.02.21 3031
818 키입력 AInput Module 3.10 by vgvgf (전체키, 마우스 입력) 6 file Alkaid 2010.09.01 3029
817 메뉴 제가 쓰고있는 메뉴 13 file 백호 2009.02.21 3028
816 전투 GTBS 1.4 스크립트 9 아방스 2009.02.05 3028
815 메뉴 링 메뉴 소지금,플레이시간 추가 버젼 17 Neowitch* 2008.04.20 3022
814 메시지 한글자씩 뜨는 스크립트 6 백호 2009.02.21 2998
813 아이템 아이템획득스크립트 ps인간 2009.01.23 2993
812 HUD 맵이름 넣기(bs님의 강의랑 다르게 스크립트로) 16 file 아방스 2007.11.09 2981
811 전투 CTB by Charlie Fleed 3.1 - FF10 스타일의 전투시스템 6 Alkaid 2010.09.10 2974
810 이동 및 탈것 캐릭터 이동 프레임? 증가 스크립트 9 백호 2009.02.21 2969
809 아이템 [신기술 체험] 인벤토리 8 file 백호 2009.02.22 2962
808 맵/타일 World Map version 1.2 11 백호 2009.02.22 2962
807 메뉴 메뉴 단축키 스크립트 14 백호 2009.02.22 2958
806 그래픽 WhiteFlute - BitmapEX 4 file JACKY 2012.12.10 2950
805 메뉴 Mog-메뉴업그레이드? ps인간 2009.01.23 2948
804 전투 Mr.mo's SBABS Lite 5 6 아방스마니아 2010.11.14 2947
803 HUD 맵 이름을 표시해주는 스크립트입니다. 25 임희성 2011.02.12 2936
» 온라인 멀티넷스크립트 => 채팅보완 스크립트 8 file 백호 2009.02.22 2931
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 52 Next
/ 52