diff options
author | wushin <pasekei@gmail.com> | 2015-02-14 21:20:23 -0600 |
---|---|---|
committer | wushin <pasekei@gmail.com> | 2015-02-15 11:26:19 -0600 |
commit | ab1bb25f7ebb0334df40f2958234fffb2a34c28d (patch) | |
tree | 668a59764295b9f1c55ae1c144817180ad271ad3 /hercules/code | |
parent | 961701aec19f0835e8b88f3a8782ce1a44d468dc (diff) | |
download | evol-tools-ab1bb25f7ebb0334df40f2958234fffb2a34c28d.tar.gz evol-tools-ab1bb25f7ebb0334df40f2958234fffb2a34c28d.tar.bz2 evol-tools-ab1bb25f7ebb0334df40f2958234fffb2a34c28d.tar.xz evol-tools-ab1bb25f7ebb0334df40f2958234fffb2a34c28d.zip |
Hercules: tmw convertor: Fix TMWA pathing to ease migration
Diffstat (limited to 'hercules/code')
-rw-r--r-- | hercules/code/server/tmw/consts.py | 2 | ||||
-rw-r--r-- | hercules/code/server/tmw/itemdb.py | 2 | ||||
-rw-r--r-- | hercules/code/server/tmw/mobdb.py | 2 | ||||
-rw-r--r-- | hercules/code/server/tmw/mobskilldb.py | 2 | ||||
-rw-r--r-- | hercules/code/server/tmw/npcs.py | 14 | ||||
-rw-r--r-- | hercules/code/serverutils.py | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/hercules/code/server/tmw/consts.py b/hercules/code/server/tmw/consts.py index 8f1cfcf..4b538dc 100644 --- a/hercules/code/server/tmw/consts.py +++ b/hercules/code/server/tmw/consts.py @@ -56,7 +56,7 @@ def convertConsts(quests): # build in parameters w.write("ClientVersion\t10000\t1\n"); - srcDir = "oldserverdata/db/" + srcDir = "oldserverdata/world/map/db/" w.write("// tmw constants\n") for srcFile in getConstsFile(srcDir): with open(srcFile, "r") as r: diff --git a/hercules/code/server/tmw/itemdb.py b/hercules/code/server/tmw/itemdb.py index e5c15f8..069f744 100644 --- a/hercules/code/server/tmw/itemdb.py +++ b/hercules/code/server/tmw/itemdb.py @@ -16,7 +16,7 @@ def getItemDbFile(srcDir): yield srcFile def convertItemDb(): - srcDir = "oldserverdata/db/" + srcDir = "oldserverdata/world/map/db/" dstFile = "newserverdata/db/re/item_db.conf" constsFile = "newserverdata/db/const.txt" fieldsSplit = re.compile(",") diff --git a/hercules/code/server/tmw/mobdb.py b/hercules/code/server/tmw/mobdb.py index 396283c..aa9502a 100644 --- a/hercules/code/server/tmw/mobdb.py +++ b/hercules/code/server/tmw/mobdb.py @@ -15,7 +15,7 @@ def getMobDbFile(srcDir): yield srcFile def convertMobDb(): - srcDir = "oldserverdata/db/" + srcDir = "oldserverdata/world/map/db/" dstFile = "newserverdata/db/re/mob_db.txt" fieldsSplit = re.compile(",") with open(dstFile, "w") as w: diff --git a/hercules/code/server/tmw/mobskilldb.py b/hercules/code/server/tmw/mobskilldb.py index d561f8d..bbef65f 100644 --- a/hercules/code/server/tmw/mobskilldb.py +++ b/hercules/code/server/tmw/mobskilldb.py @@ -9,7 +9,7 @@ from code.fileutils import * from code.stringutils import * def convertMobSkillDb(): - srcFile = "oldserverdata/db/mob_skill_db.txt" + srcFile = "oldserverdata/world/map/db/mob_skill_db.txt" dstFile = "newserverdata/db/re/mob_skill_db.txt" fieldsSplit = re.compile(",") with open(srcFile, "r") as r: diff --git a/hercules/code/server/tmw/npcs.py b/hercules/code/server/tmw/npcs.py index 856a695..0608ace 100644 --- a/hercules/code/server/tmw/npcs.py +++ b/hercules/code/server/tmw/npcs.py @@ -12,21 +12,21 @@ mapsConfFile = "newserverdata/conf/maps.conf" mapsIndexFile = "newserverdata/db/map_index.txt" npcMainScript = "newserverdata/npc/re/scripts_main.conf" mapsIndex = 1 -scriptRe = re.compile("^(((?P<map>[^/](.+))([.]gat|),([ ]*)(?P<x>[\d]+),([ ]*)(?P<y>[\d]+),([ ]*)(?P<dir>[\d]+))|(?P<function>function)|-)" + +scriptRe = re.compile("^(((?P<map>[^/](.+)),([ ]*)(?P<x>[\d]+),([ ]*)(?P<y>[\d]+),([ ]*)(?P<dir>[\d]+))|(?P<function>function)|-)" + "[|](?P<tag>script)[|](?P<name>[^|]+)([|]" "(?P<class>[\d-]+)((,((?P<xs>[\d]+),(?P<ys>[\d]+)))|)|)$") -shopRe = re.compile("^(?P<map>[^/](.+))[.]gat,([ ]*)(?P<x>[\d]+),([ ]*)(?P<y>[\d]+),([ ]*)(?P<dir>[\d]+)(|,(?P<gender>[\d]+))" + +shopRe = re.compile("^(?P<map>[^/](.+)),([ ]*)(?P<x>[\d]+),([ ]*)(?P<y>[\d]+),([ ]*)(?P<dir>[\d]+)(|,(?P<gender>[\d]+))" + "[|](?P<tag>shop)[|](?P<name>[\w#' ]+)[|]" "(?P<class>[\d]+),(?P<items>(.+))$") -mapFlagRe = re.compile("^(?P<map>[^/](.+))[.]gat" + +mapFlagRe = re.compile("^(?P<map>[^/](.+))" + "[|](?P<tag>mapflag)[|](?P<name>[\w#']+)(|[|](?P<flag>.*))$") -warpRe = re.compile("^(?P<map>[^/](.+))[.]gat,([ ]*)(?P<x>[\d]+),([ ]*)(?P<y>[\d]+)[|]" - "(?P<tag>warp)[|](?P<name>[^|]+)[|](?P<xs>[\d-]+),(?P<ys>[\d-]+),(?P<targetmap>[^/](.+))[.]gat,([ ]*)(?P<targetx>[\d]+),([ ]*)(?P<targety>[\d]+)$") +warpRe = re.compile("^(?P<map>[^/](.+)),([ ]*)(?P<x>[\d]+),([ ]*)(?P<y>[\d]+)[|]" + "(?P<tag>warp)[|](?P<name>[^|]+)[|](?P<xs>[\d-]+),(?P<ys>[\d-]+),(?P<targetmap>[^/](.+)),([ ]*)(?P<targetx>[\d]+),([ ]*)(?P<targety>[\d]+)$") -monsterRe = re.compile("^(?P<map>[^/](.+))[.]gat,([ ]*)(?P<x>[\d]+),([ ]*)(?P<y>[\d]+),([ ]*)(?P<xs>[\d-]+),(?P<ys>[\d-]+)[|]" +monsterRe = re.compile("^(?P<map>[^/](.+)),([ ]*)(?P<x>[\d]+),([ ]*)(?P<y>[\d]+),([ ]*)(?P<xs>[\d-]+),(?P<ys>[\d-]+)[|]" "(?P<tag>monster)[|](?P<name>[\w#' ]+)[|]" "(?P<class>[\d]+),(?P<num>[\d]+),(?P<delay1>[\d]+)ms,(?P<delay2>[\d]+)ms(|,(?P<label>[\w+-:#]+))$") @@ -41,7 +41,7 @@ def createMainScript(): w.write("import: npc/scripts.conf\n") def convertNpcs(items): - processNpcDir("oldserverdata/npc/", "newserverdata/npc/", items) + processNpcDir("oldserverdata/world/map/npc/", "newserverdata/npc/", items) def processNpcDir(srcDir, dstDir, items): makeDir(dstDir) diff --git a/hercules/code/serverutils.py b/hercules/code/serverutils.py index c377bd7..39a283e 100644 --- a/hercules/code/serverutils.py +++ b/hercules/code/serverutils.py @@ -6,7 +6,7 @@ import os def detectServerType(): - if os.path.exists("oldserverdata/news.d"): + if os.path.exists("oldserverdata/world/map/news.d"): return "tmw" else: return "evol" |