• 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 items inside box

Zell

Intermediate OT User
Joined
Oct 23, 2010
Messages
214
Reaction score
117
Hiho Otland, I'm trying to check the items inside bag/box but I can't find the way, will be like this..

Code:
function onUse(cid, item, frompos, item2, topos)

if item2.itemid == 1993 and item2.''Have inside items'' == X then
      
        doRemoveItem(item2.uid, 1)
       
end

I dunno if It's can be possible XD

Thanks anyway!
 
Lua:
function onUse(cid, item, frompos, item2, topos)

if item2.itemid == 1993 then
     if getContainerSize(item2.uid) > getContainerCap(item2.uid) then
          doRemoveItem(item2.uid, 1)
     end
end

I haven't used tfs 0.3.6 in years but I think this is right. Let me know if it works.
 
Last edited:
Back
Top