function onUse(cid, item, fromPosition, itemEx, toPosition)
winner = getPlayerStorageValue(cid,XXXXXX)
player = getPlayerPosition(cid)
if item.itemid == 1945 or 1946 and winner == 1 then
doPlayerAddItem(cid, XXXX, 1)
doSendMagicEffect(player, 29)
doSendAnimatedText(player, "You have found a <Item>.", TALKTYPE_PRIVATE_RED)
setPlayerStorageValue(cid, XXXXXXX, -1)
else
doPlayerSendCancel(cid, "You already got this item.")
end
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
queststatus = getPlayerStorageValue(cid,20152)
Pos = getPlayerPosition(cid)
if item.itemid == 1945 and queststatus == -1 then
doPlayerAddItem(cid, XXXX, 1)
doSendMagicEffect(Pos, 29)
doSendAnimatedText(player, "You have found a <Item>.", TALKTYPE_PRIVATE_RED)
setPlayerStorageValue(cid,20152, 1)
doTransformItem(item.uid,item.itemid+1)
elseif item.itemid == 1946 and queststatus == -1 then
doPlayerAddItem(cid, XXXX, 1)
doSendMagicEffect(player, 29)
doSendAnimatedText(player, "You have found a <Item>.", TALKTYPE_PRIVATE_RED)
setPlayerStorageValue(cid,20152, 1)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid, "You already got this item.")
end
return true
end