Also, I think the code you have for the following won't have the effect you want.
Code:
if($text=~/I will gather materials/i && $class eq "Ranger"){
quest::say('Take this pack. Go to Kaladim, find Trantor Everhot and ask for dwarven wire. Then go to Freeport to meet Jyle Windshot. Search the inns for him and ask him for treant wood. Then, collect some spiderling silk from spiderlings and finally, in Steamfont, we have the permission of the gnomes to use any micro servos we find while destroying rogue spiders. Combine them all and return the pack to me.');
quest::summonitem(17367);
} else {
quest::say("Faydark's Champions cannot call you foe. but you have yet to earn our trust.");
}
I believe you need to encase the else in with the first part like this:
Code:
if($text=~/I will gather materials/i && $class eq "Ranger") {{
quest::say("Take this pack. Go to Kaladim, find Trantor Everhot and ask for dwarven wire. Then go to Freeport to meet Jyle Windshot. Search the inns for him and ask him for treant wood. Then, collect some spiderling silk from spiderlings and finally, in Steamfont, we have the permission of the gnomes to use any micro servos we find while destroying rogue spiders. Combine them all and return the pack to me.");
quest::summonitem(17367);
} else {
quest::say("Faydark's Champions cannot call you foe, but you have yet to earn our trust.");
}}
I don't know for sure if that will even work as you want, so you might have to mess around with it. But I am pretty sure that the way you have it is wrong.