• 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!

function getItemCharges(cid, id)

Scooty

Enemia.EU
Joined
Jul 24, 2010
Messages
564
Reaction score
14
Location
Kraków
hi, i need that function:

getItemCharges(cid, id)

or

getItemCharges(cid, slot)



i want to use it in creaturescripts onthink event

ex:

PHP:
function onThink(cid, interval)
if getItemCharges(cid, 2197) == 0 then
doPlayerRemoveItem(cid, 2197,1)
end
return true
end
 
Why do you need it? In that script you don't need it since doPlayerRemoveItem(cid, itemid, type)
Type would be charges..

And to check, just use .type
E.g :
LUA:
if item.type == 1 then
 
Back
Top