Jump to content


Photo

ffxi.get_info() Zone


    2 replies to this topic

    #1 tdk1069

    tdk1069

      Member

    • Members
    • PipPip
    • 25 posts

      Posted 26 January 2014 - 08:21 AM

      hi there,

       

      Recently, Zone appears to be returning the ID of the zone not a string? 

       

      I was doing print(windower.ffxi.get_info().zone) to check for zone against a table of zone-strings, but now its getting a int, i tried printing zone_id and got nil.

       

      Is there a new label for zones in string format? This seemed to be working ok a day or two ago. Or am I missing something obvious (Very Likely, Lua is a learning curve for me)

       

      Thanks



      #2 Arcon

      Arcon

        Advanced Member

      • Windower Staff
      • 1189 posts
      • LocationMunich, Germany

      Posted 26 January 2014 - 10:05 AM

      Everything was switched to use the game internal IDs instead of strings. Aside from being more efficient, this helps internationalization, as it's language-agnostic.

       

      To get the english name from it, do this:

       

      res = require('resources')
       
      print(res.zones[windower.ffxi.get_info().zone].english)

       

      To get whatever your client's native language is (in case you wanna display it for the user) use this:

      res = require('resources')
       
      print(res.zones[windower.ffxi.get_info().zone].name)


      #3 tdk1069

      tdk1069

        Member

      • Members
      • PipPip
      • 25 posts

        Posted 26 January 2014 - 10:17 AM

        Believe it or not. I just logged back in here to say i figured that out.

         

        I just added res and used it, didnt think about other languages actually tbh so thanks for that !

         

        ta for speedyness !






        1 user(s) are reading this topic

        0 members, 1 guests, 0 anonymous users