Gives an amount of experience to the specified creature.
Specific creature to give experience to.
Amount of experience to give.
Gives nXpAmount to oCreature, adjusted by any multiclass penalty.
nXpAmount cannot be negative, however, SetXP() can make a PC lose experience to, for example, make a PC de-level to level 1.
This will always take into account anything that the default XP from killing creatures (settable in the module properties) would - thusly, multiclassing.
It reports a message to the PC getting the experience too, with the amount nXpAmount being given.
This function will not do anything to NPCs (even henchmen) or Dungeon Masters (they do not "level" at all). This begs the question why it is even oCreature at all, when oPC would be more appropriate and less confusing.
Also note that there are several functions which automatically give appropriate party experience and so on, check the lexicon under "Experience".
Bugs with Prestiege classes and multiclass experience points are/were fixed in 1.64. The problem with "You have gained 0 experience" appearing for any type of experience giving now has the message remove in the 1.64 patch.
// conversation action event.
// Get the PC
object oPC = GetPCSpeaker()
// Give the experience
author: Jody Fletcher, editor: Jasperre, additional contributor(s): Alec Usticke, Charles Feduke, Jasperre