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

tfs 0.4 8.60

elia3343

Hoster
Joined
Oct 22, 2014
Messages
167
Reaction score
8
[20:1:08.465] [Error - CreatureScript Interface]
[20:1:08.465] data/creaturescripts/scripts/login.lua:onLogin
[20:1:08.465] Description:
[20:1:08.465] data/creaturescripts/scripts/login.lua:35: attempt to call global 'valid' (a nil value)
[20:1:08.465] stack traceback:
[20:1:08.465] data/creaturescripts/scripts/login.lua:35: in function <data/creaturescripts/scripts/login.lua:12>
[20:1:08.481] Account Manager has logged out.
> Broadcasted message: "Full server save within 120 seconds, please mind it may freeze!".
> Broadcasted message: "Full server save within 120 seconds, please mind it may freeze!".
> Broadcasted message: "Full server save within 120 seconds, please mind it may freeze!".
> Broadcasted message: "Full server save within 120 seconds, please mind it may freeze!".
> Broadcasted message: "Full server save within 120 seconds, please mind it may freeze!".
> Broadcasted message: "Full server save within 120 seconds, please mind it may f





data\creaturescripts\scripts\login.lua


local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')),
seconds = 2, -- in seconds
onlyWithSameIP = "yes" -- will work for all players ("no"), or only check player with same IP? ("yes")

}

config.onlyWithSameIP = getBooleanFromString(config.onlyWithSameIP)
local m_lastLogin, m_lastIP = 0, 0

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

local timeNow, playerIP = os.time(), getPlayerIp(cid)
if(m_lastLogin + config.seconds >= timeNow and
(config.onlyWithSameIP == FALSE or m_lastIP == playerIP)) then
doAddIpBanishment(playerIP, 2419200)
return FALSE
end

m_lastIP = playerIP
m_lastLogin = timeNow

playerpos = getPlayerPosition(cid)
doSendAnimatedText(playerpos, "Online!", TEXTCOLOR_ORANGE)

registerCreatureEvent(cid, "Idle")
registerCreatureEvent(cid, "Mail")
if(getPlayerOperatingSystem(cid) >= CLIENTOS_OTCLIENT_LINUX) then
registerCreatureEvent(cid, "ExtendedOpcode")
end

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

if getPlayerLevel(cid) < 8 then
local exp = 4200
doPlayerAddExp(cid,exp)
end

if (getPlayerStorageValue(cid,41287) < 0) then
setPlayerStorageValue(cid, 41287, 0)
end

setPlayerStorageValue(cid, 41287, getPlayerStorageValue(cid, 41287) + 1)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE ,"To jest twoje ".. getPlayerStorageValue(cid, 41287) .." logowanie!")


registerCreatureEvent(cid, "GuildEvents")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "AdvanceTp")
registerCreatureEvent(cid, "GuildEvents")
registerCreatureEvent(cid, "Idle")
registerCreatureEvent(cid, "GuildWarSystem")
registerCreatureEvent(cid, "Armor")
registerCreatureEvent(cid, "SpellMaster")
registerCreatureEvent(cid, "DirectionDebug")
registerCreatureEvent(cid, "BountyHunter")
registerCreatureEvent(cid, "exp")
registerCreatureEvent(cid, "InqPortals")



doPlayerSetStorageValue(cid, 4523, 0)
doPlayerOpenChannel(cid, 6)
doPlayerOpenChannel(cid, 9)
return true
end
 
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, "AdvanceTp")
registerCreatureEvent(cid, "GuildEvents")
registerCreatureEvent(cid, "Idle")
registerCreatureEvent(cid, "GuildWarSystem")
registerCreatureEvent(cid, "Armor")
registerCreatureEvent(cid, "SpellMaster")
registerCreatureEvent(cid, "DirectionDebug")
registerCreatureEvent(cid, "BountyHunter")
registerCreatureEvent(cid, "exp")
registerCreatureEvent(cid, "InqPortals")



doPlayerSetStorageValue(cid, 4523, 0)
doPlayerOpenChannel(cid, 6)
doPlayerOpenChannel(cid, 9)
return true
end
 
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, "AdvanceTp")
registerCreatureEvent(cid, "GuildEvents")
registerCreatureEvent(cid, "Idle")
registerCreatureEvent(cid, "GuildWarSystem")
registerCreatureEvent(cid, "Armor")
registerCreatureEvent(cid, "SpellMaster")
registerCreatureEvent(cid, "DirectionDebug")
registerCreatureEvent(cid, "BountyHunter")
registerCreatureEvent(cid, "exp")
registerCreatureEvent(cid, "InqPortals")



doPlayerSetStorageValue(cid, 4523, 0)
doPlayerOpenChannel(cid, 6)
doPlayerOpenChannel(cid, 9)
return true
end





[16:20:15.548] [Error - CreatureScript Interface]
[16:20:15.548] data/creaturescripts/scripts/login.lua:eek:nLogin
[16:20:15.548] Description:
[16:20:15.548] data/lib/050-function.lua:315: attempt to call global 'getCreatureCondition' (a nil value)
[16:20:15.548] stack traceback:
[16:20:15.548] data/lib/050-function.lua:315: in function 'isPlayerGhost'
[16:20:15.548] data/creaturescripts/scripts/login.lua:32: in function <data/creaturescripts/scripts/login.lua:6>
[16:20:15.563] Account Manager has logged out.
 
Back
Top