Guerra
Member
Hello Guys!
I have a quest system on my server that when the player clicks on the quest chest and receives his prize, his name is recorded on the item. But I would like to modify it so that I could modify the prize for the same quest for each vocation on my server. So that I don't have to create multiple actions and be all in one script. Below is my quest script, I ask you to help me modify it. Use TFS 1.3 !!
I have a quest system on my server that when the player clicks on the quest chest and receives his prize, his name is recorded on the item. But I would like to modify it so that I could modify the prize for the same quest for each vocation on my server. So that I don't have to create multiple actions and be all in one script. Below is my quest script, I ask you to help me modify it. Use TFS 1.3 !!
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local queststatus = player:getStorageValue(30049)
if queststatus == -1 then
player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations, you found a treasure.")
local quest = player:addItem(31432, 1)
quest:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "This item was obtained by "..player:getName()..".")
player:setStorageValue(30049, 1)
else
player:sendTextMessage(MESSAGE_INFO_DESCR, "You already got your prize.")
end
return true
end