I would suggest you simplify that script considerably then add in debugging so you can see where it is failing. You can just add in quest::say("Class Check Passed"); and lines like that after each if statement so you can see how far your script is making it, then figure out why it doesn't do what you expect.
Right off the bat, I see a few issues. First off, you use Necro as a class name and that is incorrect. It should be Necromancer. You also use == to compare strings and that is wrong as well. You should do something more like this:
Code:
if ($myclass eq "Necromancer" || $myclass eq "Enchanter" || $myclass eq "Magician" || $myclass eq "Wizard")
Also, I see you are quoting numbers in your command arguments. This will probably work, but is not required. You can just do it like this:
Code:
quest::setskill(46, 100);
Instead of:
Code:
quest::setskill("46",100);