Pedrook
Advanced OT User
- Joined
- May 24, 2009
- Messages
- 457
- Solutions
- 3
- Reaction score
- 194
- Location
- Brazil
- GitHub
- pedrogiampietro
Hello, I'm using the printer autoloot
but when I'm in party the loot stays in the monster, it's not split, or by whoever hit the most, or by who's party leader, it just stays in the monster.
I wish it was for some, could anyone help?
AutoLoot System for tfs 1.x
but when I'm in party the loot stays in the monster, it's not split, or by whoever hit the most, or by who's party leader, it just stays in the monster.
I wish it was for some, could anyone help?
AutoLoot System for tfs 1.x
LUA:
local function scanContainer(cid, position)
local player = Player(cid)
if not player then
return
end
local corpse = Tile(position):getTopDownItem()
if not corpse or not corpse:isContainer() then
return
end
if corpse:getType():isCorpse() and corpse:getAttribute(ITEM_ATTRIBUTE_CORPSEOWNER) == cid then
for a = corpse:getSize() - 1, 0, -1 do
local containerItem = corpse:getItem(a)
if containerItem then
for b = AUTOLOOT_STORAGE_START, AUTOLOOT_STORAGE_END do
if player:getStorageValue(b) == containerItem:getId() then
containerItem:moveTo(player)
end
end
if isItemStackable(containerItem:getId()) then
if containerItem:getId() == 2148 then
containerItem:remove()
doPlayerSetBalance(player, getPlayerBalance(player) + containerItem:getCount())
end
if containerItem:getId() == 2152 then
containerItem:remove()
doPlayerSetBalance(player, getPlayerBalance(player) + (containerItem:getCount() * 100))
end
if containerItem:getId() == 2160 then
containerItem:remove()
doPlayerSetBalance(player, getPlayerBalance(player) + (containerItem:getCount() * 1000))
end
end
end
end
end
end