• 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 with some itens dont work in my server.. why

Stellow

C++/C#/PHP/LUA
Joined
Oct 23, 2008
Messages
1,112
Reaction score
221
Location
Germany
GitHub
eubrunomiguel
Hello... im trying put new quest with new itens.. (Exemple: Blue Legs, Magma Robe, etc...)..
I Make all and... dont work.. the chest open.. with nothing ...

Help me?


if i put to gain sample itens... (Example: Crown Legs) .. the quest work normally...


I Already put my itens.xml and itens.otb in the Map Editor Folder.. Help me

My Server 8.22
 
Code:
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[i], 1)
            end
        else
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
        end
    end
    return TRUE
end
 
Put the script from my upper post to:
data/actions/scripts/other name it as you want and change the xxxxx to the actionid you want to use.

open data/actions/actions.xml and add there:
Code:
<action actionid="xxxxx" script="other/thenameyouused.lua"/>

open map editor and add the same action id (xxxxx) to the chest.
 
Back
Top