AwakeGamer 1 Postado Abril 12, 2013 Share Postado Abril 12, 2013 Coloquei o sistema de task e tals funciona certinho os comando soque agora da erro no console esse e tambem o pokemon morre mais nao aaparece o corpse ele fica em pe parado mais morto . [07/04/2013 22:33:44] [Error - CreatureScript Interface] [07/04/2013 22:33:44] data/creaturescripts/scripts/task.lua:onKill [07/04/2013 22:33:44] Description: [07/04/2013 22:33:44] data/creaturescripts/scripts/task.lua:26: attempt to call global 'sendMsgToPlayer' (a nil value) [07/04/2013 22:33:45] stack traceback: [07/04/2013 22:33:45] data/creaturescripts/scripts/task.lua:26: in function <data/creaturescripts/scripts/task.lua:1> Meu scripts/Task.lua function onKill(cid, target) local continue = true if ehMonstro(target) then for i = 91001, (91000+maxTasks) do local sto = getPlayerStorageValue(cid, i) if type(sto) == "string" then local array = getArrayFromStorage(cid, i) if arrayHasContent(array) then for e, f in pairs(array) do for a = 1, #f do if tostring(f[a][1]) == getCreatureName(target) and tonumber(f[a][2]) >= 1 then if getDamageMapPercent(cid, target) < 0.5 then continue = false elseif (pokes[getPlayerStorageValue(cid, 854787)] and getCreatureName(getCreatureSummons(cid)[1]) ~= getPlayerStorageValue(cid, 854787)) then if npcsTask[tostring(e).."_1"] then continue = false --task clan end end if continue then f[a][2] = f[a][2]-1 if f[a][2] == 0 then sendMsgToPlayer(cid, 20, tostring(e)..": Quest Done!") else sendMsgToPlayer(cid, 20, tostring(e)..": You need to kill more "..f[a][2].." "..f[a][1]..(f[a][2] == 1 and "." or "s.")) end setStorageArray(cid, i, array) end continue = true end end end end end end end return true end Link para o comentário https://xtibia.com/forum/topic/211952-ajuda-nesse-erro-na-quest-diaria/ Compartilhar em outros sites More sharing options...
0 Gears 109 Postado Abril 12, 2013 Share Postado Abril 12, 2013 function onKill(cid, target) local continue = true if ehMonstro(target) then for i = 91001, (91000+maxTasks) do local sto = getPlayerStorageValue(cid, i) if type(sto) == "string" then local array = getArrayFromStorage(cid, i) if arrayHasContent(array) then for e, f in pairs(array) do for a = 1, #f do if tostring(f[a][1]) == getCreatureName(target) and tonumber(f[a][2]) >= 1 then if getDamageMapPercent(cid, target) < 0.5 then continue = false elseif (pokes[getPlayerStorageValue(cid, 854787)] and getCreatureName(getCreatureSummons(cid)[1]) ~= getPlayerStorageValue(cid, 854787)) then if npcsTask[tostring(e).."_1"] then continue = false --task clan end end if continue then f[a][2] = f[a][2]-1 if f[a][2] == 0 then doPlayerSendTextMessage(cid, 20, tostring(e)..": Quest Done!") else doPlayerSendTextMessage(cid, 20, tostring(e)..": You need to kill more "..f[a][2].." "..f[a][1]..(f[a][2] == 1 and "." or "s.")) end setStorageArray(cid, i, array) end continue = true end end end end end end end return true end Link para o comentário https://xtibia.com/forum/topic/211952-ajuda-nesse-erro-na-quest-diaria/#findComment-1502323 Compartilhar em outros sites More sharing options...
0 AwakeGamer 1 Postado Abril 12, 2013 Autor Share Postado Abril 12, 2013 Muito Obrigado . Deu certo pode mover . Rep ++ Link para o comentário https://xtibia.com/forum/topic/211952-ajuda-nesse-erro-na-quest-diaria/#findComment-1502341 Compartilhar em outros sites More sharing options...
0 Roksas 846 Postado Abril 12, 2013 Share Postado Abril 12, 2013 Tópico movido para a seção de dúvidas e pedidos resolvidos. Link para o comentário https://xtibia.com/forum/topic/211952-ajuda-nesse-erro-na-quest-diaria/#findComment-1502349 Compartilhar em outros sites More sharing options...
Pergunta
AwakeGamer 1
Coloquei o sistema de task e tals funciona certinho os comando soque agora da erro no console esse e tambem o pokemon morre mais nao aaparece o corpse ele fica em pe parado mais morto .
[07/04/2013 22:33:44] [Error - CreatureScript Interface]
[07/04/2013 22:33:44] data/creaturescripts/scripts/task.lua:onKill
[07/04/2013 22:33:44] Description:
[07/04/2013 22:33:44] data/creaturescripts/scripts/task.lua:26: attempt to call global 'sendMsgToPlayer' (a nil value)
[07/04/2013 22:33:45] stack traceback:
[07/04/2013 22:33:45] data/creaturescripts/scripts/task.lua:26: in function <data/creaturescripts/scripts/task.lua:1>
Meu scripts/Task.lua
function onKill(cid, target)
local continue = true
if ehMonstro(target) then
for i = 91001, (91000+maxTasks) do
local sto = getPlayerStorageValue(cid, i)
if type(sto) == "string" then
local array = getArrayFromStorage(cid, i)
if arrayHasContent(array) then
for e, f in pairs(array) do
for a = 1, #f do
if tostring(f[a][1]) == getCreatureName(target) and tonumber(f[a][2]) >= 1 then
if getDamageMapPercent(cid, target) < 0.5 then
continue = false
elseif (pokes[getPlayerStorageValue(cid, 854787)] and getCreatureName(getCreatureSummons(cid)[1]) ~= getPlayerStorageValue(cid, 854787)) then
if npcsTask[tostring(e).."_1"] then
continue = false --task clan
end
end
if continue then
f[a][2] = f[a][2]-1
if f[a][2] == 0 then
sendMsgToPlayer(cid, 20, tostring(e)..": Quest Done!")
else
sendMsgToPlayer(cid, 20, tostring(e)..": You need to kill more "..f[a][2].." "..f[a][1]..(f[a][2] == 1 and "." or "s."))
end
setStorageArray(cid, i, array)
end
continue = true
end
end
end
end
end
end
end
return true
end
Link para o comentário
https://xtibia.com/forum/topic/211952-ajuda-nesse-erro-na-quest-diaria/Compartilhar em outros sites
3 respostass a esta questão
Posts Recomendados