• 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 create reward chests?

Magictibiaman

New Member
Joined
May 25, 2009
Messages
371
Reaction score
0
How do i create chests so players can get a reward once, like so you can't do bright sword quest multiple time for instance
 
Last edited:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerStorageValue(cid, 12345) < 0 then
		if item.uid == 5000 then
			local container = doPlayerAddItem(cid, 1988, 1)
			doAddContainerItem(container, 2160, 10)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a bag.')
		elseif item.uid == 5001 then
			doPlayerAddItem(cid, 2195, 1)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a boots of haste.')
		end
		setPlayerStorageValue(cid, 12345, 1)
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
	end
	return TRUE
end
that's the simpliest method.
 
Back
Top