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
641 메뉴 메뉴화면 변경 스크립트 1 file 백호 2009.02.21 2770
640 파티 메뉴커맨드로 파티 멤버들 순서 바꾸기 by Yargovish 1 백호 2009.02.22 1620
639 메뉴 메뉴에서 커맨더실행하기 5 WMN 2008.04.06 1682
638 메뉴 메뉴에서 실제시간 보기 2 백호 2009.02.21 1124
637 메뉴 메뉴에 얼굴 그래픽 표시 4 file 백호 2009.02.21 3112
636 메뉴 메뉴에 그림넣기 4 file 백호 2009.02.22 4412
635 변수/스위치 메뉴변수표시 스크립트 1 file 백호 2009.02.22 1644
634 메뉴 메뉴바꾸기 4 file ureazy 2012.07.23 2845
633 메뉴 메뉴를 바꾸는 스크립트 14 №1 2012.08.04 4208
632 메뉴 메뉴등에서 움직이는 엑터 9 file 백호 2009.02.22 3162
631 메뉴 메뉴....있길래올립니다. 9 벨☆ 2010.01.23 2001
630 메뉴 메뉴 화면 변경 스크립트 file 백호 2009.02.21 2236
629 메뉴 메뉴 화면 개조 스크립트 1 백호 2009.02.21 1668
628 메뉴 메뉴 변경 스크립트 2 file 백호 2009.02.21 2359
627 메뉴 메뉴 단축키 스크립트 14 백호 2009.02.22 2958
626 기타 멋진...제작자 정보를 그림으로 1 백호 2009.02.22 1233
625 이동 및 탈것 멈췄을때 행동. 17 file Bera 2010.10.17 3408
624 온라인 멀티넷플레이 99Q Beta 3 27 백호 2009.02.22 3107
» 온라인 멀티넷스크립트 => 채팅보완 스크립트 8 file 백호 2009.02.22 2931
622 저장 멀티넷스크립트 -> 아이피 세이브,로드 스크립트 9 file 백호 2009.02.22 2204
Board Pagination Prev 1 ... 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 ... 52 Next
/ 52