Log in

View Full Version : Quest::say with languages


realityincarnate
05-09-2009, 02:27 PM
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:

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