ID:178914
 
Ok, I have an object called Thunder which is a spell,
I have a statpanel called ("Spells/Items",usr.contents) which holds Items AND spells, you buy spells and they go in usr.contents, Items also go in usr.contents! can someone help me so I may have a statpanel for Spells and a seperate one for Items? I would really appreciate it.
I assume you want items and spells both in usr.contents so that you can access their verbs with "set src in usr". There is no reason that you can't add them to extra lists also. :) Things can only be in one contents list, but they may be in as many of our custom lists as we like.

mob
var/list/spells = list()

Entered(O)
/* this method assumes you use Move() to get items.
when something is Move()ed into a mob's contents
mob/Entered() is automatically called. */

..() // do any other Entered() routines you've defined

if(istype(O,/obj/spell) // if a spell just entered the mob's inventory
spells += O // add it to the spells list. It is still in contents too!

Exited(O)
/* When something is Move()ed out of mob's contents
mob/Exited() is automatically called. */

..() // do any other Exited() routines you've defined

if(istype(O,/obj/spell) // if a spell just left the mob's inventory
spells -= O // remove it from the spells list

Stat()
statpanel("Items",(contents-spells))
// (contents-spells) means a list of anything in the contents list that is not in the spells list
statpanel("Spells",spells)