Introdução
Tira as abreviações do chat np master v3.0
Screen
- Spoiler:
Script
~Apague o script
[SC1] New Chat
e coloque este no lugar
- Código:
#==============================================================================
# ** Chat
#------------------------------------------------------------------------------
# By Marlos Gama
#==============================================================================
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, 305, 126)
$chat = @chat
@chat_text = Window_Normal.new(-9-5,304-1,336-10,90+110)
$chat_textinho = @chat_text
@chat_text.opacity = 1
@chat_text.z = 9999
@box = Text_Box.new(@chat_text,13,47+118-7,243,30)
@box.active = true
@chatt = "Mapa"
$chatt = @chatt
@chat_privado = Window_Dummys.new(205-5,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.windowskin = RPG::Cache.windowskin("Blank")
#@chat_tipo = Window_Dummys.new(210-7,402,150,100)
#@chat_tipo.windowskin = RPG::Cache.windowskin("Blank")
#@chat_tipo.set_text("#{@chatt}",45, 13)
#@chat_tipo.z = 99999
if $chat_ativo_agr == true
@box.active = true
@chat.visible = true
@chat.active = true
@chat_text.visible = true
@chat_text.active = true
#@chat_tipo.visible = true
#@chat_tipo.active = true
else
@chat.visible = false
@chat.active = false
@chat_text.visible = false
@chat_text.active = false
#@chat_tipo.visible = false
#@chat_tipo.active = false
@chat_privado.visible = false
@chat_privado.active = false
@box.active = false
end
@map_chat = Button_Map.new(@chat_text,19,23-7,"MP","Chat do Mapa ") {@chat_privado.visible = false; @chat_privado.active = false; mapa_chat; @box.active = true}
@global_chat = Button_Map.new(@chat_text,66-18+1,23-7,"GB","Chat Global ") {@chat_privado.visible = false; @chat_privado.active = false; global_chat; @box.active = true}
@party_chat = Button_Map.new(@chat_text,117-42+1,23-7,"PT","Chat da Party ") {@chat_privado.visible = false; @chat_privado.active = false; grupo_chat; @box.active = true}
@guild_chat = Button_Map.new(@chat_text,164-62,23-7,"GD","Chat da Guild ") {@chat_privado.visible = false; @chat_privado.active = false; guild_chat; @box.active = true}
@private_chat = Button_Map.new(@chat_text,209-79,23-7,"PV","Chat Privado ") {@chat_privado.visible = true; @chat_privado.active = true; private_chat; @box.active = true}
@chat_button = Button.new(@chat_text,257,47+118-7,"Enviar"){enviando_msg; @box.active = true}
chat_map_main_draw
end
def dispose
@chat.dispose
@chat_text.dispose
@box.dispose
#@chat_tipo.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("Jogadores Online: #{@pl}")
#$chat.update
@box.text = ""
return
end
if @chatt == "Party" 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}")
#Network::Main.socket.send("<23> $chat.update </23>\n")
else
Network::Main.mchat($party.members[i].netid,"[PT] #{name}: #{textss}")
$game_temp.chat_log.push("[PT] #{name}: #{textss}")
#Network::Main.socket.send("<23> $chat.update </23>\n")
end
end
end
end
if @chatt == "Party" and $party.empty?
$game_temp.chat_log.push("Você não tem grupo!")
#$chat.update
end
if @chatt == "Guild" and $game_party.actors[0].guild == ""
$game_temp.chat_log.push("Você não tem guild!")
#$chat.update
@box.text = ""
return
end
if @chatt == "Privado"
for p in Network::Main.players.values
if @private_input.text == ""
$game_temp.chat_log.push("Digite o nome do jogador!")
#$chat.update
@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}")
#Network::Main.socket.send("<23> $chat.update </23>\n")
@box.text = ""
return
else
#$game_temp.chat_log.push("Jogador está offline ou não existe!")
#@box.text = ""
#return
end
end
$game_temp.chat_log.push("Jogador não existe ou está offline!")
#$chat.update
@box.text = ""
return
end
if @chatt == "Guild"
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}")
#Network::Main.socket.send("<23> $chat.update </23>\n")
end
end
$game_temp.chat_log.push("/gd #{$game_party.actors[0].name}: #{textss}")
#$chat.update
@box.text = ""
return
end
if @chatt == "Mapa"
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}")
#Network::Main.socket.send("<23> $chat.update </23>\n")
$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}")
#$chat.update
actor = $game_party.actors[0]
actor.damage = "#{textss}"
$chat_msg = true
end
if @chatt == "Global"
Network::Main.socket.send("<chat>/g #{name}: #{textss}</chat>\n")
#Network::Main.socket.send("<23> $chat.update </23>\n")
end
@box.text = ""
return
end
def global_chat
@chatt = "Global"
#@chat_tipo.set_text("Global",48, 13)
end
def mapa_chat
@chatt = "Mapa"
#@chat_tipo.set_text("Mapa",48, 13)
end
def grupo_chat
@chatt = "Party"
#@chat_tipo.set_text("Party",48, 13)
end
def guild_chat
@chatt = "Guild"
#@chat_tipo.set_text("Guild",48, 13)
end
def private_chat
@chatt = "Privado"
#@chat_tipo.set_text("Privado",48, 13)
end
def update
if $guild_position == "Lider"
#@box.active = true if !$painel_input.active if !$guild_input.active if !$guild_created_input.active if !@private_input.active if !$guild_created_input2.active
$guild_created_input.active if !$guild_created_input2.active if !@box.active
$guild_created_input2.active if !$guild_created_input.active if !@box.active
else
#@box.active = true if !$painel_input.active if !$guild_input.active if !$guild_created_input.active if !@private_input.active
end
@private_input.active if !@box.active
@chat.refresh if $chat_size != $game_temp.chat_log.size and @chat.visible
#@chat.update if @chat.visible
#if $andando == true
#if $chat_msg == true
#@chat.update if @chat.visible
#else
#@chat.update if @chat.visible if Graphics.frame_count % 120 == 0
#end
#else
#if $chat_msg == true
#@chat.update if @chat.visible
#else
#@chat.update if @chat.visible if Graphics.frame_count % 30 == 0
#end
#end
if @box.active == true or @chat_text.in_area?
@chat_text.update if @chat_text.visible# if Graphics.frame_count % 1 == 0
end
chat_map_update
#$game_temp.chat_log.clear if $game_temp.chat_log.size == 7
#@chat_tipo.update if Graphics.frame_count % 90 == 0
@chat_privado.update if @chat_privado.visible #if Graphics.frame_count % 1 == 0
#if $guild_position == "Lider"
#if Input.pressed(Input::Mouse_Left) and @ok_guild.in_area?
# @ok_guild.active = true
# @delet_guild.active = false
# @delet_guild.refresh
#end
#if Input.pressed(Input::Mouse_Left) and @delet_guild.in_area?
# @delet_guild.active = true
# @ok_guild.active = false
# @ok_guild.refresh
#end
#end
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.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_tipo.visible = false
#@chat_tipo.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_tipo.visible = true
#@chat_tipo.active = true
$chat_ativo_agr = true
#@chat_privado.visible = true
#@chat_privado.active = true
end
if @box.active
if Input.triggerd?(13)
enviando_msg
end
end
end
end
OBS: è uma edição muito simples, caso você não queira deletar todo o script,
substitua a linha 57 até a 61, por essa:
- Código:
@map_chat = Button_Map.new(@chat_text,19,23-7,"MP","Chat do Mapa ") {@chat_privado.visible = false; @chat_privado.active = false; mapa_chat; @box.active = true}
@global_chat = Button_Map.new(@chat_text,66-18+1,23-7,"GB","Chat Global ") {@chat_privado.visible = false; @chat_privado.active = false; global_chat; @box.active = true}
@party_chat = Button_Map.new(@chat_text,117-42+1,23-7,"PT","Chat da Party ") {@chat_privado.visible = false; @chat_privado.active = false; grupo_chat; @box.active = true}
@guild_chat = Button_Map.new(@chat_text,164-62,23-7,"GD","Chat da Guild ") {@chat_privado.visible = false; @chat_privado.active = false; guild_chat; @box.active = true}
@private_chat = Button_Map.new(@chat_text,209-79,23-7,"PV","Chat Privado ") {@chat_privado.visible = true; @chat_privado.active = true; private_chat; @box.active = true}