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 05-10-2009, 12:44 AM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Bug Report: $langid always returns 0. We know it's exporting, at least, because it's returning 0 and not undef.

The speaking part is working flawlessly, however!
Reply With Quote
  #2  
Old 05-10-2009, 08:29 AM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default

Could you give me an example of how you're using $langid? It seems to work fine for me, but my only tests have been simple things like
Code:
quest::say("Your language id is $langid");
and
Code:
if($langid == 3) {
type things.
Reply With Quote
  #3  
Old 05-10-2009, 01:04 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

I'm really sorry. It was just as I was drifting to sleep last night that I realized, "Bonehead! I didn't give him anything to go on beyond 'It's not working'!"

At any rate, this is my little test .pl file:

felwithea/Exterminator_Valern.pl
Code:
# Exterminator Valern, felwithea

sub EVENT_SAY
{
  my $langName = (
    !defined($langid) ? 'undefined' :
    ($langid < 0) ? 'undefined' :
    ($langid > 26) ? 'undefined' :
    ('Common Tongue', 'Barbarian'   , 'Erudian'    , 'Elvish'      , 'Dark Elvish' , 'Dwarvish'   , 'Troll'   , 'Ogre'          , 'Gnomish',             # 00 - 08
     'Halfling'     , 'Thieves Cant', 'Old Erudian', 'Elder Elvish', 'Froglok'     , 'Goblin'     , 'Gnoll'   , 'Combine Tongue', 'Elder Teir`dal',      # 09 - 17
     'Lizardman'    , 'Orcish'      , 'Faerie'     , 'Dragon'      , 'Elder Dragon', 'Dark Speech', 'Vah Shir', 'Unknown1'      , 'Unknown2')[$langid]); # 18 - 26

  quest::say("Hail, $name! You're speaking $langName ( $langid )!", 3);
}
And this is what I get:

Code:
Current Language is Elvish. (2)
You say, 'Hail, Exterminator Valern'
Exterminator Valern says, in Elvish, 'Hail, Palren! You're speaking Common Tongue ( 0 )!'
Current Language is Elder Elvish. (4)
You say, 'Hail, Exterminator Valern'
Exterminator Valern says, in Elvish, 'Hail, Palren! You're speaking Common Tongue ( 0 )!'
Current Language is Common Tongue. (1)
You say, 'Hail, Exterminator Valern'
Exterminator Valern says, in Elvish, 'Hail, Palren! You're speaking Common Tongue ( 0 )!'
I tried with both the SoF and Titanium client, in case it was an SoF packet thing. Sorry again for the lack of information earlier!

I can try downloading and compiling the most recent rev and trying again. I believe it was Rev488 that I compiled for this run.

- Shendare
Reply With Quote
  #4  
Old 05-10-2009, 01:38 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Strangely, with Rev492 $langid is now returning 3.

Code:
Welcome to EverQuest!
You have entered Northern Felwithe.
You say, 'Hail, Exterminator Valern'
Exterminator Valern says, in Elvish, 'Hail, Palren! You're speaking Elvish ( 3 )!'
Current Language is Common Tongue. (1)
You say, 'Hail, Exterminator Valern'
Exterminator Valern says, in Elvish, 'Hail, Palren! You're speaking Elvish ( 3 )!'
Current Language is Elvish. (2)
You say, 'Hail, Exterminator Valern'
Exterminator Valern says, in Elvish, 'Hail, Palren! You're speaking Elvish ( 3 )!'
You say, '#reloadqst'
Clearing quest memory cache.
Current Language is Elder Elvish. (4)
You say, 'Hail, Exterminator Valern'
Exterminator Valern says, in Elvish, 'Hail, Palren! You're speaking Elvish ( 3 )!'
Changing the NPC's spoken language didn't change the $langid behavior, either.
Reply With Quote
  #5  
Old 05-10-2009, 02:10 PM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default

I'm glad you included the full output like that. I don't know if I would have ever figured out what was going on without seeing the "Current Language is..." text.

So here's what I've found so far: if you change the language by right clicking on the main chat box and selecting a language, everything works fine. But if you use the /language command (which I forgot existed), it doesn't seem to actually change the language (even though it does update it in the select language box).

I'll try to figure out what's going on with /language; hopefully it'll be something simple and I'll be able to get a fix out tonight or tomorrow.
Reply With Quote
  #6  
Old 05-10-2009, 02:25 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

So I've been tripped up by an obscure problem with the /language command! Good catch!

I did some testing and it does appear that the /language command is not being received or processed on the server.

The client is acting as though it's working (it lists the changed value with /lang sans argument and even shows the correct language highlighted in the right-click menu), but the server never sees the change.

The server keeps acting as though you're speaking the old language, until you zone, at which time the server gets updated properly, and the NPC recognizes the new language.
Reply With Quote
  #7  
Old 05-10-2009, 09:58 PM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default

I spent a little bit of time looking at the /language issue and, to be perfectly honest, I'm pretty confused.

The language number and skill is contained in the packet of each message sent, so that's where all the code currently grabs the language id from. For whatever reason, when you use /language it doesn't change the data that the client sends, but using the right click method does.

My first thought was that there was a "default" language value stored someplace on the server, and that /language was supposed to change that rather than updating the value sent in each packet. But the client doesn't seem to send anything different to the server when you use the command, so I don't know where it would get the information. The fact that it changes after zoning just makes it more confusing.

Anyway, with the weekend ending, I probably won't get to look at this again for a little bit, but I'd be interested to know if anyone has any idea what it's doing.
Reply With Quote
Reply

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 10:21 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