#Reportado, por duvida sanada.
@Sofft, vc n pode generalizar falando que ninguem ajuda, tem varios no forum que sempre ajudam quando podem. Eu só vi esse pedido agora que vc ja sanou, senão tinha tentado ajudar...
info
Grupo: Conde
Registrado: 30/06/11
Posts: 631
Reputação: +371
Char no Tibia: Warrior of Mort

#Reportado, por duvida sanada.
@Sofft, vc n pode generalizar falando que ninguem ajuda, tem varios no forum que sempre ajudam quando podem. Eu só vi esse pedido agora que vc ja sanou, senão tinha tentado ajudar...
info
Grupo: Infante
Registrado: 04/03/11
Posts: 1.6k
Reputação: +393
Char no Tibia: No Have

jhom disse eu tbm estou tentando ajudar todos so que os pedidos sao muitos e alguns sao mais complexos e demoram mais.
info
Grupo: Artesão
Registrado: 03/12/11
Posts: 137
Reputação: +5
Char no Tibia: Surionz

Então vou aproveitar a boa vontade de vcs, se puderem me ajudar nesse tópico ficaria muito agradecido:
info
Grupo: Artesão
Registrado: 03/12/11
Posts: 137
Reputação: +5
Char no Tibia: Surionz
Estou usando um script para o jogador 'catar' gold automaticamente, porem isso não ocorre em monstros 'novos', como lizards, souleaters, drakens.
Por favor me ajudem a consertar isso, tem muito tempo que já estou tentando arruma isso.
Alguém mais experiente poderia facilmente conserta-lo.
function getContainerItems(containeruid) local items = {} local containers = {} if type(getContainerSize(containeruid)) ~= "number" then return false end for slot = 0, getContainerSize(containeruid)-1 do local item = getContainerItem(containeruid, slot) if item.itemid == 0 then break end if isContainer(item.uid) then table.insert(containers, item.uid) end table.insert(items, item) end if #containers > 0 then for i,x in ipairs(getContainerItems(containers[1])) do table.insert(items, x) end table.remove(containers, 1) end return items end function getItemsInContainerById(container, itemid) -- Function By Kydrai local items = {} if isContainer(container) and 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 doPlayerAddItemStacking(cid, itemid, quant) local item = getItemsInContainerById(getPlayerSlotItem(cid, 3).uid, itemid) local piles = 0 if #item > 0 then for i,x in pairs(item) do if getThing(x).type < 100 then local it = getThing(x) doTransformItem(it.uid, itemid, it.type+quant) if it.type+quant > 100 then doPlayerAddItem(cid, itemid, it.type+quant-100) end else piles = piles+1 end end else return doPlayerAddItem(cid, itemid, quant) end if piles == #item then doPlayerAddItem(cid, itemid, quant) end end function corpseRetireItems(corpsepos, killer, itemsarray) local corpse = nil for i = 1, 254 do corpsepos.stackpos = i corpse = getThingFromPos(corpsepos) if corpse.uid > 0 and isCorpse(corpse.uid) then break end end local items = getContainerItems(corpse.uid) for i,x in pairs(items) do if isInArray(itemsarray, tonumber(x.itemid)) then if isItemStackable(x.itemid) then doPlayerAddItemStacking(killer, x.itemid, x.type) else doPlayerAddItem(killer, x.itemid) end doRemoveItem(x.uid, x.type) end end end function onKill(cid, target, lastHit) local loots = {2148, 2152, 2160} if lastHit and getPlayerStorageValue(cid, 6616) == 1 then addEvent(corpseRetireItems, 100, getCreaturePosition(target), cid, loots) end return true endCreditos:MatheusMkalo, por postar esse script.
Link do Tópico dele:http://www.xtibia.co...tion-auto-gold/
COMO SEMPRE!!, NINGUEM AJUDA A RESOLVER NADA AQUI, A NÃO SER FAZER BAÚ DE QUEST!!!!!
RESOLVIDO: Se você tiver o mesmo problema do que eu, o erro não está no script, mas no monstro, adicione essa tag no corpse do monstro, que fica em items.xml.
Editado Abril 25 por Sofft