Delete item by name/id?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
attackspeedzero
Posts: 28
Joined: Sat Mar 02, 2013 6:24 pm

Delete item by name/id?

#1 Post by attackspeedzero »

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!
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Delete item by name/id?

#2 Post by lisa »

Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
attackspeedzero
Posts: 28
Joined: Sat Mar 02, 2013 6:24 pm

Re: Delete item by name/id?

#3 Post by attackspeedzero »

Thanks! That makes things much easier.
User avatar
attackspeedzero
Posts: 28
Joined: Sat Mar 02, 2013 6:24 pm

Re: Delete item by name/id?

#4 Post by attackspeedzero »

Code: Select all

inventory:deleteItemInSlot(slot) 
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!
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Delete item by name/id?

#5 Post by lisa »

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
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Post Reply