GetCreatureTalentBest
Contents |
[edit] GetCreatureTalentBest(int, int, object)
Determines the best talent of a creature from a group of talents.
talent GetCreatureTalentBest( int nCategory, int nCRMax, object oCreature = OBJECT_SELF );
[edit] Parameters
nCategory
nCRMax
The maximum Challenge Rating of the talent.
oCreature
The creature that has the talent. (Default: OBJECT_SELF)
[edit] Description
Returns the best talent (i.e. closest to nCRMax without going over) of oCreature, within nCategory.
[edit] Remarks
It is possible for nCreature not to have any talent within the specified nCategory. In this case this function will return an invalid talent, akin to OBJECT_INVALID, but you must use the GetIsTalentValid() to test this.
Specifying nCategory 1 actually returns talents of category 11 and vice versa.
Returns invalid talent if the creature is immobilized (toolset speed setting, entangle effect or cutscene immobility).
If CR = -1 works like random, CR = 0 returns potions, scrolls and other items, spell has CR equal to (InnateLevel*2)-1, feats probably 0 as well
If nCategory = 0, returns anything without category, known feats (but not with 0 uses) and skills
[edit] Version
1.22
[edit] See Also
functions: | |
constants: |
author: Tom Cassiotis