This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
lua:ch:inventory [2014/12/24 04:43] aethyn created |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | Returns a table of [[:triggers:lua:obj:members|OBJ]]s. | ||
| - | |||
| - | Example: | ||
| - | |||
| - | Looping through a PCs inventory to look for an item with vnum 100: | ||
| - | |||
| - | ''for _,object in ipairs(ch.inventory) do'' | ||
| - | |||
| - | ''if object.vnum == 100 then'' | ||
| - | |||
| - | ''-- do something'' | ||
| - | |||
| - | ''end'' | ||
| - | |||
| - | ''end'' | ||