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

How to put text in a quest?

Wihup

New Member
Joined
Feb 27, 2009
Messages
9
Reaction score
0
Hello there I just noticed that when I try to open a chest wich has as reward a book with text (made in the mapeditor) I just get an empty book :S

Could someone help me please :D?
 
data/lib/050-function.lua
Code:
function doCopyItem(item, attributes)
	local attributes = attributes or false

	local ret = doCreateItemEx(item.itemid, item.type)
	if(attributes) then
		if(item.actionid > 0) then
			doItemSetAttribute(ret, "aid", item.actionid)
		end
[B][COLOR="Red"]		if(getItemText(item.uid) ~= "") then
			doItemSetAttribute(ret, "text", getItemText(item.uid))
		end[/COLOR][/B]
	end

	if(isContainer(item.uid)) then
		for i = (getContainerSize(item.uid) - 1), 0, -1 do
			local tmp = getContainerItem(item.uid, i)
			if(tmp.itemid > 0) then
				doAddContainerItemEx(ret, doCopyItem(tmp, true).uid)
			end
		end
	end

	return getThing(ret)
end
 

Similar threads

Back
Top