diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-31 20:39:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-31 20:39:14 +0300 |
commit | d31a3c5ce117fb10f378ab735cf5e1995b3f8ffb (patch) | |
tree | b6c80a23119652712687bcab903f43dcdd01beb6 /hercules | |
parent | be87f8f3a7168e5ae7423a1d44c66d8a863f625c (diff) | |
download | evol-tools-d31a3c5ce117fb10f378ab735cf5e1995b3f8ffb.tar.gz evol-tools-d31a3c5ce117fb10f378ab735cf5e1995b3f8ffb.tar.bz2 evol-tools-d31a3c5ce117fb10f378ab735cf5e1995b3f8ffb.tar.xz evol-tools-d31a3c5ce117fb10f378ab735cf5e1995b3f8ffb.zip |
hercules: tmw: fix functions conversion.
Diffstat (limited to 'hercules')
-rw-r--r-- | hercules/code/server/tmw/npcs.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/hercules/code/server/tmw/npcs.py b/hercules/code/server/tmw/npcs.py index fa8a825..4a38c9c 100644 --- a/hercules/code/server/tmw/npcs.py +++ b/hercules/code/server/tmw/npcs.py @@ -131,7 +131,7 @@ def writeScript(w, m): else: w.write("{0},{1},{2},{3}".format(m.group("map"), m.group("x"), m.group("y"), m.group("dir"))) if isFunction: - w.write("\t{0}\t{1}".format(m.group("tag"), m.group("name"))); + w.write("\t{0}\t{1}\t".format(m.group("tag"), m.group("name"))); else: class_ = m.group("class") if class_ == "0": # hidden npc @@ -159,9 +159,20 @@ def processScript(tracker): writeScript(w, m) if m.group("xs") != None: w.write(",{0},{1}".format(m.group("xs"), m.group("ys"))); - w.write(",{\n"); + try: + if m.group("function") != None: + isFunction = True + else: + isFunction = False + except: + isFunction = True + if isFunction == False: + w.write(",{\n"); + else: + w.write("{\n"); + def itemsToShop(tracker, itemsStr): itemsSplit = re.compile(",") itemsSplit2 = re.compile(":") |