Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 03-06-2012, 08:31 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

I was thinking something like this (untested):

Code:
my $GuildName = '';
my $GuildLeader = '';

sub EVENT_TIMER {
  quest::stoptimer("cooldown");
  quest::say("$GuildLeader, just come back when you think of a good [name] for your guild.");
  $GuildName = '';
  $GuildLeader = '';
}

sub EVENT_SAY {
  if (defined($qglobals{newguild}) && ($qglobals{newguild} == 1)) {
    if (($GuildLeader eq '') || ($GuildLeader eq $name)) {
      if ($text =~ /name/i) {
        quest::say("Ok, $name. What is the name of the guild you would like to create?");
        $GuildLeader = $name;
        quest::settimer("cooldown", 60);
      }
      elsif (($text =~ /^yes$/i) && ($GuildLeader eq $name)) {
        quest::say("Ok, $name. Your guild will be called $GuildName. Congratulations!");
        quest::CreateGuild(guild_name, leader);
        quest::ding();
        quest::delglobal("newguild");
        quest::stoptimer("cooldown");
        $GuildName = '';
        $GuildLeader = '';
      }
      elsif (($text =~ /^no$/i) && ($GuildLeader eq $name)) {
        quest::say("Ok, $name. Your guild will not be called $GuildName. Just let me know when you come up with a good [name] for your guild.");
        $GuildName = '';
        $GuildLeader = '';
      }
      else {
        $GuildName = $text;
        quest::say("Ok, $name. You want your guild to be called $GuildName? You must tell me 'yes' or 'no' to continue.");
      }
    }
    else {
      quest::say("Sorry, $name. Let me finish with $GuildLeader first.");
    }
  }
  else {
    if ($text =~ /hail/i) {
      quest::say("Hello there, I'm XYZ the Headmaster for Guild Creation. Are you intrested in creating a [guild]?");
    }
    elsif ($text =~ /guild/i) {
      quest::say("I'd like to help you create a guild, however I'm going to need a few items to make this happen. Bring me the feather of the Mighty Griffon Grimfeather from North Karana and Paw of Fippy Darkpaw from Qeynos.");
    }
  }
}

sub EVENT_ITEM {
  if (plugin::check_handin(\%itemcount, 19113 => 1, 16498 => 1)) {
    quest::emote("cheers enthusiastically.");
    quest::say("Excellent work, $name. I can now help you to create a guild. Let me know when you would like to [name] your guild.");
    quest::setglobal("newguild", 0, 1, "F");
  }
  else {
    quest::say("I do not need this.");
    plugin::return_items(\%itemcount);
  }
}
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:50 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3