Map of current effects and/or inventory?

cakyrespa

Member
My search-fu appears to be down, but I was trying to figure out how to get a list of all the effects currently on a character. Likewise, a list of things they have in their bag (but not closet). I'm also not sure if I can use the $effect table, since I would expect that to be treated as an aggregate, but neither count($slot) or "foreach slot in $slot" seems to work. In the undiscovered recipie script, I saw they went through the entire list basically with a:

Code:
foreach index from 1 upto 400

But that seems fairly inefficient. Does there happen to be something that lets you just get the current effects, or all the items a character has in their inventory?

Code:
int[item] inventory = my_bag();
(i.e. item + count)
Code:
int[effect] current_effects = my_currenteffects();
(i.e. effects + turns)

Or something to that result? I could go through the 1 upto X, but I'd rather find a more elegant version, if there is one.
 

Bale

Minion
Code:
effect [int] effmap;
foreach key in $effects[]
   if(have_effect(key)>0)
      effmap[count(effmap)] = key;
 
Top