View Single Post
  #3  
Old 05-07-2009, 09:49 AM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Thanks for the reply!

Yeah, when I couldn't find any built-in support for NPC languages after searching high and low, I had actually gone so far as to start putting together a full-on Perl-based speech scrambling system checking language skill and scrambling the text word by word based on (skill / 100) times word complexity based on each letter's frequency of use in English, ord() numeric hashes by each character for consistency instead of randomness, supporting different vocal sounds for different languages so each language would have its own distinct gibberish sound, etc. It was feeling pretty impressive!

Then I realized that if the NPC simply does a quest::say('Blah blah'), other players nearby who DO speak the language will get the scrambled message as well, even though it was only the player interacting with the NPC who didn't know the language (and vice-versa, those without the language could perfectly hear what the NPC said as long as someone else was talking to them).

So, I figured I'd use Client->Message, so that only the speaker got the language-based speech, but then everyone else around is going to be hearing a one-sided conversation, as though hearing someone talk on their cell phone. "Hail, NPC!" "What tasks?" "What Sword of Ultimate Power?"

So I thought maybe I could have the NPC check for all nearby players and do a skill check on each of them, sending a customized scrambled message to each one individually, but at that point I threw my hands up in the air and gave it up as a poor solution.

Even if I could manage to put it together somehow with the EntityList and Client classes and such, I'd basically be graduating from "a lot of work" to "completely reinventing the wheel on the Emu server's /say code" in order to do it, and it would probably take way too much server CPU power when you ended up with several dozen players interacting with NPCs, and just being near NPCs while others are interacting with them.

So, I came back to the forums hoping that either:

1) The functionality is already there, it's just not often used, so it isn't in the regular helpful tutorials and posts scattered around.

2) It's not there, but it shouldn't be too difficult to implement, and a Dev might be willing to look into it (related: is there any way to bribe a dev?).

But perhaps it would most likely end up being a third option.

3) Devs have their own tasks to work on. If you want the functionality added to the emulator then figure out SVN, check stuff out, and dig into the source code yourself to see what you can come up with.

The list ends up being in ascending order of how long it would likely end up taking to be able to get it working. LOL.

- Shendare
Reply With Quote