summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/constants.conf2
-rwxr-xr-xnpc/maint.py15
2 files changed, 17 insertions, 0 deletions
diff --git a/db/constants.conf b/db/constants.conf
index b29f0c3f1..432bd8481 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -1820,10 +1820,12 @@ constants_db: {
NPC_GEORGE: 205
NPC_SILVERSMITH: 207
NPC_TECH_EXPLORER: 208
+ NPC_MAINTENANCE_A: 209
NPC_CHEF: 210
NPC_GLASS_OLD_LADY: 211
NPC_PURPLE_WIZARD_F: 212
NPC_BARD_TRUMP: 213
+ NPC_MAINTENANCE_B: 214
NPC_INJURIED_MOUBOO: 215
NPC_KATZE: 216
NPC_LEGACY_GUARD_B: 217
diff --git a/npc/maint.py b/npc/maint.py
new file mode 100755
index 000000000..3fe721aeb
--- /dev/null
+++ b/npc/maint.py
@@ -0,0 +1,15 @@
+#!/usr/bin/python3
+import traceback, os, random
+
+w=open("maintenance.txt", 'w')
+w.write("// TMW2 Scripts\n")
+folders=sorted(os.listdir())
+folders=folders+["guilds","botcheck","soren","sec_pri"]
+for f in folders:
+ if "-" in f and not "000-0" in f and f not in ["003-2-0"]:
+ npc = random.choice(['NPC_CONSTR_WORKER', 'NPC_CONSTR_WORKER', 'NPC_FEMALE_WORKER', 'NPC_MAINTENANCE_A', 'NPC_MAINTENANCE_B'])
+ w.write("%s,20,20,0\tscript\tMaintainer#%s\t%s,{" % (f, f, npc))
+ w.write("\n\tmesn;\n\tmesq l(\"Sorry, we're doing an update at the moment, come back later.\");\n\tclose;\nOnInit:\n\t.@mx=getmapinfo(MAPINFO_SIZE_X, \"%s\")-20;\n\t.@my=getmapinfo(MAPINFO_SIZE_Y, \"%s\")-20;\n\tdo {\n\t\tif (.@e >= 20) break;\n\t\t.@x=rand2(20,.@mx);.@y=rand2(20,.@my);.@e+=1;\n\t} while (!checknpccell(\"%s\", .@x, .@y, cell_chkpass));\n\tmovenpc(.name$, .@x, .@y);\n\tend;\n}\n\n" % (f, f, f))
+
+w.close()
+print("gm use @loadnpc npc/maintenance.txt")