Witajcie,
ot?? chcia?bym was prosi? o pomoc przy b??dzie kt?ry pojawia si? przy wej?ciu gracza na serwerze w konsoli. Oto on:
Nie wiem w jaki spos?b go zniwelowa?, pomo?ecie?
Oto tre?? pliku login.lua :
ot?? chcia?bym was prosi? o pomoc przy b??dzie kt?ry pojawia si? przy wej?ciu gracza na serwerze w konsoli. Oto on:
Code:
[22:43:18.201] [Error - CreatureScript Interface]
[22:43:18.201] In a timer event called from:
[22:43:18.201] data/creaturescripts/scripts/login.lua:onLogin
[22:43:18.201] Description:
[22:43:18.201] data/creaturescripts/scripts/login.lua:73: attempt to call global 'doPlayerOpenChannel' (a nil value)
[22:43:18.201] stack traceback:
[22:43:18.201] data/creaturescripts/scripts/login.lua:73: in function <data/creaturescripts/scripts/login.lua:72>
Nie wiem w jaki spos?b go zniwelowa?, pomo?ecie?
Oto tre?? pliku login.lua :
local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
local function kickacc(cid)
if getCreatureName(cid) == "Account Manager" then
doRemoveCreature(cid)
end
return TRUE
end
addEvent(kickacc, 1000, cid)
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
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, "Reward")
registerCreatureEvent(cid, "points")
registerCreatureEvent(cid, "direction")
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid, "TopFrags")
registerCreatureEvent(cid, "monsterkill")
registerCreatureEvent(cid, "globalstorage")
registerCreatureEvent(cid, "arenaend")
registerCreatureEvent(cid, "Infinite")
registerCreatureEvent(cid, "KillingInTheNameOf")
registerCreatureEvent(cid, "CompetitionDeath")
registerCreatureEvent(cid, "ob_arena")
registerCreatureEvent(cid, "RefSystem")
registerCreatureEvent(cid, "ranking")
registerCreatureEvent(cid, "PowerGamers")
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "WrathOfTheEmperor")
setPlayerStorageValue(cid, 2000, 0)
setPlayerStorageValue(cid, 2001, 0)
setPlayerStorageValue(cid, 2002, 0)
--Otwieranie guild chatu, funkcja z delay bo mam exhausted na otwieranie chata
local function openchan()
doPlayerOpenChannel(cid, 10)
end
if (getPlayerGuildId(cid) > 0) and (getPlayerGuildLevel(cid) >= 3) and (getPlayerLevel(cid) >= 50) then
addEvent(openchan, 1300)
end
--koniec
if (InitArenaScript ~= 0) then
InitArenaScript = 1
-- make arena rooms free
for i = 42300, 42309 do
setGlobalStorageValue(i, 0)
setGlobalStorageValue(i+100, 0)
end
end
-- if he did not make full arena 1 he must start from zero
if getPlayerStorageValue(cid, 42309) < 1 then
for i = 42300, 42309 do
setPlayerStorageValue(cid, i, 0)
end
end
-- if he did not make full arena 2 he must start from zero
if getPlayerStorageValue(cid, 42319) < 1 then
for i = 42310, 42319 do
setPlayerStorageValue(cid, i, 0)
end
end
-- if he did not make full arena 3 he must start from zero
if getPlayerStorageValue(cid, 42329) < 1 then
for i = 42320, 42329 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42355) == -1 then
setPlayerStorageValue(cid, 42355, 0) -- did not arena level
end
setPlayerStorageValue(cid, 42350, 0) -- time to kick 0
setPlayerStorageValue(cid, 42352, 0) -- is not in arena
setPlayerPromotionLevel(cid, 1)
--setPlayerStorageValue(cid, 1993,0) -- arena pvp
--setPlayerStorageValue(cid, 1991, 0) -- arena pvp
--setPlayerStorageValue(cid, 1992, 0) -- arena pvp
return true
end
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
local function kickacc(cid)
if getCreatureName(cid) == "Account Manager" then
doRemoveCreature(cid)
end
return TRUE
end
addEvent(kickacc, 1000, cid)
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
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, "Reward")
registerCreatureEvent(cid, "points")
registerCreatureEvent(cid, "direction")
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid, "TopFrags")
registerCreatureEvent(cid, "monsterkill")
registerCreatureEvent(cid, "globalstorage")
registerCreatureEvent(cid, "arenaend")
registerCreatureEvent(cid, "Infinite")
registerCreatureEvent(cid, "KillingInTheNameOf")
registerCreatureEvent(cid, "CompetitionDeath")
registerCreatureEvent(cid, "ob_arena")
registerCreatureEvent(cid, "RefSystem")
registerCreatureEvent(cid, "ranking")
registerCreatureEvent(cid, "PowerGamers")
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "WrathOfTheEmperor")
setPlayerStorageValue(cid, 2000, 0)
setPlayerStorageValue(cid, 2001, 0)
setPlayerStorageValue(cid, 2002, 0)
--Otwieranie guild chatu, funkcja z delay bo mam exhausted na otwieranie chata
local function openchan()
doPlayerOpenChannel(cid, 10)
end
if (getPlayerGuildId(cid) > 0) and (getPlayerGuildLevel(cid) >= 3) and (getPlayerLevel(cid) >= 50) then
addEvent(openchan, 1300)
end
--koniec
if (InitArenaScript ~= 0) then
InitArenaScript = 1
-- make arena rooms free
for i = 42300, 42309 do
setGlobalStorageValue(i, 0)
setGlobalStorageValue(i+100, 0)
end
end
-- if he did not make full arena 1 he must start from zero
if getPlayerStorageValue(cid, 42309) < 1 then
for i = 42300, 42309 do
setPlayerStorageValue(cid, i, 0)
end
end
-- if he did not make full arena 2 he must start from zero
if getPlayerStorageValue(cid, 42319) < 1 then
for i = 42310, 42319 do
setPlayerStorageValue(cid, i, 0)
end
end
-- if he did not make full arena 3 he must start from zero
if getPlayerStorageValue(cid, 42329) < 1 then
for i = 42320, 42329 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42355) == -1 then
setPlayerStorageValue(cid, 42355, 0) -- did not arena level
end
setPlayerStorageValue(cid, 42350, 0) -- time to kick 0
setPlayerStorageValue(cid, 42352, 0) -- is not in arena
setPlayerPromotionLevel(cid, 1)
--setPlayerStorageValue(cid, 1993,0) -- arena pvp
--setPlayerStorageValue(cid, 1991, 0) -- arena pvp
--setPlayerStorageValue(cid, 1992, 0) -- arena pvp
return true
end