Advertisement
Uissu

[X-TIBIA][FUNCTION] doRemoveItemByIdAndPos(itemid, pos[, cou

Feb 5th, 2012
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.35 KB | None | 0 0
  1. function doRemoveItemByIdAndPos(itemid, pos, count, limit) -- By Byerne XTibia
  2.     local itempos, c, max = pos, 0, limit or 255
  3.     for stackpos=1,max do
  4.         itempos.stackpos, i = stackpos, getThingFromPos(itempos)
  5.         if i.itemid == itemid then
  6.             doRemoveItem(i.uid, i.type)
  7.             c = c+1
  8.             if (count and count == c) then
  9.                 break
  10.             end
  11.         end
  12.     end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement