local function doPlayerAddDepotItem(cid, item, count)
local item,count,pid = type(item)=="table" and item or {item},type(count)=="table" and count or {(count or 1)},getPlayerGUID(cid)
doRemoveCreature(cid)
for k,v in ipairs(item) do
local ls = db.getResult("SELECT `sid` FROM `player_depotitems` WHERE `player_id` = "..pid.." ORDER BY `sid` DESC LIMIT 1")
return db.executeQuery("INSERT INTO `player_depotitems` (`player_id`, `sid`, `pid`, `itemtype`, `count`, `attributes`) VALUES ("..pid..", "..(ls:getDataInt("sid")+1)..", 101, "..v..", "..count[k]..", '"..(count[k] > 1 and string.format("%x",count[k]) or '').."')") or false
end
end
function onSay(cid, words, param, channel)
local t = string.explode(param, ",")
if t[1] and t[2] then
doPlayerAddDepotItem(cid, t[1], t[2])
end
return true
end