• 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!

Linux TFS 1.2/1.3

Webo

Otland 4ever
Joined
Oct 20, 2013
Messages
621
Solutions
10
Reaction score
229
Location
Warsaw
Someone tell me how to do a quest with 3 cases and only 1 reward?

whore all day with this Fuck and Not Found as it is written ....
 
Just use one storage for all chests.
Something like that

Code:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)

local rewards = {
[20001] = {item = {2160, 100}},
[20002] = {item = {2160, 25}},
[20003] = {item = {2160, 10}}
}

local storage = {46182,1}

if(not rewards[item.uid]) then
    print('Fatal error in quest script, error code: [A01].')
    return true
end

if(player:getStorageValue(storage[1]) == storage[2]) then
    player:sendTextMessage(MESSAGE_STATUS_SMALL, "You have done this quest.")
    return true
end

    player:setStorageValue(storage[1], storage[2])
    player:addItem(rewards[item.uid].item[1], rewards[item.uid].item[2])
    player:sendTextMessage(MESSAGE_STATUS_SMALL, "Congratulations, you get item.")
return true
end
 
Last edited:
Back
Top