Player Resource Consortium

 

Author Topic: Get is caster  (Read 3199 times)

0 Members and 1 Guest are viewing this topic.

November 12, 2011, 09:44:25 AM
  • Jr. Associate
  • **
  • Posts: 88
  • Karma: +0/-0
    • View Profile

Hi guys, im working on a script that needs to check whether a character has any casting class or not, i guess u guys already have some method for this so i was wondering if u recall them

id need script to tell if the character has full caster levels,
tell if character has semi-caster levels, say, ranger, paladin, etc.

thanks!


November 12, 2011, 10:49:27 AM
Reply #1
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

I would go with:
GetPrimaryArcaneClass(oPC) != CLASS_TYPE_INVALID || GetPrimaryDivineClass(oPC) != CLASS_TYPE_INVALID
or you could loop through character classes with GetClassByPosition() and than use GetIsArcaneClass()/GetIsDivineClass()

You'll find some interesting functions in prc_inc_castlvl.nss
Another function for calculating caster level is located in prc_inc_spells.nss (i don't remember where is it used though).


November 12, 2011, 11:05:53 AM
Reply #2
  • Jr. Associate
  • **
  • Posts: 88
  • Karma: +0/-0
    • View Profile

looks great xwarren, thx a lot!