function onUse(cid, item, fromPosition, itemEx, toPosition)
local QuestID = 10000
local QuestITEM = 2160
local QuestQTY = 10
local QuestMSG = "You have found 10 Crystal Coins."
if item.uid == QuestID then
queststatus = getPlayerStorageValue(cid,QuestID)
if queststatus == -1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, QuestMSG)
doPlayerAddItem(cid,QuestITEM, QuestQTY)
setPlayerStorageValue(cid,QuestID,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
else
return 0
end
return 1
end
QuestQTY = 10
QuestQTY = 2
klick on the chest (what is already quest chest) and make the action id 10 simply or :d?
function onUse(cid, item, fromPosition, itemEx, toPosition)
local QuestID = 10000
local QuestITEM = 2160
local QuestQTY = 2 -- CHANGE QUANTITY HERE
local QuestMSG = "You have found 2 Crystal Coins." -- CHANGE YOUR MESSAGE HERE
if item.uid == QuestID then
queststatus = getPlayerStorageValue(cid,QuestID)
if queststatus == -1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, QuestMSG)
doPlayerAddItem(cid,QuestITEM, QuestQTY)
setPlayerStorageValue(cid,QuestID,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
else
return 0
end
return 1
end