Fethi Polat 1
Fethi Polat
xranzei 1
xranzei
Bvural41 1
Bvural41
kralhakan2009 1
kralhakan2009
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Vahsi Uzman 1
Vahsi Uzman
Cannn6161 1
Cannn6161
B 1
berione65
sen272 1
sen272
Mt2Hizmet 1
Mt2Hizmet
Hikaye Ekle
Reklam vermek için turkmmo@gmail.com
Kaynak ikonu

Multi Language System 2020-06-28

indirmek için izniniz yok
  • Konuyu başlatan Konuyu başlatan Rakancito
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 112
  • Görüntüleme Görüntüleme 25K
5.00 yıldız(lar) 1 Değerlendirme Değerlendirenler

ROHAN2 WORLD 1-120 TR TİPİ OFFICIAL YOHARA, BALATHOR VE AMON! 80. GÜNÜNDE! +10.000 ONLİNE! HİLE VE BOT %100 ENGELLİ HEMEN TIKLA!

Okay, well listen, this is how you feel about programming. Also, I tried for the quest but it does not translate
my quest test
Kod:
quest map_commerce begin
    state start begin
        when login or levelup with pc.level >= 30 begin
            if get_lang == 0 then
                set_state(information_fr)
            else
                set_state(information_en)
            end
        end
    end
    
    state information_fr begin
        when letter begin
            send_letter("La cité du commerce.")
        end

        when button or info begin
            ---                                                   l
            say("Afin de faciliter le commerce entre les royaumes,")
            say("une cité de commerce a été créée pour cet usage.")
            say("Tous les joueurs de chaque empire auront donc")
            say("juste à se téléporter là-bas pour créer leur")
            say("magasin ou bien faire leurs achats.")

            say("Voulez-vous y aller ?")

            local s=select("Oui", "Non")

            if 2==s then
                return

            elseif 1==s then
                ---                                                   l
                say("D'accord, je vous y envoie.")
                wait()
                pc.warp(610800,778000)
            end
        end
    end
    
    state information_en begin
        when letter begin
            send_letter("The city of commerce.")
        end

        when button or info begin
            ---                                                   l
            say("Afin de faciliter le commerce entre les royaumes,")
            say("une cité de commerce a été créée pour cet usage.")
            say("Tous les joueurs de chaque empire auront donc")
            say("juste à se téléporter là-bas pour créer leur")
            say("magasin ou bien faire leurs achats.")

            say("Voulez-vous y aller ?")

            local s=select("Oui", "Non")

            if 2==s then
                return

            elseif 1==s then
                ---                                                   l
                say("D'accord, je vous y envoie.")
                wait()
                pc.warp(610800,778000)
            end
        end
    end
end
i think no error, default language is FR = 0
and english language is EN = 1 in my source but with this quest i have only one language english, dont have other language, not translate
 
Okay, well listen, this is how you feel about programming. Also, I tried for the quest but it does not translate
my quest test
Kod:
quest map_commerce begin
    state start begin
        when login or levelup with pc.level >= 30 begin
            if get_lang == 0 then
                set_state(information_fr)
            else
                set_state(information_en)
            end
        end
    end
 
    state information_fr begin
        when letter begin
            send_letter("La cité du commerce.")
        end

        when button or info begin
            ---                                                   l
            say("Afin de faciliter le commerce entre les royaumes,")
            say("une cité de commerce a été créée pour cet usage.")
            say("Tous les joueurs de chaque empire auront donc")
            say("juste à se téléporter là-bas pour créer leur")
            say("magasin ou bien faire leurs achats.")

            say("Voulez-vous y aller ?")

            local s=select("Oui", "Non")

            if 2==s then
                return

            elseif 1==s then
                ---                                                   l
                say("D'accord, je vous y envoie.")
                wait()
                pc.warp(610800,778000)
            end
        end
    end
 
    state information_en begin
        when letter begin
            send_letter("The city of commerce.")
        end

        when button or info begin
            ---                                                   l
            say("Afin de faciliter le commerce entre les royaumes,")
            say("une cité de commerce a été créée pour cet usage.")
            say("Tous les joueurs de chaque empire auront donc")
            say("juste à se téléporter là-bas pour créer leur")
            say("magasin ou bien faire leurs achats.")

            say("Voulez-vous y aller ?")

            local s=select("Oui", "Non")

            if 2==s then
                return

            elseif 1==s then
                ---                                                   l
                say("D'accord, je vous y envoie.")
                wait()
                pc.warp(610800,778000)
            end
        end
    end
end
i think no error, default language is FR = 0
and english language is EN = 1 in my source but with this quest i have only one language english, dont have other language, not translate

First:

Search in questlua_global.cpp

int get_lang(lua_State* L)

and change lua_tonumber for lua_pushnumber

Second:

You need () in all function get_lang, for example this is a quest for test your lang:

Kod:
quest test_lang begin
    state start begin
        when login or levelup with pc.level >= 1 begin
            if get_lang() == 0 then
                chat("Your Lang is 0")
            elseif get_lang() == 1 then
                chat("Your Lang is 1")
            elseif get_lang() == 2 then
                chat("Your Lang is 2")
            elseif get_lang() == 3 then
                chat("Your Lang is 3")
            elseif get_lang() == 4 then
                chat("Your Lang is 4")
            elseif get_lang() == 5 then
                chat("Your Lang is 5")
            elseif get_lang() == 6 then
                chat("Your Lang is 6")
            else
                chat("lang: "..get_lang().." not found")
            end
        end
    end
end
 
No flag on the character
e7c367e46ed2e.png

@Rakancito
@Loki70
 
Son düzenleme:
First:

Search in questlua_global.cpp

int get_lang(lua_State* L)

and change lua_tonumber for lua_pushnumber

Second:

You need () in all function get_lang, for example this is a quest for test your lang:

Kod:
quest test_lang begin
    state start begin
        when login or levelup with pc.level >= 1 begin
            if get_lang() == 0 then
                chat("Your Lang is 0")
            elseif get_lang() == 1 then
                chat("Your Lang is 1")
            elseif get_lang() == 2 then
                chat("Your Lang is 2")
            elseif get_lang() == 3 then
                chat("Your Lang is 3")
            elseif get_lang() == 4 then
                chat("Your Lang is 4")
            elseif get_lang() == 5 then
                chat("Your Lang is 5")
            elseif get_lang() == 6 then
                chat("Your Lang is 6")
            else
                chat("lang: "..get_lang().." not found")
            end
        end
    end
end
oh ok is good with your fonction get_lang

No flag on the character
e7c367e46ed2e.png

@Rakancito
@Loki70

Look your packet.h client/serveur typedef struct packet_char_additional_info and typedef struct packet_update_char
 
Son düzenleme:
oh ok is good with your fonction get_lang



Look your packet.h client/serveur typedef struct packet_char_additional_info and typedef struct packet_update_char
I checked, they are the same. Other ideas?


Will you see in my src where I made a mistake? Because I am checking this code already 100x and I see nothing.
@Loki70
 
Son düzenleme:

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst