Yeah, I don't quite understand how they interact either yet, which is why I posted this lol. But, if we can get it working, I imagine you would use Quest Objects and make functions to use them to replace stuff like quest::say(). For example, you might make something like this:
TestNPC.pl
Code:
require "./home/eqemu/server/quests/perl_functions.pl";
Sub EVENT_SAY {
if ($text =~/hail/i)
{
&NPCWhisper("Hello, $name!"); #Call the function from the perl_functions.pl file
}
}
perl_functions.pl
Code:
sub NPCWhisper {
my $TextColor = 7; #Set the Text Color for the Message (this one is beige)
my $MyMessage = $_[0]; #Use the Message Supplied to the Function - "$_[0]" means to use the first argument given
if ($client) {
$client->Message($TextColor, "-"); #Spacer between Text messages to make them easier to read
my $NPCName = $npc->GetCleanName(); #Get the clean name of the NPC sending the message
$client->Message($TextColor, "$NPCName whispers, '$MyMessage'"); #Send a message to the player simulating a whisper directly to them from the NPC
}
}