Author Topic: Defining spell class used to cast?  (Read 311 times)

Legacy_BlueChicken2

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
Defining spell class used to cast?
« on: December 31, 2013, 02:57:44 pm »


               Hi,

Sorry if it is a dummy question, I started scripting not so long ago.

I noticed that int GetCasterLevel(
    object oCreature
); works for the current spell being casted, as explained in nwnlexicon.

I would like to know which is the class being used to cast the spell. This function returns the class level, but not the class itself. Is there a way to accomplish that, or at least have more information about the spell (name, arcane/divine, etc)?

I'm aiming to redefine the caster levels from my oPCs to include support to legendary levels and with some restrictions, classes like RDD and Palemaster.

Thanks!
               
               

               


                     Modifié par BlueChicken2, 31 décembre 2013 - 03:29 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Defining spell class used to cast?
« Reply #1 on: December 31, 2013, 03:16:18 pm »


               its the source class of the spell except obvious values (wiz,cler...) it returns CLASS_INVALID when the spell is cast from:
- item
- dm
- by a monster from special ability tab
- any other object that simply hasn't this spell and casting it assigned by a script

it return prestige class only when player casting some of that class spell-like feat such as summon undead
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Defining spell class used to cast?
« Reply #2 on: December 31, 2013, 03:28:52 pm »


               

ShaDoOoW wrote...

its the source class of the spell except obvious values (wiz,cler...) it returns CLASS_INVALID when the spell is cast from:
- item
- dm
- by a monster from special ability tab
- any other object that simply hasn't this spell and casting it assigned by a script

it return prestige class only when player casting some of that class spell-like feat such as summon undead


The function shadow is talking about is: 

int GetLastSpellCastClass()
               
               

               
            

Legacy_BlueChicken2

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
Defining spell class used to cast?
« Reply #3 on: December 31, 2013, 03:30:10 pm »


               Ahhh, I see. Thank you, that is what I was looking for :-)