GetLevelByClass()
Zephirius
Member Posts: 419
Trying to figure out what's wrong with the structure of this script. It won't isoloate by class?
Not sure why I can't single out the different classes...
void main() { object oPC = GetClickingObject(); if (!GetIsPC(oPC)) return; if ((GetLevelByClass(CLASS_TYPE_BARBARIAN, oPC)>0)|| (GetLevelByClass(CLASS_TYPE_DRUID, oPC)>0)|| (GetLevelByClass(CLASS_TYPE_RANGER, oPC)>0)) { // do cool stuff here } }
Not sure why I can't single out the different classes...
Post edited by Zephirius on
0
Comments
GetLevelByClass returns 0 for no or invalid class so you can just do which is a bit simpler (personally I prefer the operator on that side so it's easier to see...). But what you have should "do cool stuff" if oPC has at least one level on one of those classes.
Is it running from an event that has a ClickingObject? That is, is oPC valid?