EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=590)
-   -   Quest::say with languages (https://www.eqemulator.org/forums/showthread.php?t=28166)

realityincarnate 05-09-2009 02:27 PM

Quest::say with languages
 
I added the ability to have npcs speak in different languages to the quest::say function. The original function is unchanged, but a language number can now be added as a second parameter.

I also added a new quest variable, $langid, which is exported to the perl say events (EVENT_SAY, EVENT_AGGRO_SAY, and EVENT_PROXIMITY_SAY). This holds the number corresponding to the language spoken to trigger the event and can be used to make npcs only respond to things said in certain languages.

Example use:
Code:

sub EVENT_SAY {
  if ($langid == 9) {
    quest::say("Welcome to Rivervale, friend", 9);
  }
  else {
    quest::say("Don't speak your outsider tongue to me!");
  }
}



All times are GMT -4. The time now is 12:00 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.