Ir para conteúdo
  • 0

Servidor travando ao realizar login/logout


katumblo

Pergunta

Utilizo a base do NTO HARD

 

Eu abri um servidor no meu computador e depois em uma instância virtual da amazon, 15gb de memoria RAM, SSD, e internet de 1.2gb (sim, gigas, não mega) de download e  de upload, só tinha apenas eu e mais um amigo online nele, e sempre quando eu ou ele fazia login ou logout, o servidor SEMPRE travava por uns 2 a 3 segundos, em todo o restante não trava de jeito nenhum, 0 lag para upar, invocar vários bixos, realizar pvp, nada disso trava, mas se realizar login e logout sempre trava.

 

Não está surgindo nenhum erro na distro.

 

Código do login.lua:

 

Spoiler

 

local config = {
	loginMessage = getConfigValue('loginMessage'),
	useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
	end

	local accountManager = getPlayerAccountManager(cid)
	if(accountManager == MANAGER_NONE) then
		local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
		if(lastLogin > 0) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
			str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
		else
			str = str .. " Please choose your outfit."
			doPlayerSendOutfitWindow(cid)
		end

		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
	elseif(accountManager == MANAGER_NAMELOCK) then
		addEvent(valid(doCreatureSay), 500, cid, "Hello, it appears that your character has been locked for name violating rules, what new name would you like to have?", TALKTYPE_PRIVATE_NP, true, cid)
	elseif(accountManager == MANAGER_ACCOUNT) then
		addEvent(valid(doCreatureSay), 500, cid, "Hello, type {account} to manage your account. If you would like to start over, type {cancel} anywhere.", TALKTYPE_PRIVATE_NP, true, cid)
	else
		addEvent(valid(doCreatureSay), 500, cid, "Hello, type {account} to create an account or {recover} to recover an account.", TALKTYPE_PRIVATE_NP, true, cid)
	end

	if(not isPlayerGhost(cid)) then
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	end

	registerCreatureEvent(cid, "Idle")
	registerCreatureEvent(cid, "Mail")

	registerCreatureEvent(cid, "ReportBug")
	if(config.useFragHandler) then
		registerCreatureEvent(cid, "SkullCheck")
	end

	registerCreatureEvent(cid, "GuildEvents")
	registerCreatureEvent(cid, "AdvanceSave")
	registerCreatureEvent(cid, "recordIp")
	registerCreatureEvent(cid, "partyAndGuildProtection")
	registerCreatureEvent(cid, "PushPlayerThere")
	registerCreatureEvent(cid, "savePlayer")
	registerCreatureEvent(cid, "savePlayer_L")
	
	-- News
	registerCreatureEvent(cid, "advancedMSG")
	registerCreatureEvent(cid, "critical")
	registerCreatureEvent(cid, "Inicio")
	registerCreatureEvent(cid, "apt")
	registerCreatureEvent(cid, "bpt")
	registerCreatureEvent(cid, "cpt")
	registerCreatureEvent(cid, "dpt")
	registerCreatureEvent(cid, "FragReward")
	registerCreatureEvent(cid, "PlayerAntKillSummon")
	registerCreatureEvent(cid, "SummonAntKillPlayer")
	--Boss
	registerCreatureEvent(cid, "IndraKill")
	registerCreatureEvent(cid, "AshuraKill")
	registerCreatureEvent(cid, "MizukiKill")
	registerCreatureEvent(cid, "ZabuzaKill")
	registerCreatureEvent(cid, "JiroboKill")
	registerCreatureEvent(cid, "OrochimaruKill")
	registerCreatureEvent(cid, "KimimaruKill")
	registerCreatureEvent(cid, "KisameKill")
	registerCreatureEvent(cid, "DeidaraKill")
	registerCreatureEvent(cid, "HidanKill")
	registerCreatureEvent(cid, "KakuzoKill")
	registerCreatureEvent(cid, "KabutoKill")
	registerCreatureEvent(cid, "SasoriKill")
	registerCreatureEvent(cid, "TobiKill")
	registerCreatureEvent(cid, "NagatoKill")
	registerCreatureEvent(cid, "KonanKill")
	registerCreatureEvent(cid, "DanzouKill")
	registerCreatureEvent(cid, "ObitoKill")
	registerCreatureEvent(cid, "ItachiKill")
	registerCreatureEvent(cid, "MadaraKill")
	registerCreatureEvent(cid, "KaguyaKill")
	registerCreatureEvent(cid, "HagoromoKill")
	registerCreatureEvent(cid, "corpse")
	--Storage
	registerCreatureEvent(cid, "firstmessage")
	registerCreatureEvent(cid, "StorageKilla")
	registerCreatureEvent(cid, "teleportmonster")
	registerCreatureEvent(cid, "HeartDrop")
	registerCreatureEvent(cid, "HatDrop")
	registerCreatureEvent(cid, "autoBless")
	registerCreatureEvent(cid, "targetCreature")	
	registerCreatureEvent(cid, "invencible")
	registerCreatureEvent(cid, "kaiten")
	registerCreatureEvent(cid, "sunadefense")
	if getPlayerStorageValue(cid, 3433301) ~= 0 then
        setPlayerStorageValue(cid, 3433301, 0) 
	end
	if getPlayerStorageValue(cid, 3424675) ~= 0 then
        setPlayerStorageValue(cid, 3424675, 0) 
	end 
	if getPlayerStorageValue(cid, 3727678) ~= 0 then
        setPlayerStorageValue(cid, 3727678, 0) 
	end
	registerCreatureEvent(cid, "reflectrob")
	registerCreatureEvent(cid, "checkBless")
	registerCreatureEvent(cid, "showKD")
	doPlayerOpenChannel(cid, 9)
	doPlayerOpenChannel(cid, 8)
	doPlayerOpenChannel(cid, 10)
	
	if getCreatureName(cid) == "Account Manager" then
    return false
	end
	registerCreatureEvent(cid, "reborn")
	if getPlayerStorageValue(cid, 19332) == -1 then
        setPlayerStorageValue(cid, 19332, 0) 
    end 
	registerCreatureEvent(cid, "PushPlayerThere")
	---------- PlayerPort---------------
	if getPlayerStorageValue(cid, 49708) ~= 0 then
        setPlayerStorageValue(cid, 49708, 0) 
	end
	-- doPlayerPopupFYI(cid, "[ APROVEITE ] Double POINTS + Double EXP + Double SKILL !")
	
	return true
end

 

 

d

 

 

 

Por favor agradeceria imensamente se alguém me ajudar, pois, falta basicamente isso para deixar o servidor online.

Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

  • 0

Percebi um pequeno detalhe, quando dou logout meio que eu não deslogo e parece que o server me kicka, por conta disso, SEMPRE aparece essa mensagem após o logout:

 

Your connection has been lost.
Either your network or the server went down. (ERROR 10054)

 

*O server não cai, é algum bug que está acontecendo, mas não faço a minima ideia de onde pode ser

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...