• 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 counter where you only can throw cc's

jesseripper

New Member
Joined
Mar 12, 2008
Messages
20
Reaction score
1
Hello there, can anybody do my homework and create a counter where you only can throw crystalcoins on. Nothing else.

The idea is, there will be a casino, and the counter will be unreachable, to prevent trashing you will only be able to throw crystalcoins on it.

Help please!

+ rep given
 
Implement this system: http://otland.net/f35/creatureevent-onmoveitem-cid-item-count-tocontainer-fromcontainer-185781/

and something like this:
LUA:
local counter = xxxx

function onMoveItem(cid, item, count, toContainer, fromContainer, fromPos, toPos)
	if toPos.x == 65535 or toContainer.uid > 0 then
		return true
	end	

	local thing = getTileItemById(toPos, counter)
	if thing.uid > 0 then
		if item.itemid ~= 2160 then
			doPlayerSendCancel(cid, "You can only throw crystal coins on the casino counter.")
			return false
		end
	end 
    return true
end
 
Back
Top