attackspeedzero
Posts: 28 Joined: Sat Mar 02, 2013 6:24 pm
#1
Post
by attackspeedzero » Sat Mar 02, 2013 6:34 pm
I'd love to know what function to use to delete items from my character's inventory either by ID or name.
inventory:deleteItemInSlot(slot)
Code: Select all
function CInventory:deleteItemInSlot(slot)
self.BagSlot[slot]:delete();
end
was the closest thing I could find but it doesn't seem to work, or maybe I'm calling it wrong.
Thanks in advance!
lisa
Posts: 8332 Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia
#2
Post
by lisa » Sat Mar 02, 2013 7:46 pm
attackspeedzero
Posts: 28 Joined: Sat Mar 02, 2013 6:24 pm
#4
Post
by attackspeedzero » Thu Mar 07, 2013 1:10 am
This actually does work, but I was calling it wrong. I didn't know that the player's inventory starts with 61 when I wrote the original post. I think 0-60 is reserved for the item shop bag or something.
This is great for sacking the newbie pet egg on my elf daily quest alts!
lisa
Posts: 8332 Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia
#5
Post
by lisa » Thu Mar 07, 2013 1:17 am
just use this to get rid of newbie pet.
Code: Select all
local pet = player:findNearestNameOrId(113199)
if pet then inventory:useItem(207051); end -- get rid of the annoying newbie pet