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

Problems with Chest of Quest please

Stellow

C++/C#/PHP/LUA
Joined
Oct 23, 2008
Messages
1,112
Reaction score
221
Location
Germany
GitHub
eubrunomiguel
For the quest work with new itens (Example: Magma Robe), i need make Quest by ActionId example:



<action actionid="xxxxx" script="other/thenameyouused.lua"/>


local items = {
magmalegsid,
otheritemid,
anotherotheritemid
}
function onUse(cid, item)
if item.actionid == xxxxx then
if getPlayerStorageValue(cid, item.actionid) == - 1 then
local container = doPlayerAddItem(cid, 1998, 1)
setPlayerStorageValue(cid, item.actionid, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a bag.")
for i = 1,table.maxn(items) do
doAddContainerItem(container, items, 1)
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
end
end
return TRUE
end



All work.. but.. the player can move te chest and pickup...

Please Help
 
Back
Top