From c4fbc0161296ca9e11ce8f0b8907e2fe96fa9d0c Mon Sep 17 00:00:00 2001 From: Andrei Karas <akaras@inbox.ru> Date: Thu, 2 Feb 2012 20:25:19 +0300 Subject: Move client check to function. --- npc/000-0/sailors.txt | 9 +-------- npc/functions/clientversion.txt | 17 +++++++++++++++++ npc/scripts.conf | 3 ++- 3 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 npc/functions/clientversion.txt 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 -- cgit v1.2.3-70-g09d2