Here is an update. Yea yea. I can't help myself.
Anyway...
I added a code to check if there is a target cause that was causing a crash and I also made it where the chanter will stop casting and cast AoE mez because if you are telling the chanter to cast this spell then you want it now or people will probably die.
Code:
// AoE Mez
if(!strcasecmp(sep->arg[1], "aoemez")) {
Mob *mezzer = NULL;
Mob *target = c->GetTarget();
bool hasmezzer = false;
if(c->IsGrouped())
{
Group *g = c->GetGroup();
if(g) {
for(int i=0; i<MAX_GROUP_MEMBERS; i++)
{
if(g->members[i] && g->members[i]->IsBot() && (g->members[i]->GetClass() == ENCHANTER))
{
hasmezzer = true;
mezzer = g->members[i];
}
}
if(!hasmezzer) {
c->Message(15, "You must have an Enchanter in your group.");
}
}
}
if((hasmezzer)&&(!target == NULL)) {
if (c->GetLevel() <= 15) {
mezzer->Say("I need to be level 16 or higher for this...");
}
else if ((c->GetLevel() >= 16) && (c->GetLevel() <= 51)) {
mezzer->Say("Casting Mesmerization...");
if(mezzer->IsCasting()){
mezzer->InterruptSpell();
}
mezzer->CastSpell(307, target->GetID(), 1, -1, -1);
}
else if ((c->GetLevel() >= 52) && (c->GetLevel() <= 64)) {
mezzer->Say("Casting Fascination...");
if(mezzer->IsCasting()){
mezzer->InterruptSpell();
}
mezzer->CastSpell(1690, target->GetID(), 1, -1, -1);
}
else if ((c->GetLevel() >= 65) && (c->GetLevel() <= 68)) {
mezzer->Say("Casting Bliss of the Nihil...");
if(mezzer->IsCasting()){
mezzer->InterruptSpell();
}
mezzer->CastSpell(4878, target->GetID(), 1, -1, -1);
}
else if ((c->GetLevel() >= 69) && (c->GetLevel() <= 70)) {
mezzer->Say("Casting Wake of Felicity...");
if(mezzer->IsCasting()){
mezzer->InterruptSpell();
}
mezzer->CastSpell(5511, target->GetID(), 1, -1, -1);
}
}
return;
}