summaryrefslogtreecommitdiff
path: root/hercules/code/server/evol/npcs.py
diff options
context:
space:
mode:
Diffstat (limited to 'hercules/code/server/evol/npcs.py')
-rw-r--r--hercules/code/server/evol/npcs.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/hercules/code/server/evol/npcs.py b/hercules/code/server/evol/npcs.py
index 6efe811..dd2c7be 100644
--- a/hercules/code/server/evol/npcs.py
+++ b/hercules/code/server/evol/npcs.py
@@ -31,7 +31,7 @@ monsterRe = re.compile("^(?P<map>[^/](.+))[.]gat,([ ]*)(?P<x>[\d]+),([ ]*)(?P<y>
"(?P<tag>monster)[\t](?P<name>[\w#' ]+)[\t]"
"(?P<class>[\d]+),(?P<num>[\d]+),(?P<look>[\d-]+),(?P<delay1>[\d]+),(?P<delay2>[\d]+)$")
-setRe = re.compile("^(?P<space>[ ]+)set[ ](?P<var>[^,]+),([ ]*)(?P<val>[^;]+);$");
+setRe = re.compile("^(?P<space>[ ]+)set[ ](?P<var>[^,]+),([ ]*)(?P<val>[^;]+);$")
class ScriptTracker:
pass
@@ -115,7 +115,7 @@ def processScriptMapLine(line):
def writeScript(w, m):
if m.group("gender") != None:
- w.write("// Gender = {0}\n".format(m.group("gender")));
+ w.write("// Gender = {0}\n".format(m.group("gender")))
if m.group("x") == 0 and m.group("y") == 0: # float npc
w.write("-")
@@ -128,7 +128,7 @@ def writeScript(w, m):
class_ = int(class_)
if class_ > 125 and class_ <= 400:
class_ = class_ + 100
- w.write("\t{0}\t{1}\t{2}".format(m.group("tag"), m.group("name"), class_));
+ w.write("\t{0}\t{1}\t{2}".format(m.group("tag"), m.group("name"), class_))
def processScript(tracker):
line = tracker.line
@@ -139,7 +139,7 @@ def processScript(tracker):
m = scriptRe.search(line)
if m == None:
- print "error in parsing: " + line
+ print("error in parsing: " + line)
w.write("!!!error parsing line")
w.write(line)
return
@@ -149,11 +149,11 @@ def processScript(tracker):
# m.group("tag"), m.group("name"), m.group("class"), m.group("xs"), m.group("ys"), m.group("size"))
if m.group("size") != None:
- w.write("// Size = {0}\n".format(m.group("size")));
+ w.write("// Size = {0}\n".format(m.group("size")))
writeScript(w, m)
if m.group("xs") != None:
- w.write(",{0},{1}".format(m.group("xs"), m.group("ys")));
- w.write(",{\n");
+ w.write(",{0},{1}".format(m.group("xs"), m.group("ys")))
+ w.write(",{\n")
def itemsToShop(tracker, itemsStr):
@@ -175,7 +175,7 @@ def processShop(tracker):
m = shopRe.search(line)
if m == None:
- print "error in parsing: " + line
+ print("error in parsing: " + line)
w.write("!!!error parsing line")
w.write(line)
return
@@ -193,7 +193,7 @@ def processMapFlag(tracker):
m = mapFlagRe.search(line)
if m == None:
- print "error in parsing: " + line
+ print("error in parsing: " + line)
w.write("!!!error parsing line")
w.write(line)
return
@@ -212,7 +212,7 @@ def processWarp(tracker):
w = tracker.w
m = warpRe.search(line)
if m == None:
- print "error in parsing: " + line
+ print("error in parsing: " + line)
w.write("!!!error parsing line")
w.write(line)
return
@@ -237,7 +237,7 @@ def processMonster(tracker):
w = tracker.w
m = monsterRe.search(line)
if m == None:
- print "error in parsing: " + line
+ print("error in parsing: " + line)
w.write("!!!error parsing line")
w.write(line)
return
@@ -273,7 +273,7 @@ def processStrReplace(tracker):
line = line.replace("getmapmobs(", "mobcount(")
- m = setRe.search(line);
+ m = setRe.search(line)
if m != None:
line = "{0}{1} = {2};\n".format(m.group("space"), m.group("var"), m.group("val"))