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

removePlayerItems

Syntax

Developer
Joined
Oct 10, 2007
Messages
2,890
Reaction score
458
Location
Texas
Lua:
function removePlayerItems(cid)
   for _, slot in ipairs({1,2,3,4,5,6,7,8,9,10}) do
      if getPlayerSlotItem(cid, slot).uid > 0 then
         doRemoveItem(getPlayerSlotItem(cid, slot).uid)
      end
   end
return true
end

Uses: mainly just because I needed it..uhm maybe for rooking system...being a dick to your players...I dunno.
 
Code:
function removePlayerItems(cid)
	for i = CONST_SLOT_FIRST, CONST_SLOT_LAST do
		local fgets = getPlayerSlotItem(cid, i).uid
		if fgets > 0 then
			doRemoveItem(fgets)
		end
	end
	return true
end
 
@up, good for release, im using it so it doesnt take backpack away.
 
Advanced maybe?

What about a talkaction "/remove xxxx"

I'm not 100% familiar with new commands or anything since i haven't been
around tibia or developing for about a year and a half but isn't there
functions to search house storage, player storage, and depot storage?

this would be useful as: player charges back money (item has unique id when purchased)

then you "/remove xxxx" and it searches through and then removes the item
via the @ up command..

Just a thought.. starting my own server soon (for dev'ing purposes only, not an OT)
and going to try and learn LUA all over again..
 
If it has UID, then doRemoveItem(UID goes here) can be used :p
 
Back
Top