EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Custom (https://www.eqemulator.org/forums/forumdisplay.php?f=671)
-   -   Guild Invite Bot (https://www.eqemulator.org/forums/showthread.php?t=30010)

cubber 11-21-2009 01:32 AM

Guild Invite Bot
 
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!

cubber 11-28-2009 12:28 PM

This script could easily be modified to support multiple guilds on the server.

instead of using this line for a one guild setup:

Code:

elsif ($text=~/Interested/i)
                {
                        quest::setguild(1,0);
                        quest::say("Welcome to the guild $name!");
                }

You could modify it for each guild like so:

Code:


elsif ($text=~/Guild1/i)
                {
                        quest::setguild(1,0);
                        quest::say("Welcome to the guild $name!");
                }

elsif ($text=~/Guild2/i)
                {
                        quest::setguild(2,0);
                        quest::say("Welcome to the guild $name!");
                }

elsif ($text=~/Guild3/i)
                {
                        quest::setguild(3,0);
                        quest::say("Welcome to the guild $name!");
                }

and so on... Of course you would have to change the intro text to support the new guild names.

the quest::setguild(x,y); command uses the "x" value as the guild ID on the server, which you can find with the GM command #guilds list. The "y" value is the guild status so 0 is member, 1 is officer. You probably want to keep the "y" value as 0 since the bot is auto-inviting members.


All times are GMT -4. The time now is 02:35 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.