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

Script :/

Fu Manchu

Sepultra™
Joined
Jan 28, 2011
Messages
439
Reaction score
9
So I kind of need a script that when you right click an item (Christmas bag) and open it. It has the set of donors in it. I want to make it so people can donate and receive a whole set for cheaper then buying it piece by piece. Is it possible to script an item to have items inside of it? If so how. Lol Or make the bag usable and when used the items pop up but if I go this route then the bag can only be used once. But idk if someone could help me out and tell me what they think and the best way to go about this I would appreciate it. Thx
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local items = {2463, 2647}
	
	if doRemoveItem(item.uid) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Thanks for donating!')
		doSendMagicEffect(fromPosition, CONST_ME_POFF)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE)
		for i = 1, table.maxn(items) do
			doPlayerAddItem(cid, items[i])
		end
		return true
	end
	
	return false
end
 
Back
Top