-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
-
Conteúdo Similar
-
script alguém pode me ajudar nessa spells aqui, queira que colocassem pro meu personagem ficar inatingível por 6 segundos e podendo atacar livremente
Por lazaroszz,
- 0 respostas
- 1026 visualizações
-
- 3 respostas
- 4280 visualizações
-
- 0 respostas
- 2105 visualizações
-
- 2 respostas
- 1922 visualizações
-
- 1 resposta
- 1632 visualizações
-

Pergunta
LightTenshimaru 0
Estou com um problema e faz tempo que procuro a solução em diversos Forum's e não acho.
É o seguinte:
Tenho um script de "AutoGold" que funciona plenamente, só que quando mato monstros "sem corpse" como Slime e derivados ou Rift Worm ele trava meu servidor e fica aparecendo mensagens constantes uma atrás da outra assim.
"[Error - CreatureScript Interface]
In a timer event called from:
data/creaturescripts/scripts/autoloot.lua:onKill
Description:
(LuaInterface::luaGetThing) Thing not found"
Meu Script é esse:
local configs = { ids = {2148, 2152, 2160, 7588, 7589, 7590, 7591, 7618, 7620, 8473}, premium = true -- só premium usar o auto loot ? [true ou false] } function getItemsInContainerById(container, itemid) local items = {} if getContainerSize(container) > 0 then for slot=0, (getContainerSize(container)-1) do local item = getContainerItem(container, slot) if isContainer(item.uid) then local itemsbag = getItemsInContainerById(item.uid, itemid) for i=0, #itemsbag do table.insert(items, itemsbag[i]) end else if itemid == item.itemid then table.insert(items, item.uid) end end end end return items end function autoGold(cid, pos, stack) if stack > 255 then return true end local position = {x = pos.x, y = pos.y, z = pos.z, stackpos = stack} local tile = getThingFromPos(position) if isCorpse(tile.uid) then corpse = tile else autoGold(cid, pos, stack + 1) end if corpse ~= nil then for _, idmoney in pairs(configs.ids) do tab = getItemsInContainerById(corpse.uid, idmoney) if #tab ~= 0 then for _, uid in pairs(tab) do money = getPlayerMoney(cid) doPlayerRemoveMoney(cid, money) doPlayerAddMoney(cid, money+item.type) doRemoveItem(item.uid, item.type) end end end end end function onKill(cid, target) if not isPremium(cid) and configs.premium then return true end return addEvent(autoGold, 10, cid, getCreaturePosition(target), 0) endMuito agradecido quem puder me ajudar...
Link para o comentário
https://xtibia.com/forum/topic/200042-concertar-script/Compartilhar em outros sites
5 respostass a esta questão
Posts Recomendados