summaryrefslogtreecommitdiff
path: root/hercules/convert_server.py
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-19 20:22:22 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-19 21:08:48 +0300
commitffae72db7aa5eeeac3bead8c0f505b73f4e2b6a4 (patch)
treef1670e0b63f296603ced1da1ab4c21a4500ee1ef /hercules/convert_server.py
parent1673d571967c933bbf79568c9e9eb51ec4995127 (diff)
downloadevol-tools-ffae72db7aa5eeeac3bead8c0f505b73f4e2b6a4.tar.gz
evol-tools-ffae72db7aa5eeeac3bead8c0f505b73f4e2b6a4.tar.bz2
evol-tools-ffae72db7aa5eeeac3bead8c0f505b73f4e2b6a4.tar.xz
evol-tools-ffae72db7aa5eeeac3bead8c0f505b73f4e2b6a4.zip
hercules: fix parsing warps in new tmwa format (missing wap name).
Diffstat (limited to 'hercules/convert_server.py')
-rwxr-xr-xhercules/convert_server.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/hercules/convert_server.py b/hercules/convert_server.py
index f323b4e..6f0f5ba 100755
--- a/hercules/convert_server.py
+++ b/hercules/convert_server.py
@@ -4,12 +4,28 @@
# Copyright (C) 2014 Evol Online
# Author: Andrei Karas (4144)
+import sys
+
from code.serverutils import *
from code.server.evol.main import *
from code.server.tmw.main import *
-serverType = detectServerType()
+def showHelp():
+ print "Usage: ./convert_server.py evol"
+ print " ./convert_server.py tmwold"
+ print " ./convert_server.py tmwnew"
+ exit(1)
+
+if len(sys.argv) != 2:
+ showHelp()
+ exit(1)
+
+serverType = sys.argv[1]
if serverType == "evol":
serverEvolMain();
+elif serverType == "tmwold":
+ serverTmwMain(False);
+elif serverType == "tmwnew":
+ serverTmwMain(True);
else:
- serverTmwMain();
+ print "Wrong parameter" \ No newline at end of file