• 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] Special Tool usable on 3 items with different outcomes?

kessykins

Intermediate OT User
Joined
Mar 15, 2010
Messages
297
Reaction score
105
Ok so I'm trying to make a green vase clean 3 different items..

Currently the vase works on 1 of the three items. It gives me an error saying duplicate registered id ####.

Anyways so I was wondering if it's possible to put them all on the same action script.. but when each of the items are used by the green vase there needs to be a different outcome.
ie:
green vase used on item 1 gets a torch/small rock/arrow
green vase used on item 2 gets a bow/mace/pearl
green vase used on item 3 gets a crossbow/twohanded sword/knight armor

Is it possible?
 
gets?
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)

	if itemEx.itemid == item1 then
		--
	elseif itemEx.itemid == item2 then
		--
	elseif itemEx.itemid == item3 then
		--
	else
		return false
	end

	return true
end
 
Back
Top