• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[Support] Get item count

Ancores

Active Member
Joined
Jan 17, 2010
Messages
538
Reaction score
28
How can I get the count of stacked items on the ground?

Example:
LUA:
if getItemCount(pos, itemid) == 50 then
   ...
end

Using TFS 0.3.6pl1
 
Last edited:
i need the same!, please help this guy!!!

i need people to transform an item on ground but not just 1 item, i mean like:

you put 50 wood in floor and when you use a hammer i want those woods to tranform in a dunno, wooden wall? or something xD

but not with one, with 50!
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if itemEx.itemid == 5901 then
		if toPosition.x == 65535 then
			doCreatureSay(cid, 'Put the wood on the floor first.', TALKTYPE_ORANGE_1, false, cid)
		elseif itemEx.type ~= 50 then
			doCreatureSay(cid, 'You need to stack 50 pieces of wood.', TALKTYPE_ORANGE_1, false, cid)
		else
			doTransformItem(itemEx.uid, 5272)
			doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
		end
		return true
	end
end
 
Back
Top