From 6409a5d6be5cc70ee4d5ad170b1a8a8dfd775508 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 29 May 2019 09:32:37 -0300 Subject: Update login system and use closeclientdialog() --- npc/functions/clientversion.txt | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'npc/functions/clientversion.txt') diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt index 8ed754a45..300ce1343 100644 --- a/npc/functions/clientversion.txt +++ b/npc/functions/clientversion.txt @@ -7,7 +7,7 @@ // Function checking the client version and reports if it is too old. // This also handles all updates, and usually have priority. -function script checkclientversion { +function script clientupdater { // Skip any update for newcomers if (getmap() ~= "000-0*") { UPDATE=gettimetick(2); @@ -282,24 +282,19 @@ function script checkclientversion { #ADD_LVL=0; // TODO: Use @super debug functions and force player to join a guild. We will need the guild ID, though. rodex_sendmail(getcharid(0), "TMW2 Team", "Welcome to Moubootaur Legends", "Hey, thanks for believing on us! We hope to have a great time togheter. Any problem, ask for help in #world - the Discord bridge! Enjoy our game!", 20); - if (ClientVersion < 24) next; - /* - next; - mesn "Failsafe Mechanism"; - mesc l("Ah... You must update your client first."), 1; - next; - */ } + if (.@dg) + closeclientdialog; + return; +} - - if (ClientVersion >= 25) { - if (.@dg) - close; +// Just be sure your client version is OK +function script checkclientversion { + if (ClientVersion >= 25) return; - } mesn "Narrator"; mesc l("Warning."), 1; @@ -311,7 +306,7 @@ function script checkclientversion { next; if (ClientVersion >= 22) mesc l("Compatibility Support mode enabled. Client may crash AT RANDOM, beware."); if (ClientVersion >= 22) mesc l("Crazy stuff can happen in overall. YOU HAVE BEEN WARNED TO UPDATE YOUR CLIENT."); - if (ClientVersion >= 22) close; + if (ClientVersion >= 22) closeclientdialog; if (ClientVersion >= 22) return; mesc l("You won't be allowed to play this game until you have an updated client."); next; -- cgit v1.2.3-70-g09d2