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

Lua Quests not working.

Vanderlay

Back on track
Premium User
Joined
Sep 20, 2007
Messages
893
Reaction score
109
Location
Sweden
Hello. I've got a issue regarding all my quests.
All quests contain their proper item reward and so on, but they wont trigger a "quest effect", such as giving the item instantly.
Instead they are prompted to open up the box/chest, and take out the item, resulting in a effect that others can't take the reward until the server restarts.

This is what I get from the console whenever I open a chest:

PHP:
data/actions/scripts/quests/system.lua:onUse
Description:
data/actions/scripts/quests/system.lua:28: attempt to call global 'isContainer' (a nil value)
stack traceback:
        data/actions/scripts/quests/system.lua:28: in function <data/actions/scripts/quests/system.lua:10>

And this is what contains at the regarding lines in system.lua:

PHP:
if(getPlayerStorageValue(cid, storage) > 0) then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
		return true
	end

	local items = {}
	local reward = 0

	local size = isContainer(item.uid) and getContainerSize(item.uid) or 0
	if(size == 0) then
		reward = doCopyItem(item, false)
	else
		for i = 0, size do
			local tmp = getContainerItem(item.uid, i)
			if(tmp.itemid > 0) then
				table.insert(items, tmp)
			end
		end
	end

I've tried to research at the forums and in my c++ files to see the reason but I can't come to a conclusion.

If anyone knows, please help me out.
Kind regards,
Vanderlay
 
Did you try to add the unique ID of each quest chest?
Set Action ID to anything random that havnt been used before, and Unique ID to 2000.

If that dosnt work try to replace your system.lua with this;

What rev are you using?
 
Last edited:
Did you try to add the unique ID of each quest chest?
Set Action ID to anything random that havnt been used before, and Unique ID to 2000.

If that dosnt work try to replace your system.lua with this;

What rev are you using?

Thanks for your answer.
I discovered earlier that it diden't have to do with system.lua(I guess), but that the chests dident have a proper unique id/action id set.

Kind regards,
Vanderlay
 
Back
Top