Hi there, i'm looking for a c++ script that will only allow a player to cast a spell (ID = 1515) if the player is the leader of the group. If the player is not in a group they should also be able to cast it.\
Here's a summary of what i want.
i tried doing it myself, i couldn't do it, the code is horribleCode:If (In_Group->GetGroup()) //Caster is in a group if (Leader->GetLeader() == CasterGUID()) //Caster is the leader of the group CastSpell; //Casts spell if player is leader else MessageCaster("Only the party leader may cast that spell"); else Castspell; //Casts spell if player is not in a group