Excuse me but I'm using Netplay 1.7 and I've been wondering for long what's the key to chat ?
Because F5,F6,don't work >.<
Here's my Scene chat :
Here's my Windows Chat :
Here's my Window Chat Input :
If you could tell me how to do please ^^
Because F5,F6,don't work >.<
Here's my Scene chat :
Code:
#===============================================================================
# ** Scene_Chat (1)
#-------------------------------------------------------------------------------
# Author Meâ„¢ and Mr.Mo
# Version 1.0
# Date 11-04-06
#===============================================================================
SDK.log("Chat1", "Meâ„¢ and Mr.Mo", "1.0", " 11-04-06")
if SDK.state('Chat1') == true and User_Edit::CHAT_SYSTEM == 'Chat[1]'
class Scene_Chat
#-------------------------------------------------------------------------
# * Maind Processing
#-------------------------------------------------------------------------
def main
# Make the windows and the Background
main_draw
# Graphics Transition
Graphics.transition
# Main Loop
loop do
# Update
Network::Base.update
# calls update method.
update
break if $scene != self
end
dispose
end
#-------------------------------------------------------------------------
# * Make the windows and the Background
#-------------------------------------------------------------------------
def main_draw
@spriteset = Spriteset_Map.new
@chat_window = Window_Chat.new
@chat_window.z += 9000
@input_window = Window_ChatInput.new
@input_window.z += 9000
end
#-------------------------------------------------------------------------
# * Dispose
#-------------------------------------------------------------------------
def dispose
# Freeze Graphics
Graphics.freeze
# Dispose
@spriteset.dispose
@chat_window.dispose
@input_window.dispose
end
#-------------------------------------------------------------------------
# * Update
#-------------------------------------------------------------------------
def update
# Update Background and windows
@chat_window.update if $game_temp.chat_refresh
@input_window.update if @input_window.old_text != @input_window.text.size
#update keys
update_up_keys if !Input.pressed?(Input::Shift)
update_low_keys if Input.pressed?(Input::Shift)
#Updates Enter, Space, F5, ESC, F6
update_controls
end
#-------------------------------------------------------------------------
# * Updates Enter, Space, F5, ESC, F6
#-------------------------------------------------------------------------
def update_controls
# Sends chat message.
if Input.triggerd?(13)
if @input_window.text.size == 0
$game_system.se_play($data_system.buzzer_se)
return
elsif User_Edit::ENABLE_MC
for mp in Network::Main.mapplayers.values
next if mp == nil
next if mp.map_id != $game_map.map_id
name = Network::Main.name
textss = @input_window.text
Network::Main.mchat(mp.netid,"#{name}) #{textss}")
end
name = Network::Main.name
textss = @input_window.text
id = Network::Main.id
Network::Main.mchat(id,"#{name}) #{textss}")
@input_window.text.clear
return
else
name = Network::Main.name
Network::Main.socket.send("<chat>#{name}) #{@input_window.text}</chat>\n")
@input_window.text.clear
return
end
end
# Clear the Chat Log
$game_temp.chat_log.clear if Input.triggerd?(Input::Fkeys[6])
# Return to the Map
$scene = Scene_Map.new if Input.triggerd?(Input::Fkeys[5]) or Input.triggerd?(Input::Esc)
#Space
@input_window.text.push(" ") if Input.triggerd?(Input::Space)
# Removes last entry in test.
@input_window.text.delete_at(-1) if Input.triggerd?(Input::Back) and @input_window.text.size != 0
end
#-------------------------------------------------------------------------
# * Updates UpperKeys
#-------------------------------------------------------------------------
def update_up_keys
#Checks for Numberkeys input.
for key in Input::Numberkeys.keys
@input_window.text.push(key.to_s) if Input.triggerd?(Input::Numberkeys[key])
end
#Checks for Letter input.
for key in Input::Letters.keys
@input_window.text.push(key.downcase.to_s) if Input.triggerd?(Input::Letters[key])
end
#Checks for other keys
@input_window.text.push("-") if Input.triggerd?(Input::Underscore)
@input_window.text.push(".") if Input.triggerd?(Input::Dot)
@input_window.text.push(",") if Input.triggerd?(Input::Comma)
@input_window.text.push("/") if Input.triggerd?(Input::Backslash)
@input_window.text.push("'") if Input.triggerd?(Input::Quote)
@input_window.text.push("=") if Input.triggerd?(Input::Equal)
end
#-------------------------------------------------------------------------
# * Updates LowerKeys
#-------------------------------------------------------------------------
def update_low_keys
#Checks for Numberkeys input.
for key in Input::Numberkeys.keys
if Input.triggerd?(Input::Numberkeys[key])
@input_window.text.push("!") if key == 1
@input_window.text.push("@") if key == 2
@input_window.text.push("#") if key == 3
@input_window.text.push("$") if key == 4
@input_window.text.push("%") if key == 5
@input_window.text.push("^") if key == 6
@input_window.text.push("&") if key == 7
@input_window.text.push("*") if key == 8
@input_window.text.push("(") if key == 9
@input_window.text.push(")") if key == 0
end
end
#Checks for Letter input.
for key in Input::Letters.keys
@input_window.text.push(key.upcase.to_s) if Input.triggerd?(Input::Letters[key])
end
#Checks for Other keys
@input_window.text.push("_") if Input.triggerd?(Input::Underscore)
@input_window.text.push(">") if Input.triggerd?(Input::Dot)
@input_window.text.push("<") if Input.triggerd?(Input::Comma)
@input_window.text.push("?") if Input.triggerd?(Input::Backslash)
@input_window.text.push("''") if Input.triggerd?(Input::Quote)
@input_window.text.push("+") if Input.triggerd?(Input::Equal)
end
end
#-------------------------------------------------------------------------
# End Enable SDK Check
#-------------------------------------------------------------------------
end
Here's my Windows Chat :
Code:
#===============================================================================
# ** Window_Chat (1)
#-------------------------------------------------------------------------------
# Author Meâ„¢ and Mr.Mo
# Version 1.0
# Date 11-04-06
#===============================================================================
class Window_Chat < Window_Base
#--------------------------------------------------------------------------
# * Initializes chat window.
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 100)
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_refresh = true
self.contents.clear
c = User_Edit::CHAT_SYSTEM
n = (c == 'Chat[1]' ? 25 : c == 'Chat[2]' ? 10 : 0)
$game_temp.chat_log.delete_at(0) if $game_temp.chat_log.size > n
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
end
#--------------------------------------------------------------------------
# * Updates chat window.
#--------------------------------------------------------------------------
def update
# Only refresh when the Chat Changes
refresh if $game_temp.chat_refresh
super
end
end
Here's my Window Chat Input :
Code:
#===============================================================================
# ** Window_ChatInput (1) - Based on the Full-Keyboard Input script created by Cybersam.
#-------------------------------------------------------------------------------
# Author Meâ„¢ and Mr.Mo
# Version 1.0
# Date 11-04-06
#===============================================================================
class Window_ChatInput < Window_Base
attr_accessor :text
attr_accessor :old_text
#--------------------------------------------------------------------------
# * Initializes chat input window.
#--------------------------------------------------------------------------
def initialize
super(0, 432, 640, 48)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 16
self.opacity = 160
@text = []
@old_text = @text.size
@newtext = []
refresh
end
#--------------------------------------------------------------------------
# * Refreshes chat input window.
#--------------------------------------------------------------------------
def refresh
self.contents.clear
name = Network::Main.name
self.contents.draw_text(0, -16, 620, 48, "#{name}) #{@text.to_s} _")
@old_text = @text.size
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
refresh if @old_text != @text.size
super
end
end
If you could tell me how to do please ^^