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
421 파티 메뉴커맨드로 파티 멤버들 순서 바꾸기 by Yargovish 1 백호 2009.02.22 1620
420 기타 Dynamic Stores by Astro_mech@rmxp.net 1 file 백호 2009.02.22 878
419 스킬 약간 수정한 심플액알(크리티컬,스킬) 10 백호 2009.02.22 3835
418 메뉴 Event Spawner 1 file 백호 2009.02.22 979
417 메뉴 새로운 cms 4 file 백호 2009.02.22 2117
416 기타 KGC - RMXP 스크립트 개발용 프로젝트 1.01 4 file 백호 2009.02.22 1515
415 기타 Random Character Generator by SephirothSpawn (SDK호환) 1 백호 2009.02.22 1040
414 전투 마법검 스크립트 1 백호 2009.02.22 1425
413 기타 Terrain Encounter Areas by SephirothSpawn 백호 2009.02.22 778
412 타이틀/게임오버 타이틀 아주 미묘한 효과 5 백호 2009.02.22 1857
411 메시지 1문자식 표시랑 따랑소리 나는 스크립트 8 백호 2009.02.22 2303
410 기타 Multiple Currencies(여러 개의 통화단위 사용) 2 백호 2009.02.22 1124
409 기타 Text Scroll by Dubealex (Release 3) 2 file 백호 2009.02.22 939
408 기타 Near Fantastica's SDK Test Bed 3 file 백호 2009.02.22 885
407 기타 멋진...제작자 정보를 그림으로 1 백호 2009.02.22 1233
406 전투 배틀 포인트 1 백호 2009.02.22 918
405 전투 배틀샵 스크립트 1 백호 2009.02.22 1126
» 온라인 멀티넷스크립트 => 채팅보완 스크립트 8 file 백호 2009.02.22 2931
403 저장 멀티넷스크립트 -> 아이피 세이브,로드 스크립트 9 file 백호 2009.02.22 2204
402 HUD Advanced HUD Script 3 file 백호 2009.02.22 1341
Board Pagination Prev 1 ... 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 ... 52 Next
/ 52