LucasFerraz
Systems Analyst
Its sending parcel ok but doItemSetAttribute shows in console "item not found".
Can someone help?
Can someone help?
LUA:
local function doPlayerAddDepotItems(cid, items, town)
if (not isPlayer(cid)) then
error("Player not found")
end
local town = town or getPlayerTown(cid)
local parcel = doCreateItemEx(ITEM_PARCEL)
for item, count in pairs(items) do
if (type(item) == "number") then
local attritemid = doPlayerGiveItemContainer(cid, 2596, item, count, subType)
doItemSetAttribute(attritemid, "description", "This item belongs to ".. getPlayerName(cid) ..".")
doItemSetAttribute(attritemid, "aid", getPlayerGUID(cid)+10000)
elseif (type(item) == "string") then
doPlayerGiveItemContainer(cid, 2596,getItemIdByName(item), count, subType)
else
error("Undefinied type of item name")
end
end
return doPlayerSendMailByName(getCreatureName(cid), parcel, town)
end