He definitely responds to hails now, but both if statements fire off.
When you hail him he says, "Ah, $name..." followed directly by a "I knew you would be interested."
Even though I never said teach.
I copy pasted the code from above and made sure it all looked okay in George S. Quest Editor.
Code:
sub EVENT_SAY
{
if ($text = ~/hail/i)
{
if (($ulevel >= 4) && ($ulevel <= 7) && ($class eq "Wizard"))
{
quest::say ("Ah, $name, you have returned, and growing stronger. I can [teach] you more, but this time for a price.");
}
else
{
quest::say ("I have nothing to teach you at this time.");
}
}
if ($text = ~/teach/i)
{
if (($ulevel >= 4) && ($ulevel <= 7) && ($class eq "Wizard"))
{
quest::say ("I knew you would be interested! Simply return to me with an Untranslated Initiate's Tome from a monster in the Feerrott and 15 gold. Then you shall feel the embrace of knowledge.");
}
else
{
quest::say ("I have nothing to teach you at this time.");
}
}
}
sub EVENT_ITEM
{
if($class eq "Wizard")
{
if (plugin::check_handin(\%itemcount, 1079 => 1) && ($gold == 15))
{
quest::exp(15);
quest::summonitem(15036);
quest::summonitem(15377);
quest::summonitem(15378);
quest::summonitem(15230);
quest::summonitem(15376);
}
else
{
quest::say("I have no use for this item!");
plugin::return_items(\%itemcount);
}
else
{
quest::say("You are no Wizard, And I know a Wizard when I see one!");
plugin::return_items(\%itemcount);
}
}
Also, I think you were right with the gold. I have to figure out a way to seperate them into two statements, cause he still eats all items and doesnt give a reward for the right ones. Just trying to get the text figured out first though.
Thanks for the help so far!