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

Writeable quest items help

Newpy

New Member
Joined
May 5, 2010
Messages
50
Reaction score
1
Looking for a script that will allow me to have a writeable item as a quest item from a chest with words already in it. Please help, will rep+ ;p
 
Server + Version?

If you use latest TFS that should work by doing a chest in your mapeditor.
Then set the chest actionid to 2000 and give it a unique id as storage.
Then right click on the chest and select "properties" and add your paper in the chest by clicking on an empty field. Then right click and properties on that paper and edit its text.
 
Server + Version?

If you use latest TFS that should work by doing a chest in your mapeditor.
Then set the chest actionid to 2000 and give it a unique id as storage.
Then right click on the chest and select "properties" and add your paper in the chest by clicking on an empty field. Then right click and properties on that paper and edit its text.
It doesn't copy description of reward items, only actionid (if any)

Edit your 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(getItemAttribute(item.uid, "text")) then
			doItemSetAttribute(ret, "text", getItemAttribute(item.uid, "text"))
		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
 
Back
Top