• 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 Check item stack on position for a specific itemid

christiandb

Member
Joined
Feb 5, 2008
Messages
2,469
Reaction score
5
Location
010
Hey,

I have the following problem; my poi script has all the positions of the levers configured and checks whether the levers are pulled or not with the getThingfromPos(leverpos) function. The thing is that players tend to put coins on the levers to mark them. The coin is then returned by the getThingfromPos(levelpos) function. Is there a way to check the stack of items on a certain position for the itemid of the pulled lever?

I know I can rebuild the script to request the itemid of a certain aid (give each lever an aid), but that would prolly require more work than the solution suggested above.

Thanks in advance,

Chris~
 
Code:
getTileItemById(pos, itemid).uid

To see if the item is on that position you can do it like this
Code:
if(getTileItemById(pos, itemid).uid > 0) then
 
Back
Top