caiocesar2 3 Postado Setembro 27, 2009 Share Postado Setembro 27, 2009 (editado) Olá Gostaria de saber como faço para adicionar o sistema de mostrar o Loot quando mata o monstro em meu Servidor 8.5, pois ainda não tem. Obrigado :smile_positivo: Editado Setembro 28, 2009 por caiocesar2 Link para o comentário Compartilhar em outros sites More sharing options...
Kydrai 146 Postado Setembro 27, 2009 Share Postado Setembro 27, 2009 Era só pesquisa um pouco http://www.xtibia.com/forum/creatuescript-...tml&hl=loot Link para o comentário Compartilhar em outros sites More sharing options...
caiocesar2 3 Postado Setembro 28, 2009 Autor Share Postado Setembro 28, 2009 (editado) Eu ja tinha testado esse, e infelizmente nao funcionou.. Editado Setembro 28, 2009 por caiocesar2 Link para o comentário Compartilhar em outros sites More sharing options...
canovas 3 Postado Setembro 28, 2009 Share Postado Setembro 28, 2009 Se não funcionou é porque voce deve ter feito algo errado, eu ja usei esse script genial do Mock e ele funcionou perfeitamente em um TFS 0.3.1231. Revise todos os passos e tente denovo. Link para o comentário Compartilhar em outros sites More sharing options...
caiocesar2 3 Postado Setembro 28, 2009 Autor Share Postado Setembro 28, 2009 (editado) Estranho pois axo que fiz tudo certo... Olhe: creaturescripts.xml <event type="kill" name="loot" event="script" value="loot.lua"/> login.lua function onLogin(cid) local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) end registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "PlayerDeath") registerCreatureEvent(cid, "loot") return TRUE end loot.lua --- Script by mocklocal function find(pa)--- Script by mock for i=1,255 do pa.stackpos = i local corpse = getThingfromPos(pa) if isCorpse(corpse.uid) == TRUE then if isContainer(corpse.uid) == TRUE then return corpse.uid end end end return FALSE end local function getConteiner(item)--- Script by mock if isContainer(item.uid) == FALSE then return "" end local items = getItemName(item.itemid)..": (" local g = doAddContainerItem(item.uid,2815,1) for i=1, getContainerCap(item.uid) do local k = getContainerItem(item.uid, i) if k.itemid ~= 0 then if isContainer(k.uid) == TRUE then items = items..getConteiner(k)..', ' print('o0') else if k.type > 1 then items = items..k.type..'x '..getItemNameById(k.itemid).."s, " else items = items..getItemNameById(k.itemid)..", " end end end end items = items:sub(1,#items-2)..'.' doRemoveItem(g,-1) return items..')' end function getLoot(pa,cid,nam)--- Script by mock corpse = find(pa) if corpse == FALSE then return FALSE end local g = doAddContainerItem(corpse,2815,1) local str = 'Loot de '..nam..': ' for i=1, getContainerCap(corpse) do local a = getContainerItem(corpse, i) if a.itemid ~= 0 then if isContainer(a.uid) == TRUE then str = str..getConteiner(a)..' , ' else if a.type > 1 then str = str..a.type..'x '..getItemNameById(a.itemid)..'s, ' else str = str..getItemNameById(a.itemid)..', ' end end end end doRemoveItem(g,-1) str = str:sub(1,#str-2)..'.' doPlayerSendTextMessage(cid, 23, str) end function onKill(cid, target)--- Script by mock addEvent(getLoot,100,getCreaturePosition(target),cid,getCreatureName(target)) return 1 end Editado Setembro 28, 2009 por caiocesar2 Link para o comentário Compartilhar em outros sites More sharing options...
canovas 3 Postado Setembro 28, 2009 Share Postado Setembro 28, 2009 Dá algum erro no console do OTserver quando você mata algum bixo, ou quando algum player loga ? Link para o comentário Compartilhar em outros sites More sharing options...
caiocesar2 3 Postado Setembro 28, 2009 Autor Share Postado Setembro 28, 2009 (editado) Sim, da um erro no console qd mata um bixo apontando erro no loot.xml Editado Setembro 28, 2009 por caiocesar2 Link para o comentário Compartilhar em outros sites More sharing options...
canovas 3 Postado Setembro 28, 2009 Share Postado Setembro 28, 2009 Então poste esse erro aqui, pra poder te ajudar melhor, aliás ja deveria ter postado no inicio do topico né ... Link para o comentário Compartilhar em outros sites More sharing options...
caiocesar2 3 Postado Setembro 28, 2009 Autor Share Postado Setembro 28, 2009 (editado) Sim, mas agora eu troquei o loot.xml por um outro arquivo que peguei de outro Ot... agora nada adiantou e nem erro + aparece ~~edit esse eh o erro q aparecia: Editado Setembro 28, 2009 por caiocesar2 Link para o comentário Compartilhar em outros sites More sharing options...
caio1523 0 Postado Setembro 29, 2009 Share Postado Setembro 29, 2009 Muito estranho, Talvez sua Distro não esteja rodando.. Qual você usa? E olhando para o tópico sugerido pelo nosso amigo kydrai, pude notar um comentário logo abaixo do próprio criador do tópico: Mock mas esse script funciona em servidores até 8.1 ^^. Então.. "talvez" pode ser esse o problema. Bom, espero o post da Distro que você utiliza. Att. Sheikah Link para o comentário Compartilhar em outros sites More sharing options...
caiocesar2 3 Postado Outubro 1, 2009 Autor Share Postado Outubro 1, 2009 é, também percebi isto, porém ainda estou na dúvida. Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados