Introdução
Olá Pessoal, editei uma parte no script [SC1] New Chat, fico bom, na minha opinião esta melhor do que antes!
Screen
Instrução
Va no script [LNG] Português
na linha 63 ate a 67 apague o tem escrito e coloque isso
CHATMAP = "MP"
CHATGLOBAL = "GB"
CHATPARTY = "PT"
CHATGUILD = "GD"
CHATPRIVATE = "PV"
Script
Créditos
A mim por ter editado!
Olá Pessoal, editei uma parte no script [SC1] New Chat, fico bom, na minha opinião esta melhor do que antes!
Screen
- Spoiler:
Instrução
Va no script [LNG] Português
na linha 63 ate a 67 apague o tem escrito e coloque isso
CHATMAP = "MP"
CHATGLOBAL = "GB"
CHATPARTY = "PT"
CHATGUILD = "GD"
CHATPRIVATE = "PV"
Script
- Spoiler:
- #==============================================================================
# ** Chat
#------------------------------------------------------------------------------
# By Valentine
# Edit Matheus180
#==============================================================================
class Scene_Map
alias chat_map_main_draw main_draw
alias chat_map_update update
#--------------------------------------------------------------------------
# * Main
#--------------------------------------------------------------------------
def main_draw
@chat = Window_Chat.new(0, 341-4, 300, 126)
$chat = @chat
@chat_text = Window_Normal.new(-9-5,304-1,500-10,90+110)
$chat_textinho = @chat_text
@chat_text.opacity = 1
@chat_text.z = 9999
$chat_id = 1
@box = Text_Box.new(@chat_text,13,158,243,30)
@box.active = true
@chat_privado = Window_Dummys.new(200,391,120,100)
@private_input = Text_Box.new(@chat_privado,13,47,78,10)
@chat_privado.visible = false
@chat_privado.active = false
@chat_privado.z = 99999
@chat_privado.opacity = 1
if $chat_ativo_agr == true
@box.active = true
@chat.visible = true
@chat.active = true
@chat_text.visible = true
@chat_text.active = true
else
@chat.visible = false
@chat.active = false
@chat_text.visible = false
@chat_text.active = false
@chat_privado.visible = false
@chat_privado.active = false
@box.active = false
end
@map_chat = Button_Map.new(@chat_text,309,55-7,LANGUAGE::CHATMAP, 1, LANGUAGE::CHAT_MAP) {@chat_privado.visible = false; @chat_privado.active = false; $chat_id = 1; @box.active = true}
@global_chat = Button_Map.new(@chat_text,309,75-7,LANGUAGE::CHATGLOBAL, 2,LANGUAGE::CHAT_GLOBAL) {@chat_privado.visible = false; @chat_privado.active = false; $chat_id = 2; @box.active = true}
@party_chat = Button_Map.new(@chat_text,309,95-7,LANGUAGE::CHATPARTY, 3,LANGUAGE::CHAT_PARTY) {@chat_privado.visible = false; @chat_privado.active = false; $chat_id = 3; @box.active = true}
@guild_chat = Button_Map.new(@chat_text,309,115-7,LANGUAGE::CHATGUILD, 4,LANGUAGE::CHAT_GUILD) {@chat_privado.visible = false; @chat_privado.active = false; $chat_id = 4; @box.active = true}
@private_chat = Button_Map.new(@chat_text,309,135-7,LANGUAGE::CHATPRIVATE, 5,LANGUAGE::CHAT_PRIVATE) {@chat_privado.visible = true; @chat_privado.active = true; $chat_id = 5; @box.active = true}
@chat_button = Button.new(@chat_text,257,47+118-7,LANGUAGE::CHAT_SEND){enviando_msg; @box.active = true}
chat_map_main_draw
end
def dispose
@chat.dispose
@chat_text.dispose
@box.dispose
@chat_privado.dispose
end
def enviando_msg
return if @box.text == ""
name = $game_party.actors[0].name
level = $game_party.actors[0].level
textss = @box.text
id = Network::Main.id
if @box.text == "/online"
@pl = Network::Main.players.size
$game_temp.chat_log.push(LANGUAGE::PLAYERSON+" #{@pl}")
@box.text = ""
return
end
if $chat_id == 3 and !$party.empty?
for i in 0..$party.members.size
if $party.members[i] != nil
if $parte_s == true
Network::Main.mchat($charzinho_id,"[PT] #{name}: #{textss}")
$game_temp.chat_log.push("[PT] #{name}: #{textss}")
else
Network::Main.mchat($party.members[i].netid,"[PT] #{name}: #{textss}")
$game_temp.chat_log.push("[PT] #{name}: #{textss}")
end
end
end
end
if $chat_id == 3 and $party.empty?
$game_temp.chat_log.push(LANGUAGE::NOTPARTY)
end
if $chat_id == 4 and $game_party.actors[0].guild == ""
$game_temp.chat_log.push(LANGUAGE::NOTGUILD)
@box.text = ""
return
end
if $chat_id == 5
for p in Network::Main.players.values
if @private_input.text == ""
$game_temp.chat_log.push(LANGUAGE::NOTPLAYERNAME)
@box.text = ""
return
end
if p.nome == @private_input.text.to_s
name = $game_party.actors[0].name
textss = @box.text
Network::Main.pchat(p.netid,"/p #{$game_party.actors[0].name}: #{textss}")
$game_temp.chat_log.push("/p #{$game_party.actors[0].name}: #{textss}")
@box.text = ""
return
end
end
$game_temp.chat_log.push(LANGUAGE::NOTPLAYEREXIST)
@box.text = ""
return
end
if $chat_id == 4
for p in Network::Main.players.values
if p.guild == $game_party.actors[0].guild
name = $game_party.actors[0].name
textss = @box.text
Network::Main.pchat(p.netid,"/gd #{$game_party.actors[0].name}: #{textss}")
end
end
$game_temp.chat_log.push("/gd #{$game_party.actors[0].name}: #{textss}")
@box.text = ""
return
end
if $chat_id == 1
for mp in Network::Main.mapplayers.values
next if mp == nil
next if mp.map_id != $game_map.map_id
name = $game_party.actors[0].name
textss = @box.text
Network::Main.mchat(mp.netid,"#{name}: #{textss}")
$chat_text = textss
Network::Main.send_start
$chat_msg = true
end
name = $game_party.actors[0].name
textss = @box.text
$game_temp.chat_log.push("#{name}: #{textss}")
actor = $game_party.actors[0]
actor.damage = "#{textss}"
$chat_msg = true
end
if $chat_id == 2
Network::Main.socket.send("/g #{name}: #{textss} \n")
end
@box.text = ""
return
end
def update
if $guild_position == LANGUAGE::GUILDLEADER
$guild_created_input.active if !$guild_created_input2.active if !@box.active
$guild_created_input2.active if !$guild_created_input.active if !@box.active
end
@private_input.active if !@box.active
@chat.refresh if $chat_size != $game_temp.chat_log.size and @chat.visible
if @box.active == true or @chat_text.in_area?
@chat_text.update if @chat_text.visible
end
chat_map_update
@chat_privado.update if @chat_privado.visible
if Input.pressed(Input::Mouse_Left) and @private_input.in_area?
@private_input.active = true
@box.active = false
@box.refresh
end
if Input.pressed(Input::Mouse_Left) and $guild_created_input.in_area?
$guild_created_input.active = true
@box.active = false
@box.refresh
end
if Input.pressed(Input::Mouse_Left) and $guild_input.in_area?
$guild_input.active = true
@box.active = false
@box.refresh
end
if Input.trigger?(Input::Tab)
$chat_id = $chat_id + 1
$chat_id = 1 if $chat_id >= 6
if $chat_id == 5
@chat_privado.visible = true
@chat_privado.active = true
else
@chat_privado.visible = false
@chat_privado.active = false
end
@chat_text.update if @chat_text.visible
end
if Input.pressed(Input::Mouse_Left) and @box.in_area?
$guild_created_input.active = false
@box.active = true
@private_input.refresh
$guild_created_input.refresh
@private_input.active = false
end
if Input.triggerd?(Input::Fkeys[5]) and @chat.visible == true
@chat.visible = false
@chat.active = false
@chat_text.visible = false
@chat_text.active = false
@chat_privado.visible = false
@chat_privado.active = false
@box.active = false
$chat_ativo_agr = false
elsif Input.triggerd?(Input::Fkeys[5]) and @chat.visible == false
@box.active = true
@chat.visible = true
@chat.active = true
@chat_text.visible = true
@chat_text.active = true
$chat_ativo_agr = true
end
if @box.active
if Input.triggerd?(13)
enviando_msg
end
end
end
end
Créditos
A mim por ter editado!