summaryrefslogblamecommitdiff
path: root/npc/functions/clientversion.txt
blob: f21ea5a90c739edc57b92d5ba98af1c184852393 (plain) (tree)
1
2
3
4
5
6
7
8
9
               


                  
               



                                                                        









                                                                                                        
                                    

                    

                           

                                                        
                                                                                                       
         

                                                                                           
         

                                      

           
// TMW2 Scripts
// Evol functions.
// Author:
//    4144
//    Jesusalva
// Description:
//    Function checking the client version and reports if it is too old.

function	script	checkclientversion	{
    // Update handler
    if (Lang > 5 && UPDATE < 1528369855) {
        UPDATE=gettimetick(2);
        Lang=0;
        mesn "Jesus Saves";
        mes col("Oh, noes! Due lack of translators, some languages were removed from this project.", 9);
        mes col("You might have been affected. Please, select your desired language.", 9);
        asklanguage(LANG_IN_SHIP);
    }

    if (ClientVersion >= 24) return;

    mesn "Narrator";
    mes col("Warning.", 1);
    mes col("Warning.", 1);
    mes col("Warning: You are using an old client.", 9);
    next;
    mes col("Please install the new client from [@@https://manaplus.org/|https://manaplus.org/@@]", 9);
    next;
    if (ClientVersion >= 22) return;
    mes col("You won't be allowed to play this game until you have an updated client.", 9);
    next;
    // Force user to disconnect
    atcommand "@kick "+strcharinfo(0);
    return;
}