diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-02-02 20:25:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-02-02 20:25:19 +0300 |
commit | c4fbc0161296ca9e11ce8f0b8907e2fe96fa9d0c (patch) | |
tree | 3314e386c833628a6024fd2815c10431423851df | |
parent | 42428950b981dbf84e4a899908672ea3f842cc77 (diff) | |
download | serverdata-c4fbc0161296ca9e11ce8f0b8907e2fe96fa9d0c.tar.gz serverdata-c4fbc0161296ca9e11ce8f0b8907e2fe96fa9d0c.tar.bz2 serverdata-c4fbc0161296ca9e11ce8f0b8907e2fe96fa9d0c.tar.xz serverdata-c4fbc0161296ca9e11ce8f0b8907e2fe96fa9d0c.zip |
Move client check to function.
-rw-r--r-- | npc/000-0/sailors.txt | 9 | ||||
-rw-r--r-- | npc/functions/clientversion.txt | 17 | ||||
-rw-r--r-- | npc/scripts.conf | 3 |
3 files changed, 20 insertions, 9 deletions
diff --git a/npc/000-0/sailors.txt b/npc/000-0/sailors.txt index 313552de..f5e32120 100644 --- a/npc/000-0/sailors.txt +++ b/npc/000-0/sailors.txt @@ -9,14 +9,7 @@ 000-0.gat,23,20,0,1 script Sailors 305,6,6,{ OnTouch: - if (getclientversion("") > 3) goto intro; - mes "Warning: you using old client."; - next; - mes "Not all features will work."; - next; - mes "Please update from http://manaplus.evolonline.org/"; - next; -intro: + callfunc "CheckClientVersion"; requestlang @lang; if (@lang >= 0 && @lang <= 7) setlang @lang; mesn "Narrator"; diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt new file mode 100644 index 00000000..828a0fd2 --- /dev/null +++ b/npc/functions/clientversion.txt @@ -0,0 +1,17 @@ +// Evol scripts. +// Authors: +// 4144 +// Description: +// Function checking client version and report if it too old. + +function script CheckClientVersion { + if (getclientversion("") > 3) return; + mes "Warning:"; + mes "Warning:"; + mes "Warning: you using old client."; + next; + mes "Not all features will work."; + next; + mes "Please install client from http://www.evolonline.org/"; + next; +} diff --git a/npc/scripts.conf b/npc/scripts.conf index e5db521f..93272f8d 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -4,4 +4,5 @@ import: npc/_import.txt // Item Functions -npc: npc/items/PoisonedWater.txt
\ No newline at end of file +npc: npc/items/PoisonedWater.txt +npc: npc/functions/clientversion.txt |