Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 10-10-2005, 02:28 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

you should be able to do this entirely in perl...
the best way I can say to do it is this..
make a directory on your server named 'locales' somewhere, let the path be /home/eqemu/locales. Make it writeable by the user running eqemu.

use a perl command like (check this syntax, im winging it):
Code:
sub commands_init() {
  command_add("locale", "Set your locale", 0);
}

sub locale {
  my $loc = shift;
  if($loc eq "") {
    $client->Message(13, "You must specify a locale: en or fr");
    return;
  }
  my $name = $client->GetName();
  open(F, ">/home/eqemu/locales/$name");
  print F "$loc";
  close(F);
}
then make a plugin:
Code:
sub get_locale {
  my $name = shift;
  open(F, "</home/eqemu/locales/$name");
  my $loc = <F>;
  close(F);
  return($loc);
}

then you can write a quest like:
Code:
sub EVENT_SAY {
  my $locale = plugin::get_locale($name);
  if($locale eq 'en') {
    #....
  } else {#.....
  }
}
}
[/code]

Last edited by fathernitwit; 10-11-2005 at 07:33 PM..
Reply With Quote
 

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 07:45 AM.


 

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