function onSay(cid, words, param, channel)
if(param == "") then
doPlayerSendCancel(cid, "You have to type a value.")
return true
end
local pos = getCreatureLookPosition(cid)
pos.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
local item = getThingFromPos(pos).uid
if(item) then
doItemSetAttribute(item, "uid", param)
end
return true
end
function onSay(cid, words, param, channel)
if param == "" then
doPlayerSendCancel(cid, "You have to type a value.")
elseif not tonumber(param) then
doPlayerSendCancel(cid, "You must enter a numeric value.")
else
local pos = getCreatureLookPosition(cid)
pos.stackpos = 255
local item = getThingFromPos(pos, false).uid
if item > 0 and not isCreature(item) then
doItemSetAttribute(item, 'uid', tonumber(param))
else
doPlayerSendCancel(cid, "Item not found.")
end
end
return true
end
function onSay(cid, words, param, channel)
if param == "" then
doPlayerSendCancel(cid, "You have to type a value.")
elseif not tonumber(param) then
doPlayerSendCancel(cid, "You must enter a numeric value.")
else
local v = getThing(tonumber(param)).uid
if v > 0 then
doRemoveItem(v)
doPlayerSendCancel(cid, "Item with UID " .. param .. " has been removed.")
else
doPlayerSendCancel(cid, "Item not found.")
end
end
return true
end