Ué, é só verificar se há um processo do Game.exe aberto antes de iniciar o game
Super simples, acho que até por isso o Marlos não postei ele.
Super simples, acho que até por isso o Marlos não postei ele.
Isso não é bug, o que aparece no status é Str e não o Atk, são coisas separadas no rpg makerSamuka_Maker escreveu:marlos se eu intendi bem, estou com o mesmo problema
quando eu equipo algo não aparece na win status ex:
eu equipo uma arma que aumenta 100 de atk
na win status n aumenta :C
Obrigado por reportar o bug, eu já o corrigi, aqui está a correçãoJonny escreveu:Encontre otro bug no NPM 4.0
cuando usted activa el comando de swicht por el admin no funciona
por ejemplo :
/sw Jonny 2000 on
ele no activa...
#==============================================================================
# ** Window_Painel
#------------------------------------------------------------------------------
# By Valentine
#==============================================================================
class Window_Painel < Window_Base
def initialize(x,y,a,b)
super(x,y,a,b)
self.contents = Bitmap.new(self.width-32, self.height-32)
@dragable = true
@closable = true
self.z = 999999
@painel_button = Button.new(self,216,62,LANGUAGE::PANEL_OK) {ok_painel}
self.back_opacity = 200
refresh
end
def on_close
self.visible = false
self.active = false
$fechando_ativar = true
end
def ok_painel
for p in Network::Main.players.values
arg = $painel_input.text.split
if arg[0]== "/ir"
if p.nome == arg[1]
$painel_input.text = ""
$game_temp.player_new_map_id = p.map_id
$game_temp.player_new_x = p.x
$game_temp.player_new_y = p.y+1
$game_temp.player_transferring = true
$game_map.update
Network::Main.send_start
return
end
elsif arg[0]== "/sw"
if arg[3] == "on"
$game_switches[arg[2].to_i] = true
@aconteçe = "Ativado"
elsif arg[3] == "off"
$game_switches[arg[2].to_i] = false
@aconteçe = "Desativado"
end
@idzinho = arg[2].to_i
$game_temp.chat_log.push("Switche #{@idzinho} #{@aconteçe}")
$game_map.need_refresh = true
elsif arg[0]== "/var"
$game_variables[arg[1].to_i] = arg[2].to_i
@idzinho = arg[1].to_i
@aconteçe = arg[2].to_i
$game_temp.chat_log.push("Variável #{@idzinho}, Constante: #{@aconteçe}")
$game_map.need_refresh = true
elsif arg[0]== "/puxar"
if p.nome == arg[1]
jogador = arg[1]
mapa = $game_map.map_id
x = $game_player.x
y = $game_player.y+1
Network::Main.pchat(p.netid,"[COM] [PUXAR] #{jogador} #{mapa} #{x} #{y}")
$painel_input.text = ""
return
end
end
if arg[1] == $game_party.actors[0].name
tipo = arg[0]
id = arg[2]
quantidade = arg[3]
jogador = arg[1]
Admin.verificar_comando(arg[0], arg[1], arg[2], arg[3])
$painel_input.text = ""
$painel_input.active = true
return
elsif arg[1] == "Todos"
tipo = arg[0]
id = arg[2]
quantidade = arg[3]
jogador = arg[1]
Network::Main.pchat(p.netid,"[COM] [PNEL] #{tipo} #{jogador} #{id} #{quantidade}")
elsif p.nome == arg[1]
tipo = arg[0]
id = arg[2]
quantidade = arg[3]
jogador = arg[1]
Network::Main.pchat(p.netid,"[COM] [PNEL] #{tipo} #{jogador} #{id} #{quantidade}")
end
end
$painel_input.text = ""
$painel_input.active = true
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(60, -5, self.width-64, 32, LANGUAGE::PANEL_TITLE)
self.contents.font.size = 14
self.contents.draw_text(0, 16, self.width-64, 32, LANGUAGE::PANEL_TITLE2)
self.contents.font.color = normal_color
end
end
#==============================================================================
# ** Scene Login
#------------------------------------------------------------------------------
# By Valentine
#==============================================================================
class Scene_Login
#--------------------------------------------------------------------------
# Main
#--------------------------------------------------------------------------
def main
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
@base_window = Window_Login.new(185, 120, 265, 205)
@base_window.dragable = true
@window_erro = Window_Dummys.new(200,165,235,90)
@window_erro.z = 9999
@window_erro.visible = false
@window_erro.active = false
@convite_button1 = Button.new(@window_erro,@window_erro.width/3+12, 55, LANGUAGE::LOGINERROOK) {@window_erro.visible = false; @window_erro.active = false}
@window_erro.dragable = true
@window_erro.closable = true
main_data
@base_window.set_text(LANGUAGE::LOGIN_TITLE,125, 0)
@base_window.set_text4(LANGUAGE::USUARIO_NOME,10, 37)
if User_Edit::ACTIVE_SCENE_CONNECT == false
if $servidor_off == true
@base_window.set_text7(LANGUAGE::SERVER_STATUS+User_Edit::SERVEROFF,83, 140)
else
@base_window.set_text7(LANGUAGE::SERVER_STATUS+User_Edit::SERVERON,83, 140)
end
end
if $servidor_off == false
Network::Main.retrieve_mod if $game_temp.motd.to_s == "" or $game_temp.motd.to_s == LANGUAGE::NOMOTD
@base_window.set_modt("#{$game_temp.motd}",18, 2)
end
$user_window_text.active = true
@base_window.set_text5(LANGUAGE::SENHA_NOME,10,62)
@register_button = Button.new(@base_window,156,135,LANGUAGE::REGISTRAR_BOTAO,0,1) {register}
@base_window.set_text6(LANGUAGE::LEMBRAR_NOME,22,88)
@mainlogin_ckh = Check_Box.new(@base_window,16,114)
@tempo = 0
if $user_window_text.text != ""
ativar_ckh
$user_window_text.active = false
$pass_window_text.active = true
end
@login_button = Button.new(@base_window,156,110,LANGUAGE::ENTRAR_BOTAO,0,1) {entrando}
plusx = (640/2 - @base_window.width/2) - 100
@password = []
@user_name = []
Graphics.transition
Network::Main.retrieve_version if not $servidor_off
loop do
Network::Base.update
update
if $scene != self
break if main_scenechange?
end
end
Graphics.freeze
@sprite.dispose
@window_erro.dispose
@base_window.dispose
@login_button.dispose
@mainlogin_ckh.dispose
end
#--------------------------------------------------------------------------
# Salvar Conta
#--------------------------------------------------------------------------
def main_data
if FileTest.exist?("Account.rxdata")
@dati = []
file = File.open("Account.rxdata", "rb")
@dati = Marshal.load(file)
file.close
@base_window.set_username = @dati[0]
@base_window.set_password = @dati[1]
end
end
def ativar_ckh
@mainlogin_ckh.value = true
end
def main_scenechange?
if $scene != self
if @mainlogin_ckh.checked
@dati = []
@dati[0] = @base_window.username
@dati[1] = @base_window.password
file = File.open("Account.rxdata", "wb")
Marshal.dump(@dati,file)
file.close
end
return true
end
return false
end
def username
return @base_window.username
end
#--------------------------------------------------------------------------
# Update
#--------------------------------------------------------------------------
def update
@base_window.update
@window_erro.update
@login_button.update
if Input.pressed(Input::Mouse_Left) and $user_window_text.in_area?
$user_window_text.active = true
$pass_window_text.active = false
$pass_window_text.refresh
return
elsif Input.pressed(Input::Mouse_Left) and $pass_window_text.in_area?
$user_window_text.active = false
$pass_window_text.active = true
$user_window_text.refresh
end
if Input.trigger?(Input::Tab) or Input.trigger?(Input::DN) and $user_window_text.active == true
$user_window_text.active = false
$pass_window_text.active = true
$user_window_text.refresh
elsif Input.trigger?(Input::Tab) or Input.trigger?(Input::UPs) and $user_window_text.active == false
$user_window_text.active = true
$pass_window_text.active = false
$pass_window_text.refresh
return
end
if Graphics.frame_count / Graphics.frame_rate != @total_sec
@tempo += 1
end
if @tempo == 4 * 10
$mouse_active = false
@tempo = 0
end
if @login_update
login
return
end
end
def reset_login(id)
@base_window.set_text4(LANGUAGE::USUARIO_NOME,10, 37)
@base_window.set_text5(LANGUAGE::SENHA_NOME,10,62)
@base_window.set_text6(LANGUAGE::LEMBRAR_NOME,22,88)
if User_Edit::ACTIVE_SCENE_CONNECT == false and id == 2
if $servidor_off == true
@base_window.set_text7(LANGUAGE::SERVER_STATUS+User_Edit::SERVEROFF,83, 140)
else
@base_window.set_text7(LANGUAGE::SERVER_STATUS+User_Edit::SERVERON,83, 140)
end
end
end
#--------------------------------------------------------------------------
# Set Status Text
#--------------------------------------------------------------------------
def set_status(status)
@base_window.contents.clear
if status != LANGUAGE::LOGIN_STATUS
@window_erro.visible = true
@window_erro.active = true
@window_erro.set_modt(status,0, -3)
end
reset_login(2)
if $servidor_off == false
Network::Main.retrieve_mod if $game_temp.motd.to_s == "" or $game_temp.motd.to_s == LANGUAGE::NOMOTD
@base_window.set_modt("#{$game_temp.motd}",18, 2)
end
end
def entrando
return if $mouse_active == true
if $mouse_active != true
if $servidor_off == true
@base_window.contents.clear
@window_erro.visible = true
@window_erro.active = true
@window_erro.set_modt(LANGUAGE::ERRO_OFF,0, -3)
reset_login(1)
@base_window.set_text7(LANGUAGE::SERVER_STATUS + User_Edit::SERVEROFF,83, 140)
$mouse_active = true
else
$user_window_text.active = false
$pass_window_text.active = false
@login_update = true
login
$mouse_active = true
return true
end
end
end
def register
return if $mouse_active == true
return if $user_window_text.text.include?("-")
if $mouse_active != true
if $servidor_off == true
@base_window.contents.clear
@window_erro.visible = true
@window_erro.active = true
@window_erro.set_modt(LANGUAGE::ERRO_OFF,0, -3)
reset_login(1)
@base_window.set_text7(LANGUAGE::SERVER_STATUS + User_Edit::SERVEROFF,83, 140)
$mouse_active = true
else
if $pass_window_text.text != "" && $user_window_text.text != ""
if Network::Main.user_exist?(@base_window.username) == true
@base_window.contents.clear
@window_erro.visible = true
@window_erro.active = true
@window_erro.set_modt(LANGUAGE::REGISTER_DENIED,0, -3)
reset_login(2)
$mouse_active = true
if $servidor_off == false
Network::Main.retrieve_mod if $game_temp.motd.to_s == "" or $game_temp.motd.to_s == LANGUAGE::NOMOTD
@base_window.set_modt("#{$game_temp.motd}",18, 2)
end
else
Network::Main.send_register(@base_window.username , @base_window.password)
Network::Main.send_login(@base_window.username , @base_window.password)
@base_window.contents.clear
reset_login(2)
$mouse_active = true
if $servidor_off == false
Network::Main.retrieve_mod if $game_temp.motd.to_s == "" or $game_temp.motd.to_s == LANGUAGE::NOMOTD
@base_window.set_modt("#{$game_temp.motd}",18, 2)
end
end
else
@base_window.contents.clear
@window_erro.visible = true
@window_erro.active = true
@window_erro.set_modt(LANGUAGE::REGISTER_ERROR,0, -3)
reset_login(2)
$mouse_active = true
if $servidor_off == false
Network::Main.retrieve_mod if $game_temp.motd.to_s == "" or $game_temp.motd.to_s == LANGUAGE::NOMOTD
@base_window.set_modt("#{$game_temp.motd}",18, 2)
end
end
end
end
end
#--------------------------------------------------------------------------
# Login
#--------------------------------------------------------------------------
def login
return if not @login_update
return if $user_window_text.text.include?("-")
if $pass_window_text.text != "" && $user_window_text.text != ""
Network::Main.send_login(@base_window.username , @base_window.password)
@base_window.contents.clear
reset_login(2)
if $servidor_off == false
Network::Main.retrieve_mod if $game_temp.motd.to_s == "" or $game_temp.motd.to_s == LANGUAGE::NOMOTD
@base_window.set_modt("#{$game_temp.motd}",18, 2)
end
@login_update = false
@cursor_pos = 1
else
@base_window.contents.clear
@window_erro.visible = true
@window_erro.active = true
@window_erro.set_modt(LANGUAGE::LOGIN_FILLERROR,0, -3)
reset_login(2)
if $servidor_off == false
Network::Main.retrieve_mod if $game_temp.motd.to_s == "" or $game_temp.motd.to_s == LANGUAGE::NOMOTD
@base_window.set_modt("#{$game_temp.motd}",18, 2)
end
@login_update = false
@cursor_pos = 1
end
end
end
#==============================================================================
# ** Teletransporte
#------------------------------------------------------------------------------
# By Valentine
#==============================================================================
module Teleport_Configure
TELEPORT = []
#Informações dos Teleports
# Nome, Preço, Mapa, x, y
TELEPORT[1] = ["Sparta - 20g", 20, 1, 8, 10]
TELEPORT[2] = ["Olympia - 100g", 100, 1, 8, 10]
TELEPORT[3] = ["Tiquanda - 120g", 120, 1, 8, 10]
TELEPORT[4] = ["Premia - 200g", 200, 1, 8, 10]
end
class Window_Teleport < Window_Selectable
attr_accessor :data2
def initialize(x,y,a,b,id)
super(x,y,a,b,id)
self.x = x
self.y = y
self.width = width
self.height = height
self.index = index
self.back_opacity = 200
self.z = 99999
self.index = 0
@dragable = true
@closable = true
refresh
end
def on_close
self.visible = false
self.active = false
$fechando_ativar = true
end
def item
return @data[self.index]
end
def update
super
refresh if @old_quests != @data
if Input.trigger?(Input::C) or can_pressed?
if $game_party.item_number(Item_Ouro::Item_Id.to_i) >= Teleport_Configure::TELEPORT[index+1][1]
else
return
end
return if @data[index] == nil
$teleport.visible = false
$teleport.active = false
$game_temp.player_new_map_id = Teleport_Configure::TELEPORT[index+1][2]
$game_temp.player_new_x = Teleport_Configure::TELEPORT[index+1][3]
$game_temp.player_new_y = Teleport_Configure::TELEPORT[index+1][4]
$game_temp.player_transferring = true
$game_map.update
@move = $game_player
@move.turn_down
Audio.me_stop
Audio.bgs_stop
$scene = Scene_Map.new
$fechando_ativar = true
Network::Main.send_start
$game_party.lose_item(Item_Ouro::Item_Id.to_i, Teleport_Configure::TELEPORT[index+1][1])
end
end
def can_pressed?
if ( Input.pressed?(Input::Mouse_Left) and in_area?([0, 16,self.width, 20*@item_max]) and @item_max <= 9 ) or ( Input.pressed?(Input::Mouse_Left) and in_area?([0, 16,self.width, self.height]) and @item_max > 9 )
return true
end
end
def on_close
self.visible = false
self.active = false
$fechando_ativar = true
end
def refresh
@old_quests = @data
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# Add item
for p in 1..(Teleport_Configure::TELEPORT.size-1)
@data.push(Teleport_Configure::TELEPORT[p][0])
end
a = @data.index(p)
@data[a] = nil if a != nil
@data = @data.compact
@item_max = @data.size
# If item count is not 0, make a bit map and draw all items
if @data.size > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@data.size
draw_item(i)
end
end
end
def draw_item(index)
item = @data[index]
return if index > 19
if $game_party.item_number(Item_Ouro::Item_Id.to_i) >= Teleport_Configure::TELEPORT[index+1][1]
self.contents.font.color = normal_color
else
self.contents.font.color = Color.new(128,128,128)
end
x = 4
y = index * 20
rect = Rect.new(x, y-6, self.contents.width - 8, 32)
self.contents.draw_text(rect, item, 1)
end
def open_teleporte
$teleport.refresh
$teleport.visible = true
$teleport.active = true
end
end
#==============================================================================
# ** Lista de Quests
#------------------------------------------------------------------------------
# By Valentine
#==============================================================================
class Quest_list < Window_Selectable
attr_accessor :data2
def initialize(x,y,a,b,id)
super(x,y,a,b,id)
self.x = x
self.y = y
self.width = width
self.height = height
self.index = index
self.back_opacity = 200
self.z = 99999
self.index = 0
@dragable = true
@closable = true
refresh
end
def item
return @data[self.index]
end
def update
super
refresh if @old_quests != @data
if Input.trigger?(Input::C) or can_pressed?
if $game_switches[Quest_Configure::MISSION[index+1][1]] == true
else
return
end
return if @data[index] == nil
$quest_w.refresh
$quest_w.visible = true
$quest_w.active = true
end
end
def can_pressed?
if ( Input.pressed?(Input::Mouse_Left) and in_area?([0, 16,self.width, 20*@item_max]) and @item_max <= 10 ) or ( Input.pressed?(Input::Mouse_Left) and in_area?([0, 16,self.width, self.height]) and @item_max > 10 )
return true
end
end
def on_close
self.visible = false
self.active = false
$fechando_ativar = true
end
def refresh
@old_quests = @data
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# Add item
for p in 1..(Quest_Configure::MISSION.size-1)
@data.push(Quest_Configure::MISSION[p][0])
end
a = @data.index(p)
@data[a] = nil if a != nil
@data = @data.compact
@item_max = @data.size
# If item count is not 0, make a bit map and draw all items
if @data.size > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@data.size
draw_item(i)
end
end
end
def draw_item(index)
item = @data[index]
return if index > 19
if $game_switches[Quest_Configure::MISSION[index+1][1]] == true
self.contents.font.color = normal_color
else
self.contents.font.color = Color.new(128,128,128)
end
x = 4
y = index * 20
rect = Rect.new(x, y-6, self.contents.width - 8, 32)
self.contents.draw_text(rect, item, 1)
end
end