This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
lua:ch:inventory [2014/12/24 04:57] aethyn |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Returns a table of [[:lua:obj:members|OBJ]]s. | ||
- | |||
- | Example: | ||
- | |||
- | Loop through a PC's inventory and remove items with vnum 100 | ||
- | |||
- | <code lua>for _,object in ipairs(ch.inventory) do | ||
- | |||
- | if object.vnum == 100 then | ||
- | |||
- | object:destroy() | ||
- | |||
- | end | ||
- | |||
- | end | ||
- | </code> | ||