Here is a simple script I came up with to allow an NPC to invite players into a guild when they hail and talk to him. Good for small servers with one guild that holds all the players.
Code:
#############
#Written By : Cubber
#Quest Name: Guild Invite Bot
#Date: 11-21-2009
#################
sub EVENT_SAY
{
if($text=~/Hail/i)
{
quest::say("Hello there $name, would you like to join the [Guild]?");
}
elsif ($text=~/Guild/i)
{
quest::say("Ahh yes the Guild! It is the greatest guild in all the land...
All of the most revered adventures in Norrath join it! Besides the many benefits that being in a guild has to offer,
it also allows members to keep in touch with each other easily.");
quest::say("Tell me $race, are you [interested]?");
}
elsif ($text=~/Interested/i)
{
quest::setguild(1,0);
quest::say("Welcome to the guild $name!");
}
}
Enjoy!