thanks for the info Cavedude :)
|
Have you tried reading the little wiki page on Say Links?
http://www.eqemulator.net/wiki/wikka.php?wakka=SayLink That might help a bit. They are really easy to use. Once you get the first one working, it is extremely easy to get any extra ones added. |
...
Yes I did, but Cavedude pointed me in the right direction.
Updated and compiled the lastest Rev from the Trunk and saylinks are working now. Thanks guys for the help :) |
I think it would help a lot if there was at least an option to make the saylink not actually make the player say something. If you combined that with using $client->Message("(npc) says ...") instead of quest::say("..."), you could have completely private/spam-free interactions with npcs. It would also help a lot for my passcode script idea. (see below)
Also, I came up with a kind of cheap way in perl to make the text you click different from the text that is said: Code:
sub Saylink So for example you could do $saylink = Saylink("option1","[Ask about the recent attacks.]"); and it would make a saylink titled "[Ask about the recent attacks.]" and when you click it, it would make you say "option1". This can help in some cases but doesn't have much practical use until you get to more advanced stuff: Like my passcode script idea. -Passcode script idea- If saylinks didn't actually make the player say something, you could use them for private npc interactions. One example of this would be to set a passcode that is required in order for something to happen (being able to open a door, zone somewhere, summon an item, spawn a mob, enter an instance, etc). I tried doing this in game and it works fine. The script just creates saylinks for the digits (0-9) and then a saylink for resetting the passcode and a saylink for submitting the passcode. When you click one of the digits, it adds that digit to $passcode[$cid] which is an array of passcodes where the index is the character's id (This is so any number of players can use the script at the same time without messing each other up). When you click [reset passcode], it sets $passcode[$cid] back to empty and when you click [submit passcode], it checks $passcode[$cid] against $check, the variable that the correct passcode is stored in. If they match, access is granted and you can flag the player or do whatever you wanted to do. If they don't match, it denies them access. Code:
$check = 52213; # the passcode to check against: can also load it from a global/file/etc http://img268.imageshack.us/img268/4...example.th.jpg |
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. |
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 |
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 { |
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 |
Quote:
Code:
my $task = quest::saylink("What task is that?", 0, "task"); |
All times are GMT -4. The time now is 02:56 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.