Thread: Say Links
View Single Post
  #30  
Old 05-21-2009, 05:26 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I did some more testing and found that the code I had needed a couple other tweaks and stuff to prevent possible crashes, but it looks to be working perfectly now. I added this to the SVN. All you need to do is add the required SQL and it should work just fine.

To use the new quest function, simply follow this example:
Code:
sub EVENT_SAY {

my $test = quest::saylink("test a saylink");
my $click = quest::saylink("click");
my $say = quest::saylink("say");

  if($text=~/hail/i)
  {
    quest::say("Hello, $name.  Would you like to [$test]? If so, simply [$click] on the pink text and wait for my response.  You may also simply /$say the message like normal if you prefer that method instead.");
  }

  if($text=~/test a saylink/i)
  {
    quest::say("The test was a huge success!  Well done :P");
  }

  if($text=~/click/i)
  {
    quest::say("Yes, click the pink text exactly like you just did!");
  }

  if($text=~/^say$/i)
  {
    quest::say("Saying or clicking the text is the same thing to me!");
  }

}
It's pretty cool if you ask me. Now let's see if EQLive shows up with something similar soon :p

I just added quest::saylink() to the wiki and went ahead and wrote a quick wiki page for using it as well:
http://www.eqemulator.net/wiki/wikka.php?wakka=SayLink

I have some say links setup on Storm Haven if anyone wants to log in to check them out. I have them in both the Titanium and SoF starting areas. The areas aren't full of say links yet, but the nearby NPCs from where you start will have them.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 05-21-2009 at 03:15 PM..
Reply With Quote