SO
pedido

Alguem pode reajustar esse sistema de autoloot

Por SoufandoRoksas, 29 de abr. de 2013 em Scripts

2rep+
script
5
1.1k
SoufandoRoksasS
29 de abril de 2013 às 08:54

alguem pode reajustar quem for pegando o dinheiro já transformando de gold para moedas cinza é de moeda cinza pra crystal coin.

 

 

é resover 1 bug que tem ai se eu matar 1 monstro sumonado por qualquer player da erro no server é ele cai mais depois vilta porque o monstro sumunado não tem loot.

 

é outra adicionar o comando !autoloot , só para p.a

 

2 Rep+

 

lembrando o sistema do auto loot é creaturescripts

 

local configs = {

ids = {2148, 2152, 2160}, -- adicionado somente os dos dinheiros, mais pode adicionar qual id quiser.

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)

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

item = getThing(uid)

doPlayerAddItem(cid, idmoney, 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)

end

Editado Abril 29 por SoufandoRoksas

RoksasR
29 de abril de 2013 às 22:30

Amigo, juntar os coins automaticamente é nas sources. Baixe o TFS 0.4 que já vem implantado.

 

Me mostre o erro que da depois de matar o summon.

 

E poste o código do !autoloot, fica em data/talkactions/scripts

SoufandoRoksasS
30 de abril de 2013 às 08:48

dá esse erro sem parar eu coloquei só uma parte dele só não coloco mais porque é mt mt mesmo ai cai o server depois volta sem eu fazer nada.

 

[30/4/2013 8:44:59] [Error - CreatureScript Interface]

[30/4/2013 8:44:59] In a timer event called from:

[30/4/2013 8:44:59] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:44:59] Description:

[30/4/2013 8:44:59] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:44:59] [Error - CreatureScript Interface]

[30/4/2013 8:44:59] In a timer event called from:

[30/4/2013 8:45:0] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:0] Description:

[30/4/2013 8:45:0] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:0] [Error - CreatureScript Interface]

[30/4/2013 8:45:0] In a timer event called from:

[30/4/2013 8:45:0] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:0] Description:

[30/4/2013 8:45:0] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:0] [Error - CreatureScript Interface]

[30/4/2013 8:45:0] In a timer event called from:

[30/4/2013 8:45:0] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:0] Description:

[30/4/2013 8:45:0] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:0] [Error - CreatureScript Interface]

[30/4/2013 8:45:0] In a timer event called from:

[30/4/2013 8:45:0] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:0] Description:

[30/4/2013 8:45:0] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:0] [Error - CreatureScript Interface]

[30/4/2013 8:45:0] In a timer event called from:

[30/4/2013 8:45:0] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:0] Description:

[30/4/2013 8:45:0] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:0] [Error - CreatureScript Interface]

[30/4/2013 8:45:0] In a timer event called from:

[30/4/2013 8:45:0] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:0] Description:

[30/4/2013 8:45:0] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:0] [Error - CreatureScript Interface]

[30/4/2013 8:45:0] In a timer event called from:

[30/4/2013 8:45:0] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:0] Description:

[30/4/2013 8:45:1] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:1] [Error - CreatureScript Interface]

[30/4/2013 8:45:1] In a timer event called from:

[30/4/2013 8:45:1] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:1] Description:

[30/4/2013 8:45:1] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:1] [Error - CreatureScript Interface]

[30/4/2013 8:45:1] In a timer event called from:

[30/4/2013 8:45:1] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:1] Description:

[30/4/2013 8:45:1] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:1] [Error - CreatureScript Interface]

[30/4/2013 8:45:1] In a timer event called from:

[30/4/2013 8:45:1] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:1] Description:

[30/4/2013 8:45:1] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:1] [Error - CreatureScript Interface]

[30/4/2013 8:45:1] In a timer event called from:

[30/4/2013 8:45:1] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:1] Description:

[30/4/2013 8:45:1] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:1] [Error - CreatureScript Interface]

[30/4/2013 8:45:1] In a timer event called from:

[30/4/2013 8:45:1] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:1] Description:

[30/4/2013 8:45:1] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:1] [Error - CreatureScript Interface]

[30/4/2013 8:45:1] In a timer event called from:

[30/4/2013 8:45:1] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:1] Description:

[30/4/2013 8:45:1] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:1] [Error - CreatureScript Interface]

[30/4/2013 8:45:2] In a timer event called from:

[30/4/2013 8:45:2] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:2] Description:

[30/4/2013 8:45:2] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:2] [Error - CreatureScript Interface]

[30/4/2013 8:45:2] In a timer event called from:

[30/4/2013 8:45:2] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:2] Description:

[30/4/2013 8:45:2] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:2] [Error - CreatureScript Interface]

[30/4/2013 8:45:2] In a timer event called from:

[30/4/2013 8:45:2] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:2] Description:

[30/4/2013 8:45:2] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:2] [Error - CreatureScript Interface]

[30/4/2013 8:45:2] In a timer event called from:

[30/4/2013 8:45:2] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:2] Description:

[30/4/2013 8:45:2] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:2] [Error - CreatureScript Interface]

[30/4/2013 8:45:2] In a timer event called from:

[30/4/2013 8:45:2] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:2] Description:

[30/4/2013 8:45:2] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:2] [Error - CreatureScript Interface]

[30/4/2013 8:45:2] In a timer event called from:

[30/4/2013 8:45:2] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:2] Description:

[30/4/2013 8:45:2] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:2] [Error - CreatureScript Interface]

[30/4/2013 8:45:2] In a timer event called from:

[30/4/2013 8:45:2] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:2] Description:

[30/4/2013 8:45:2] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:3] [Error - CreatureScript Interface]

[30/4/2013 8:45:3] In a timer event called from:

[30/4/2013 8:45:3] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:3] Description:

[30/4/2013 8:45:3] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:3] [Error - CreatureScript Interface]

[30/4/2013 8:45:3] In a timer event called from:

[30/4/2013 8:45:3] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:3] Description:

[30/4/2013 8:45:3] (LuaInterface::luaGetThing) Thing not found

 

[30/4/2013 8:45:3] [Error - CreatureScript Interface]

[30/4/2013 8:45:3] In a timer event called from:

[30/4/2013 8:45:3] data/creaturescripts/scripts/autoloot.lua:onKill

[30/4/2013 8:45:3] Description:

[30/4/2013 8:45:3] (LuaInterface::luaGetThing) Thing not found

JonnyGuioJ
01 de maio de 2013 às 21:04

Tente retirar o item = getThing(uid) e usar o próprio uid nas funções:

doPlayerAddItem(cid, idmoney, uid.type)

doRemoveItem(uid, uid.type)

SoufandoRoksasS
01 de maio de 2013 às 21:28

Tente retirar o item = getThing(uid) e usar o próprio uid nas funções:

doPlayerAddItem(cid, idmoney, uid.type)

doRemoveItem(uid, uid.type)

 

se você fizer isso no script eu te do REP + eu não to conseguindo.