Initial Release of IGNCore version 2.5

This commit is contained in:
2021-08-09 13:18:56 +02:00
commit a83d98c47e
910 changed files with 224171 additions and 0 deletions
@@ -0,0 +1,43 @@
import html
import re
from core.command_param_types import Any
from core.decorators import instance, command
@instance()
class CalculatorController:
def __init__(self):
self.allow_chars_regex = re.compile(r"^[0123456789.+\-*%()/ &|^~<>]+$")
@command(command="calc",
params=[Any("formula")],
access_level="member",
description="Perform a calculation",
extended_description="Supported operators:\n\n"
"+ (addition)\n"
"- (subtraction)\n"
"* (multiplication)\n"
"/ (division)\n"
"% (modulus)\n"
"** (exponent)\n"
"// (floor/integer division)\n"
"< (less than)\n"
"> (greater than)\n"
"() (parenthesis)\n"
"& (binary AND)\n"
"| (binary OR)\n"
"^ (binary exclusive OR)\n"
"~ (binary ones complement)\n"
"<< (binary left shift)\n"
">> (binary right shift)")
def calc_cmd(self, _, formula):
# this may be problematic if this bot is running on a system with a different locale
formula = html.unescape(formula.replace(",", "."))
if self.allow_chars_regex.match(formula):
try:
return f"{formula} = {round(eval(formula), 4)}"
except SyntaxError:
return "Error! Invalid formula supplied."
else:
return "Error! Invalid character detected."
@@ -0,0 +1,73 @@
from core.chat_blob import ChatBlob
from core.command_param_types import Int, Any
from core.db import DB
from core.decorators import instance, command
from core.text import Text
@instance()
class DynaController:
def inject(self, registry):
self.db: DB = registry.get_instance("db")
self.text: Text = registry.get_instance("text")
def pre_start(self):
self.db.load_sql_file(self.module_dir + "/sql/" + "dyna.sql", pre_optimized=True)
self.db.create_view("dynadb")
@command(command="dyna", params=[], access_level="member",
description="Show a list of dyna mob types")
def dyna_mob_types_command(self, _):
data = self.db.query("SELECT mob, MIN(minQl) AS minQl, MAX(maxQl) AS maxQl "
"FROM dynadb GROUP BY mob ORDER BY mob")
blob = ""
for row in data:
blob += "%s (%d - %d)\n" % (self.text.make_tellcmd(row.mob, "dyna %s" % row.mob), row.minQl, row.maxQl)
return ChatBlob("Dyna Mobs (%d)" % len(data), blob)
@command(command="dyna", params=[Int("level")], access_level="member",
description="Show a list of dyna camps +/- 25 of QL")
def dyna_level_command(self, _, level):
min_level = level - 25
max_level = level + 25
data = self.db.query("SELECT * FROM dynadb d "
"JOIN playfields p ON d.playfield_id = p.id "
"WHERE d.minQl >= ? AND d.maxQl <= ? "
"ORDER BY minQl", [min_level, max_level])
blob = f"Results of dyna camps between QL <highlight>{min_level:d}</highlight> " \
f"and <highlight>{max_level:d}</highlight>\n\n"
blob += self.format_results(data)
# noinspection HttpUrlsUsage
url = "http://creativestudent.com/ao/files-helpfiles.html"
blob += "Dyna camp information taken from CSP help files: " + self.text.make_chatcmd(url, "/start " + url)
return ChatBlob("Dyna Camps (%d)" % len(data), blob)
@command(command="dyna", params=[Any("search")], access_level="member",
description="Search for dyna camps based on playfield or mob type")
def dyna_search_command(self, _, search):
search_param = "%" + search + "%"
data = self.db.query("SELECT * FROM dynadb d JOIN playfields p ON d.playfield_id = p.id "
"WHERE p.long_name LIKE ? OR p.short_name LIKE ? OR d.mob LIKE ? ORDER BY d.minQl",
[search_param, search_param, search_param])
blob = f"Results of dyna camps search for <highlight>{search}</highlight>\n\n"
blob += self.format_results(data)
# noinspection HttpUrlsUsage
url = "http://creativestudent.com/ao/files-helpfiles.html"
blob += "Dyna camp information taken from CSP help files: " + self.text.make_chatcmd(url, "/start " + url)
return ChatBlob(f"Dyna Camps ({len(data):d})", blob)
def format_results(self, data):
blob = ""
for row in data:
coordinates = self.text.make_chatcmd(f"{row.long_name} {row.cX:d}x{row.cY:d}",
f"/waypoint {row.cX:d} {row.cY:d} {row.playfield_id:d}")
blob += "<pagebreak>" + coordinates + "\n"
blob += f"{row.mob} - Level <highlight>{row.minQl:d}-{row.maxQl:d}</highlight>\n\n"
return blob
@@ -0,0 +1,47 @@
import math
from core.chat_blob import ChatBlob
from core.command_param_types import Int
from core.db import DB
from core.decorators import instance, command
from core.dict_object import DictObject
from core.text import Text
@instance()
class OverequippedController:
def inject(self, registry):
self.db: DB = registry.get_instance("db")
self.text: Text = registry.get_instance("text")
@command(command="oe", params=[Int("skill_level")], access_level="member",
description="Show the current time in every timezone")
def oe_command(self, _, skill_level):
oe = self.get_oe_vals(skill_level)
blob = "With a skill requirement of <highlight>%s</highlight>, you will be\n" % skill_level
blob += "Out of OE: <highlight>%d</highlight> or higher\n" % oe.oe100low
blob += "75%%: <highlight>%d</highlight> to <highlight>%d</highlight>\n" % (oe.oe75low, oe.oe100low - 1)
blob += "50%%: <highlight>%d</highlight> to <highlight>%d</highlight>\n" % (oe.oe50low, oe.oe75low - 1)
blob += "25%%: <highlight>%d</highlight> to <highlight>%d</highlight>\n" % (oe.oe25low, oe.oe50low - 1)
blob += "0%%: <highlight>%d</highlight> or lower\n\n" % (oe.oe25low - 1)
blob += "With a personal skill of <highlight>%s</highlight>, you can use up to\n" % skill_level
blob += "Out of OE: <highlight>%d</highlight> or lower\n" % oe.oe100
blob += "75%%: <highlight>%d</highlight> to <highlight>%d</highlight>\n" % (oe.oe100 + 1, oe.oe75)
blob += "50%%: <highlight>%d</highlight> to <highlight>%d</highlight>\n" % (oe.oe75 + 1, oe.oe50)
blob += "25%%: <highlight>%d</highlight> to <highlight>%d</highlight>\n" % (oe.oe50 + 1, oe.oe25)
blob += "0%%: <highlight>%d</highlight> or higher\n" % (oe.oe25 - 1)
return ChatBlob("%d - %d - %d" % (oe.oe100low, skill_level, oe.oe100), blob)
def get_oe_vals(self, skill_level):
return DictObject({
"oe100": int(math.floor(skill_level / 0.8)),
"oe100low": int(math.floor(skill_level * 0.8)),
"oe75": int(math.floor(skill_level / 0.6)),
"oe75low": int(math.floor(skill_level * 0.6)),
"oe50": int(math.floor(skill_level / 0.4)),
"oe50low": int(math.floor(skill_level * 0.4)),
"oe25": int(math.floor(skill_level / 0.2)),
"oe25low": int(math.floor(skill_level * 0.2))})
@@ -0,0 +1,91 @@
from core.chat_blob import ChatBlob
from core.command_param_types import Regex, Int, Any, Const
from core.db import DB
from core.decorators import instance, command
from core.text import Text
@instance()
class PlayfieldController:
def inject(self, registry):
self.db: DB = registry.get_instance("db")
self.text: Text = registry.get_instance("text")
self.command_alias_service = registry.get_instance("command_alias_service")
def pre_start(self):
self.db.load_sql_file(self.module_dir + "/sql/" + "playfields.sql", pre_optimized=True)
self.db.create_view("playfields")
def start(self):
self.command_alias_service.add_alias("playfields", "playfield")
@command(command="playfield", params=[Const("all", is_optional=True)], access_level="member",
description="Show a list of playfields")
def playfield_list_command(self, _, const_all):
if const_all:
data = self.db.query("SELECT * FROM playfields ORDER BY long_name")
else:
data = self.db.query("SELECT * FROM playfields WHERE short_name != '' ORDER BY long_name")
blob = ""
for row in data:
blob += "[<highlight>%d</highlight>] %s (%s)\n" % (row.id, row.long_name, row.short_name)
return ChatBlob("Playfields", blob)
@command(command="waypoint",
params=[Regex("waypoint_data", r"\s+.*?Pos: ([0-9.]+), ([0-9.]+), ([0-9.]+), Area: ([a-zA-Z ]+).*",
num_groups=4)],
access_level="member",
description="Create a waypoint link from F9 output",
extended_description="Example: <symbol>waypoint Pos: 123.1, 456.1, 789.1, Area: Perpetual Wastelands")
def waypoint1_command(self, _, regex):
x_coords, y_coords, _, playfield_arg = regex
return self.create_waypoint_blob(x_coords, y_coords, playfield_arg)
@command(command="waypoint",
params=[Regex("waypoint_data", r"\s+.*?([0-9.]+) ([0-9.]+) y ([0-9.]+) ([0-9]+).*",
num_groups=4)],
access_level="member",
description="Create a waypoint link from Shift + F9 output",
extended_description="Example: <symbol>waypoint 123.1 456.1 y 789.1 570")
def waypoint2_command(self, _, regex):
x_coords, y_coords, _, playfield_arg = regex
return self.create_waypoint_blob(x_coords, y_coords, playfield_arg)
@command(command="waypoint",
params=[Int("x_coords"), Int("y_coords"), Any("playfield")],
access_level="member",
description="Manually create a waypoint link",
extended_description="Example: !waypoint 123 456 PW")
def waypoint3_command(self, _, x_coords, y_coords, playfield_arg):
return self.create_waypoint_blob(x_coords, y_coords, playfield_arg)
def create_waypoint_blob(self, x_coords, y_coords, playfield_arg):
x_coords = int(float(x_coords))
y_coords = int(float(y_coords))
playfield = self.get_playfield_by_name(playfield_arg) or self.get_playfield_by_id(playfield_arg)
if not playfield:
return f"Could not find playfield <highlight>{playfield_arg}</highlight>."
else:
title = f"waypoint: {x_coords}x{y_coords} {playfield.long_name}"
blob = f"Zone: {playfield.long_name} ({playfield.id})\n"
blob += f"Coords: {x_coords} x {y_coords}\n\n"
waypoint = f'/waypoint {x_coords} {y_coords} {playfield.id:d}'
blob += f"<center>{self.text.make_chatcmd(self.text.make_image(11336), waypoint)}\n"
blob += self.text.make_chatcmd("Click for waypoint", f"/waypoint {x_coords} {y_coords} {playfield.id:d}")
return ChatBlob(title, blob)
def get_playfield_by_name(self, name):
return self.db.query_single("SELECT * FROM playfields "
"WHERE long_name LIKE ? "
"OR short_name LIKE ? "
"LIMIT 1", [name, name])
def get_playfield_by_id(self, playfield_id):
return self.db.query_single("SELECT * FROM playfields "
"WHERE id = ?", [playfield_id])
@@ -0,0 +1,76 @@
import random
import time
from core.command_param_types import Any, Int, Const
from core.db import DB
from core.decorators import instance, command
# noinspection SqlInsertValues
@instance()
class RandomController:
def inject(self, registry):
self.db: DB = registry.get_instance("db")
self.util = registry.get_instance("util")
self.character_service = registry.get_instance("character_service")
self.command_alias_service = registry.get_instance("command_alias_service")
def start(self):
self.db.exec("CREATE TABLE IF NOT EXISTS roll (id INT PRIMARY KEY AUTO_INCREMENT, "
"created_at INT NOT NULL, "
"char_id INT NOT NULL, "
"options VARCHAR(2048), "
"result VARCHAR(255))")
self.db.create_view("roll")
self.command_alias_service.add_alias("verify", "roll verify")
self.command_alias_service.add_alias("lootorder", "random")
@command(command="random", params=[Any("items")], access_level="all",
description="Randomly order a list of elements",
extended_description="Enter a space-delimited list of items to randomize.")
def random_command(self, _, items):
items = items.split(" ")
random.shuffle(items)
return " ".join(items)
@command(command="roll", params=[Const("verify"), Int("roll_id")], access_level="all",
description="Verify a roll that happened")
def roll_verify_command(self, _, _1, roll_id):
row = self.db.query_single("SELECT * FROM roll WHERE id = ?", [roll_id])
if not row:
return "Could not find roll with id <highlight>%d</highlight>." % roll_id
else:
time_string = self.util.time_to_readable(int(time.time()) - row.created_at)
name = self.character_service.resolve_char_to_name(row.char_id)
return "<highlight>%s</highlight> rolled by <highlight>%s</highlight> %s ago. Possible options: %s." % (
row.result, name, time_string, row.options)
@command(command="roll", params=[Int("start_value", is_optional=True), Int("end_value")], access_level="all",
description="Roll a number between 1 and a number",
extended_description="The given numbers are included in the roll.")
def roll_number_command(self, request, start_value, end_value):
start_value = start_value or 1
if start_value > end_value:
end = start_value
start = end_value
else:
start = start_value
end = end_value
result = random.randint(start, end)
options = f"value between {start:d} and {end:d}"
self.db.exec("INSERT INTO roll (created_at, char_id, options, result) VALUES (?, ?, ?, ?)",
[int(time.time()), request.sender.char_id, options, result])
return f"The roll is <highlight>{result:d}</highlight> out of values between {start:d} and {end:d}. " \
f"To verify do /tell <myname> verify {self.db.last_insert_id():d}"
# Keep this method at the bottom of file otherwise it will precede over all other commands
@command(command="roll", params=[Any("items")], access_level="all",
description="Roll a random value",
extended_description="Enter a space-delimited list of values to roll")
def roll_text_variables_command(self, request, items):
options = items.split(" ")
result = random.choice(options)
self.db.exec("INSERT INTO roll (created_at, char_id, options, result) VALUES (?, ?, ?, ?)",
[int(time.time()), request.sender.char_id, items, result])
return f"The roll is <highlight>{result}</highlight> out of possible options: {items}. " \
f"To verify do /tell <myname> verify {self.db.last_insert_id():d}"
@@ -0,0 +1,62 @@
from core.chat_blob import ChatBlob
from core.command_param_types import Int
from core.db import DB
from core.decorators import instance, command
from core.text import Text
@instance()
class ResearchController:
def inject(self, registry):
self.db: DB = registry.get_instance("db")
self.text: Text = registry.get_instance("text")
self.util = registry.get_instance("util")
def pre_start(self):
self.db.load_sql_file(self.module_dir + "/sql/" + "research.sql", pre_optimized=True)
self.db.create_view("research")
@command(command="research", params=[Int("research_level")], access_level="member",
description="Show information about a specific research level")
def research_command(self, _, research_level):
if research_level > 10 or research_level < 1:
return "Research level must be between 1 and 10."
row = self.db.query_single("SELECT * FROM research WHERE level = ?", [research_level])
capsk = int(row.sk * 0.1)
blob = f"You must be level <highlight>{row.levelcap:d}</highlight> to research " \
f"<highlight>Research Level {research_level:d}</highlight>.\n"
blob += f"You need <highlight>{self.util.format_number(row.sk)} SK</highlight> to reach " \
f"<highlight>Research Level {research_level:d}</highlight> per research line.\n\n"
blob += f"This equals <highlight>{self.util.format_number(row.sk * 1000)} XP</highlight>.\n\n"
blob += f"Your research will cap at <highlight>{self.util.format_number(capsk * 1000)} XP</highlight> or " \
f"<highlight>{self.util.format_number(capsk)} SK</highlight>."
return ChatBlob("Research Level %d" % research_level, blob)
@command(command="research", params=[Int("research_level"), Int("research_level")], access_level="member",
description="Show the amount of SK needed from one research level to another")
def research_span_command(self, _, research_level1, research_level2):
if research_level1 > 10 or research_level1 < 1 or research_level2 > 10 or research_level2 < 1:
return "Research level must be between 1 and 10."
elif research_level1 == research_level2:
return "You must specify different research levels."
if research_level1 > research_level2:
# swap researches so the lower is research_level1 and higher is research_level2
research_level1, research_level2 = research_level2, research_level1
row = self.db.query_single("SELECT SUM(sk) AS total_sk, MAX(levelcap) AS levelcap FROM research "
"WHERE level > ? AND level <= ?",
[research_level1, research_level2])
blob = f"You must be <highlight>Level {row.levelcap:d}</highlight> to reach " \
f"Research Level <highlight>{research_level2:d}.</highlight>\n"
blob += f"It takes <highlight>{self.util.format_number(row.total_sk)} SK</highlight> to go from " \
f"Research Level <highlight>{research_level1:d}</highlight> to " \
f"Research Level <highlight>{research_level2:d}</highlight> per research line.\n\n"
blob += f"This equals <highlight>{self.util.format_number(row.total_sk * 1000)} XP</highlight>."
return ChatBlob(f"Research Levels {research_level1:d} - {research_level2:d}", blob)
+183
View File
@@ -0,0 +1,183 @@
# noinspection LongLineForFile
# noinspection LongLineForFile
DROP TABLE IF EXISTS dynadb;
CREATE TABLE IF NOT EXISTS dynadb
(
playfield_id SMALLINT NOT NULL,
label VARCHAR(200),
mob VARCHAR(200),
minQl SMALLINT NOT NULL,
maxQl SMALLINT NOT NULL,
cX SMALLINT NOT NULL,
cY SMALLINT NOT NULL,
INDEX playfield_id (playfield_id) USING BTREE,
INDEX mob (mob) USING BTREE,
INDEX minQl (minQl) USING BTREE,
INDEX maxql (maxQl) USING BTREE
);
INSERT INTO dynadb
VALUES (585, 'Dynacamp1', 'Rhinomen', 60, 65, 460, 340),
(585, 'Dynacamp3', 'Hounds', 55, 60, 820, 980),
(585, 'Dynacamp4', 'Androids', 55, 60, 380, 2300),
(585, 'Dynacamp5', 'Androids', 50, 55, 860, 2340),
(585, 'Dynacamp6', 'Mechdogs', 45, 50, 1100, 1700),
(585, 'Dynacamp7', 'Androids', 40, 45, 980, 380),
(585, 'Dynacamp8', 'Mantezes', 45, 50, 1260, 700),
(585, 'Dynacamp9', 'Mantezes', 45, 50, 1180, 940),
(585, 'Dynacamp10', 'Anuns', 60, 65, 1380, 1380),
(585, 'Dynacamp11', 'Leets', 30, 35, 1340, 1900),
(585, 'Dynacamp12', 'Fleas', 25, 30, 1420, 2620),
(585, 'Dynacamp13', 'Fleas', 25, 30, 1580, 2780),
(585, 'Dynacamp14', 'Rollerrats', 40, 45, 1860, 2780),
(585, 'Dynacamp15', 'Hounds', 40, 45, 1620, 2060),
(585, 'Dynacamp16', 'Blubbags', 15, 20, 1740, 1940),
(585, 'Dynacamp17', 'Blubbags', 25, 30, 1700, 1700),
(585, 'Dynacamp18', 'Fleas', 25, 30, 2100, 2340),
(585, 'Dynacamp19', 'Hounds', 45, 50, 2140, 980),
(585, 'Dynacamp20', 'Mantezes', 60, 65, 2060, 740),
(716, 'Dynacamp1', 'Igruana', 5, 6, 380, 3180),
(716, 'Dynacamp2', 'Tentacle Mutants', 11, 13, 860, 3260),
(716, 'Dynacamp3', 'Blubbags', 6, 8, 540, 2860),
(716, 'Dynacamp5', 'Malle', 3, 5, 380, 1500),
(716, 'Dynacamp6', 'Biofreaks', 5, 7, 380, 1300),
(716, 'Dynacamp7', 'Fleas', 17, 19, 540, 1020),
(716, 'Dynacamp8', 'Shadowmutants', 8, 10, 300, 1060),
(716, 'Dynacamp9', 'Leets', 7, 8, 380, 820),
(716, 'Dynacamp10', 'Pareets', 11, 13, 300, 620),
(716, 'Dynacamp11', 'Rhinomen', 15, 17, 620, 340),
(716, 'Dynacamp12', 'Aquaans', 12, 14, 540, 660),
(716, 'Dynacamp13', 'Nighthowler', 12, 14, 660, 1340),
(716, 'Dynacamp14', 'Reets', 3, 4, 660, 2540),
(590, 'Dynacamp1', 'Snakes', 130, 135, 380, 420),
(590, 'Dynacamp2', 'Anuns', 115, 120, 420, 1060),
(590, 'Dynacamp3', 'Spiders', 120, 125, 500, 1700),
(590, 'Dynacamp4', 'Spiders', 110, 115, 460, 2380),
(590, 'Dynacamp5', 'Spiders', 105, 110, 860, 2380),
(590, 'Dynacamp6', 'Spiders', 115, 120, 940, 1860),
(590, 'Dynacamp7', 'Enigmas', 140, 145, 940, 1540),
(590, 'Dynacamp8', 'Enigmas', 135, 140, 1340, 860),
(590, 'Dynacamp9', 'Enigmas', 100, 105, 1700, 2500),
(590, 'Dynacamp10', 'Cyborgs', 95, 100, 1380, 2740),
(590, 'Dynacamp11', 'Enigmas', 130, 135, 2620, 2820),
(590, 'Dynacamp12', 'Enigmas', 130, 135, 2380, 2340),
(590, 'Dynacamp13', 'Spiders', 120, 125, 2340, 340),
(590, 'Dynacamp14', 'Nanofreaks', 165, 170, 2660, 300),
(590, 'Dynacamp15', 'Spiders', 120, 125, 3380, 1380),
(590, 'Dynacamp16', 'Snakes', 175, 180, 3540, 1420),
(590, 'Dynacamp17', 'Snakes', 125, 130, 3220, 1620),
(590, 'Dynacamp18', 'Anuns', 130, 135, 3580, 2940),
(590, 'Dynacamp20', 'Snakes', 200, 205, 3500, 1900),
(655, 'Dynacamp01', 'Leets', 30, 35, 1380, 2700),
(655, 'Dynacamp02', 'Shadowmutants', 80, 85, 4500, 1140),
(655, 'Dynacamp03', 'Snakes', 60, 65, 1180, 1420),
(655, 'Dynacamp04', 'Skin Spiders', 75, 80, 2220, 1500),
(655, 'Dynacamp05', 'Scavenger Dogs', 55, 60, 460, 580),
(655, 'Dynacamp06', 'Scorpiods', 40, 45, 1220, 2100),
(655, 'Dynacamp0', 'Hammerbeasts', 35, 40, 1700, 2740),
(655, 'Dynacamp08', 'Snakes', 85, 90, 3020, 300),
(655, 'Dynacamp09', 'Skin Spiders', 75, 80, 2940, 2020),
(655, 'Dynacamp10', 'Shadowmutants', 50, 55, 3020, 2220),
(655, 'Dynacamp11', 'Hammerbeasts', 70, 75, 4180, 420),
(600, 'Dynacamp1', 'Mantezes', 60, 65, 700, 2180),
(600, 'Dynacamp2', 'Mantezes', 60, 65, 580, 2540),
(600, 'Dynacamp3', 'Rhinomen', 55, 60, 1140, 980),
(600, 'Dynacamp4', 'Rhinomen', 45, 50, 1020, 300),
(600, 'Dynacamp5', 'Rhinomen', 50, 55, 1220, 340),
(600, 'Dynacamp6', 'Rhinomen', 65, 70, 1380, 540),
(600, 'Dynacamp7', 'Rhinomen', 60, 65, 1340, 900),
(600, 'Dynacamp8', 'Lizards', 20, 25, 1020, 2740),
(600, 'Dynacamp9', 'Blubbags', 51, 56, 1300, 2340),
(600, 'Dynacamp10', 'Spiders', 50, 55, 1420, 1540),
(600, 'Dynacamp11', 'Lizards', 15, 20, 1740, 2660),
(600, 'Dynacamp12', 'Rhinomen', 60, 65, 1940, 1860),
(600, 'Dynacamp13', 'Rhinomen', 80, 85, 1860, 1100),
(600, 'Dynacamp14', 'Bileswarms', 105, 110, 1700, 820),
(600, 'Dynacamp15', 'Unfinished Breed', 60, 65, 2060, 420),
(600, 'Dynacamp16', 'Blubbags', 50, 55, 3060, 2220),
(600, 'Dynacamp17', 'Leets', 30, 35, 3340, 2860),
(600, 'Dynacamp18', 'Mantezes', 55, 60, 4020, 1780),
(600, 'Dynacamp19', 'Mantezes', 60, 65, 4060, 1340),
(600, 'Dynacamp20', 'Mantezes', 65, 70, 4220, 380),
(605, 'Dynacamp1', 'Snakes', 140, 145, 460, 780),
(605, 'Dynacamp2', 'Enigmas', 135, 140, 580, 1820),
(605, 'Dynacamp3', 'Ninjadroids', 125, 130, 380, 2260),
(605, 'Dynacamp4', 'Quake Lizards', 135, 140, 820, 1940),
(605, 'Dynacamp5', 'Pit Lizards', 155, 160, 820, 1340),
(605, 'Dynacamp6', 'Quake Lizards', 135, 140, 900, 740),
(605, 'Dynacamp7', 'Pit Lizards', 160, 165, 1500, 660),
(605, 'Dynacamp8', 'Snakes', 155, 160, 1500, 2100),
(605, 'Dynacamp9', 'Enigmas', 110, 115, 1660, 3100),
(605, 'Dynacamp10', 'Bileswarms', 130, 135, 1700, 2580),
(605, 'Dynacamp11', 'Nanofreaks', 151, 155, 1660, 1780),
(605, 'Dynacamp12', 'Snakes', 150, 155, 1700, 1380),
(605, 'Dynacamp13', 'Snakes', 155, 160, 1780, 1140),
(605, 'Dynacamp14', 'Swampghouls', 170, 175, 1700, 540),
(605, 'Dynacamp15', 'Nanofreaks', 165, 170, 2380, 740),
(605, 'Dynacamp16', 'Snakes', 160, 165, 2380, 1460),
(605, 'Dynacamp17', 'Swampghouls', 170, 175, 2300, 1260),
(605, 'Dynacamp18', 'Ninjadroids', 135, 140, 2500, 2140),
(605, 'Dynacamp19', 'Ninjadroids', 135, 140, 2180, 2540),
(605, 'Dynacamp20', 'Ottous', 110, 115, 2140, 2980),
(565, 'Dynacamp1', 'Lizards', 20, 25, 340, 1740),
(565, 'Dynacamp3', 'Leets', 30, 35, 460, 2380),
(565, 'Dynacamp4', 'Leets', 30, 35, 740, 2900),
(565, 'Dynacamp5', 'Leets', 30, 35, 1220, 2900),
(565, 'Dynacamp6', 'Rhinomen', 10, 15, 1260, 2540),
(565, 'Dynacamp7', 'Rhinomen', 10, 15, 1340, 2340),
(565, 'Dynacamp8', 'Rhinomen', 30, 35, 1460, 2140),
(565, 'Dynacamp9', 'Rhinomen', 30, 35, 1700, 1580),
(565, 'Dynacamp10', 'Eyemutants', 15, 20, 2180, 2740),
(565, 'Dynacamp11', 'Snakes', 30, 35, 2100, 2220),
(565, 'Dynacamp12', 'Brontos', 20, 25, 2340, 1060),
(565, 'Dynacamp13', 'Scorpiods', 30, 35, 2340, 660),
(565, 'Dynacamp14', 'Scorpiods', 30, 35, 2620, 300),
(565, 'Dynacamp15', 'Buzzsaws', 20, 25, 2820, 700),
(565, 'Dynacamp16', 'Rhinomen', 45, 50, 2820, 1220),
(565, 'Dynacamp17', 'Rhinomen', 50, 55, 2660, 1460),
(565, 'Dynacamp18', 'Salamanders', 30, 35, 2740, 2460),
(565, 'Dynacamp19', 'Fleas', 25, 30, 3260, 2900),
(565, 'Dynacamp20', 'Minibulls', 40, 45, 3420, 2100),
(565, 'Dynacamp21', 'Rhinomen', 40, 45, 3500, 1300),
(570, 'Dynacamp1', 'Anuns', 145, 150, 380, 500),
(570, 'Dynacamp2', 'Anuns', 145, 150, 380, 900),
(570, 'Dynacamp3', 'Sandworms', 145, 150, 420, 1500),
(570, 'Dynacamp4', 'Anuns', 150, 155, 700, 2460),
(570, 'Dynacamp5', 'Anuns', 150, 155, 460, 3140),
(570, 'Dynacamp6', 'Anuns', 150, 155, 1340, 3060),
(570, 'Dynacamp7', 'Anuns', 150, 155, 1260, 2860),
(570, 'Dynacamp8', 'Mantis', 76, 90, 1140, 1140),
(570, 'Dynacamp9', 'Mantis', 135, 140, 1460, 860),
(570, 'Dynacamp10', 'Cyborgs', 85, 90, 1940, 1380),
(570, 'Dynacamp11', 'Mantis', 165, 170, 2220, 3340),
(570, 'Dynacamp12', 'Mantis', 165, 170, 2460, 2660),
(570, 'Dynacamp13', 'Mantis', 135, 140, 2660, 2300),
(570, 'Dynacamp14', 'Mantis', 165, 170, 2740, 2460),
(570, 'Dynacamp15', 'Mantis', 165, 170, 2980, 2940),
(570, 'Dynacamp16', 'Mantis', 165, 170, 3100, 3260),
(570, 'Dynacamp18', 'Anuns', 165, 170, 3500, 2020),
(570, 'Dynacamp20', 'Anuns', 105, 110, 3060, 900),
(570, 'Dynacamp21', 'Unknown', 171, 190, 3460, 294),
(570, 'Dynacamp22', 'Unknown', 121, 141, 3980, 1780),
(551, 'Dynacamp', 'Template', 70, 75, 140, 2700),
(551, 'Dynacamp1', 'Biofreaks', 35, 40, 340, 1060),
(551, 'Dynacamp2', 'Scorpiods', 45, 50, 540, 1460),
(551, 'Dynacamp3', 'Skin Spiders', 50, 55, 620, 3060),
(551, 'Dynacamp4', 'Hammerbeasts', 70, 75, 980, 3300),
(551, 'Dynacamp5', 'Skin Spiders', 55, 60, 1260, 2540),
(551, 'Dynacamp6', 'Clawfingers', 40, 45, 1140, 1700),
(551, 'Dynacamp7', 'Hounds', 40, 45, 1580, 1140),
(551, 'Dynacamp8', 'Hounds', 40, 45, 1420, 1140),
(551, 'Dynacamp9', 'Hounds', 40, 45, 1380, 1380),
(551, 'Dynacamp10', 'Blubbags', 35, 40, 1100, 2020),
(551, 'Dynacamp11', 'Skin Spiders', 55, 60, 1340, 2500),
(551, 'Dynacamp13', 'Rollerrats', 35, 40, 1740, 1220),
(551, 'Dynacamp12', 'Hammerbeasts', 70, 75, 1540, 3340),
(551, 'Dynacamp14', 'Blubbags', 40, 45, 1700, 1740),
(551, 'Dynacamp15', 'Hammerbeasts', 70, 75, 1700, 3380),
(551, 'Dynacamp16', 'Skin Spiders', 45, 50, 1980, 2580),
(551, 'Dynacamp17', 'Blubbags', 40, 45, 2300, 1340),
(551, 'Dynacamp18', 'Blubbags', 45, 50, 2420, 1340),
(551, 'Dynacamp19', 'Blubbags', 50, 55, 2340, 1500),
(551, 'Dynacamp20', 'Blubbags', 55, 60, 2340, 1420);
+623
View File
@@ -0,0 +1,623 @@
# noinspection LongLineForFile
DROP TABLE IF EXISTS `playfields`;
CREATE TABLE IF NOT EXISTS `playfields`
(
`id` smallint(6) NOT NULL PRIMARY KEY,
`long_name` varchar(100) NOT NULL,
`short_name` varchar(30) DEFAULT NULL,
`dungeon` tinyint(255) NOT NULL DEFAULT 0,
UNIQUE (`short_name`)
);
INSERT INTO `playfields`
VALUES (100, 'Needed PF-stuff', NULL, 0),
(101, 'Default Door Links', NULL, 0),
(102, 'Monster and NPC dependencies', NULL, 0),
(103, 'Shop and Item Dependencies', NULL, 0),
(104, 'One Template PF', NULL, 0),
(105, 'Morten gfx fixes', NULL, 0),
(107, 'AI graphics dependency', NULL, 0),
(109, 'LE dependencies', NULL, 0),
(110, 'Dependency EP1 Mons', NULL, 0),
(111, 'RK Quick Export Dependancy', NULL, 0),
(120, 'Camelot', 'TARA', 0),
(124, 'Tir Assembly Hall', NULL, 0),
(125, 'Smuggler''s Rearranged', NULL, 0),
(127, 'Abandoned Mall', 'SUBWAY', 1),
(128, 'Subway Junction', NULL, 1),
(152, 'Grid', 'GRID', 0),
(320, 'AutocontentMidtech(dung)', NULL, 0),
(321, 'AutocontentHITech(dung)', NULL, 0),
(322, 'Autocontentdungcave(dung)', NULL, 0),
(324, 'AutocontentClan(dung)', NULL, 0),
(331, 'ACD tarm', NULL, 1),
(341, 'ACD Grey Caves-Mines', NULL, 1),
(346, 'ACD Omnilab', NULL, 1),
(351, 'ACD Subway - Ventil', NULL, 1),
(362, 'SL ACG', NULL, 1),
(382, 'Alien ACG', NULL, 1),
(386, 'Alien Mothership', NULL, 1),
(500, 'Parnassos', 'GMPF', 0),
(501, 'Parnassos Island of Ceremony', 'ARKHQ', 0),
(505, 'Avalon', 'AV', 0),
(540, 'Old Athen', 'OA', 0),
(545, 'West Athens', 'WA', 0),
(550, 'Athen Shire', 'AS', 0),
(551, 'Wailing Wastes', 'WW', 0),
(556, 'Coast of Peace', 'CP', 0),
(560, 'Mort', 'MORT', 0),
(565, 'Newland Desert', 'NLD', 0),
(566, 'Newland City', 'NC', 0),
(567, 'Newland', 'NL', 0),
(570, 'Perpetual Wastelands', 'PW', 0),
(585, 'Aegean', 'AEG', 0),
(586, 'Wartorn Valley', 'WV', 0),
(590, 'Central Artery Valley', 'CAV', 0),
(595, 'Deep Artery Valley', 'DAV', 0),
(600, 'Varmint Woods', 'VW', 0),
(605, 'Belial Forest', 'BF', 0),
(610, 'Southern Artery Valley', 'SAV', 0),
(615, 'Southern Fouls Hills', 'SFH', 0),
(620, 'Eastern Fouls Plain', 'EFP', 0),
(625, 'Milky Way', 'MW', 0),
(630, 'Pleasant Meadows', 'PM', 0),
(635, 'Stret East Bank', 'SEB', 0),
(640, 'Tir', 'TIR', 0),
(641, 'Tir Arena', NULL, 0),
(646, 'Tir County', 'TC', 0),
(647, 'Greater Tir County', 'GTC', 0),
(650, 'Upper Stret East Bank', 'USEB', 0),
(655, 'Andromeda', 'AND', 0),
(656, 'Coast of Tranquility', 'CT', 0),
(665, 'Broken Shores', 'BS', 0),
(670, 'Clondyke', 'CLON', 0),
(685, 'Galway County', 'GC', 0),
(687, 'Galway Shire', 'GS', 0),
(695, 'Lush Fields', 'LF', 0),
(696, 'Mutant Domain', 'MD', 0),
(700, 'Omni-1 HQ', 'OHQ', 0),
(705, 'Omni-1 Entertainment', 'ENT', 0),
(706, 'Omni Entertainment Arena', NULL, 0),
(710, 'Omni-1 Trade', 'OT', 0),
(716, 'Omni Forest', 'OF', 0),
(717, 'Greater Omni Forest', 'GOF', 0),
(730, 'Rome Red', 'RR', 0),
(735, 'Rome Blue', 'RB', 0),
(740, 'Rome Green', 'RG', 0),
(750, 'The Reck', 'RECK', 0),
(760, '4 Holes', '4HO', 0),
(790, 'Stret West Bank', 'SWB', 0),
(791, 'Holes in the Wall', 'HITW', 0),
(795, 'The Longest Road', 'TLR', 0),
(800, 'Borealis', 'BOR', 0),
(896, 'Character Creation Lab', NULL, 1),
(950, 'Omni Training', NULL, 0),
(952, 'Clan Training', NULL, 0),
(953, 'Clan Backyard', NULL, 0),
(954, 'Neutral Training', NULL, 0),
(955, 'Neutral Backyard', NULL, 0),
(1001, 'Senitel rec_centre (wine) GOLD', NULL, 0),
(1002, 'medical/eating (wine) GOLD', NULL, 0),
(1003, 'Wine hq (wine) GOLD', NULL, 0),
(1004, 'barracks (wine) GOLD', NULL, 0),
(1005, 'storage (wine) GOLD', NULL, 0),
(1011, '2HO HQ (streteast) GOLD', NULL, 0),
(1012, '2HO satellite (streteast) GOLD', NULL, 0),
(1021, 'Omni barracks (USEB) GOLD', NULL, 0),
(1031, 'Avalon omni barracks', NULL, 0),
(1136, 'Mir shop clan', NULL, 0),
(1137, 'mir shop omni', NULL, 0),
(1180, 'ord_smarket_clan_basic', NULL, 0),
(1181, 'ord_smarket_clan_advanced', NULL, 0),
(1182, 'ord_smarket_clan_sup', NULL, 0),
(1183, 'ord_smarket_omni_basic', NULL, 0),
(1184, 'ord_smarket_omni_advanced', NULL, 0),
(1185, 'ord_smarket_omni_sup', NULL, 0),
(1186, 'ord_smarket_neut_basic', NULL, 0),
(1187, 'ord_smarket_neut_advanced', NULL, 0),
(1189, 'spec_smarket_clan_advanced', NULL, 0),
(1190, 'spec_smarket_clan_sup', NULL, 0),
(1191, 'spec_smarket_omni_advanced', NULL, 0),
(1192, 'spec_smarket_omni_sup', NULL, 0),
(1193, 'spec_smarket_neut_basic', NULL, 0),
(1211, 'basicomniapartment', NULL, 1),
(1231, 'Clan Small Clan Apartment', NULL, 0),
(1232, 'Clan Medium Clan Apartment', NULL, 0),
(1233, 'Clan Big Clan Apartment', NULL, 0),
(1241, 'Neutral Small Clan Apartment', NULL, 0),
(1242, 'Neutral Medium Clan Apartment', NULL, 0),
(1243, 'Neutral Big Clan Apartment', NULL, 0),
(1251, 'Omni Small Guild', NULL, 0),
(1321, 'tir clanbuilding2', NULL, 1),
(1322, 'tir clanbuilding1', NULL, 1),
(1323, 'tir clanbuilding9', NULL, 1),
(1324, 'tir clanbuilding11', NULL, 1),
(1325, 'tir clanbuilding12', NULL, 1),
(1326, 'tir clanbuilding3', NULL, 0),
(1327, 'tir clanbuilding_pod4', NULL, 1),
(1328, 'tir clanbuilding5', NULL, 1),
(1329, 'tir clanbuilding6', NULL, 1),
(1330, 'tir clanbuilding7', NULL, 1),
(1404, 'The Temple of Home', NULL, 0),
(1405, 'clanapartment', NULL, 0),
(1406, 'omniapartment', NULL, 0),
(1407, 'neutralapartment', NULL, 0),
(1410, 'items', NULL, 0),
(1421, 'avalon_building3', NULL, 1),
(1422, 'avalon_building4', NULL, 1),
(1423, 'avalon_building5', NULL, 0),
(1424, 'avalon_building2', NULL, 1),
(1426, 'Clan Registration', NULL, 1),
(1427, 'Omni registration', NULL, 1),
(1428, 'Neutral organisation', NULL, 1),
(1501, 'omnimine_hq_building_06', NULL, 0),
(1502, 'omnimine_hq_building_02', NULL, 0),
(1503, 'omnimine_hq_building_04', NULL, 0),
(1504, 'omnimine_hq_building_07', NULL, 0),
(1505, 'omnimine_hq_building_08', NULL, 0),
(1506, 'omnimine_hq_building_09', NULL, 0),
(1507, 'omnimine_hq_building10', NULL, 0),
(1510, 'Neutral Insurance building', NULL, 0),
(1511, 'Neutral Mission building', NULL, 0),
(1601, 'athens_clanhouse1 VP', NULL, 1),
(1602, 'athens_clanhouse3 VP', NULL, 1),
(1603, 'athens_clanhouse4 VP', NULL, 1),
(1604, 'athens_clanhouse12 VP', NULL, 1),
(1611, 'Swamp_house01 VP', NULL, 1),
(1612, 'Swamp_house02', NULL, 0),
(1613, 'swamp_house03 VP', NULL, 1),
(1614, 'Swamp_house04 VP', NULL, 1),
(1621, 'wood_shack_01 VP', NULL, 1),
(1622, 'wood_shack_02 VP', NULL, 1),
(1623, 'wood_shack_03 VP', NULL, 1),
(1624, 'wood_shack_04 VP', NULL, 1),
(1625, 'wood_shack_05 VP', NULL, 1),
(1626, 'wood_shack_06 VP', NULL, 1),
(1627, 'wood_shack_07 VP', NULL, 1),
(1641, 'lowtech_building1 VP', NULL, 1),
(1642, 'lowtech_building2 VP', NULL, 1),
(1643, 'lowtech_building3 VP', NULL, 1),
(1644, 'lowtech_building4 VP', NULL, 1),
(1645, 'lowtech_building5 VP', NULL, 1),
(1646, 'lowtech_building6 VP', NULL, 1),
(1647, 'lowtech_building7 VP', NULL, 1),
(1648, 'lowtech_waterwell VP', NULL, 1),
(1651, 'rome_shopbuilding1 VP', NULL, 1),
(1652, 'rome_simplebuilding VP', NULL, 1),
(1653, 'rome_simplebuilding1 VP', NULL, 1),
(1661, 'rhino_house1 VP', NULL, 1),
(1662, 'rhino_house2 VP', NULL, 1),
(1663, 'rhino_house3 VP', NULL, 1),
(1671, 'reck_trading_outpost_bunker1 VP', NULL, 0),
(1672, 'reck_trading_outpost_bunker2 VP', NULL, 0),
(1673, 'reck_trading_outpost_bunker3 VP', NULL, 0),
(1674, 'reck_trading_outpost_bunker4 VP', NULL, 0),
(1675, 'reck_trading_outpost_bunker5 VP', NULL, 0),
(1701, 'Home VP 1 medium', NULL, 1),
(1702, 'Home VP 2 big', NULL, 1),
(1703, 'Home VP 3 small', NULL, 1),
(1711, 'Factory VP barracks', NULL, 1),
(1712, 'Factory VP factory', NULL, 1),
(1721, 'LD VP 1', NULL, 1),
(1722, 'LD VP 2', NULL, 1),
(1741, 'enigma_tree01', NULL, 0),
(1742, 'enigma_tree02', NULL, 0),
(1743, 'enigma_tree03', NULL, 0),
(1826, 'Dancing Atrox Bar', NULL, 0),
(1827, 'Omni Military Barracks', NULL, 0),
(1833, 'Cyborg Barracks', NULL, 1),
(1836, 'Baboons Nightclub', NULL, 0),
(1840, 'Rompa Bar', NULL, 0),
(1846, 'McRiid''s Office', NULL, 0),
(1862, 'The Smugglers Den', NULL, 0),
(1866, 'The HQ of Omni-Mine', NULL, 0),
(1886, 'Versailles Tower', NULL, 0),
(1887, 'Treepine Hut', NULL, 0),
(1891, 'The Happy Rebel Inn', NULL, 0),
(1892, 'Enjoy it While it Lasts', NULL, 0),
(1893, 'The Cup', NULL, 0),
(1894, 'Clan Registration Office', NULL, 0),
(1901, 'Neutral Organisation Office', NULL, 0),
(1902, 'Neuters ''R'' Us', NULL, 0),
(1913, 'Reet Retreat', NULL, 1),
(1931, 'Temple of Three Winds', NULL, 1),
(1933, 'Steps of Madness', NULL, 1),
(1941, 'Bio MARE', NULL, 0),
(1943, 'High Level ToTW', NULL, 1),
(2001, 'clan_basic_weapons_shop', NULL, 0),
(2002, 'clan_basic_armor_shop', NULL, 0),
(2003, 'clan_basic_pharmasist_shop', NULL, 0),
(2004, 'clan_basic_clothes_shop', NULL, 0),
(2005, 'clan_basic_implants_shop', NULL, 0),
(2006, 'clan_basic_nano_shop', NULL, 0),
(2010, 'clan_advanced_weapons_shop', NULL, 0),
(2011, 'clan_advanced_armor_shop', NULL, 0),
(2012, 'clan_advanced_pharmacist_shop', NULL, 0),
(2013, 'clan_advanced_implants_shop', NULL, 0),
(2014, 'clan_advanced_nano_shop', NULL, 0),
(2020, 'clan_sup_weapons_shop', NULL, 0),
(2021, 'clan_sup_armor_shop', NULL, 0),
(2022, 'clan_sup_pharmacist_shop', NULL, 0),
(2023, 'clan_sup_implants_shop', NULL, 0),
(2024, 'clan_sup_nano_shop', NULL, 0),
(2030, 'omni_basic_weapons_shop', NULL, 0),
(2031, 'omni_basic_armor_shop', NULL, 0),
(2032, 'omni_basic_pharmacist', NULL, 0),
(2033, 'omni_basic_clothes_shop', NULL, 0),
(2034, 'omni_basic_implants_shop', NULL, 0),
(2040, 'omni_advanced_weapons_shop', NULL, 0),
(2041, 'omni_advanced_armor_shop', NULL, 0),
(2042, 'omni_advanced_pharmacist_shop', NULL, 0),
(2043, 'omni_advanced_implants_shop', NULL, 0),
(2050, 'omni_sup_weapons_shop', NULL, 0),
(2051, 'omni_sup_armor_shop', NULL, 0),
(2052, 'omni_sup_pharmacist_shop', NULL, 0),
(2053, 'omni_sup_implants_shop', NULL, 0),
(2060, 'neut_basic_weapon _shop', NULL, 0),
(2061, 'neut_basic_armor_shop', NULL, 0),
(2062, 'neut_basic_pharmacist_shop', NULL, 0),
(2063, 'neut_basic_clothes_shop', NULL, 0),
(2064, 'neut_basic_implants_shop', NULL, 0),
(2070, 'neut_advanced_weapons_shop', NULL, 0),
(2071, 'neut_advanced_armor_shop', NULL, 0),
(2072, 'neut_advanced_pharmacist_shop', NULL, 0),
(2073, 'neut_advanced_implants_shop', NULL, 0),
(2096, '4holes Fashion', NULL, 0),
(3000, 'Omni-1 Entertainment Backyard 1', NULL, 0),
(3001, 'Omni-1 Entertainment Backyard 2', NULL, 0),
(3002, 'Omni-1 Entertainment Backyard 3', NULL, 0),
(3003, 'Omni-1 Entertainment Backyard 4', NULL, 0),
(3004, 'Omni-1 Entertainment Backyard 5', NULL, 0),
(3005, 'Omni-1 Entertainment Backyard 6', NULL, 0),
(3006, 'Omni-1 Entertainment Backyard 7', NULL, 0),
(3007, 'Omni-1 Entertainment Backyard 8', NULL, 0),
(3008, 'Omni-1 Entertainment Backyard 9', NULL, 0),
(3009, 'Omni-1 Entertainment Backyard 10', NULL, 0),
(3010, 'Omni-1 Entertainment Backyard 11', NULL, 0),
(3011, 'Omni-1 Entertainment Backyard 12', NULL, 0),
(3012, 'Omni-1 Entertainment Backyard 13', NULL, 0),
(3013, 'Omni-1 Entertainment Backyard 14', NULL, 0),
(3014, 'Omni-1 Entertainment Backyard 15', NULL, 0),
(3015, 'Omni-1 Entertainment Backyard 16', NULL, 0),
(3016, 'Omni-1 Entertainment Backyard 17', NULL, 0),
(3017, 'Omni-1 Entertainment Backyard 18', NULL, 0),
(3018, 'Omni-1 Entertainment Backyard 19', NULL, 0),
(3019, 'Omni-1 Entertainment Backyard 20', NULL, 0),
(3020, 'Omni-1 Trade Backyard 1', NULL, 0),
(3021, 'Omni-1 Trade Backyard 2', NULL, 0),
(3022, 'Omni-1 Trade Backyard 3', NULL, 0),
(3023, 'Omni-1 Trade Backyard 4', NULL, 0),
(3024, 'Omni-1 Trade Backyard 5', NULL, 0),
(3025, 'Omni-1 Trade Backyard 6', NULL, 0),
(3026, 'Omni-1 Trade Backyard 7', NULL, 0),
(3027, 'Omni-1 Trade Backyard 8', NULL, 0),
(3028, 'Omni-1 Trade Backyard 9', NULL, 0),
(3029, 'Omni-1 Trade Backyard 10', NULL, 0),
(3030, 'Omni-1 Trade Backyard 11', NULL, 0),
(3031, 'Omni-1 Trade Backyard 12', NULL, 0),
(3032, 'Omni-1 Trade Backyard 13', NULL, 0),
(3033, 'Omni-1 Trade Backyard 14', NULL, 0),
(3034, 'Omni-1 Trade Backyard 15', NULL, 0),
(3035, 'Omni-1 Trade Backyard 16', NULL, 0),
(3036, 'Omni-1 Trade Backyard 17', NULL, 0),
(3037, 'Omni-1 Trade Backyard 18', NULL, 0),
(3038, 'Omni-1 Trade Backyard 19', NULL, 0),
(3039, 'Omni-1 Trade Backyard 20', NULL, 0),
(3040, 'Rome Blue Backyard 1', NULL, 0),
(3041, 'Rome Blue Backyard 2', NULL, 0),
(3042, 'Rome Blue Backyard 3', NULL, 0),
(3043, 'Rome Blue Backyard 4', NULL, 0),
(3044, 'Rome Blue Backyard 5', NULL, 0),
(3045, 'Rome Blue Backyard 6', NULL, 0),
(3046, 'Rome Blue Backyard 7', NULL, 0),
(3047, 'Rome Blue Backyard 8', NULL, 0),
(3048, 'Rome Blue Backyard 9', NULL, 0),
(3049, 'Rome Blue Backyard 10', NULL, 0),
(3050, 'Rome Green Backyard 1', NULL, 0),
(3051, 'Rome Green Backyard 2', NULL, 0),
(3052, 'Rome Green Backyard 3', NULL, 0),
(3053, 'Rome Green Backyard 4', NULL, 0),
(3054, 'Rome Green Backyard 5', NULL, 0),
(3055, 'Rome Green Backyard 6', NULL, 0),
(3056, 'Rome Green Backyard 7', NULL, 0),
(3057, 'Rome Green Backyard 8', NULL, 0),
(3058, 'Rome Green Backyard 9', NULL, 0),
(3059, 'Rome Green Backyard 10', NULL, 0),
(3060, 'Newland Backyard 1', NULL, 0),
(3061, 'Newland Backyard 2', NULL, 0),
(3062, 'Newland Backyard 3', NULL, 0),
(3063, 'Newland Backyard 4', NULL, 0),
(3064, 'Newland Backyard 5', NULL, 0),
(3065, 'Newland Backyard 6', NULL, 0),
(3066, 'Newland Backyard 7', NULL, 0),
(3067, 'Newland Backyard 8', NULL, 0),
(3068, 'Newland Backyard 9', NULL, 0),
(3069, 'Newland Backyard 10', NULL, 0),
(3070, 'Newland Backyard 11', NULL, 0),
(3071, 'Newland Backyard 12', NULL, 0),
(3080, 'Borealis Backyard 1', NULL, 0),
(3081, 'Borealis Backyard 2', NULL, 0),
(3082, 'Borealis Backyard 3', NULL, 0),
(3083, 'Borealis Backyard 4', NULL, 0),
(3084, 'Borealis Backyard 5', NULL, 0),
(3085, 'Borealis Backyard 6', NULL, 0),
(3086, 'Borealis Backyard 7', NULL, 0),
(3087, 'Borealis Backyard 8', NULL, 0),
(3088, 'Borealis Backyard 9', NULL, 0),
(3089, 'Borealis Backyard 10', NULL, 0),
(3100, 'Tir Backyard 1', NULL, 0),
(3101, 'Tir Backyard 2', NULL, 0),
(3102, 'Tir Backyard 3', NULL, 0),
(3103, 'Tir Backyard 4', NULL, 0),
(3104, 'Tir Backyard 5', NULL, 0),
(3105, 'Tir Backyard 6', NULL, 0),
(3106, 'Tir Backyard 7', NULL, 0),
(3107, 'Tir Backyard 8', NULL, 0),
(3108, 'Tir Backyard 9', NULL, 0),
(3109, 'Tir Backyard 10', NULL, 0),
(3110, 'Tir Backyard 11', NULL, 0),
(3111, 'Tir Backyard 12', NULL, 0),
(3112, 'Tir Backyard 13', NULL, 0),
(3113, 'Tir Backyard 14', NULL, 0),
(3114, 'Tir Backyard 15', NULL, 0),
(3115, 'Tir Backyard 16', NULL, 0),
(3116, 'Tir Backyard 17', NULL, 0),
(3117, 'Tir Backyard 18', NULL, 0),
(3120, 'Old Athen Backyard 1', NULL, 0),
(3121, 'Old Athen Backyard 2', NULL, 0),
(3122, 'Old Athen Backyard 3', NULL, 0),
(3123, 'Old Athen Backyard 4', NULL, 0),
(3124, 'Old Athen Backyard 5', NULL, 0),
(3125, 'Old Athen Backyard 6', NULL, 0),
(3126, 'Old Athen Backyard 7', NULL, 0),
(3127, 'Old Athen Backyard 8', NULL, 0),
(3128, 'Old Athen Backyard 9', NULL, 0),
(3129, 'Old Athen Backyard 10', NULL, 0),
(3130, 'Old Athen Backyard 11', NULL, 0),
(3131, 'Old Athen Backyard 12', NULL, 0),
(3132, 'Old Athen Backyard 13', NULL, 0),
(3133, 'Old Athen Backyard 14', NULL, 0),
(3134, 'Old Athen Backyard 15', NULL, 0),
(3135, 'Old Athen Backyard 16', NULL, 0),
(3136, 'Old Athen Backyard 17', NULL, 0),
(3137, 'Old Athen Backyard 18', NULL, 0),
(3138, 'Old Athen Backyard 19', NULL, 0),
(3139, 'Old Athen Backyard 20', NULL, 0),
(3140, 'West Athen Backyard 1', NULL, 0),
(3141, 'West Athen Backyard 2', NULL, 0),
(3142, 'West Athen Backyard 3', NULL, 0),
(3143, 'West Athen Backyard 4', NULL, 0),
(3144, 'West Athen Backyard 5', NULL, 0),
(3145, 'West Athen Backyard 6', NULL, 0),
(3146, 'West Athen Backyard 7', NULL, 0),
(3147, 'West Athen Backyard 8', NULL, 0),
(3148, 'West Athen Backyard 9', NULL, 0),
(3149, 'West Athen Backyard 10', NULL, 0),
(4001, 'Jobe Research', 'RESEARCH', 0),
(4003, 'Burning Marshes', NULL, 0),
(4005, 'Inferno Burning Marshes', 'INFMARSHES', 0),
(4006, 'Penumbra', NULL, 0),
(4010, 'Garden of Redeemed Main', NULL, 0),
(4011, 'Garden_of_unredeemed', NULL, 0),
(4102, 'Beer And Booze', NULL, 1),
(4107, 'Fixer Grid', 'FGRID', 1),
(4121, 'Will To Fight', NULL, 0),
(4211, 'Maze_Acheron', NULL, 0),
(4212, 'Maze_Letha_scheol_red', NULL, 0),
(4213, 'Maze_Styx_ado_red', NULL, 0),
(4214, 'Maze_Eridan', NULL, 0),
(4215, 'Maze_Phlegethas1', NULL, 0),
(4220, 'Maze_Acheron (Unre)', NULL, 0),
(4221, 'Maze_Letha_scheol_unre', NULL, 0),
(4222, 'Maze_Styx_ado_unre', NULL, 0),
(4223, 'Maze_Eridan (Unre)', NULL, 0),
(4224, 'Maze_Phlegethas1 (Unre)', NULL, 0),
(4310, 'Nascense Frontier', 'NASCFRONTIER', 0),
(4311, 'Nascense Wilds', 'NASCWILDS', 0),
(4312, 'Nascense Swamp', 'NASCSWAMP', 0),
(4313, 'Nascense Training Ground', 'NASCTRAIN', 0),
(4314, 'Jobe Harbour Gateway', NULL, 1),
(4315, 'Jobe Market Gateway', NULL, 1),
(4316, 'Jobe Plaza Gateway', NULL, 1),
(4318, 'Nascense Portal', NULL, 0),
(4320, 'Penumbra Forest', 'PENFOREST', 0),
(4321, 'Penumbra Valley', 'PENVALLEY', 0),
(4322, 'Penumbra Hollows', 'PENHOLLOW', 0),
(4324, 'Penumbra Transit', NULL, 1),
(4327, 'Jobe Apartment Normal', NULL, 1),
(4328, 'Pandemonium Caina', 'PANDECAINA', 0),
(4329, 'Pandemonium Antenora', 'PANDEANTENORA', 0),
(4330, 'Pandemonium Ptolemea', 'PANDEPTOLEMEA', 0),
(4331, 'Pandemonium Judecca', 'PANDEJUDECCA', 0),
(4334, 'Rubi-Ka Rumble', NULL, 1),
(4335, 'Dark Ruins', NULL, 0),
(4336, 'Alappaa', 'ALAPPAA', 0),
(4337, 'Albtraum', 'ALB', 0),
(4341, 'Basic Omni org hq', NULL, 0),
(4342, 'Basic Clan org hq', NULL, 0),
(4343, 'Basic Neutral org hq', NULL, 0),
(4344, 'Advanced Omni org hq', NULL, 0),
(4345, 'Advanced Clan org hq', NULL, 0),
(4346, 'Advanced Neutral org hq', NULL, 0),
(4347, 'Superior Omni org hq', NULL, 0),
(4348, 'Superior Clan org hq', NULL, 0),
(4349, 'Superior Neutral org hq', NULL, 0),
(4350, '...remember rule no. 1', NULL, 0),
(4351, 'Swimming Pool', NULL, 0),
(4352, 'Market', NULL, 0),
(4354, 'Uncle Bazzits Workshop', NULL, 1),
(4355, 'Basic Player Market', NULL, 1),
(4356, 'Advanced Player Market', NULL, 1),
(4357, 'Superior Player Market', NULL, 1),
(4360, 'Clinique Plastique', NULL, 0),
(4363, 'Tir Night Club', NULL, 1),
(4364, 'Unicorn Outpost', 'OUTPOST', 0),
(4365, 'Sector 13', 'S13', 0),
(4366, 'Sector 28', 'S28', 0),
(4367, 'Sector 35', 'S35', 0),
(4368, 'Unicorn Outpost - Lower level', NULL, 0),
(4370, 'Sector 42', 'S42', 0),
(4374, 'Sector 10', 'S10', 0),
(4376, 'ICC Assembly Hall', NULL, 1),
(4380, 'Battle Station 20-49', NULL, 0),
(4381, 'Battle Station 50-74', NULL, 0),
(4382, 'Battle Station 75-99', NULL, 0),
(4383, 'Battle Station 100-124', NULL, 0),
(4384, 'Battle Station 125-149', NULL, 0),
(4385, 'Battle Station 150-174', NULL, 0),
(4386, 'Battle Station 175-199', NULL, 0),
(4387, 'Battle Station 200-209', NULL, 0),
(4388, 'Battle Station 215-220', NULL, 0),
(4389, 'Caina', NULL, 0),
(4390, 'Ptolemea', NULL, 0),
(4391, 'Judecca', NULL, 0),
(4468, 'Sector 7', 'S7', 0),
(4504, 'West Buggy (DONT DELETE)', NULL, 0),
(4505, 'South Buggy (DONT DELETE)', NULL, 0),
(4524, 'Elysium_pre-split', NULL, 0),
(4525, 'Jobe', 'JOBE', 0),
(4526, 'Jobe_pre-split', NULL, 0),
(4530, 'Jobe Platform', 'PLATFORM', 0),
(4531, 'Jobe Harbor', 'HARBOR', 0),
(4532, 'Jobe Market', 'MARKET', 0),
(4533, 'Jobe Plaza', 'PLAZA', 0),
(4534, 'Jobe Apartment', NULL, 0),
(4540, 'Elysium South', 'ELYSOUTH', 0),
(4541, 'Elysium West', 'ELYWEST', 0),
(4542, 'Elysium', 'ELY', 0),
(4543, 'Elysium East', 'ELYEAST', 0),
(4544, 'Elysium North', 'ELYNORTH', 0),
(4561, 'Arrival Hall Gateway', NULL, 1),
(4563, 'Hardware Dimension - Basic', NULL, 0),
(4564, 'Hardware Dimension - Advanced', NULL, 0),
(4565, 'Hardware Dimenion - Superior', NULL, 0),
(4567, 'Dimensional Shift - Basic', NULL, 0),
(4568, 'Dimensional Shift - Advanced', NULL, 0),
(4569, 'Dimensional Shift - Superior', NULL, 0),
(4571, 'Heavenly Business - Basic', NULL, 0),
(4572, 'Heavenly Business - Advanced', NULL, 0),
(4573, 'Heavenly Business - Superior', NULL, 0),
(4575, 'IPS Interior - Basic', NULL, 0),
(4576, 'IPS Interior - Advanced', NULL, 0),
(4577, 'IPS Interior - Superior', NULL, 0),
(4582, 'ICC Shuttleport', NULL, 0),
(4604, 'Arrival_hall', 'ARRIVALHALL', 0),
(4605, 'Inferno', 'INF', 0),
(4621, 'Redeemed Temple (Elysium)', NULL, 0),
(4622, 'Unredeemed Temple (ELysium)', NULL, 0),
(4623, 'Redeemed Temple (Scheol)', NULL, 0),
(4624, 'Unredeemed Temple (Scheol)', NULL, 0),
(4625, 'Redeemed Temple (Adonis)', NULL, 0),
(4626, 'Unredeemed Temple (Adonis)', NULL, 0),
(4627, 'Redeemed Temple (Penumbra)', NULL, 0),
(4628, 'Unredeemed Temple (Penumbra)', NULL, 0),
(4629, 'Redeemed Temple (Inferno)', NULL, 0),
(4630, 'Unredeemed Temple (Inferno)', NULL, 0),
(4676, 'Garden of Redeemed Nascense', NULL, 0),
(4677, 'Garden_of_unredeemed Nascense', NULL, 0),
(4678, 'Garden of Redeemed Elysium', NULL, 0),
(4679, 'Garden of Redeemed Elysium2', NULL, 0),
(4680, 'Garden_of_unredeemed Elysium', NULL, 0),
(4681, 'Garden_of_unredeemed Elysium2', NULL, 0),
(4682, 'Garden of Redeemed Scheol', NULL, 0),
(4683, 'Garden_of_unredeemed Scheol', NULL, 0),
(4684, 'Garden of Redeemed Adonis', NULL, 0),
(4685, 'Garden of Redeemed Adonis2', NULL, 0),
(4686, 'Garden_of_unredeemed Adonis', NULL, 0),
(4687, 'Garden_of_unredeemed Adonis2', NULL, 0),
(4688, 'Garden of Redeemed Penumbra', NULL, 0),
(4689, 'Garden of Redeemed Penumbra2', NULL, 0),
(4690, 'Garden_of_unredeemed Penumbra', NULL, 0),
(4691, 'Garden_of_unredeemed Penumbra2', NULL, 0),
(4692, 'Garden of Redeemed Inferno', NULL, 0),
(4693, 'Garden of Redeemed Inferno2', NULL, 0),
(4694, 'Garden_of_unredeemed Inferno', NULL, 0),
(4695, 'Garden_of_unredeemed Inferno2', NULL, 0),
(4696, 'Garden of Redeemed Pandemonium', NULL, 0),
(4697, 'Garden of unredeemed Pandemonium', NULL, 0),
(4698, 'Garden of Redeemed Scheol2', NULL, 0),
(4699, 'Garden_of_unredeemed Scheol2', NULL, 0),
(4704, 'Booster Shop (dungeon)', NULL, 0),
(4805, 'The Crypt of Home', NULL, 0),
(4833, 'Teleport Tower', NULL, 0),
(4872, 'Adonis City', 'ADOCITY', 0),
(4873, 'Adonis Abyss', 'ADO', 0),
(4877, 'Adonis Hallway', NULL, 0),
(4880, 'Scheol Upper', 'SCHEOLUPPER', 0),
(4881, 'Scheol Lower', 'SCHEOLLOWER', 0),
(4885, 'Shadow Crypt', NULL, 0),
(4894, 'Coast of Harmony', NULL, 0),
(4898, 'Broken Shores AI movie', NULL, 0),
(4899, 'Broken Shores AI Demo', NULL, 0),
(5001, 'Playa del Desierto', NULL, 0),
(5002, 'Montroyal City', NULL, 0),
(6001, 'Area', NULL, 0),
(6002, 'Sunrise Station', NULL, 0),
(6003, 'The Dig Site', NULL, 0),
(6007, 'Unicorn Defence Hub', NULL, 0),
(6010, 'Serenity Islands', NULL, 0),
(6011, 'Arid Rift', 'ARID', 0),
(6012, 'Neretva Canyon', NULL, 0),
(6013, 'Central Gateway', NULL, 0),
(6014, 'Inside The Ruin', NULL, 0),
(6015, 'The Elder Hall', NULL, 0),
(6017, 'Teachers Chamber', NULL, 0),
(6020, 'Xan Hub Tower Room 1', NULL, 0),
(6021, 'Xan Tower', NULL, 0),
(6022, 'Area X', NULL, 0),
(6024, 'Sealed Antechamber', NULL, 1),
(6028, 'Santa Leet Event', NULL, 1),
(6035, 'Dark Ruins', NULL, 0),
(6036, 'Dark Ruins', NULL, 0),
(6041, 'Inside The Ruin', NULL, 0),
(6050, 'Serenity Islands', NULL, 0),
(6051, 'Serenity Islands', NULL, 0),
(6055, 'Inside The Machine', NULL, 0),
(6056, 'Dust Brigade Research Facility', NULL, 0),
(6057, 'Dust Brigade Research Facility 2', NULL, 0),
(6060, 'Profspecroom', NULL, 0),
(6061, 'Engineers Dugout', NULL, 0),
(6071, 'The Grind', NULL, 0),
(6101, 'Three Craters West', '3CW', 0),
(6102, 'Three Craters East', '3CE', 0),
(6104, 'SBC-Xpm Site Alpha-Romeo 29', NULL, 0),
(6111, 'Area', NULL, 0),
(6112, 'Area', NULL, 0),
(6113, 'Area', NULL, 0),
(6115, 'Area', NULL, 0),
(6121, 'Area', NULL, 0),
(6123, 'Area', NULL, 0),
(6125, 'Area', NULL, 0),
(6127, 'Area', NULL, 0),
(6129, 'Area', NULL, 0),
(6131, 'Area', NULL, 0),
(6133, 'Sauna', NULL, 0),
(6211, 'Area', NULL, 0),
(6300, 'SBC-Xpm Site Alpha-Romeo 29', NULL, 0),
(6301, 'SBC-Xpm Site Alpha-Romeo 29', NULL, 0),
(6302, 'SBC-Xpm Site Alpha-Romeo 29', NULL, 0),
(6303, 'SBC-Xpm Site Alpha-Romeo 29', NULL, 0),
(6304, 'SBC-Xpm Site Alpha-Romeo 29', NULL, 0),
(6305, 'SBC-Xpm Site Alpha-Romeo 29', NULL, 0),
(6306, 'SBC-Xpm Site Alpha-Romeo 29', NULL, 0),
(6550, 'Uturn Canyon', 'UC', 0),
(6551, 'Uturn Forest', 'UF', 0),
(6553, 'Arete', 'ARETE', 0),
(7001, 'Palmiero''s Office', NULL, 0),
(7010, 'DOJA Research', NULL, 0),
(7011, 'Omni Tek Agency', NULL, 0),
(7012, 'Clan Quest HQ', NULL, 0),
(7013, 'Antiques and more', NULL, 0),
(7015, 'Area', NULL, 0),
(7051, 'Area', NULL, 0),
(7054, 'Area', NULL, 0),
(7092, 'Area', NULL, 0),
(7101, 'Freighter headed to ICC - Andromeda', NULL, 0),
(8002, 'Phasefront Racetrack', NULL, 0),
(8004, 'Area', NULL, 0),
(8006, 'Generetic Corp. Offices', NULL, 0),
(8040, 'Foundry of Nightmares', NULL, 0),
(8045, 'Foundry of Nightmares', NULL, 0),
(8046, 'Foundry of Nightmares', NULL, 0),
(8050, 'Foundry of Nightmares', NULL, 0),
(8080, 'Santa Leet Event - Aliums', NULL, 0);
+21
View File
@@ -0,0 +1,21 @@
# noinspection LongLineForFile
DROP TABLE IF EXISTS research;
CREATE TABLE IF NOT EXISTS research
(
level SMALLINT NOT NULL,
sk INT NOT NULL,
levelcap SMALLINT NOT NULL
);
INSERT INTO research
VALUES (0, 0, 0),
(1, 50, 1),
(2, 450, 50),
(3, 1600, 75),
(4, 4700, 100),
(5, 12750, 125),
(6, 32000, 150),
(7, 54000, 175),
(8, 64000, 190),
(9, 740000, 190),
(10, 900000, 200);
@@ -0,0 +1,126 @@
# noinspection LongLineForFile
DROP TABLE IF EXISTS whompah_cities;
CREATE TABLE IF NOT EXISTS whompah_cities
(
id INT PRIMARY KEY AUTO_INCREMENT,
city_name VARCHAR(50) NOT NULL,
zone VARCHAR(50) NOT NULL,
faction VARCHAR(10) NOT NULL,
short_name VARCHAR(255) DEFAULT NULL
);
INSERT INTO whompah_cities (id, city_name, zone, faction, short_name)
VALUES (1, 'ICC', 'Andromeda', 'Neutral', 'icc'),
(2, 'Camelot', 'Avalon', 'Clan', 'camelot'),
(3, 'Bliss', 'The Longest Road', 'Clan', 'bliss'),
(4, 'Broken Shores - North', 'Broken Shores', 'Clan', 'bsn'),
(5, 'Old Athen', 'Athen', 'Clan', 'oa'),
(6, 'Tir', 'Tir County', 'Clan', 'tir'),
(7, 'Varmint Woods', 'Varmint Woods', 'Clan', 'vw'),
(8, 'Wailing Wastes', 'Wailing Wastes', 'Clan', 'ww'),
(9, 'Wine', 'Belial Forest', 'Clan', 'wine'),
(10, 'Newland City', 'Newland', 'Neutral', 'nlc'),
(11, 'Newland Desert', 'Newland Desert', 'Neutral', 'nld'),
(12, 'Borealis', 'Borealis', 'Neutral', 'bor'),
(13, 'Hope', 'Mort', 'Neutral', 'hope'),
(14, 'Stret West Bank', 'Stret West Bank', 'Neutral', 'swb'),
(15, 'Omni Trade', 'Omni Trade', 'Omni', 'trade'),
(16, 'Omni Entertainment', 'Omni Entertainment', 'Omni', 'ent'),
(17, 'Galway Castle', 'Galway County', 'Omni', 'gc'),
(18, '20K', 'Pleasant Meadows', 'Omni', '20k'),
(19, '4 Holes', '4 Holes', 'Clan', '4ho'),
(20, 'Broken Shores - South', 'Broken Shores', 'Omni', 'bss'),
(21, 'Outpost 10-3', 'Southern Artery Valley', 'Omni', 'sav'),
(22, '2HO', 'Stret East Bank', 'Omni', '2ho'),
(23, 'Rome', 'Rome Red', 'Omni', 'rr'),
(24, 'The Longest Road', 'The Longest Road', 'Omni', 'tlr'),
(25, 'Mutant Domain', 'Mutant Domain', 'Omni', 'md'),
(26, 'Perpetual Wasteland', 'Perpetual Wasteland', 'Neutral', 'pw'),
(27, 'Southern Fouls Hills', 'Southern Fouls Hills', 'Omni', 'sfh'),
(28, 'Central Artery Valley', 'Central Artery Valley', 'Clan', 'cav'),
(29, 'The Reck North', 'The Reck', 'Omni', 'trn'),
(30, 'The Reck South', 'The Reck', 'Clan', 'trs');
DROP TABLE IF EXISTS whompah_cities_rel;
CREATE TABLE whompah_cities_rel
(
city1_id SMALLINT NOT NULL,
city2_id SMALLINT NOT NULL
);
INSERT INTO whompah_cities_rel (city1_id, city2_id)
VALUES (1, 10),
(1, 15),
(1, 6),
(2, 3),
(2, 8),
(3, 2),
(3, 4),
(3, 5),
(4, 3),
(4, 9),
(5, 3),
(5, 6),
(5, 8),
(6, 1),
(6, 5),
(6, 7),
(7, 6),
(7, 8),
(7, 9),
(8, 2),
(8, 5),
(8, 7),
(9, 4),
(9, 7),
(10, 1),
(10, 11),
(10, 12),
(11, 10),
(11, 13),
(12, 10),
(12, 14),
(13, 11),
(13, 14),
(14, 12),
(14, 13),
(15, 1),
(15, 16),
(15, 17),
(16, 15),
(16, 18),
(16, 23),
(16, 25),
(17, 15),
(17, 21),
(17, 23),
(18, 16),
(18, 21),
(20, 23),
(21, 17),
(21, 18),
(21, 22),
(22, 21),
(22, 24),
(23, 16),
(23, 17),
(23, 20),
(24, 22),
(25, 16),
(26, 13),
(13, 26),
(25, 22),
(22, 25),
(24, 20),
(20, 24),
(27, 18),
(18, 27),
(28, 19),
(19, 28),
(19, 4),
(4, 19),
(30, 6),
(6, 30),
(29, 15),
(15, 29);
-- test congruency
-- SELECT * FROM (SELECT city1_id, count(*) AS cnt FROM whompah_cities_rel GROUP BY city1_id ) t1 JOIN (SELECT city2_id, count(*) AS cnt FROM whompah_cities_rel GROUP BY city2_id) t2 ON t1.city1_id = t2.city2_id WHERE t1.cnt <> t2.cnt
@@ -0,0 +1,61 @@
import calendar
import time
from datetime import datetime
import pytz
from core.chat_blob import ChatBlob
from core.command_param_types import Any, Const
from core.decorators import instance, command
@instance()
class TimeController:
def __init__(self):
self.time_format = "%Y-%m-%d %H:%M:%S %Z%z"
@command(command="time", params=[Const('all', is_optional=True)], access_level="member",
description="Show the current time in every timezone")
def time_cmd(self, _, const_all):
if const_all:
blob = "Unixtime => %d\n\n" % int(time.time())
current_region = ""
dt = datetime.now()
for tz in pytz.common_timezones:
result = tz.split("/", 2)
if len(result) == 2:
region, city = result
else:
region = result[0]
city = result[0]
if current_region != region:
blob += "\n<pagebreak><header2>%s</header2>\n" % region
current_region = region
blob += "%s => %s\n" % (city, dt.astimezone(pytz.timezone(tz)).strftime(self.time_format))
return ChatBlob("Timezones", blob)
else:
now = datetime.utcnow()
day = f"{now.day}"
if now.day == 1:
day += "st"
elif now.day == 2:
day += "nd"
elif now.day == 3:
day += "rd"
else:
day += "th"
return f"Currently its {now.hour}:{now.minute}:{now.second} " \
f"{calendar.month_name[now.month]} {day}, {now.year + 27474} Rubi-Ka Universal Time."
@command(command="time", params=[Any("timezone")], access_level="member",
description="Show time for the specified timezone")
def time_zone_cmd(self, _, timezone_str):
timezone_str = timezone_str.lower()
for tz in pytz.common_timezones:
if tz.lower() == timezone_str:
return f"{tz} => {datetime.now(tz=pytz.timezone(tz)).strftime(self.time_format)}"
return "Unknown timezone."
@@ -0,0 +1,108 @@
from core.chat_blob import ChatBlob
from core.command_param_types import Any
from core.db import DB
from core.decorators import instance, command
from core.text import Text
@instance()
class WhompahController:
def inject(self, registry):
self.db: DB = registry.get_instance("db")
self.text: Text = registry.get_instance("text")
def pre_start(self):
self.db.load_sql_file(self.module_dir + "/sql/" + "whompah_cities.sql", pre_optimized=True)
self.db.create_view("whompah_cities")
self.db.create_view("whompah_cities_rel")
@command(command="whompah", params=[], access_level="all",
description="Show list of whompah cities")
def whompah_list_cmd(self, request):
cities = self.db.query("SELECT id, city_name, zone, faction, short_name FROM whompah_cities ORDER BY city_name")
blob = ""
for city in cities:
blob += f"{self.text.get_formatted_faction(city.faction.lower(), city.city_name)} " \
f"({self.text.make_tellcmd(city.short_name, f'whompah {city.short_name}')})\n"
return ChatBlob("Whompah Cities", blob)
@command(command="whompah", params=[Any("city1"), Any("city2")], access_level="all",
description="Show whompah route between two cities")
def whompah_travel_cmd(self, request, city_name1, city_name2):
city1 = self.get_whompah_city(city_name1)
city2 = self.get_whompah_city(city_name2)
if not city1:
return f"Could not find whompah city <highlight>{city_name1}</highlight>."
elif not city2:
return f"Could not find whompah city <highlight>{city_name2}</highlight>."
data = self.db.query("SELECT w1.*, w2.city2_id AS city_rel FROM whompah_cities w1 "
"JOIN whompah_cities_rel w2 ON w1.id = w2.city1_id")
cities = {}
for city in data:
rel = cities.get(city.id, {}).get("rel", [])
rel.append(city.city_rel)
cities[city.id] = city
cities[city.id]["rel"] = rel
path = self.format_path(self.find_path(cities, city1.id, city2.id))
return " -> ".join(path)
@command(command="whompah", params=[Any("city")], access_level="all",
description="Show whompah destinations for a city")
def whompah_city_cmd(self, request, city_name):
city = self.get_whompah_city(city_name)
if not city:
return f"Could not find whompah city <highlight>{city_name}</highlight>."
cities = self.db.query("SELECT w2.* FROM whompah_cities_rel w1 "
"JOIN whompah_cities w2 ON w1.city2_id = w2.id "
"WHERE w1.city1_id = ?", [city.id])
msg = f"From {city.city_name} you can get to: "
msg += ", ".join(map(lambda x: f"{self.text.get_formatted_faction(x.faction.lower(), x.city_name)} "
f"({x.short_name})", cities))
return msg
def get_whompah_city(self, city):
return self.db.query_single("SELECT id, city_name, zone, faction, short_name FROM whompah_cities "
"WHERE city_name LIKE ? "
"OR short_name LIKE ?", [city, city])
def find_path(self, cities, start_city_id, end_city_id):
def get_and_remove(key):
value = cities[key]
del cities[key]
return value
end_city = get_and_remove(end_city_id)
if start_city_id == end_city_id:
return end_city
# create stack and initialize
# start with ending city and traverse backwards so we don't have to reverse the result
stack = [end_city]
while stack:
root = stack.pop(0)
for rel in root["rel"]:
if rel in cities:
c = get_and_remove(rel)
c["parent"] = root
if c["id"] == start_city_id:
return c
stack.append(c)
return None
def format_path(self, path):
result = []
root = path
while root:
result.append(self.text.get_formatted_faction(root["faction"].lower(), root["city_name"]))
root = root.get("parent")
return result