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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 09-29-2005, 09:22 AM
Belfedia
Demi-God
 
Join Date: Jan 2005
Posts: 1,109
Default I want quest in english but other languages also

Just a simple question about quests.
All quest are in the Quests directory, but i search how i can localise the quest. After you can choose your language and the quest answer with this language.
Anyone have a perl idea for make that plz ?
__________________
__________________________________________________ _____________________________________
I speak english like a spanish cow..., I speak spanish like a english pudding...
But I try to speak good french !!! (Non au langage SMS sur forum)
http://eqfroggy.new.fr : Froggy French Server Website.
Reply With Quote
  #2  
Old 09-29-2005, 10:57 AM
sdabbs65
Dragon
 
Join Date: Dec 2003
Location: Earth
Posts: 818
Default ?

Quote:
Originally Posted by Belfedia
Just a simple question about quests.
All quest are in the Quests directory, but i search how i can localise the quest. After you can choose your language and the quest answer with this language.
Anyone have a perl idea for make that plz ?
dunno maybe babblefish.com can help you.
__________________
hosting Eqemu/Runuo/wow Emulators.

www.cheaterz.info
Reply With Quote
  #3  
Old 09-29-2005, 11:03 AM
Belfedia
Demi-God
 
Join Date: Jan 2005
Posts: 1,109
Default

My english is very poor (sorry snif)
I don't search translate web site but one idea for my player
A perl code for choose if the player have quest in english or other language
I search how localised the quest
__________________
__________________________________________________ _____________________________________
I speak english like a spanish cow..., I speak spanish like a english pudding...
But I try to speak good french !!! (Non au langage SMS sur forum)
http://eqfroggy.new.fr : Froggy French Server Website.
Reply With Quote
  #4  
Old 09-29-2005, 07:21 PM
deazone
Sarnak
 
Join Date: Jun 2005
Posts: 37
Default

That is a cool idea. Perhaps a new function to check a language field in your database and return the result to perl. And a command in commands.cpp/.h to set that field in the database.

Good luck

Last edited by deazone; 09-30-2005 at 03:34 AM..
Reply With Quote
  #5  
Old 09-30-2005, 07:30 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Well, you could just add a player command ( a # comamand, like #locale [fr/en/es/etc]) that allows you to change your locale by manually adding a quest global, and then in your quests just have like..

if ($locale eq 'fr')
{
french..
}
elsif ($locale eq 'en')
{
english..
}
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #6  
Old 10-09-2005, 08:26 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Hey Belfedia, if you tell me what version of EQEmu you're using I'd be happy to write it up really quick. Send me an email: admin@awhiteflame.net.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #7  
Old 10-09-2005, 06:18 PM
Belfedia-1
Fire Beetle
 
Join Date: Oct 2005
Posts: 4
Default

Quote:
Originally Posted by Cisyouc
Hey Belfedia, if you tell me what version of EQEmu you're using I'd be happy to write it up really quick. Send me an email: admin@awhiteflame.net.
I use Eqemu 0.6.2 DR1 last version from CVS on a linux box now
Any help is welcome for write this locale stuff
__________________
My account is stuck,
This is my help account :(
Reply With Quote
  #8  
Old 10-10-2005, 02:46 AM
Belfedia
Demi-God
 
Join Date: Jan 2005
Posts: 1,109
Default

I understand how that work
I need to find a C++ coder for the command #locale now
thks all for help.
__________________
__________________________________________________ _____________________________________
I speak english like a spanish cow..., I speak spanish like a english pudding...
But I try to speak good french !!! (Non au langage SMS sur forum)
http://eqfroggy.new.fr : Froggy French Server Website.
Reply With Quote
  #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
  #10  
Old 10-10-2005, 09:00 PM
Belfedia
Demi-God
 
Join Date: Jan 2005
Posts: 1,109
Default

Thanks i try it

Quote:
command_add("locale", "Set your locale");
need more : command_add (name , desc, access)
what is acces ?
__________________
__________________________________________________ _____________________________________
I speak english like a spanish cow..., I speak spanish like a english pudding...
But I try to speak good french !!! (Non au langage SMS sur forum)
http://eqfroggy.new.fr : Froggy French Server Website.

Last edited by Belfedia; 10-11-2005 at 05:51 AM..
Reply With Quote
  #11  
Old 10-11-2005, 01:40 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

status required to use it, pass 0
Reply With Quote
  #12  
Old 10-11-2005, 06:25 AM
Belfedia
Demi-God
 
Join Date: Jan 2005
Posts: 1,109
Default

Nice, but say i'm use a unitialized value in concatenation (.) or string in commands.pl

Code:
open(F, ">/home/eqemu/locales/$name");
Program don't know $name i think ?
i try to add a print "$name";
and i have same error on it.
__________________
__________________________________________________ _____________________________________
I speak english like a spanish cow..., I speak spanish like a english pudding...
But I try to speak good french !!! (Non au langage SMS sur forum)
http://eqfroggy.new.fr : Froggy French Server Website.

Last edited by Belfedia; 10-11-2005 at 02:45 PM..
Reply With Quote
  #13  
Old 10-11-2005, 11:33 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

oops..

add
Code:
my $name = $client->GetName();
Reply With Quote
  #14  
Old 10-12-2005, 03:19 AM
Belfedia
Demi-God
 
Join Date: Jan 2005
Posts: 1,109
Default

Thats work very fine !!!

MANY thanks (one more !!!)
Now i try to find a (book/tradeskills) solution
__________________
__________________________________________________ _____________________________________
I speak english like a spanish cow..., I speak spanish like a english pudding...
But I try to speak good french !!! (Non au langage SMS sur forum)
http://eqfroggy.new.fr : Froggy French Server Website.
Reply With Quote
Reply


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 04:15 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3