Using an easy table we can tell the player the name of the quest is he doing when opens the chest.
actions/quest/system.lua
..last lines
Lua:
function getQuestName(uid)
local table = {
[13333] = "Spike Sword",
[40000] = "Pits of Inferno",
[1320] = "Demon Oak",
}
return table[uid]
end
actions/quest/system.lua
..last lines
Lua:
if(doPlayerAddItemEx(cid, reward.uid, false) ~= RETURNVALUE_NOERROR) then
result = "You have found a reward weighing " .. getItemWeight(reward.uid) .. " oz. It is too heavy or you have not enough space."
else
result = "You have found " .. result .. ". You have completed the "..getQuestName(item.uid).." quest!"
setPlayerStorageValue(cid, storage, 1)
if(questsExperience[storage] ~= nil) then
doPlayerAddExp(cid, questsExperience[storage])
doSendAnimatedText(getCreaturePosition(cid), questsExperience[storage], TEXTCOLOR_WHITE)