ChazyTheBest/TrinityCore — comment on commit 9a9f1642989d6dc53196a72eddec405c7803430e
File:  line 0
By Faelon:

probably easiest way is to remove the ELSE before all lines of "CanLearn" and add the line "canLearn" to condition in your cases...example :
case 4732: //Randal Hunter

if (player->GetReputationRank(72) != REP_EXALTED && race != RACE_HUMAN)
{
player->SEND_GOSSIP_MENU(5855, creature->GetGUID());
canLearn = true;
}
break;

according to this example you need to change all the cases...
then the script should work.
the best way? probably SAI(smart AI ;) ) , but condidering that you would need to learn it and write it completly its easiest to use .cpp file which you already have