Jump to content

Scripting: Look at inventory


nephlm

Recommended Posts

Is there a script version of the console command showinventory?

 

bookshelves essentially hook the additem and removeitem events to keep a separate copy of the contents of the container. I'd like to be able to iterate over the contents of a container to see what it contains, but there doens't seem to be a native call to see what's in a container. This may not be possible since arrays can only have 128 items in it, while containers don't have any such limit that I'm aware.

 

So does anyone know of a way to see the contents of a container in a script?

Link to comment
Share on other sites

you can see if something has a particular type of item, but to keep complete track you have to make your own separate list somehow by hooking the events. Those who do keep track this way have to remove everything, then replace it and track each event as it's replaced.
Link to comment
Share on other sites

you can see if something has a particular type of item, but to keep complete track you have to make your own separate list somehow by hooking the events. Those who do keep track this way have to remove everything, then replace it and track each event as it's replaced.

 

Can you point me generally toward the calls that would tell if a container had an object of a certain type and how to remove everything. I only found calls to remove a specific form or ref.

 

Thanks.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...