Code:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 8883 then
queststatus = getPlayerStorageValue(cid,6698)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a sword.")
local sword = doPlayerAddItem(cid,2376,1)
doItemSetAttribute(sword,"elementfire", 10)
doItemSetAttribute(sword,"attack", 15)
doItemSetAttribute(sword,"name", "Sword of Fire")
setPlayerStorageValue(cid,6694,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
else
return 0
end
return 1
end
what's wrong? why doItemSetAttribute(sword,"elementFire", 10) don't work?