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
  #1  
Old 06-11-2009, 05:19 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

That passcode idea is pretty neat. I am not sure of any places where I would use something like that, but I always love to see innovative ideas to push the limits of what we can do with the emulator systems available.

As for making the saylinks so they don't actually say what they click, that isn't too hard. I think we can just do the parse of the text right in the place were we currently send the message to the NPC. Though, it might take a bit of extra code to ensure that it doesn't cause other issues. Using the parse at that point is exactly how I originally tested saylinks (mentioned at the beginning of this thread), so I know it works.

I have been thinking about adding in a rule to allow admins to decide whether they want their saylinks to cause the players to actually say the message or not. But, another route might be to add in a second variation to the command. Maybe something like "ssaylink()" for Silent Saylink, or something to that effect. Then, one could chose either type for any scenario instead of having to chose 1 or the other for the entire server. The coding is already all there, so it would mostly just be adding the new command and the parse code. I think to differentiate between the 2 types of saylinks, we could just have the silent saylinks set their item ID to a much higher range. Since normal saylinks are set in the 500k range, the silent ones could be set to use the 1mil range or something like that.

I will try to look into getting this change added sometime soon, but I have a lot on my plate atm as usual, so no ETA. Glad to see people using the saylink system. I think it is a pretty neat little feature.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
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
  #3  
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
  #4  
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
  #5  
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

Thread Tools
Display Modes

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 06:26 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