Stellow
C++/C#/PHP/LUA
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
<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