Technically, it should have been "$class eq 'Warrior'", not "$class == 'Warrior'", but I could never get it to work that way for some reason. My best guess is that it is automatically replacing the class name with the number. If so, then I don't see any reason why using the numbers wouldn't work. It might be a bit harder to reference what is going on in your scripts though if you do.
The reason I mentioned the new code I am using is because checking for which class it is should not have to be done with an array, since $class already does that. You just have to do things in the right order for them to work properly. It can make scripts much easier to manage. I am probably going to try to work up some more similar variations to the script above that I just posted. I will try to get one up that also has arrays for turn ins. It should make dealing with armor quests or epic quests considerably cleaner and much less scripting.
|