I trying to make a script that delete a specific item description, but without success.
The problem are in the form of comment in the script.
Here are my trying:
The problem are in the form of comment in the script.
Here are my trying:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local oo = "+3 reflect."
local cc = "+5 reflect."
local nn = "+7 reflect."
if getItemAttribute(itemEx.uid, "reflect") then
doItemEraseAttribute(itemEx.uid, "reflect") -- attribute is deleted
doItemEraseAttribute(itemEx.uid, "description", string.find(oo)) -- dont find the item
doItemEraseAttribute(itemEx.uid, "description", string.find(cc)) -- dont find the item
doItemEraseAttribute(itemEx.uid, "description", string.find(nn)) -- dont find the item
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you deleted the atribute")
doRemoveItem(item.uid, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "this item dont have attribute to delete.")
end
return true
end
Last edited: