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

Quest system how to make 2 chests with same uid?

Solution
I would rewrite it to use action ID, not unique ID and create 2 chests with action ID 2001.
UID = unique ID. As name says, it should be unique.
It's because unique ids are used to register one unique thing. Can't be used twice. If you wish to make it work, set two different unique ids, to two different scripts, or make one action script that holds 2 unique ids.

Check this script as example, it uses unique id to get triggered (if you register it as unique on actions.xml).
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local bloodStorage = PlayerStorageKeys.BloodHerbQuest
    local player = Player(cid)
    if player:getStorageValue(bloodStorage) > 0 then
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The tree is empty.")
        return true
    end
 
    player:addItem(2798, 1)
    player:setStorageValue(bloodStorage, 1)
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a blood herb.")
    ---toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN)
    return true
end
 
I would rewrite it to use action ID, not unique ID and create 2 chests with action ID 2001.
UID = unique ID. As name says, it should be unique.
yep i rewrited it to use action id and now it work :D i didn't know how work uid, now when im look on this topic im laught
 
Back
Top