• 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 Script] How to add an item with an item inside? (solved)

StormRusher

New Member
Joined
Dec 23, 2009
Messages
138
Reaction score
0
Well i need to add an item (doPlayerAddItem) like a present, with another item inside it.

Thanks
 
Last edited:
Example

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local cfg = {
		box = XXXX,
		items = { {2160,10} }
	}
	for i = 1, #cfg.items do
		local present = doCreateItem(cid, cfg.box)
		doAddContainerItem(present, cfg.items[i][1], cfg.items[i][2])
		doCreatureSay(cid, "You have found a present.")
	end
end
 
Back
Top