• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Award for vocation with name in the description. TFS 1.3

Guerra

Member
Joined
May 1, 2018
Messages
69
Reaction score
9
Location
Natal/RN - Brasil
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 !!

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
 
Back
Top