• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Can't enter again when logout

Zakhran

Pace
Joined
May 7, 2012
Messages
252
Reaction score
6
Location
Detroit, Michigan
When a player is playing on my ots, when he logouts, cant enter anymore, like the otserver is offline, and i need to reset de ots to login aggain... whats wrong?
 
PHP:
	<event type="login" name="PlayerLogin" event="script" value="login.lua"/>

login.lua:

PHP:
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
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
	elseif(accountManager == MANAGER_ACCOUNT) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
	end

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

	registerCreatureEvent(cid, "Mail")
	registerCreatureEvent(cid, "GuildMotd")

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

	registerCreatureEvent(cid, "ReportBug")
	registerCreatureEvent(cid, "AdvanceSave")
	    registerCreatureEvent(cid, "Event")
        registerCreatureEvent(cid, "Eventa")
        registerCreatureEvent(cid, "Eventb")
        registerCreatureEvent(cid, "Eventc")
        registerCreatureEvent(cid, "Eventd")
        registerCreatureEvent(cid, "Evente")
        registerCreatureEvent(cid, "Eventf")
        registerCreatureEvent(cid, "Eventg")
        registerCreatureEvent(cid, "Eventh")
        registerCreatureEvent(cid, "Eventi")
        registerCreatureEvent(cid, "Eventj")
		registerCreatureEvent(cid, "Eventk")
	return true
end

pd. this is randomly, if you logout and login when the server is recently opening, you can logout and login without any problems, but in like 30 mins.. you logout and cant enter anymore with the error server name doesn't exists..
 
You said you used a compleet different server, and still had the same problem? If it's not your server, it can also be something with your internet connection.
 
I've been using TFS 0.3.6 v3 and all seems to be working fine, but when i want to use OTX, the problem appears, so i think maybe a creatureevent, or something in config.lua, but didn't find anything:/.. thanks
 
@WarOfTheTitans
yes, the server crashes when i reload the creaturescripts (the tfs) but also crashes without reason, when i am not at the pc or something..

@up
yes i tried to use a new database and i have the same problem
thx
 
Back
Top Bottom