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

[Request] Simple Quest

Code:
if item.actionid == actionid then
    if getPlayerStorageValue(cid, storageid) ~= 1 then
         doPlayerAddItem(cid, itemid, count)
         doPlayerAddItem(cid, itemid, count)
    else
        doPlayerSendTextMessage(cid, 22, "It is empty.")
    end
end

Code:
if item.actionid == actionid then
    if getPlayerStorageValue(cid, storageid) ~= 1 then
        local container = doPlayerAddItem(cid, containerid, 1)
        doContainerAddItem(container, itemid, itemcount)
        doContainerAddItem(container, itemid, itemcount)
    else
        doPlayerSendTextMessage(cid, 22, "It is empty.")
    end
end

functions onUse~
 
Code:
	function onUse(cid, item, frompos, item2, topos)

        if item.uid == 2024 then -- the unique id of chest
		queststatus = getPlayerStorageValue(cid,2024) --storage value, keep at chests unique id
		if queststatus == -1 then -- checks if quest is done
			doPlayerSendTextMessage(cid,22,"You have found a bag") --Massage when open
			Container = doPlayerAddItem(cid, 1993, 1) -- container =bag or backpack ID
			doAddContainerItem(Container, 2427, 1) -- item
			doAddContainerItem(Container, 2171, 1) -- item
			setPlayerStorageValue(cid,2024,1) -- sets storage value up 1
		else
			doPlayerSendTextMessage(cid,22,"It is empty.")
		end
	return 1
	end
end
 
Last edited:
Back
Top