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

Patch 10 Furniture Construction Kits Out of Whack

Commoner

New Member
Joined
Jul 8, 2008
Messages
3
Reaction score
0
The Furniture Packages seems to be completely out of whack in the latest distro (Patch 10: Rev. 1073). I'm not sure if the problems are in the items.xml descriptions or in constructionkits.xml. In general, however, the description on the furniture construction kits do not match the furniture created when you use the item while some items are not usable at all (probably because they're missing entries in constructionkits.xml).

My first impression was that the constructionkits.xml were simply outdated but I also noticed that items.xml seem to have a couple of problems issues such as there being 5 diffrent construction kit descriptions describing themselves as bookshelf consturction kits and a couple which have no descriptions at all. So, I'm not too sure which of the files is out of whack.
 
I see. Well anyway, since the issue is just a matter of the items.xml and constructionkits.lua being out of synch with each other, I decided to fix the problem myself. If anybody is intersted, I've posted the code to fix the problem here.

Change constructionkits.lua to :

PHP:
local constructionKits = {[3901] = 1615, [3902] = 1616, [3903] = 1619, [3904] = 1650, [3905] = 1658, [3906] = 1666, [3907] = 1671, [3908] = 1674, [3909] = 1714, [3910] = 1718, [3911] = 1728, [3912] = 1732, [3913] = 2080, [3914] = 2084, [3915] = 1740,  [3916] = 1724, [3917] = 2116, [3918] = 2581, [3919] = 3805, [3920] = 3807, [3921] = 3809, [3922] = 2099, [3923] = 2094, [3924] = 2098, [3925] = 2101, [3926] = 2585, [3927] = 2104, [3928] = 2104, [3929] = 2105, [3930] = 3813, [3931] = 2821, [3932] = 3826, [3932] = 3828, [3933] = 3830, [3934] = 3832, [3935] = 3817, [3936] = 6368, [3937] = 2064, [3938] = 1615}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getTileHouseInfo(fromPosition) == FALSE then
		doPlayerSendCancel(cid,"You may only construct this inside a house.")
	elseif fromPosition.x == CONTAINER_POSITION then
		doPlayerSendCancel(cid, "Put the construction kit on the floor first.")
	elseif constructionKits[item.itemid] ~= nil then
		doTransformItem(item.uid, constructionKits[item.itemid])
		doSendMagicEffect(fromPosition, CONST_ME_POFF)
	else
		return FALSE
	end
	return TRUE
end

As for the two items with no description just replace the 3931 and 3931 entry in items.xml with :

PHP:
	<item id="3931" article="a" name="furniture package">
		<attribute key="weight" value="2500"/>
		<attribute key="description" value="It is a kit for a trunk chair."/>
	</item>

and 3937 entry with :

PHP:
	<item id="3937" article="a" name="furniture package">
		<attribute key="weight" value="2500"/>
		<attribute key="description" value="It is a kit for a table lamp."/>
	</item>

I usually don't like to touch items.xml myself but the lack of description on these two was clearly an oversight.

I assumed that the table lamp entry in constructionkits.lua for item 3937 (creats a table lamp) was correct and that the description was simply left out in items.xml. As for item 3931 I pretty much just took an educated guess on what item it was supposed to create based on the kind of furniture the consturcion kits in its itemid range were producing (primitive style furniture).

As for the multiple bookcase furniture kits, I simply assumed that the description on these items were correct and that the furniture kits were supposed to create the many different types of bookcases available in the game (ie. wooden ones, bamboo ones, etc.) so I treated them like all the other furniture kits and simply updated the entries in constructionkits.lua so that they would produce the different bookshelf types depending on which specific construction kit is used.

The only real problem with this, of course, is that now it is difficult for players to distinguish between which specific bookshelf is produced with which furniture kit since they all have the description : "It is a kit for a bookcase."
 
Back
Top