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
Server\data\actions\scripts\quests\Secret Quests.lua
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.
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.