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 저장 세이브파일 망가뜨리기 by RPG Advocate 3 백호 2009.02.22 2657
640 기타 Advanced Weather System (AWS) 3 file 백호 2009.02.22 1272
639 기타 ↓ 날씨 자동설정 스크립트 3 백호 2009.02.22 1530
638 파티 Reserve Party Tools by RPG Advocate 백호 2009.02.22 920
637 온라인 온라인스크립트 99Q(NM=No Map)버전 5 백호 2009.02.22 3121
636 온라인 온라인스크립트 실행방법 13 file 백호 2009.02.22 4275
635 상점 여관 시스템 5 file 백호 2009.02.22 2209
634 상점 밑에 글 영어로 뜨는거 수정(여관시스템) 7 file 백호 2009.02.22 1683
633 기타 에어리어 설정 by RPG Advocate 백호 2009.02.22 709
632 기타 강제 종료시키기 1 file 백호 2009.02.22 1015
631 온라인 멀티넷 스크립트 수정본 (약간 한글화) 7 백호 2009.02.22 2315
630 메뉴 Materia System 2 file 백호 2009.02.22 1222
629 이동 및 탈것 Maplinks - 맵연결을 쉽게 하기 1 백호 2009.02.22 1541
628 맵/타일 Random Map Generator by Wachunga@rmxp.net file 백호 2009.02.22 1096
627 온라인 [멀티넷스크립 PvP 이벤트버전] / [넷플레이0.7.2]버전 3 file 백호 2009.02.22 2604
626 파티 파티원 포션 나눠먹기 스크립트 1 file 백호 2009.02.22 1047
625 메뉴 콤보 스크립트 백호 2009.02.22 1399
624 전투 ATB시스템 입니다. [스샷 첨부] 17 백호 2009.02.22 4182
623 전투 Advanced Limit Breaks (KGC스크립트를 SDK호환용으로 손질한 것) 백호 2009.02.22 1214
622 기타 AMS___Advanced_Message_Script 1 file 백호 2009.02.22 889
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