Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #46  
Old 06-11-2009, 05:27 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

I like the idea of having the option for silent as well as visible saylink responses.

If one is not using silent saylinks, I also like the idea of being able to specify the text being said by the player when they click on the link, instead of making it always the text of the link itself.

"Hail, Player! Would you be interested in helping me with this [task]?"

*click [task]* "What task is that?"

...as opposed to:

*click [task]* "task"

- Shendare
Reply With Quote
  #47  
Old 06-11-2009, 06:30 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Sion already mentioned a way to do that with Perl, but I do agree that it would be nice to have the option to do it directly with the command.

The only reason to have a table for saylinks is so the server knows what phrase to associate with whichever saylink is being clicked. So, basically whatever gets put into that table is what the server will use to parse (or have the client /say) when the link is clicked.

This means that we should be able to set a second argument for the command that is optional. If the second argument is set, then that second phrase/argument would be the one that appears in the actual link in the text of the NPC. I am not that great with coding optional arguments for quest commands yet, but I can maybe try to add that in as well at some point. Again, most of the code needed for this to work should already be there. Basically, the saylink() command would just need to check for a second argument and if one exists, it uses that argument for creating the actual itemlink, but it still does the query of the saylink table based on the first argument.

If this functionality was added, it should work something like this:
Code:
sub EVENT_SAY {

my $test = quest::saylink(""Yes, I would like to test a saylink","test a saylink");
my $click = quest::saylink("I need to click something?","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!");
  }

}
Where the values put into the saylink table (as well as what the character would appear to say when clicking the link) would be the first argument and the values in the second argument would be only for the text that shows up in the link itself when the NPC says it.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #48  
Old 07-19-2009, 06:53 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I added a new bool option for the saylink command to allow them to be silent. More info can be found on the wiki page here about it:

http://www.eqemulator.net/wiki/wikka.php?wakka=SayLink
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #49  
Old 07-21-2009, 09:28 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Quote:
Originally Posted by Shendare View Post
I like the idea of having the option for silent as well as visible saylink responses.

If one is not using silent saylinks, I also like the idea of being able to specify the text being said by the player when they click on the link, instead of making it always the text of the link itself.

"Hail, Player! Would you be interested in helping me with this [task]?"

*click [task]* "What task is that?"

...as opposed to:

*click [task]* "task"

- Shendare
I updated Saylinks again so this is now an option. If you wanted to set a saylink to do what Shendare is showing in this quote, you would do this:

Code:
my $task = quest::saylink("What task is that?", 0, "task");

quest::say("Hail, $name! Would you be interested in helping me with this [$task]?");
The 0 in the middle is the bool for being silent or not, so when making different responses from what the link shows, it only makes sense to set it as 0 so the player says the message.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply


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 05:46 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3