I have a script similar to that. I turned my girlfriend into an NPC vendor on our server, and have her use custom sayings for everyone on our server (all friends) who come up to her:
Code:
sub EVENT_SAY {
if($text =~ /hail/i && $name =~ /Greenmistlolz/) {
quest::say("You're so scaly! <3");
}
elsif($text =~ /hail/i && $name =~ /Tissirja/) {
quest::say("My favorite cleric! <3");
}
elsif($text =~ /hail/i && $name =~ /Chinc/) {
quest::say("Haha. You're hung like a five year old. Go back to playing Starcraft, we all hate you.");
}
elsif($text =~ /hail/i && $name =~ /Mabey/) {
quest::say("Either step away from me, or I'm going to Rambo your throat.");
}
elsif($text =~ /hail/i && $name =~ /Snacko/) {
quest::say("You're a tiny troll Jesus. Best shaman evar <3'");
}
elsif($text =~ /hail/i && $name =~ /Panthro/) {
quest::say("A black panther? You effing racist.");
}
elsif($text =~ /hail/i) {
quest::say("Welcome to the Order of Hasson server, how can I help you today?");
}
}
sub EVENT_ITEM {
if(($platinum==1) && ($gold==3) && ($silver==3) && ($copper==7)) {
quest::selfcast(6593);
quest::say("Hehe, enjoy!");
}
else{
quest::say("What the hell am I supposed to do with that? Take it back. And get away from me, freak!");
plugin::return_items(\%itemcount);
}
}
#Submitted by Jim Mills
Edited out a few of the more harshly worded ones :P
She has a basic hail that works for anyone, and then customized ones that work for anyone with a specific name. Hope this gets you on the right track.