Get a given creature's experience.
Returns oCreature's experience points (XP).
Only player characters (PC's) can have experience. Anything else returns 0, and of course a newly created PC will also return 0. Dungeon masters may return different values if leveled up outside the DM client by moving them into the local vault, then back into the dm valut.
One use for this function is if you want to take XP away from a PC. GiveXPToCreature doesn't work with negative amounts of XP, so you'll first have to calculate the XP the PC should have, then set it with SetXP. See code sample below for a wrapper function that can be used to both give and take XP from a PC.
author: Kristian Markon, editor: Jasperre