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

Solved Open as normal box after quest complete.

Exoltes

Novia OTserv Developer
Joined
Jul 2, 2009
Messages
563
Reaction score
47
Location
Belgium
I'm working on a 8.54 Open Tibia Server using The Forgotten Server - Version 0.2.7 (Mystic Spirit).

Basicly the idea is that I want to use the barrel as a normal storage barrel (which can not be moved) in which items spawn after server restart once you completed the quest.

Server\data\actions\actions.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<actions>
    <action uniqueid="5575" script="quests/Secret Quests.lua"/>
</actions>

Server\data\actions\scripts\quests\Secret Quests.lua
Code:
function onUse(cid, item, frompos, item2, topos)

//~//Not relevant code

      elseif item.uid == 5575 then
          queststatus = getPlayerStorageValue(cid,7012)
          if queststatus == -1 then
              doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You found found some northern pikes hidden deep within the barrel.")
              doPlayerAddItem(cid,2669,3)    -- Northern Pike
              setPlayerStorageValue(cid,7000,1)
              setPlayerStorageValue(cid,7012,1)
          end

        return 1
    else
        return 0
    end
end


The barrel ingame has only a unique id. When I give another barrel an other unique id without writing a script for it you can open it perfectly.
 
Back
Top