vudi 17 Postado Fevereiro 6, 2013 Share Postado Fevereiro 6, 2013 Olá tenhu autoloot que funciona normal no meu otserve só não esta funcionando nos pokemons da outland Alguem sabe porque não funciona nos pokemon da outland? Ou alguem sabe configurar pra outros pokemons(outland)? Por favor Link para o comentário https://xtibia.com/forum/topic/206851-encerrado-duvida-como-configurar-autoloot-pra-pokemons-da-outland/ Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Fevereiro 6, 2013 Share Postado Fevereiro 6, 2013 1* ta em area errada, vo mover para derivados 2* se tu procurase antes de postar veria q ja tem um topico com o MESMO problema aberto em derivados --' 3* postar o script q tas usando ajuda sabia? nos nao somos videntes! 4* se for por onDeath provavelmente tem q por uma tag no .xml dos pokes... Link para o comentário https://xtibia.com/forum/topic/206851-encerrado-duvida-como-configurar-autoloot-pra-pokemons-da-outland/#findComment-1462257 Compartilhar em outros sites More sharing options...
vudi 17 Postado Fevereiro 6, 2013 Autor Share Postado Fevereiro 6, 2013 (editado) Descupe irei postar a script que estou usando pode dar uma olhada alguem creaturescripts function onLogin(cid) registerCreatureEvent(cid, "aloot_kill") return true end local stor = 7575 function autoloot(cid, target, pos) local function doStack(cid, itemid, new) local count = getPlayerItemCount(cid, itemid) if (count > 100) then count = count - math.floor(count / 100) * 100 end local newCount = count + new if (count ~= 0) then local find = getPlayerItemById(cid, true, itemid, count).uid if (find > 0) then doRemoveItem(find) else newCount = new end end local item = doCreateItemEx(itemid, newCount) doPlayerAddItemEx(cid, item, true) end local function scanContainer(cid, uid, list) for k = (getContainerSize(uid) - 1), 0, -1 do local tmp = getContainerItem(uid, k) if (isInArray(list, tmp.itemid)) then if isItemStackable(tmp.itemid) and (getPlayerItemCount(cid, tmp.itemid) > 0) then doStack(cid, tmp.itemid, tmp.type) else local item = doCreateItemEx(tmp.itemid, tmp.type) doPlayerAddItemEx(cid, item, true) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Looted ' .. tmp.type .. ' ' .. getItemNameById(tmp.itemid) .. '.') doRemoveItem(tmp.uid) elseif isContainer(tmp.uid) then scanContainer(cid, tmp.uid, list) end end end local items = {} for i = getTileInfo(pos).items, 1, -1 do pos.stackpos = i table.insert(items, getThingFromPos(pos)) end if (#items == 0) then return end local corpse = -1 for _, item in ipairs(items) do local name = getItemName(item.uid):lower() if name:find(target:lower()) then corpse = item.uid break end end if (corpse ~= -1) and isContainer(corpse) then scanContainer(cid, corpse, tostring(getPlayerStorageValue(cid, stor)):gsub('_', ''):explode(',')) end end function onKill(cid, target, lastHit) if not isPlayer(target) then local infos = getPlayerStorageValue(cid, stor) if (infos == -1) then return true end local list = tostring(infos):explode(',') if (#list == 0) then return true end addEvent(autoloot, 150, cid, getCreatureName(target), getCreaturePosition(target)) end return true end talkactions local stor, limit = 7575, 30 --storage, limit to add. local allow_container = false --empty! not looted with items, atleast for now. function onSay(cid, words, param) local expl = param:explode(':') local action, rst = expl[1], expl[2] if (action:lower() == 'check') then local infos, list = getPlayerStorageValue(cid, stor), {} if (infos ~= -1) then list = tostring(infos):explode(',') end local txt = 'Autoloot List:\n' if (#list > 0) then for k, id in ipairs(list) do id = id:gsub('_', '') if tonumber(id) then txt = txt .. getItemNameById(tonumber(id)) .. ((k < #list) and '\n' or '') end end else txt = 'Empty' end doPlayerPopupFYI(cid, txt) elseif (action:lower() == 'add') then local infos, list = getPlayerStorageValue(cid, stor), {} if (infos ~= -1) then list = tostring(infos):gsub('_', ''):explode(',') end if (#list >= limit) then return doPlayerSendCancel(cid, 'You already have ' .. limit .. ' autolooting items.') end local item = tonumber(rst) if not item then item = getItemIdByName(rst, false) if not item then return doPlayerSendCancel(cid, 'not valid item.') end end if not allow_container and isItemContainer(item) then return doPlayerSendCancel(cid, 'this item can not be autolooted.') end local attrs = getItemInfo(item) if not attrs then return doPlayerSendCancel(cid, 'not valid item.') elseif not attrs.movable or not attrs.pickupable then return doPlayerSendCancel(cid, 'this item can not be autolooted.') end if isInArray(list, item) then return doPlayerSendCancel(cid, 'already added.') end table.insert(list, tostring(item)) local new = '' for v, id in ipairs(list) do new = new .. '_' .. id:gsub('_' ,'') .. ((v < #list) and ',' or '') end doPlayerSetStorageValue(cid, stor, tostring(new)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Item >>' .. getItemNameById(item) .. '<< has been added to the autoloot list.') elseif (action:lower() == 'remove') then local infos, list = getPlayerStorageValue(cid, stor), {} if (infos ~= -1) then list = tostring(infos):gsub('_', ''):explode(',') end if (#list == 0) then return doPlayerSendCancel(cid, 'You dont have any item added.') end if (#list >= limit) then return doPlayerSendCancel(cid, 'You already have ' .. limit .. ' autolooting items.') end local item = tonumber(rst) if not item then item = getItemIdByName(rst, false) if not item then return doPlayerSendCancel(cid, 'not valid item.') end end if not isInArray(list, item) then return doPlayerSendCancel(cid, 'This item is not in the list.') end local new = '' for v, id in ipairs(list) do if (tonumber(id) ~= item) then new = new .. '_' .. id:gsub('_' ,'') .. ((v < #list) and ',' or '') end end doPlayerSetStorageValue(cid, stor, tostring(new)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Item >>' .. getItemNameById(item) .. '<< removed from the autoloot list.') end return true end Espero ter ajudado Editado Fevereiro 6, 2013 por vudi Link para o comentário https://xtibia.com/forum/topic/206851-encerrado-duvida-como-configurar-autoloot-pra-pokemons-da-outland/#findComment-1462301 Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Fevereiro 6, 2013 Share Postado Fevereiro 6, 2013 hum... provavelmente o problema esta aki.. local name = getItemName(item.uid):lower() manda como ta o nome de 1 poke q n ta funciona... e tb como ta o nome do corpse dele no items.xml ... -se tu n coloco nome nos corpses la, coloque q deve funcionar...- Link para o comentário https://xtibia.com/forum/topic/206851-encerrado-duvida-como-configurar-autoloot-pra-pokemons-da-outland/#findComment-1462464 Compartilhar em outros sites More sharing options...
vudi 17 Postado Fevereiro 7, 2013 Autor Share Postado Fevereiro 7, 2013 (editado) Itendi nada sobre oque voce falou agora vo tentar ver se o erro é nessa tag EDIT: Sabe oque estou achando que é ? tipo os pokes novos que criei da outland não esta registrado no items.xml e o script do autoloot deve esta relacionado ao item.xml na hora de puxar o item do corpse etc? Oque acha disso? Nossa mano ideia deu certo , tem que colocar o pokes novos no item.xml uHAUha OBRIGADO sciler S2 Edit: o Foda só foi criar novos 30 corpse kk mais foi rapidao Editado Fevereiro 7, 2013 por vudi Link para o comentário https://xtibia.com/forum/topic/206851-encerrado-duvida-como-configurar-autoloot-pra-pokemons-da-outland/#findComment-1462738 Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Fevereiro 7, 2013 Share Postado Fevereiro 7, 2013 -se tu n coloco nome nos corpses la, coloque q deve funcionar...- foi oq eu tentei flar kkk mas blz... sanado, movido Link para o comentário https://xtibia.com/forum/topic/206851-encerrado-duvida-como-configurar-autoloot-pra-pokemons-da-outland/#findComment-1462838 Compartilhar em outros sites More sharing options...
Stigal 585 Postado Abril 20, 2018 Share Postado Abril 20, 2018 A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta. + Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda. * Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado. Link para o comentário https://xtibia.com/forum/topic/206851-encerrado-duvida-como-configurar-autoloot-pra-pokemons-da-outland/#findComment-1733496 Compartilhar em outros sites More sharing options...
Posts Recomendados