• 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!

[OT BUG]New Player make 1 minute freeze

Daubydogg

World Famous Drug Dealer
Joined
Jul 7, 2011
Messages
103
Reaction score
1
Location
Brockway, PA
Hello, i just opened my ot and i'm checking when a new player registered log in the server, the server freezes 35-45 segs, i dont know whe the console doesn't show anything.

HElP?
 
Happened to me before
Looks like some of ur script is playing around try disable creaturescripts script by script and check if freezes are gone on login.
It may not show any error on console but maybe it's poorly optimized.
 
Happened to me before
Looks like some of ur script is playing around try disable creaturescripts script by script and check if freezes are gone on login.
It may not show any error on console but maybe it's poorly optimized.
Yeah, it's on my script "PlayerLogin" Could you help me??
Post automatically merged:

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 * 9.25)
doPlayerSetLossPercent(cid, PLAYERLOSS_SKILL, loss * 19)
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
doPlayerSetPromotionLevel(cid,1)
doPlayerAddPremiumDays(cid, days)
local config = {str = 1111, days = 365}
if getPlayerStorageValue(cid,config.str) ~= 1 then
doPlayerAddPremiumDays(cid, config.days)
setPlayerStorageValue(cid, config.str, 1)
end
end
local a = 0
local limitAM = 5
if getCreatureName(cid):lower() == "account manager" then
for _, pid in ipairs(getPlayersOnline()) do
if getCreatureName(pid):lower() == "account manager" and pid ~= cid then
a = a + 1
end
end
local config = {str = 1111, days = 365}
if getPlayerStorageValue(cid,config.str) ~= 1 then
doPlayerAddPremiumDays(cid, config.days)
setPlayerStorageValue(cid, config.str, 1)
end

if a > limitAM then
return false
end
return true
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, "GuildEvents")

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

registerCreatureEvent(cid, "fraglook")
registerCreatureEvent(cid, "Frag")
registerCreatureEvent(cid, "Startskills")
registerCreatureEvent(cid, "Posagi")
registerCreatureEvent(cid, "FragReward")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "recordIp")
registerCreatureEvent(cid, "partyAndGuildProtection")

return true
end
Post automatically merged:

@GoalTV I just fixed it bro, this was messing up the server
return true
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
 
Last edited:
Yeah, it's on my script "PlayerLogin" Could you help me??
Post automatically merged:

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 * 9.25)
doPlayerSetLossPercent(cid, PLAYERLOSS_SKILL, loss * 19)
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
doPlayerSetPromotionLevel(cid,1)
doPlayerAddPremiumDays(cid, days)
local config = {str = 1111, days = 365}
if getPlayerStorageValue(cid,config.str) ~= 1 then
doPlayerAddPremiumDays(cid, config.days)
setPlayerStorageValue(cid, config.str, 1)
end
end
local a = 0
local limitAM = 5
if getCreatureName(cid):lower() == "account manager" then
for _, pid in ipairs(getPlayersOnline()) do
if getCreatureName(pid):lower() == "account manager" and pid ~= cid then
a = a + 1
end
end
local config = {str = 1111, days = 365}
if getPlayerStorageValue(cid,config.str) ~= 1 then
doPlayerAddPremiumDays(cid, config.days)
setPlayerStorageValue(cid, config.str, 1)
end

if a > limitAM then
return false
end
return true
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, "GuildEvents")

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

registerCreatureEvent(cid, "fraglook")
registerCreatureEvent(cid, "Frag")
registerCreatureEvent(cid, "Startskills")
registerCreatureEvent(cid, "Posagi")
registerCreatureEvent(cid, "FragReward")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "recordIp")
registerCreatureEvent(cid, "partyAndGuildProtection")

return true
end
Post automatically merged:

@GoalTV I just fixed it bro, this was messing up the server
return true
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



Awesome glad to hear that :)

Hopefully, all works fine for you from now.
 
Back
Top