summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-05-29 09:32:37 -0300
committerJesusaves <cpntb1@ymail.com>2019-05-29 09:32:37 -0300
commit6409a5d6be5cc70ee4d5ad170b1a8a8dfd775508 (patch)
tree941b34265969d19a993ff89d414e0922688dd214 /npc
parent58bd79e5404433c51f6ac5f6949b2dc33551d075 (diff)
downloadserverdata-6409a5d6be5cc70ee4d5ad170b1a8a8dfd775508.tar.gz
serverdata-6409a5d6be5cc70ee4d5ad170b1a8a8dfd775508.tar.bz2
serverdata-6409a5d6be5cc70ee4d5ad170b1a8a8dfd775508.tar.xz
serverdata-6409a5d6be5cc70ee4d5ad170b1a8a8dfd775508.zip
Update login system and use closeclientdialog()
Diffstat (limited to 'npc')
-rw-r--r--npc/003-3/malindou.txt5
-rw-r--r--npc/functions/clientversion.txt23
2 files changed, 13 insertions, 15 deletions
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index 289007dfc..0942e7765 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -413,6 +413,9 @@ OnPCLoginEvent:
#MerchantBank = 0;
}
+ // Cannot login with outdated client
+ checkclientversion();
+
// Message of the Day have priority
MOTDHandler();
@@ -422,7 +425,7 @@ OnPCLoginEvent:
// TODO: npc/commands/rate-management.txt
// Main update handler
- checkclientversion();
+ clientupdater();
// Position and gameplay fixes
HUB_Login();
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;