diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..efa407c --- /dev/null +++ b/.gitignore @@ -0,0 +1,162 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/latest/usage/project/#working-with-version-control +.pdm.toml +.pdm-python +.pdm-build/ + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..499d6f6 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,33 @@ +{ + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnishar... + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Current Dir (external)", + "type": "python", + "request": "launch", + "cwd":"${fileDirname}", + "program": "${file}", + "console": "externalTerminal", + "env": {"PYTHONPATH": "${workspaceRoot}"}, + }, + { + "name": "Python: Current Dir (internal)", + "type": "python", + "request": "launch", + "cwd":"${fileDirname}", + "program": "${file}", + "console": "integratedTerminal", + "env": {"PYTHONPATH": "${workspaceRoot}"}, + }, + { + "name": "Python: Current File (Integrated Terminal)", + "type": "python", + "request": "launch", + "program": "${file}", + "console": "integratedTerminal", + } + ] + } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5f85fc4 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "python.testing.pytestArgs": [ + "cmds" + ], + "python.testing.unittestEnabled": false, + "python.testing.nosetestsEnabled": false, + "python.testing.pytestEnabled": true +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..6331051 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# IdleCorp Profit Bot Python + +This code has not been updated since the migration of the Python code to +JavaScript. So, the code has not been updated for a really long time, +but I still put it here for a kind of archive. \ No newline at end of file diff --git a/VSCodemark b/VSCodemark new file mode 100644 index 0000000..e69de29 diff --git a/aliases.json b/aliases.json new file mode 100644 index 0000000..a06c7b4 --- /dev/null +++ b/aliases.json @@ -0,0 +1,360 @@ +{ + "main": { + "ping": ["p"], + "version": ["v"] + }, + "cogs": { + "botinfo": { + "botinfo": ["bif"] + }, + "calculationcmds": { + "calculate": ["cal", "="] + }, + "codes": { + "codes": [["cds"], { + "update": ["u", "ud"], + "error": ["e"] + }] + }, + "cog_commands": { + "listcogs": ["lc"], + "load": ["ld"], + "unload": ["ul"], + "reload": ["rl"], + "sss": ["ss"] + }, + "help": { + "help": ["h"] + }, + "history": { + "history": [["ht"], { + "command": ["cm", "cmd"], + "Alpha_0_1": [["A01"], { + "profit": ["pf"] + }], + "Alpha_0_2_1": [["A021"], { + "listcogs": ["lc"] + }], + "Alpha_0_3_0": [["A030"], { + "speed": ["sp"], + "profit": ["pf"] + }], + "Beta_0_1_0": [["B010"], { + "version": ["v"], + "ping": ["p"] + }], + "Beta_0_2_0": [["B020"], { + "speed": ["sp"], + "profit": ["pf"], + "search": ["sc"] + }], + "server_icon": [["si", "icon"], { + "1": ["one"] + }], + "Beta_0_3_0": [["B030"], { + "help": ["h"], + "info": ["if"], + "profit": ["pf"], + "rules": ["rs"], + "search": ["sc"], + "speed": ["sp"], + "updates": ["uds"] + }], + "Beta_0_4_0": [["B040"], { + "info": ["if"], + "help": ["h"], + "profit": ["pf"], + "search": ["sc"], + "updates": ["uds"] + }], + "Beta_0_5_0": [["B050"], { + "profit": ["pf"], + "info": ["if"], + "speed": ["sp"] + }], + "server": [["sv"], { + "joins": ["j"] + }], + "idlecorpprofit": [["icp"], { + "begin": ["bg"] + }], + "Beta_0_6_0": [["B060"], { + "updates": ["uds"], + "speed": ["sp"], + "profit": ["pf"], + "profitcomplete": ["pfc"] + }], + "Beta_0_6_1": [["B061"], { + "search": ["sc"], + "profitcomplete": ["pfc", "pfcomp"], + "updates": ["uds", "ud"], + "task": [["t"], { + "add": ["a"], + "change": ["c"], + "remove": ["r"] + }] + }], + "Stable_1_0": [["S10"], { + "info": ["if"], + "help": ["h"] + }], + "Stable_1_0_1": [["S101"], { + "speed": ["sp"], + "profit": ["pf"], + "profitcomplete": ["pfc"], + "suggest": [["sug", "sg", "sgt"], { + "info": ["if", "i"] + }], + "updates": ["uds"] + }], + "Stable_1_0_2": [["S102"], { + "updates": ["uds"] + }] + }] + }, + "info": { + "info": ["if"] + }, + "main": { + "send": ["sd"] + }, + "ncguide": { + "ncguide": ["ncg"] + }, + "profit": { + "profit": ["pf"] + }, + "profitcomplete": { + "profitcomplete": ["pfcomp", "pfc"] + }, + "profitfileexport": { + "profitfileexport": ["pffep"] + }, + "rules": { + "rules": ["rs"] + }, + "search": { + "search": ["sc"] + }, + "speed": { + "speed": ["sp"] + }, + "suggestions": { + "suggest": [["sg", "sug", "sgt"], { + "add": ["a"], + "edit": ["e"], + "vote": ["v"], + "info": ["i", "if"], + "change": ["c"], + "remove": ["r", "rm"] + }] + }, + "task_status": { + "task": [["t"], { + "add": ["a"], + "change": ["c"], + "remove": ["r"] + }] + }, + "updates": { + "updates": ["uds", "changelog"] + } + }, + "cogs_loads": { + "botinfo": ["bif"], + "calculate": ["ccl"], + "calculationcmds": ["cc", "cclc", "clc"], + "codes": ["cd"], + "cogs_commands": ["cc"], + "custom_exception": ["ce"], + "error_handler": ["eh"], + "function_handler": ["fh"], + "help": ["h"], + "history": ["ht"], + "info": ["if"], + "isdigit": ["id"], + "main": ["m"], + "member_jnl": ["mj", "mm"], + "ncguide": ["ncg"], + "profit": ["p", "pf"], + "profitcomplete": ["pfcomp", "pfc"], + "profitfileexport": ["pffep"], + "repeating_decimal_sol": ["rds"], + "rules": ["rs"], + "search": ["sc"], + "Setup": ["su"], + "speed": ["sp"], + "status": ["s"], + "string_handler": ["sh"], + "suggestions": ["sgt", "sg"], + "task_status": ["ts"], + "updates": ["ud"], + "you_know": ["yk"] + }, + "updates list": { + "first": { + "commands": ["cmds", "c"], + "other": ["o"], + "plans to update": ["ptu", "p"], + "note": ["n"] + }, + "second": { + "adds": ["ad", "a"], + "changes": ["cg", "c"], + "deletes": ["dl", "d"] + }, + "third": { + "commands": ["cmds", "c"], + "systems": ["st", "s"], + "others": ["o"] + } + }, + "ic": { + "assets": { + "land": null, + "scrap": null, + "crude_oil": ["crudeoil", "oil"], + "bauxite": null, + "wood": null, + "coal": null, + "plastic": null, + "led": null, + "iron": null, + "polyester": null, + "aluminum": ["aluminium"], + "gasoline": ["gas", "petrol"], + "cotton": null, + "jet_fuel": ["jetfuel"], + "rubber": null, + "steel": null, + "energy": null, + "silicon": null, + "lamp": ["lamps"], + "glass": null, + "clothing": ["clothes"], + "furniture": ["furni"], + "gold": null, + "rocket_fuel": ["rocketfuel"], + "research_chemical": ["res chemical", "res chem", "research chemicals", "researchchemical"], + "cpu": ["cpus"], + "bicycle": ["bicycles", "bike", "bikes"], + "prescription_drug": ["drug", "drugs", "medicine"], + "ccd": ["ccds"], + "cell_phone": ["cell phones", "cellphone", "phone", "phones"], + "laptop": ["laptops"], + "digital_camera": ["digital cameras", "digitalcamera", "camera", "cameras"], + "television": ["tv", "tvs"], + "gasoline_engine": ["gasoline engines", "gasolineengine", "gas engine", "gas engines", "petrol engine", "gasengine"], + "car": ["cars"], + "rocket": null + }, + "facilities": { + "tree_farm": ["treefarm", "wood farm", "woodfarm"], + "oil_well": ["oilwell"], + "coal_mine": ["coalmine"], + "iron_mine": ["ironmine"], + "oil_refinery": ["oilrefinery", "gas refinery", "gasrefinery", "gas plant", "gasplant"], + "steel_mill": ["steelmill", "steel furnace", "steelfurnace"], + "bauxite_mine": ["bauxitemine"], + "rubber_factory": ["rubberfactory", "rubber plant", "rubberplant", "rubber fac"], + "gas_station": ["gasstation"], + "furniture_factory": ["furniturefactory", "furniture fac", "furni factory", "furni fac"], + "aluminum_factory": ["aluminumfactory", "aluminum fac"], + "led_factory": ["ledfactory", "led fac"], + "polyester_factory": ["polyesterfactory", "polyester fac"], + "silicon_mine": ["siliconmine"], + "bicycle_factory": ["bicyclefactory", "bike factory", "bikefactory", "bike fac"], + "gold_mine": ["goldmine"], + "lamp_factory": ["lampfactory", "lamp fac"], + "cotton_farm": ["cottonfarm"], + "plastic_factory": ["plasticfactory", "plastic fac"], + "ccd_factory": ["ccdfactory", "ccd fac"], + "glass_factory": ["glassfactory", "glass fac"], + "cpu_factory": ["cpufactory", "cpu fac"], + "clothing_factory": ["clothingfactory", "clothing fac"], + "cell_phone_factory": ["cellphone factory", "cellphonefactory", "cell phone fac", "phone factory", "phone fac"], + "coal_power_plant": ["coal plant", "coalplant"], + "laptop_factory": ["laptopfactory", "laptop fac"], + "research_chemical_factory": ["researchchemicalfactory", "research chemical fac", "chemical factory", "chemical fac", "res chem fac", "chem fac"], + "solar_power_plant": ["solar plant", "solarplant"], + "rocket_fuel_factory": ["rocketfuelfactory", "rocket fuel fac", "rocketfuel fac"], + "digital_camera_factory": ["digitalcamerafactory", "digital camera fac", "camera factory", "camera fac"], + "television_factory": ["televisionfactory", "tv factory", "tv fac"], + "gasoline_engine_factory": ["gasolineenginefactory", "gas engine factory", "gas engine fac"], + "car_factory": ["carfactory", "car fac"], + "logistics_center": ["logistics centre", "logisticscenter", "logistics", "lc"], + "prescription_drug_factory": ["precrriptiondrugfactory", "prescription drug fac", "drug factory", "drug fac"], + "airport": null, + "retail_store": ["retailstore", "retail", "store"], + "research_facility": ["researchfacility", "research fac", "res fac", "search center", "research centre", "researchcenter", "rf", "research lab"], + "customer_support_center": ["customer support centre", "customersupportcenter", "supporter center", "support centre", "customer support", "cupportcenter"], + "hq": ["headquarters", "head quarters"] + }, + "blueprints": { + "oil_mapping_blueprint": ["oil mapping bp", "oilmappingblueprint"], + "coal_detector_blueprint": ["coal detector bp", "coaldetectorblueprint"], + "log_loader_blueprint": ["log loader bp", "logloaderblueprint"], + "advanced_woodworking_blueprint": ["advanced woodworking bp", "adv ww bp", "advancedwoodworkingblueprint"], + "bauxite_detector_blueprint": ["bauxite detector bp", "bauxitedectorblueprint"], + "jet_fuel_refining_blueprint": ["jet fuel refining bp", "jetfuelrefiningblueprint"], + "gold_detector_blueprint": ["gold detector bp", "golddetectorblueprint"], + "vacuum_distillation_blueprint": ["vacuum distillation bp", "vac distillation bp", "vac dist bp", "vacuumdistillationblueprint"], + "robotic_automation_blueprint": ["robotic automation bp", "robo auto bp", "roboticautomationbleuprint"], + "factory_specialization_blueprint": ["factory specialization bp", "factory spec bp", "fac spec bp", "factoryspecializationblueprint"], + "mining_specialization_blueprint": ["mining specialization bp", "mining spec bp", "miningspecializationblueprint"], + "oil_specialization_blueprint": ["oil specialization bp", "oil spec bp", "oilspecializationblueprint"], + "energy_specialization_blueprint": ["energy specialization bp", "energy spec bp", "energyspecializationblueprint"], + "logistics_ecpansion_blueprint": ["logistics expansion bp", "logisticsexpansionblueprint"], + "airport_tram_blueprint": ["airport tram bo", "airporttramblueprint"], + "quality_control_blueprint": ["quality control bp", "qualitycontrolblueprint"], + "reincorporation_computer_blueprint": ["ri computer bp", "ri comp bp", "ric bp", "reincorportioncomputerblueprint"] + }, + "technologies": { + "oil_mapping": ["oilmapping"], + "oil_mapping_u": ["oilmappingu"], + "oil_mapping_uu": ["oilmappinguu"], + "coal_detector": ["coaldetector"], + "coal_detector_u": ["coaldetectoru"], + "coal_detector_uu": ["coaldetectoruu"], + "log_loader": ["logloader"], + "log_loader_u": ["logloaderu"], + "log_loader_uu": ["logloaderuu"], + "advanced_woodworking": ["adv ww", "advancedwoodworking"], + "advanced_woodworking_u": ["adv ww u", "advancedwiidwirkingu"], + "advanced_woodworking_uu": ["adv ww uu", "advancedwoodworkinguu"], + "bauxite_detector": ["bauxitedetector"], + "bauxite_detector_u": ["bauxitedetectoru"], + "jet_fuel_refining": ["jetfuelrefining"], + "jet_fuel_refining_u": ["jetfuelrefiningu"], + "gold_detector": ["golddetector"], + "gold_detector_u": ["golddetectoru"], + "gold_detector_uu": ["golddetectoruu"], + "vacuum_disuillation": ["vac disuillation", "vac dist", "vacuumdistillation"], + "vacuum_distillation_u": ["vac distillation u", "vac dist u", "vacuumdistillationu"], + "robotic_automation": ["robo auto", "roboticautomation"], + "robotic_automation_u": ["robo auto u", "roboticautomationu"], + "robotic_automation_uu": ["robo auto uu", "roboticautomationuu"], + "factory_specialization": ["factory spec", "fac spec", "factroryspecialization"], + "mining_specialization": ["mine specialization", "mining spec", "mine spec", "miningspecialization"], + "oil_specialization": ["oil spec", "oilspecialization"], + "energy_specialization": ["energy spec", "energyspecialization"], + "logistics_expansion": ["logisticsexpansion", "log expansion"], + "logistics_expansion_u": ["logisticsexpansionu", "log expansion"], + "airport_tram": ["airporttram"], + "airport_tram_u": ["airporttramu"], + "quality_control": ["qualitycontrol"], + "quality_control_u": ["qualitycontrolu"], + "reincorporation_computer": ["ri computer", "ri comp", "ric", "reincorporationcomputer"] + }, + "services": { + "medium_park": null, + "region_office": null, + "large_park": null, + "land_management_office": ["land office"], + "unversity": null, + "small_park": null, + "fiber_infrastructure": "fiber" + }, + "policies": {} + } +} \ No newline at end of file diff --git a/bot.py b/bot.py new file mode 100644 index 0000000..89d54f3 --- /dev/null +++ b/bot.py @@ -0,0 +1,63 @@ +import discord +from discord.ext import commands +from discord.ext import tasks +from pathlib import Path +import json +import os +import datetime +import asyncio +import random +import sys +from io import StringIO +from cmds.isdigit import isdigit + +# Setup +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) + +intents = discord.Intents.all() + +bot = discord.Client() +bot = commands.Bot(command_prefix='+', intents=intents, help_command=None) + +file_ = Path("VSCodemark") +if file_.is_file(): + jdata["VSCode"] = "Yes" +else: + jdata["VSCode"] = "No" +with open("setting.json", mode="w", encoding="utf8") as f: + json.dump(jdata, f, ensure_ascii=False, indent=4) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) + +@bot.command(aliases=als["main"]["ping"]) +async def ping(ctx): + if str(datetime.datetime.now().date()) == "2021-04-01": + await ctx.send(f'**{round(bot.latency*1000000, 2)}** ms') + else: + await ctx.send(f'**{round(bot.latency*1000, 2)}** ms') + +@bot.command(aliases=als["main"]["version"]) +async def version(ctx): + if str(datetime.datetime.now().date()) == "2021-04-01": + await ctx.send(f"The bot version is: **v.204.211**") + else: + await ctx.send(f"The bot version is: **{jdata['version']}**") + +loadextensioncount = 0 +for filename in os.listdir('./cmds'): + if filename.endswith('.py'): + filename = filename[:-3] + black = jdata['load_blacklist'] + if not filename in black: + if jdata["VSCode"] == "Yes": + if filename == "error_handler": + continue + # un = jdt['unload'] + # if not filename in un: + bot.load_extension(f'cmds.{filename}') + loadextensioncount += 1 + print(str(loadextensioncount) + '_' + filename + '_loaded') + +if __name__ == "__main__": + bot.run(jdata['Token'] if jdata["VSCode"] == "No" else "ODQwNTI3OTU3OTAxNDQzMDgy.YJZgqQ.8tLNlFkV-uN-y5QDQ3e70NxLLsM") \ No newline at end of file diff --git a/cmds/Setup.py b/cmds/Setup.py new file mode 100644 index 0000000..cbc294c --- /dev/null +++ b/cmds/Setup.py @@ -0,0 +1,21 @@ +import discord +from discord.ext import commands +import json +import datetime +import asyncio + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) + +class Setup(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.Cog.listener() + async def on_ready(self): + if jdata["VSCode"] == "No": + await self.bot.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name=f"Version {jdata['version']}")) + print("Now online") + +def setup(bot): + bot.add_cog(Setup(bot)) \ No newline at end of file diff --git a/cmds/botinfo.py b/cmds/botinfo.py new file mode 100644 index 0000000..bcce9db --- /dev/null +++ b/cmds/botinfo.py @@ -0,0 +1,28 @@ +import discord +from discord.ext import commands +import json +import datetime +import asyncio +from cmds.repeating_decimal_sol import repeating_dec_sol +from cmds.function_handler import function_handler +import decimal + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) + +class botinfo(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command(aliases=als["cogs"]["botinfo"]["botinfo"]) + async def botinfo(self, ctx): + embed = discord.Embed(title="Bot info", color=discord.Colour.dark_blue(), timestamp= datetime.datetime.now()) + embed.add_field(name="Bot Information", value="This bot is used to help players in IdleCorp can easier.```md\n\n\n```".format(jdata["version"]), inline=False) + embed.add_field(name="Server Information", value="Any bugs or typos can be reported in <#828810972902457415> or DM/PM the Developer/Owner.\nAny suggections can send in <#801067404759007292>.\nThe wiki can see in <#820210762123051089>.\nAny questions or want to get help about IdleCorp or IdleCorp Profit, can send in <#801067628802080798> or DM\PM the Owner.", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + +def setup(bot): + bot.add_cog(botinfo(bot)) \ No newline at end of file diff --git a/cmds/calculate.py b/cmds/calculate.py new file mode 100644 index 0000000..011d3cb --- /dev/null +++ b/cmds/calculate.py @@ -0,0 +1,649 @@ +import discord +from discord.ext import commands +import json +import datetime +import asyncio +from cmds.repeating_decimal_sol import repeating_dec_sol +from cmds.function_handler import function_handler +import decimal, fractions +import re + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) + +with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + +class calculate(commands.Cog): + def __init__(self, bot): + self.bot = bot + + def product_speed(facility, types, num=1): + fac = icd["facilities"][facility] + if not types in ("consumes", "produces", "all"): + return + if types == "all": + tya = fac["consumes"] + tyb = fac["produces"] + else: + ty = fac[types] + if ty == "None": + return None + speed = fac["speed"] + con_spee = {} + pro_spee = {} + if types == "consumes": + if type(speed) == list: + for e in speed: + for a, b in ty.items(): + c = b*int(num) + con_spe = repeating_dec_sol.repeating_dec_sol(c, e) + con_spee[a] = con_spe + return con_spee + for a, b in ty.items(): + c = b*int(num) + con_spe = repeating_dec_sol.repeating_dec_sol(c, speed) + con_spee[a] = con_spe + return con_spee + elif types == "produces": + if type(speed) == list: + for e in speed: + for a, b in ty.items(): + c = b*int(num) + pro_spe = repeating_dec_sol.repeating_dec_sol(c, e) + pro_spee[a] = pro_spe + return pro_spee + for a, b in ty.items(): + c = b*int(num) + pro_spe = repeating_dec_sol.repeating_dec_sol(c, speed) + pro_spee[a] = pro_spe + return pro_spee + elif types == "all": + if not tya == "None": + if type(speed) == list: + i = 0 + for e in speed: + for a, b in tya.items(): + c = b*int(num) + con_spe = repeating_dec_sol.repeating_dec_sol(c, e) + if i == 0: + con_spee[a+f"_Max({e})"] = con_spe + elif i == 1: + con_spee[a+f"_Min({e})"] = con_spe + i += 1 + else: + for a, b in tya.items(): + c = b*int(num) + con_spe = repeating_dec_sol.repeating_dec_sol(c, speed) + con_spee[a] = con_spe + else: + con_spee = "None" + if not tyb == "None": + if type(speed) == list: + i = 0 + for e in speed: + for a, b in tyb.items(): + c = b*int(num) + pro_spe = repeating_dec_sol.repeating_dec_sol(c, e) + if i == 0: + pro_spee[a+f"_Max({e})"] = pro_spe + elif i == 1: + pro_spee[a+f"_Min({e})"] = pro_spe + i += 1 + else: + for a, b in tyb.items(): + c = b*int(num) + pro_spe = repeating_dec_sol.repeating_dec_sol(c, speed) + pro_spee[a] = pro_spe + else: + pro_spee = "None" + return [con_spee, pro_spee] + + def product_profit(facility, types, num=1): + fac = icd["facilities"][facility] + if not types in ("consumes", "produces", "all"): + return + if types == "all": + tya = fac["consumes"] + tyb = fac["produces"] + else: + ty = fac[types] + if ty == "None": + return None + speed = fac["speed"] + con_pfr = {} + pro_pfr = {} + if types == "consumes": + for a, b in ty.items(): + money = icd["assets"][a] + c = b*int(num)*money + con_pf = repeating_dec_sol.repeating_dec_sol(c*2, speed) + con_pfr[a] = con_pf + return con_pfr + elif types == "produces": + for a, b in ty.items(): + money = icd["assets"][a] + c = b*int(num)*money + pro_pf = repeating_dec_sol.repeating_dec_sol(c, speed) + pro_pfr[a] = pro_pf + return pro_pfr + elif types == "all": + if not tya == "None": + for a, b in tya.items(): + if type(speed) == list: + speed = fac["speed"] + count = 0 + for d in speed: + if a == "money": + money = 1 + else: + money = icd["assets"][a] + c = b*int(num)*money + if c == int(c): + c = int(c) + else: + while c != int(c): + c *= 10 + d *= 10 + c = int(c) + con_pf = repeating_dec_sol.repeating_dec_sol(c*2, d) + con_pfr[a+(("_Min("+str(d)+")") if count == 1 else ("_Max("+str(d)+")"))] = con_pf + count = 1 + else: + if a == "money": + money = 1 + else: + money = icd["assets"][a] + c = b*int(num)*money + if c == int(c): + c = int(c) + else: + while c != int(c): + c *= 10 + speed *= 10 + c = int(c) + con_pf = repeating_dec_sol.repeating_dec_sol(c*2, speed) + con_pfr[a] = con_pf + else: + con_pfr = "None" + if not tyb == "None": + for a, b in tyb.items(): + speed = fac["speed"] + if type(speed) == list: + count = 0 + for d in speed: + if a == "money": + money = 1 + else: + money = icd["assets"][a] + c = b*int(num)*money + if c == int(c): + c = int(c) + else: + while c != int(c): + c *= 10 + d *= 10 + c = int(c) + pro_pf = repeating_dec_sol.repeating_dec_sol(c, d) + pro_pfr[a+(("_Min("+str(d)+")") if count == 1 else ("_Max("+str(d)+")"))] = pro_pf + count = 1 + else: + speed = fac["speed"] + if a == "money": + money = 1 + else: + money = icd["assets"][a] + c = b*int(num)*money + if c == int(c): + c = int(c) + else: + while c != int(c): + c *= 10 + speed *= 10 + c = int(c) + pro_pf = repeating_dec_sol.repeating_dec_sol(c, speed) + pro_pfr[a] = pro_pf + else: + pro_pfr = "None" + if con_pfr == "None": + if len(list(pro_pfr.values())) == 1: + for a in list(pro_pfr.values()): + pfs = a + else: + speed = fac["speed"] + assets = icd["assets"] + if type(speed) == list: + i = 0 + pfss = [] + for r in speed: + for a, b in tyb.items(): + if a == "money": + pdm = 1 + else: + pdm = assets[a] + pdttm = b*pdm*int(num) + csttm = [] + for a, b in tya.items(): + csm = assets[a] + csttm.append(csm*b*int(num)) + cstm = 0 + for a in csttm: + cstm += a + pfbf = float(decimal.Decimal(str(pdttm))-decimal.Decimal(str(cstm*2))) + if pfbf == int(pfbf): + pfbf = int(pfbf) + else: + while pfbf != int(pfbf): + pfbf *= 10 + r *= 10 + pfbf = int(pfbf) + pfs = repeating_dec_sol.repeating_dec_sol(pfbf, r) + if i == 1: + pfss.append({"Min": pfs}) + else: + pfss.append({"Max": pfs}) + i += 1 + return [con_pfr, pro_pfr, pfss] + for a, b in tyb.items(): + if a == "money": + pdm = 1 + else: + pdm = assets[a] + pdttm = b*pdm*int(num) + csttm = [] + for a, b in tya.items(): + csm = assets[a] + csttm.append(csm*b*int(num)) + cstm = 0 + for a in csttm: + cstm += a + pfbf = float(decimal.Decimal(str(pdttm))-decimal.Decimal(str(cstm*2))) + if pfbf == int(pfbf): + pfbf = int(pfbf) + else: + while pfbf != int(pfbf): + pfbf *= 10 + speed *= 10 + pfbf = int(pfbf) + pfs = repeating_dec_sol.repeating_dec_sol(pfbf, speed) + return [con_pfr, pro_pfr, pfs] + + def fraction_diff(a_a, a_b, b_a, b_b): + args = [a_a, a_b, b_a, b_b] + for a in args: + if type(a) == int: + pass + elif type(a) == float: + if a == int(a): + a = int(a) + else: + print(f"ERROR \"{a}\"") + elif type(a) == str: + a = float(a) + if a == int(a): + a = int(a) + else: + print(f"ERROR \"{a}\"") + stuff = a_b + a_a *= b_b; a_b *= b_b + b_a *= stuff; b_b *= stuff + a_set = a_a-b_a + if a_b == b_b: + pass + else: + print("ERROR b_set") + return [a_set, a_b] + + def facratio(fac, num=1): + faclist = icd["facilities"] + faccs = faclist[fac]["consumes"] + facspeed = faclist[fac]["speed"] + if faccs == "None": + return [f"0:{num}", f"(0:{num}, 0:{num})", [("N/A", 0)]] + facpd = [] + for a in faccs: + for b in faclist: + for c in faclist[b]["produces"].keys(): + if c == a: + facpd.append((b, c)) + stuff = [b for a, b in facpd] + rep = [] + for a in range(len(stuff)): + for b in stuff: + if stuff.count(b) > 1: + rep.append(b) + energy = 0 + if "energy" in rep: + energy = 1 + if energy: + facpd.pop(0) + facpd = [("solar_power_plant" if a == "coal_power_plant" else a, b) for a, b in facpd] + stuff1 = [] + depfrac1 = [] + depfrac2 = [] + firstfacdt = [] + if type(faclist[fac]["speed"]) == list: + for s in faclist[fac]["speed"]: + for f, g in facpd: + ty = "_Max({})".format(s) if faclist[fac]["speed"].index(s) else "_Min({})".format(s) + # a = fractions.Fraction(faclist[f]["produces"][g], faclist[f]["speed"]) + b = fractions.Fraction(faccs[g], s)*num + count = 0 + while b > 0: + b-=fractions.Fraction(faclist[f]["produces"][g], faclist[f]["speed"]) + count += 1 + firstfacdt.append((f+ty, count)) + stuff1.append(str(count)+ty) + frac1 = b/fractions.Fraction(faclist[f]["produces"][g], faclist[f]["speed"]) + afrac = [b, fractions.Fraction(faclist[f]["produces"][g], faclist[f]["speed"])] + if afrac.index(min(afrac)): + afrac = (max(afrac)/min(afrac), 1) + else: + afrac = (1, max(afrac)/min(afrac)) + depfrac1.append((":".join((str(int(float(f))) if float(f).is_integer() else f) if re.fullmatch(r"[0-9]+[.][0-9]+", f) else f for f in [repeating_dec_sol.repeating_dec_sol(a.numerator, a.denominator) for a in calculate.simratio(afrac)]))+ty) + bfrac = [] + for a in afrac: + if type(a) == fractions.Fraction: + b = repeating_dec_sol.repeating_dec_sol(a.numerator, a.denominator) + bfrac.append((str(int(float(b))) if float(b).is_integer() else b) if re.fullmatch(r"[0-9]+[.][0-9]+", b) else b) + else: bfrac.append(str(a)) + depfrac2.append(":".join(bfrac)+ty) + else: + for f, g in facpd: + # a = fractions.Fraction(faclist[f]["produces"][g], faclist[f]["speed"]) + b = fractions.Fraction(faccs[g], faclist[fac]["speed"])*num + count = 0 + while b > 0: + b-=fractions.Fraction(faclist[f]["produces"][g], faclist[f]["speed"]) + count += 1 + firstfacdt.append((f, count)) + stuff1.append(str(count)) + frac1 = fractions.Fraction(faccs[g], facspeed)/fractions.Fraction(faclist[f]["produces"][g], faclist[f]["speed"]) + afrac = [fractions.Fraction(faccs[g], faclist[fac]["speed"]), fractions.Fraction(faclist[f]["produces"][g], faclist[f]["speed"])] + if afrac.index(min(afrac)): + afrac = (max(afrac)/min(afrac), 1) + else: + afrac = (1, max(afrac)/min(afrac)) + depfrac1.append(":".join((str(int(float(f))) if float(f).is_integer() else f) if re.fullmatch(r"[0-9]+[.][0-9]+", f) else f for f in [repeating_dec_sol.repeating_dec_sol(a.numerator, a.denominator) for a in calculate.simratio(afrac)])) + bfrac = [] + for a in afrac: + if type(a) == fractions.Fraction: + b = repeating_dec_sol.repeating_dec_sol(a.numerator, a.denominator) + bfrac.append((str(int(float(b))) if float(b).is_integer() else b) if re.fullmatch(r"[0-9]+[.][0-9]+", b) else b) + else: bfrac.append(str(a)) + depfrac2.append(":".join(bfrac)) + # a = True + # b = [decimal.Decimal(str(1.2337)), decimal.Decimal(str(1.22)), decimal.Decimal(str(7.177))] + # re = b + # while a: + # bfr = [] + # stuff = [] + # for c in re: + # c*=10 + # bfr.append(c) + # stuff.append(True if int(c)!=float(c) else False) + # if True in stuff: a = True + # if list(set(stuff)) == [False]: a = False + # re = bfr + # for a, b in facpd: + # a, = faclist[f]["produces"].values() + # b = fractions.Fraction(faccs[g], facspeed) + # intrat = calculate.simratio([fractions.Fraction(faclist[a]["produces"][b], faclist[a]["speed"]) for a, b in facpd]+[fractions.Fraction(faccs[], 1)]) + # print(intrat) # ":".join([repeating_dec_sol.repeating_dec_sol(a.numerator, a.denominator) for a in intrat])+":1", + return (":".join(stuff1)+":1", ", ".join([f"({a}, {b})" for a, b in zip(depfrac1, depfrac2)]), firstfacdt) + + def simratio(nums): + re = [] + hcf = nums[0].numerator + lcm = nums[0].denominator + for a in nums: + nu, de = a.numerator, a.denominator + lcm = (de*lcm)/(calculate.gcd(de, lcm)) + hcf = calculate.gcd(nu, hcf) + frac = fractions.Fraction(int(hcf), int(lcm)) + return [n / frac for n in nums] + + def gcd(*nums):#greatest common denominator + if len(nums) > 2: + c = gcd(*nums[1::]) + return gcd(nums[0], c) + a, b = nums + while b != 0: + a, b = b, a % b + return a + + def firstfac(fac, facdt, sp=False): + if not sp: ff = "\n".join([f"**{a.capitalize().replace('_', ' ')}** | {b}" for a, b in facdt]) + else: ff = "\n".join([f"{a.capitalize().replace('_', ' ')} | {b}" for a, b in facdt]) + lds = "Land "+str(1+sum([b for a, b in facdt])) + return [ff, lds, 1+sum([b for a, b in facdt])] + + def product_profitpland(facility, types, num=1, land=1): + fac = icd["facilities"][facility] + if not types in ("consumes", "produces", "all"): + return + if types == "all": + tya = fac["consumes"] + tyb = fac["produces"] + else: + ty = fac[types] + if ty == "None": + return None + speed = fac["speed"] + con_pfr = {} + pro_pfr = {} + if types == "consumes": + for a, b in ty.items(): + money = icd["assets"][a] + c = b*int(num)*money + con_pf = repeating_dec_sol.repeating_dec_sol(c*2, speed) + con_pfr[a] = con_pf + return con_pfr + elif types == "produces": + for a, b in ty.items(): + money = icd["assets"][a] + c = b*int(num)*money + pro_pf = repeating_dec_sol.repeating_dec_sol(c, speed*land) + pro_pfr[a] = pro_pf + return pro_pfr + elif types == "all": + if not tya == "None": + for a, b in tya.items(): + if type(speed) == list: + speed = fac["speed"] + count = 0 + for d in speed: + if a == "money": + money = 1 + else: + money = icd["assets"][a] + c = b*int(num)*money + if c == int(c): + c = int(c) + else: + while c != int(c): + c *= 10 + d *= 10 + c = int(c) + con_pf = repeating_dec_sol.repeating_dec_sol(c*2, d) + con_pfr[a+(("_Min("+str(d)+")") if count == 1 else ("_Max("+str(d)+")"))] = con_pf + count = 1 + else: + if a == "money": + money = 1 + else: + money = icd["assets"][a] + c = b*int(num)*money + if c == int(c): + c = int(c) + else: + while c != int(c): + c *= 10 + speed *= 10 + c = int(c) + con_pf = repeating_dec_sol.repeating_dec_sol(c*2, speed) + con_pfr[a] = con_pf + else: + con_pfr = "None" + if not tyb == "None": + for a, b in tyb.items(): + speed = fac["speed"] + if type(speed) == list: + count = 0 + for d in speed: + if a == "money": + money = 1 + else: + money = icd["assets"][a] + c = b*int(num)*money + if c == int(c): + c = int(c) + else: + while c != int(c): + c *= 10 + d *= 10 + c = int(c) + pro_pf = repeating_dec_sol.repeating_dec_sol(c, d*land) + pro_pfr[a+(("_Min("+str(d)+")") if count == 1 else ("_Max("+str(d)+")"))] = pro_pf + count = 1 + else: + speed = fac["speed"] + if a == "money": + money = 1 + else: + money = icd["assets"][a] + c = b*int(num)*money + if c == int(c): + c = int(c) + else: + while c != int(c): + c *= 10 + speed *= 10 + c = int(c) + pro_pf = repeating_dec_sol.repeating_dec_sol(c, speed*land) + pro_pfr[a] = pro_pf + else: + pro_pfr = "None" + if con_pfr == "None": + if len(list(pro_pfr.values())) == 1: + for a in list(pro_pfr.values()): + pfs = a + else: + speed = fac["speed"] + assets = icd["assets"] + if type(speed) == list: + i = 0 + pfss = [] + for r in speed: + for a, b in tyb.items(): + if a == "money": + pdm = 1 + else: + pdm = assets[a] + pdttm = b*pdm*int(num) + csttm = [] + for a, b in tya.items(): + csm = assets[a] + csttm.append(csm*b*int(num)) + cstm = 0 + for a in csttm: + cstm += a + pfbf = float(decimal.Decimal(str(pdttm))-decimal.Decimal(str(cstm*2))) + if pfbf == int(pfbf): + pfbf = int(pfbf) + else: + while pfbf != int(pfbf): + pfbf *= 10 + r *= 10 + pfbf = int(pfbf) + pfs = repeating_dec_sol.repeating_dec_sol(pfbf, r*land) + if i == 1: + pfss.append({"Min": pfs}) + else: + pfss.append({"Max": pfs}) + i += 1 + return [con_pfr, pro_pfr, pfss] + for a, b in tyb.items(): + if a == "money": + pdm = 1 + else: + pdm = assets[a] + pdttm = b*pdm*int(num) + csttm = [] + for a, b in tya.items(): + csm = assets[a] + csttm.append(csm*b*int(num)) + cstm = 0 + for a in csttm: + cstm += a + pfbf = float(decimal.Decimal(str(pdttm))-decimal.Decimal(str(cstm*2))) + if pfbf == int(pfbf): + pfbf = int(pfbf) + else: + while pfbf != int(pfbf): + pfbf *= 10 + speed *= 10 + pfbf = int(pfbf) + pfs = repeating_dec_sol.repeating_dec_sol(pfbf, speed*land) + return [con_pfr, pro_pfr, pfs] + + def produce_remain(fac, facdt, num=1, land=1): + faclist = icd["facilities"] + faccs = faclist[fac]["consumes"] + facspeed = faclist[fac]["speed"] + assets = icd["assets"] + res1 = [] + res2 = [] + ld = [] + if type(facspeed) == list: + for s in facspeed: + for a, b in facdt: + ty = "_Max({})".format(a[-3:-1]) if re.search(r"_Max([0-9][0-9])$", a) else "_Min({})".format(a[-3:-1]) + a = a[:-8] + if a == "N/A": + pd = a + sp = 1 + b = "0" + else: + pd, = faclist[a]["produces"].keys() + f, = faclist[a]["produces"].values() + f = fractions.Fraction(f*b, faclist[a]["speed"]) + sp = f-fractions.Fraction(faccs[pd]*int(num), s) + b = repeating_dec_sol.repeating_dec_sol(sp.numerator, sp.denominator) + res1.append((pd+ty, (str(int(float(b))) if float(b).is_integer() else b) if re.fullmatch(r"[0-9]+[.][0-9]+", b) else b)) + if a == "N/A": b = fractions.Fraction(0) + else: b = sp*fractions.Fraction(str(assets[pd])) + ld.append(b) + if a == "N/A": b = "0" + else: b = repeating_dec_sol.repeating_dec_sol(b.numerator, b.denominator) + res2.append((pd+ty, (str(int(float(b))) if float(b).is_integer() else b) if re.fullmatch(r"[0-9]+[.][0-9]+", b) else b)) + pfld = sum(ld)/land + res3 = repeating_dec_sol.repeating_dec_sol(pfld.numerator, pfld.denominator) + res3 = (str(int(float(b))) if float(b).is_integer() else b) if re.fullmatch(r"[0-9]+[.][0-9]+", b) else b + print(res1, res2, res3) + else: + for a, b in facdt: + if a == "N/A": + pd = a + sp = 1 + b = "0" + else: + pd, = faclist[a]["produces"].keys() + f, = faclist[a]["produces"].values() + f = fractions.Fraction(f*b, faclist[a]["speed"]) + sp = f-fractions.Fraction(faccs[pd]*int(num), facspeed) + b = repeating_dec_sol.repeating_dec_sol(sp.numerator, sp.denominator) + res1.append((pd, (str(int(float(b))) if float(b).is_integer() else b) if re.fullmatch(r"[0-9]+[.][0-9]+", b) else b)) + if a == "N/A": b = fractions.Fraction(0) + else: b = sp*fractions.Fraction(str(assets[pd])) + ld.append(b) + if a == "N/A": b = "0" + else: b = repeating_dec_sol.repeating_dec_sol(b.numerator, b.denominator) + res2.append((pd, (str(int(float(b))) if float(b).is_integer() else b) if re.fullmatch(r"[0-9]+[.][0-9]+", b) else b)) + pfld = sum(ld)/land + res3 = repeating_dec_sol.repeating_dec_sol(pfld.numerator, pfld.denominator) + res3 = (str(int(float(b))) if float(b).is_integer() else b) if re.fullmatch(r"[0-9]+[.][0-9]+", b) else b + return [res1, res2, res3] + +def setup(bot): + bot.add_cog(calculate(bot)) \ No newline at end of file diff --git a/cmds/calculationcmds.py b/cmds/calculationcmds.py new file mode 100644 index 0000000..201b260 --- /dev/null +++ b/cmds/calculationcmds.py @@ -0,0 +1,37 @@ +import discord +from discord.ext import commands +import json +import datetime +import asyncio +from cmds.calculate import calculate +import re +import decimal, math, numexpr + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) + +class calculationcmds(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command(name="calculate", aliases=als["cogs"]["calculationcmds"]["calculate"]) + async def calculations(self, ctx, option, *, express): + res = [] + express = [a.strip() for a in express.split("|")] + if option in ("+", "plus", "p"): + for a in express: + b = [decimal.Decimal(a.strip()) for a in re.split("[,+]", a)] + res.append(str(sum(b))) + elif option in ("*", "x" "times", "t"): + for a in express: + b = [decimal.Decimal(a.strip()) for a in re.split("[,*]", a)] + res.append(str(math.prod(b))) + else: + for a in express: + res.append(str(numexpr.evaluate(a))) + await ctx.send("Result:\n"+"\n".join(res)) + +def setup(bot): + bot.add_cog(calculationcmds(bot)) \ No newline at end of file diff --git a/cmds/codes.py b/cmds/codes.py new file mode 100644 index 0000000..3082b13 --- /dev/null +++ b/cmds/codes.py @@ -0,0 +1,194 @@ +import discord +from discord.ext import commands +import json +import datetime +import asyncio +from cmds.calculate import calculate + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) +with open("codes.json", mode="r", encoding="utf8") as f: + cdslist = json.load(f) + +class codes(commands.Cog): + def __init__(self, bot): + self.bot = bot + + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # Update: + # U, perm(D/A/N), {from 0}type(command(Hiperm), command(normal), event(include you_know), codes), commands(add, change, remove, add(history), change(history), remove(history), codes, aliases, other), size(history(1), statusread(1), status(2), codes(1), aliases(1), you_know(2)), number(two digits) + # Error: + # E, perm(D/A/N), {from 0}type(command, command(specific), event), {from 0}type(badargument, looperror, defineerror, checkerror(permission etc), argumenterror(unexpect)), number(two digits) + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + @commands.group(invoke_without_command=True, aliases=als["cogs"]["codes"]["codes"][0]) + async def codes(self, ctx): + if " ".join(ctx.message.content.split()[1:]) in ("version", "v"): + await ctx.send("The code version is {}, the versions have: {}".format(cdslist["version"], ", ".join([a.capitalize() for a in cdslist["oldver"].keys()]+[cdslist["version"]]))) + return + elif " ".join(ctx.message.content.split()[1:]) in ("list", "l"): + if discord.utils.get(ctx.author.roles, name="Owner") or discord.utils.get(ctx.author.roles, name="ICP Deceloper"): + await ctx.send("The list of codes:\n"+"\n".join([b for a in cdslist["codes"].values() for b in a.keys()])+"\n\nCode version: v.{}".format(cdslist["version"])) + elif discord.utils.get(ctx.author.roles, name="Admin"): + await ctx.send("The list of codes:\n"+"\n".join([b for a in cdslist["codes"].values() for b in a.keys() if "D" not in b])+"\n\nCode version: v.{}".format(cdslist["version"])) + else: + await ctx.send("The list of codes:\n"+"\n".join([b for a in cdslist["codes"].values() for b in a.keys() if "D" or "A" not in b])+"\n\nCode version: v.{}".format(cdslist["version"])) + return + await ctx.send("Commands: `update`, `error`\n" + "The current Codes version is v.{}".format(cdslist["version"])) + + @codes.command(aliases=als["cogs"]["codes"]["codes"][1]["update"]) + async def update(self, ctx, *, args): + await self.bot.wait_until_ready() + cds = cdslist["codes"] + oldnew = cdslist["oldnew"] + oldver = cdslist["oldver"] + guild = self.bot.get_guild(jdata["guild_id"]) + args = args.split() + code = args[-1] + if len(args) != 1: + oth = args[:-1] + for a in oth: + if not a.startswith("--"): + await ctx.send("`EN0001`: Flags error (\"--\")") + return + if len(oth) > 1: + await ctx.send("`EN0002`: Flags error, 1") + return + oth, = oth + if oth == "--old": + if code not in cds["update"].keys(): + for a, b in oldnew.items(): + if a == code: + code = b + elif oth[2:].lower() in oldver.keys(): + oth = oth[2:].lower() + if oldver[oth].setdefault("update"): + if oldver[oth]["update"].setdefault(code): + if "D" or "A" in code: + if "D" in code and not (discord.utils.get(ctx.author.roles, name="Owner") or discord.utils.get(ctx.author.roles, name="ICP Developer")): + await ctx.send("`EN0301`: The code is required permissions.") + return + elif "A" and not discord.utils.get(ctx.author.roles, name="Admin"): + await ctx.send("`EN0302`: The code is required permissions.") + return + else: + embed = discord.Embed(title=f"Update code {a}", description=oldver[oth]["update"][code]+"\n\nCode v."+cdslist["version"], color=discord.Color.dark_red(), timestamp= datetime.datetime.now()) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + return + else: + embed = discord.Embed(title=f"Update code {a}", description=oldver[oth]["update"][code]+"\n\nCode v."+cdslist["version"], color=discord.Color.dark_red(), timestamp= datetime.datetime.now()) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + return + else: + await ctx.send(f"`EN1001`: Invalid code entered in {oth}.") + return + else: + await ctx.send("`EN0003`: Invalid flag.") + return + for a, b in cds["update"].items(): + if code == a: + if code[1] != "N" and not (discord.utils.get(ctx.author.roles, name="Owner") or discord.utils.get(ctx.author.roles, name="Admin") or discord.utils.get(ctx.author.roles, name="ICP Developer")): + break + embed = discord.Embed(title=f"Update code {a}", description=b+"\n\nCode v."+cdslist["version"], color=discord.Color.dark_red(), timestamp= datetime.datetime.now()) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + return + #Check Error + if code[0] != "U": + await ctx.send("`EN1002`: Wrong code type") + return + if len(code) == 1: + await ctx.send("`EN1001`: Invalid code entered") + return + if code[1] == "D": + if not (discord.utils.get(ctx.author.roles, name="Owner") or discord.utils.get(ctx.author.roles, name="ICP Deceloper")): + await ctx.send("`EN0301`: The code is required permissions.") + return + elif code[1] == "A": + if not discord.utils.get(ctx.author.roles, name="Admin"): + await ctx.send("`EN0302`: The code is required permissions.") + return + await ctx.send("`EN1001`: Invalid code entered") + + @codes.command(aliases=als["cogs"]["codes"]["codes"][1]["error"]) + async def error(self, ctx, *, args): + await self.bot.wait_until_ready() + cds = cdslist["codes"] + oldnew = cdslist["oldnew"] + oldver = cdslist["oldver"] + guild = self.bot.get_guild(jdata["guild_id"]) + args = args.split() + code = args[-1] + if len(args) != 1: + oth = args[:-1] + for a in oth: + if not a.startswith("--"): + await ctx.send("`EN0001`: Flags error (\"--\")") + return + if len(oth) > 1: + await ctx.send("`EN0002`: Flags error, 1") + return + oth, = oth + if oth == "--old": + if code not in cds["error"].keys(): + for a, b in oldnew.items(): + if a == code: + code = b + elif oth[2:].lower() in oldver.keys(): + oth = oth[2:].lower() + if oldver[oth].setdefault("error"): + if oldver[oth]["error"].setdefault(code): + if "D" or "A" in code: + if "D" in code and not (discord.utils.get(ctx.author.roles, name="Owner") or discord.utils.get(ctx.author.roles, name="ICP Developer")): + await ctx.send("`EN0301`: The code is required permissions.") + return + elif "A" and not discord.utils.get(ctx.author.roles, name="Admin"): + await ctx.send("`EN0302`: The code is required permissions.") + return + else: + embed = discord.Embed(title=f"Error code {a}", description=oldver[oth]["error"][code]+"\n\nCode v."+cdslist["version"], color=discord.Color.dark_red(), timestamp= datetime.datetime.now()) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + return + else: + embed = discord.Embed(title=f"Error code {a}", description=oldver[oth]["update"][code]+"\n\nCode v."+cdslist["version"], color=discord.Color.dark_red(), timestamp= datetime.datetime.now()) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + return + else: + await ctx.send(f"`EN1001`: Invalid code entered in {oth}.") + return + else: + await ctx.send("`EN0003`: Invalid flag.") + return + for a, b in cds["error"].items(): + if code == a: + if code[1] != "N" and not (discord.utils.get(ctx.author.roles, name="Owner") or discord.utils.get(ctx.author.roles, name="Admin") or discord.utils.get(ctx.author.roles, name="ICP Developer")): + break + embed = discord.Embed(title=f"Error code {a}", description=b+"\n\nCode v."+cdslist["version"], color=discord.Color.dark_red(), timestamp= datetime.datetime.now()) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + return + #Check Error + if code[0] != "E": + await ctx.send("`EN1002`: Wrong code type") + return + if len(code) == 1: + await ctx.send("`EN1001`: Invalid code entered") + return + if code[1] == "D": + if not (discord.utils.get(ctx.author.roles, name="Owner") or discord.utils.get(ctx.author.roles, name="ICP Deceloper")): + await ctx.send("`EN0301`: The code is required permissions.") + return + elif code[1] == "A": + if not discord.utils.get(ctx.author.roles, name="Admin"): + await ctx.send("`EN0302`: The code is required permissions.") + return + await ctx.send("`EN1001`: Invalid code entered") + +def setup(bot): + bot.add_cog(codes(bot)) \ No newline at end of file diff --git a/cmds/cogs_commands.py b/cmds/cogs_commands.py new file mode 100644 index 0000000..2d83aa6 --- /dev/null +++ b/cmds/cogs_commands.py @@ -0,0 +1,112 @@ +import discord +from discord.ext import commands +import json +import os +import datetime +import asyncio +import random + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) + +class cogs_commands(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command(aliases=als["cogs"]["cog_commands"]["listcogs"]) + @commands.has_any_role(801052590389329930, 801052697498746920) + async def listcogs(self, ctx): + lists = [] + for filename in os.listdir('./cmds'): + if filename.endswith('.py'): + lists.append(f'{filename[:-3]}') + await ctx.send("\n".join(lists)) + + def load_aliases(input_): + lists = als["cogs_loads"] + for a, b in lists.items(): + for c in b: + if input_ == c: + return a + + @commands.command(aliases=als["cogs"]["cog_commands"]["load"]) + @commands.has_any_role(801052590389329930, 801052697498746920) + async def load(self, ctx, extension): + lists = als["cogs_loads"] + res = [] + for a in lists.values(): + if type(a) == list: + for b in a: + res.append(b) + else: + res.append(a) + if not extension in res: + self.bot.load_extension(f'cmds.{extension}') + await ctx.send(f'Loaded **{extension}**') + else: + a = cogs_commands.load_aliases(extension) + self.bot.load_extension(f'cmds.{a}') + await ctx.send(f'Loaded **{a}**') + + @commands.command(aliases=als["cogs"]["cog_commands"]["unload"]) + @commands.has_any_role(801052590389329930, 801052697498746920) + async def unload(self, ctx, extension): + lists = als["cogs_loads"] + res = [] + for a in lists.values(): + if type(a) == list: + for b in a: + res.append(b) + else: + res.append(a) + if not extension in res: + self.bot.unload_extension(f'cmds.{extension}') + await ctx.send(f'Unloaded **{extension}**') + else: + a = cogs_commands.load_aliases(extension) + self.bot.unload_extension(f'cmds.{a}') + await ctx.send(f'Unloaded **{a}**') + + @commands.command(aliases=als["cogs"]["cog_commands"]["reload"]) + @commands.has_any_role(801052590389329930, 801052697498746920) + async def reload(self, ctx, extension): + lists = als["cogs_loads"] + res = [] + for a in lists.values(): + if type(a) == list: + for b in a: + res.append(b) + else: + res.append(a) + if not extension in res: + self.bot.reload_extension(f'cmds.{extension}') + await ctx.send(f'Reloaded **{extension}**') + else: + a = cogs_commands.load_aliases(extension) + self.bot.reload_extension(f'cmds.{a}') + await ctx.send(f'Reloaded **{a}**') + + @commands.command(aliases=als["cogs"]["cog_commands"]["sss"]) + @commands.has_any_role(801052590389329930, 801052697498746920) + async def sss(self, ctx): + for filename in os.listdir('./cmds'): + if filename.endswith('.py'): + files = (f'{filename[:-3]}') + filename = files + try: + self.bot.load_extension(f"cmds.{filename}") + except commands.ExtensionAlreadyLoaded: + # print(filename + 'a') + await ctx.send(files + ' | ' + '已啟用') + except commands.ExtensionNotLoaded: + # print(filename + 'b') + await ctx.send(files + ' | ' + '己關閉') + else: + # print(filename + 'c') + self.bot.unload_extension(f"cmds.{filename}") + await ctx.send(files + ' | ' + '己關閉') + +def setup(bot): + bot.add_cog(cogs_commands(bot)) diff --git a/cmds/custom_exception.py b/cmds/custom_exception.py new file mode 100644 index 0000000..f0435f6 --- /dev/null +++ b/cmds/custom_exception.py @@ -0,0 +1,22 @@ +import discord +from discord.ext import commands, tasks +import json +import os +import datetime +import asyncio +import random +import time + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) + +class custom_exception(commands.Cog): + def __init__(self, bot): + self.bot = bot + + class MissingRequiredArgument(Exception): + def __init__(self, arg): + self.arg = arg + +def setup(bot): + bot.add_cog(custom_exception(bot)) \ No newline at end of file diff --git a/cmds/error_handler.py b/cmds/error_handler.py new file mode 100644 index 0000000..5516a46 --- /dev/null +++ b/cmds/error_handler.py @@ -0,0 +1,178 @@ +import discord +from discord.ext import commands +import json +import datetime +import asyncio +from cmds.custom_exception import custom_exception + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) + +class error_handler(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.Cog.listener() + async def on_error(self, event): + if isinstance(event, discord.DiscordException): + print("Discord.py error") + elif isinstance(event, discord.ClientException): + print("Client fail") + elif isinstance(event, discord.LoginFailure): + print("Login fail") + elif isinstance(event, discord.NoMoreItems): + print("No more items") + elif isinstance(event, discord.HTTPException): + if isinstance(event, discord.Forbidden): + print("HTTP status code 403 occurs") + elif isinstance(event, discord.NotFound): + print("HTTP status code 404 occurs") + elif isinstance(event, discord.DiscordServerError): + print("HTTP a 500 range status code occurs") + else: + print(f"HTTP request fail, response: {event.response}{f', error: {event.text}' if event.text != None else ''}, status: {event.status}, code: {event.code}") + elif isinstance(event, discord.InvalidData): + print("Encounters unknown or invalid data") + elif isinstance(event, discord.InvalidArgument): + print("Invalid argument") + elif isinstance(event, discord.GatewayNotFound): + print("Gateway not found") + elif isinstance(event, discord.ConnectionClosed): + print(f"Gateway connection is closed, code: {event.code}, reason: {event.reason}{f', shard id: {event.shard_id}' if event.shard_id != None else ''}") + elif isinstance(event, discord.PrivilegedIntentsRequired): + print(f"Not enabled intents{f', shard id: {event.shard_id}' if event.shard_id != None else ''}") + elif isinstance(event, discord.opus.OpusError): + print(f"Opus event, code: {event.code}") + elif isinstance(event, discord.opus.OpusNotLoaded): + print("Opus isn\'t loaded") + print(event) + + @commands.Cog.listener() + async def on_command_error(self, ctx, error): + if hasattr(error, "original"): + original = getattr(error, "original") + if isinstance(original, custom_exception.MissingRequiredArgument): + await ctx.send(f"`EN0005`: Missing argument {original.arg}") + return + if isinstance(error, commands.errors.DiscordException): + if isinstance(error, commands.errors.CommandError): + if isinstance(error, commands.errors.ConversionError): + await ctx.send(f"Conversion {error.converter} Error ({error.original})") + elif isinstance(error, commands.errors.UserInputError): + if isinstance(error, commands.errors.MissingRequiredArgument): + await ctx.send(f"Missing argument {error.param}") + elif isinstance(error, commands.errors.ArgumentParsingError): + if isinstance(error, commands.errors.UnexpectedQuoteError): + await ctx.send(f"Wrong usage in {error.quote}") + elif isinstance(error, commands.errors.InvalidEndOfQuotedStringError): + await ctx.send(f"Missing space after the closing quote in {error.char}") + elif isinstance(error, commands.errors.ExpectedClosingQuoteError): + await ctx.send(f"Missing the closing quote {error.close_quote}") + else: + await ctx.send("Wrong arg") + elif isinstance(error, commands.errors.BadArgument): + if isinstance(error, commands.errors.MessageNotFound): + await ctx.send(f"Can't found message {error.argument}") + elif isinstance(error, commands.errors.MemberNotFound): + await ctx.send(f"Can't found member {error.argument}") + elif isinstance(error, commands.errors.UserNotFound): + await ctx.send(f"Can't found user {error.argument}") + elif isinstance(error, commands.errors.ChannelNotFound): + await ctx.send(f"Can't find channel {error.argument}") + elif isinstance(error, commands.errors.ChannelNotReadable): + await ctx.send(f"Can't read channel {error.argument}") + elif isinstance(error, commands.errors.BadColourArgument): + await ctx.send(f"Invalid color {error.argument} was given") + elif isinstance(error, commands.errors.RoleNotFound): + await ctx.send(f"Can't find role {error.argument}") + elif isinstance(error, commands.errors.BadInviteArgument): + await ctx.send("Invalid invite") + elif isinstance(error, commands.errors.EmojiNotFound): + await ctx.send(f"Can't find emoji {error.argument}") + elif isinstance(error, commands.errors.PartialEmojiConversionFailure): + await ctx.send(f"Wrong emoji format {error.argument}") + elif isinstance(error, commands.errors.BadBoolArgument): + await ctx.send(f"Wrong bool argument {error.argument} was given") + else: + await ctx.send("Argument error") + elif isinstance(error, commands.errors.BadUnionArgument): + await ctx.send(f"Union error, {error.param}, {error.converters}, {error.errors}") + elif isinstance(error, commands.errors.TooManyArguments): + await ctx.send("Too many arguments") + else: + await ctx.send("Input error") + elif isinstance(error, commands.errors.CheckFailure): + if isinstance(error, commands.errors.PrivateMessageOnly): + await ctx.send("It's private message only") + elif isinstance(error, commands.errors.NoPrivateMessage): + await ctx.send("Can't work in private message") + elif isinstance(error, commands.errors.CheckAnyFailure): + await ctx.send(f"Check_any fail, {error.errors}, c: {error.checks}") + elif isinstance(error, commands.errors.NotOwner): + await ctx.send("Is not owner") + elif isinstance(error, commands.errors.MissingPermissions): + a = ",".join(error.missing_perms) + await ctx.send(f"User haven't enough permission(s) ({a})") + elif isinstance(error, commands.errors.BotMissingPermissions): + a = ",".join(error.missing_perms) + await ctx.send(f"Bot not enough permission(s) ({a})") + elif isinstance(error, commands.errors.MissingRole): + await ctx.send(f"User missing role: {a}") + elif isinstance(error, commands.errors.BotMissingRole): + await ctx.send(f"Bot missing role: {a}") + elif isinstance(error, commands.errors.MissingAnyRole): + d = [] + for a in error.missing_roles: + for b in a: + if type(b) == str: + d.append(b) + await ctx.send(f"User missing either in roles: {d}") + elif isinstance(error, commands.errors.BotMissingAnyRole): + d = [] + for a in error.missing_roles: + for b in a: + if type(b) == str: + d.append(b) + await ctx.send(f"Bot missing either in roles: {d}") + elif isinstance(error, commands.errors.NSFWChannelRequired): + await ctx.send(f"Channel {error.channel} missing NSFW channel setting") + else: + await ctx.send("Check fail") + elif isinstance(error, commands.errors.CommandNotFound): + await ctx.send("Haven't this command") + elif isinstance(error, commands.errors.DisabledCommand): + await ctx.send("This command is disabled") + elif isinstance(error, commands.errors.CommandInvokeError): + await ctx.send(f"Command has error, {error.original}") + elif isinstance(error, commands.errors.CommandOnCooldown): + await ctx.send(f"Command is on cooldown, {error.cooldown}, wait {error.retry_after}") + elif isinstance(error, commands.errors.MaxConcurrencyReached): + await ctx.send(f"In maximum concurrency, max {error.number}, per {error.per}") + else: + await ctx.send("Command has error") + elif isinstance(error, commands.errors.ExtensionError): + if isinstance(error, commands.errors.ExtensionAlreadyLoaded): + await ctx.send(f"The extension {error.name} has already been loaded") + elif isinstance(error, commands.errors.ExtensionNotLoaded): + await ctx.send(f"The extension {error.name} was not loaded") + elif isinstance(error, commands.errors.NoEntryPointError): + await ctx.send(f"The extension {error.name} doesn't has a \"setup\" function") + elif isinstance(error, commands.errors.ExtensionFailed): + await ctx.send(f"The extension {error.name} failed when loading, {error.original if error.original != None else ''}") + elif isinstance(error, commands.errors.ExtensionNotFound): + await ctx.send(f"Can't found extension") + else: + await ctx.send(f"Extension {error.name} had an error") + else: + await ctx.send("Discord error") + elif isinstance(error, commands.errors.ClientException): + if isinstance(error, commands.errors.CommandRegistrationError): + await ctx.send(f"Can't add command {error.name}{', conflicts to an alias'if error.alias_conflict == True else ''}") + else: + await ctx.send("Client error") + else: + await ctx.send("Error") + pass + +def setup(bot): + bot.add_cog(error_handler(bot)) \ No newline at end of file diff --git a/cmds/function_handler.py b/cmds/function_handler.py new file mode 100644 index 0000000..a414f59 --- /dev/null +++ b/cmds/function_handler.py @@ -0,0 +1,20 @@ +import discord +from discord.ext import commands, tasks +import json +import datetime +import asyncio +from pathlib import Path +import inspect + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) + +class function_handler(commands.Cog): + def __init__(self, bot): + self.bot = bot + + def get_args(function): + return list(dict(inspect.signature(function).parameters).keys()) + +def setup(bot): + bot.add_cog(function_handler(bot)) \ No newline at end of file diff --git a/cmds/help.py b/cmds/help.py new file mode 100644 index 0000000..c37a7a8 --- /dev/null +++ b/cmds/help.py @@ -0,0 +1,106 @@ +import discord +from discord.ext import commands, tasks +import json +import datetime +import asyncio +from pathlib import Path +import re + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("help.json", mode="r", encoding="utf8") as f: + hps = json.load(f) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) + +class help(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command(aliases=als["cogs"]["help"]["help"]) + async def help(self, ctx, *, cmd=None): + if cmd == None: + embed = discord.Embed(title="Help", description="Won't show Admin's, Owner's, Developer's commands", color=discord.Colour.green(), timestamp= datetime.datetime.now()) + for a, b in hps["commands"].items(): + embed.add_field(name=a.capitalize(), value=f"Descriptions/Features: {b[0]}\nSyntax: {b[1]}", inline=False) + else: + can = True + cd = cmd + cmds = cmd.split() + if len(cmds) == 3: + if cmds[-1] == "command": + cmds = [cmds[0]]+["command"] + out, fir = [], False + for a, b in hps["info"]["aliases"].items(): + for e, f in b.items(): + for a in cmds: + if isinstance(f, dict): + if e != cmds[0]: continue + print("a") + if ("__init__" in f) and ((a in f["__init__"]) or a == e): + fir = True + out.append(e) + else: + g = f + + for c, d in g.items(): + if a in d: + out.append(c) + elif isinstance(d, dict): + if "__init__" in d and d["__init__"] == a: + out.append(d["__init__"]) + continue + g = d + elif a in f or a == e: + fir = True + out.append(e) + cmds = out + if fir == False or cmds[0] not in hps["commands"]: + await ctx.send("`EN0004`: Cannot find command info named `{}`".format(cd)) + return + embed = discord.Embed(title="Help -- "+cmds[0].capitalize(), color=discord.Colour.green(), timestamp= datetime.datetime.now()) + res = hps["commands"][cmds[0]] + for a, b in hps["info"].items(): + if a == "aliases": + for c, d in b.items(): + for e, f in d.items(): + g = f + if e != cmds[0]: continue + for cmd in cmds: + if cmd not in g: continue + if not isinstance(g, dict): break + g = g[cmd] + res.append(g["__init__"] if isinstance(g, dict) else g) + can = False + break + elif a == "details": + for c, d in b.items(): + e = d + for cmd in cmds: + if cmd not in e: continue + e = e[cmd] + if type(e) == dict and "__init__" not in e: continue + s = e["__init__"] if isinstance(e, dict) else e + if not s: break + # if re.search(r"(?<=\{)([A-Za-z0-9-])+(?<=\})", s): + # if re.search(r"(?<=\{)([A-Za-z0-9-])+(?<=\})", s) == "-1": + # s = s.format(cmds[-1]) + # elif re.search(r"(?<=\{)([A-Za-z0-9-])+(?<=\})", s) == "-2": + # s - s.format(cmds[-2]) + if "{" and "}" in s: s - s.format(**zip([str(-g) for g in range(1, len(cmds)+1)[::-1]], cmds[:-1])) + res.append(s) + can = False + break + if can == True: + await ctx.send("`EN0004`: Cannot find command info named `{}`".format(cd)) + return + out = [("Description: "+res[0])]+[("Syntax: "+res[1])]+[("Aliases: "+", ".join(res[2]))] + if len(res) == 4: + out.append("Details: "+res[3]) + embed.add_field(name=" ".join(cmds), value="\n\n".join(out), inline=False) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + +def setup(bot): + bot.add_cog(help(bot)) \ No newline at end of file diff --git a/cmds/history.py b/cmds/history.py new file mode 100644 index 0000000..6ffdff7 --- /dev/null +++ b/cmds/history.py @@ -0,0 +1,5359 @@ +from pathlib import Path +import discord +from discord.ext import commands +import json +import datetime +import asyncio +from cmds.calculate import calculate +import os +from cmds.string_handler import string_handler +from cmds.custom_exception import custom_exception +from cmds.calculate import calculate +from PIL import Image, ImageColor, ImageDraw, ImageFont +import re, textwrap, random +from cmds.repeating_decimal_sol import repeating_dec_sol +import fractions +from collections import deque +import bitdotio + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) +with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) +with open("help.json", mode="r", encoding="utf8") as f: + hps = json.load(f) +with open("rules.json", mode="r", encoding="utf8") as f: + rulej = json.load(f) +with open("updates.json", mode="r", encoding="utf8") as f: + udslist = json.load(f) + +db = bitdotio.bitdotio("6cCg_cknNfbKVqNk84Q2JeV8vVXL") + +class history(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][0]) + async def history(self, ctx): + await ctx.send("History `command`:\n`Alpha_0_1`\n`Alpha_0_2_1`\n`Alpha_0_3_0`" + "\n`Beta_0_1_0`\n`Beta_0_2_0`\n`Beta-0_3_0`\n`Beta_0_4_0`\n`Beta_0_5_0`\n`Beta_0_6_0`\n`Beta_0_6_1`" + "\n\nNote:\nAliases system not include in here\n" + "\n`Stable_1_0`\n`Stable_1_0_1`\n`Stable_1_0_2`" + "History `server_icon`:\n`1`" + "\nHistory for history points and timestamps:\n`server`\n`idlecorpprofit`" + "Suggest for more, or suggest more aliases") + + @history.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["Alpha_0_1"][0]) + async def Alpha_0_1(self, ctx): + await ctx.send("History: Alpha_0_1 commands:\n`command`") + + @Alpha_0_1.group(name="command", invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["command"]) + async def commandA01(self, ctx): + await ctx.send("History: Command commands:\n`profit`") + + @commandA01.command(aliases=als["cogs"]["history"]["history"][1]["Alpha_0_1"][1]["profit"]) + async def profit(self, ctx, fac, typ, num: int=1): + if num == 1: + sol = calculate.product_speed(fac, typ) + else: + sol = calculate.product_speed(fac, typ, num) + pd = list(sol.keys()) + sp = list(sol.values()) + s = [] + for a, b in zip(pd, sp): + s.append(" | ".join(list((a, b)))) + c = "\n".join(s) + embed = discord.Embed(title=fac) + + await ctx.send(f"{fac}```\n{c}\n```") + + @history.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["Alpha_0_2_1"][0]) + async def Alpha_0_2_1(self, ctx): + await ctx.send("History: Alpha_0_2_1 commands:\n`command`") + + @Alpha_0_2_1.group(name="command", invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["command"]) + @commands.has_role("Owner") + async def commandA021(self, ctx): + await ctx.send("History: Command commands:\n`listcogs`") + + @commandA021.command(aliases=als["cogs"]["history"]["history"][1]["Alpha_0_2_1"][1]["listcogs"]) + @commands.has_role("Owner") + async def listcogs(self, ctx): + for filename in os.listdir('./cmds'): + if filename.endswith('.py'): + lists = (f'{filename[:-3]}') + await ctx.send(lists) + + @history.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["Alpha_0_3_0"][0]) + async def Alpha_0_3_0(self, ctx): + await ctx.send("History: Alpha_0_3_0 commands:\n`command`") + + @Alpha_0_3_0.group(name="command", invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["command"]) + async def commandA030(self, ctx): + await ctx.send("History: Command commands:\n`speed`\n`profit`") + + @commandA030.command(aliases=als["cogs"]["history"]["history"][1]["Alpha_0_3_0"][1]["speed"]) + async def speed(self, ctx, *, args):#facilities, number + correct = string_handler.location(str, int, args) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("Can't determind arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args) + fac = args[0] + num = args[1] + if num == []: + num = 1 + fac = "_".join(fac) + if type(num) == list: + for a in num: + num = a + sol = calculate.product_speed(fac, "all", num) + print(sol) + if sol[0] == "None": + cs_pd = "None" + else: + cs_pd = list(sol[0].keys()) + cs_sp = list(sol[0].values()) + if sol[1] != "None:": + pd_pd = list(sol[1].keys()) + pd_sp = list(sol[1].values()) + else: + pd_pd = "None" + s = [] + s2 = [] + if not cs_pd == "None": + for a, b in zip(cs_pd, cs_sp): + s.append(" | ".join(list(("**"+a.replace("_", " ")+"**", b)))) + c = "\n".join(s) + else: + c = "None" + if not pd_pd == "None": + for a, b in zip(pd_pd, pd_sp): + s2.append(" | ".join(list(("**"+a.replace("_", " ")+"**", b)))) + p = "\n".join(s2) + else: + p = "None" + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_, color=discord.Colour.blue(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p, inline=False) + embed.add_field(name="Note", value="The result of this command can't get anything of region(s). In Alpha.0.2, this command just calculate for one-type-facility in **one action**! ", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @commandA030.command(aliases=als["cogs"]["history"]["history"][1]["Alpha_0_3_0"][1]["profit"]) + async def profit(self, ctx, *, args):#facility, number + correct = string_handler.location(str, int, args) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("Can't determind arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args) + fac = args[0] + num = args[1] + if num == []: + num = 1 + fac = "_".join(fac) + if type(num) == list: + for a in num: + num = a + sol = calculate.product_profit(fac, "all", num) + if sol[0] == "None": + cs_pd = "None" + else: + cs_pd = list(sol[0].keys()) + cs_sp = list(sol[0].values()) + if sol[1] != "None:": + pd_pd = list(sol[1].keys()) + pd_sp = list(sol[1].values()) + else: + pd_pd = "None" + s = [] + s2 = [] + if not cs_pd == "None": + for a, b in zip(cs_pd, cs_sp): + s.append(" | ".join(list(("**"+a.replace("_", " ")+"**", "$"+b)))) + c = "\n".join(s) + else: + c = "None" + if not pd_pd == "None": + for a, b in zip(pd_pd, pd_sp): + s2.append(" | ".join(list(("**"+a.replace("_", " ")+"**", "$"+b)))) + p = "\n".join(s2) + else: + p = "None" + if type(sol[2]) == list: + pfs = sol[2] + for a in list(pfs[0].values()): + pf = "**Max** | $"+a+"\n" + for a in list(pfs[1].values()): + pf += "**Min** | $"+a + else: + pf = "$"+sol[2] + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_, color=discord.Colour.blue(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p, inline=False) + embed.add_field(name="Profit", value=pf, inline=False) + embed.add_field(name="Note", value="The result of this command can't get anything of region(s). In Alpha.0.2, this command just calculate for one-type-facility in **one action**! ", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @history.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["Beta_0_1_0"][0]) + async def Beta_0_1_0(self, ctx): + await ctx.send("History: Beta_1_0 commands:\n`command`") + + @Beta_0_1_0.group(name="command", invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["command"]) + async def commandB010(self, ctx): + await ctx.send("History: Command commands:\n`ping`\n`version`") + + @commandB010.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_1_0"][1]["ping"]) + async def ping(self, ctx): + await ctx.send(f'**{round(self.bot.latency*1000, 2)}** ms') + + @commandB010.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_1_0"][1]["version"]) + async def version(self, ctx): + await ctx.send(f"The bot version is: **{jdata['version']}**") + + @history.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["Beta_0_2_0"][0]) + async def Beta_0_2_0(self, ctx): + await ctx.send("History: Beta_2_0 commands:\n`command`") + + @Beta_0_2_0.group(name="command", invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["command"]) + async def commandB020(self, ctx): + await ctx.send("History: Command commands:\n`speed`\n`profit`") + + @commandB020.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_2_0"][1]["speed"]) + async def speed(self, ctx, *, args):#facilities, number + correct = string_handler.location(str, int, args) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("Can't determind arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args) + fac = args[0] + num = args[1] + if num == []: + num = 1 + fac = "_".join(fac) + if type(num) == list: + for a in num: + num = a + sol = calculate.product_speed(fac, "all", num) + if sol[0] == "None": + cs_pd = "None" + else: + cs_pd = list(sol[0].keys()) + cs_sp = list(sol[0].values()) + if sol[1] != "None:": + pd_pd = list(sol[1].keys()) + pd_sp = list(sol[1].values()) + else: + pd_pd = "None" + s = [] + s2 = [] + if not cs_pd == "None": + for a, b in zip(cs_pd, cs_sp): + s.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", b)))) + c = "\n".join(s) + else: + c = "None" + if not pd_pd == "None": + for a, b in zip(pd_pd, pd_sp): + s2.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", b)))) + p = "\n".join(s2) + else: + p = "None" + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p, inline=False) + embed.add_field(name="Note", value="The result of this command can't get anything of region(s). In Alpha.0.2, this command just calculate for one-type-facility in **one action**! ", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @commandB020.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_2_0"][1]["profit"]) + async def profit(self, ctx, *, args):#facility, number + correct = string_handler.location(str, int, args) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("Can't determind arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args) + fac = args[0] + num = args[1] + if num == []: + num = 1 + fac = "_".join(fac) + if type(num) == list: + for a in num: + num = a + sol = calculate.product_profit(fac, "all", num) + if sol[0] == "None": + cs_pd = "None" + else: + cs_pd = list(sol[0].keys()) + cs_sp = list(sol[0].values()) + if sol[1] != "None:": + pd_pd = list(sol[1].keys()) + pd_sp = list(sol[1].values()) + else: + pd_pd = "None" + s = [] + s2 = [] + if not cs_pd == "None": + for a, b in zip(cs_pd, cs_sp): + s.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", "$"+b)))) + c = "\n".join(s) + else: + c = "None" + if not pd_pd == "None": + for a, b in zip(pd_pd, pd_sp): + s2.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", "$"+b)))) + p = "\n".join(s2) + else: + p = "None" + if type(sol[2]) == list: + pfs = sol[2] + for a in list(pfs[0].values()): + pf = "**Max** | $"+a+"\n" + for a in list(pfs[1].values()): + pf += "**Min** | $"+a + else: + pf = "$"+sol[2] + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p, inline=False) + embed.add_field(name="Profit", value=pf, inline=False) + embed.add_field(name="Note", value="The result of this command can't get anything of region(s). In Alpha.0.2, this command just calculate for one-type-facility in **one action**! ", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @commandB020.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_2_0"][1]["search"]) + async def search(self, ctx, ctn=None): + if ctn == None: + await ctx.send("What you want to search?Just need to enter something.") + else: + embed = discord.Embed(title="Search", color=discord.Color.from_rgb(int("35", 16), int("12", 16), int("38", 16)), timestamp= datetime.datetime.now()) + imgname = "" + if not str(datetime.datetime.now().date()) == "2021-04-01": + embed.add_field("Haven't this command", "This command is not usable") + await ctx.send(embed=embed) + return + if ctn == "when": + embed.add_field(name="Result", value="ERROR: Time collection! Pleace make sure you have time to do this and try again") + img = Image.new("1", (100, 100), 255) + font = ImageFont.FreeTypeFont('Arial.ttf', size=20) + ImageDraw.Draw(img).text((50, 50), "Search", anchor="mm", fill="black", font=font, align="center") + imgnum = len([file for file in os.listdir() if file.endswith(".jpg")]) + imgname = f"Search{imgnum}.jpg" + img.save(imgname) + embed.set_thumbnail(url="attachment://"+imgname) + elif re.search(r'^#(?:[0-9a-fA-F]{3}){1,2}$', ctn.split(" ")[0]) or re.search(r'^(?:[0-9a-fA-F]{3}){1,2}$', ctn): + clr = ctn.split(" ")[0] + ctn = " ".join(ctn.split(" ")[1:]) + if clr.startswith("#"): + img = Image.new("RGB", (100,100), clr) + embed.add_field(name="Color", value=clr) + if ctn: + font = ImageFont.FreeTypeFont('Arial.ttf', size=15) + ImageDraw.Draw(img).multiline_text((50, 50), "\n".join(textwrap.wrap(ctn, 7)), anchor="mm", fill="black", font=font, align="center") + else: + img = Image.new("RGB", (100,100), "#"+clr) + embed.add_field(name="Color", value="#"+clr) + if ctn: + font = ImageFont.FreeTypeFont('Arial.ttf', size=15) + ImageDraw.Draw(img).multiline_text((50, 50), "\n".join(textwrap.wrap(ctn, 7)), anchor="mm", fill="black", font=font, align="center") + imgnum = len([file for file in os.listdir() if file.endswith(".jpg")]) + imgname = f"Search{imgnum}.jpg" + img.save(imgname) + embed.set_thumbnail(url="attachment://"+imgname) + elif ctn == "end": + embed.add_field(name="Result", value="When UTC...") + img = Image.new("1", (100, 100), 255) + font = ImageFont.FreeTypeFont('Arial.ttf', size=20) + ImageDraw.Draw(img).text((50, 50), "Search", anchor="mm", fill="black", font=font, align="center") + imgnum = len([file for file in os.listdir() if file.endswith(".jpg")]) + imgname = f"Search{imgnum}.jpg" + img.save(imgname) + embed.set_thumbnail(url="attachment://"+imgname) + else: + errors = ["Watch your self 3 second then close your eyes 1 second, search again", + "Internet error, pleace reconnect your internet", + "You are too alone, try again", + "Your brain is going to explode! try again!", + "Your pc is getting hacked, make sure your pc is right then try again", + "Your pc will EXPLODE!!"] + embed.add_field(name="Result", value="Error:\n"+random.choice(errors)) + img = Image.new("1", (100, 100), 255) + font = ImageFont.FreeTypeFont('Arial.ttf', size=20) + ImageDraw.Draw(img).text((50, 50), "Search", anchor="mm", fill="black", font=font, align="center") + imgnum = len([file for file in os.listdir() if file.endswith(".jpg")]) + imgname = f"Search{imgnum}.jpg" + img.save(imgname) + embed.set_thumbnail(url="attachment://"+imgname) + await ctx.send(file=discord.File(imgname), embed=embed) + if imgname: + os.remove(imgname) + + @history.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["server_icon"][0]) + async def server_icon(self, ctx): + await ctx.send("Server icon version: `1`") + + @server_icon.command(name="1", aliases=als["cogs"]["history"]["history"][1]["server_icon"][1]["1"]) + async def one(self, ctx): + embed = discord.Embed(title="Server icon", description="Version 1 (v.1)", color=discord.Colour.light_gray(), timestamp= datetime.datetime.now()) + image = discord.File("ICP server icon v1.png", filename="icon.png") + embed.set_thumbnail(url="attachment://icon.png") + embed.add_field(name="Server Icon on the right side", value="You can see what's the difference of them.") + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(file=image, embed=embed) + + @history.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["Beta_0_3_0"][0]) + async def Beta_0_3_0(self, ctx): + await ctx.send("History: Beta_3_0 commands:\n`command`") + + @Beta_0_3_0.group(name="command", invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["command"]) + async def commandB030(self, ctx): + await ctx.send("History: Command commands:\n`help`\n`info`\n`profit`\n`rules`\n`search`\n`speed`\n`updates`") + + @commandB030.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_3_0"][1]["help"]) + async def help(self, ctx, *, cmd=None): + if cmd == None: + embed = discord.Embed(title="Help", description="Won't show Admin's, Owner's, Developer's commands", color=discord.Colour.green(), timestamp= datetime.datetime.now()) + for a, b in hps["commands"].items(): + embed.add_field(name=a.capitalize(), value=f"Descriptions/Features: {b[0]}\nSyntax: {b[1]}", inline=False) + else: + can = True + cd = cmd + cmds = cmd.split() + if len(cmds) == 3: + if cmds[-1] == "command": + cmds = [cmds[0]]+["command"] + out = [] + for a, b in hps["info"]["aliases"].items(): + for e, f in b.items(): + for a in cmds: + if isinstance(f, dict): + if ("__init__" in f) and (a in f["__init__"]): + out.append(e) + else: + g = f + + for c, d in g.items(): + if a in d: + out.append(c) + elif isinstance(d, dict): + if "__init__" in d and d["__init__"] == a: + out.append(d["__init__"]) + continue + g = d + elif a in f: + out.append(e) + cmds = out + embed = discord.Embed(title="Help -- "+cmds[0].capitalize(), color=discord.Colour.green(), timestamp= datetime.datetime.now()) + res = hps["commands"][cmds[0]] + for a, b in hps["info"].items(): + if a == "aliases": + for c, d in b.items(): + e = d + for cmd in cmds: + if cmd not in e: continue + e = e[cmd] + res.append(f["__init__"] if isinstance(f, dict) else f) + can = False + break + elif a == "details": + for c, d in b.items(): + e = d + for cmd in cmds: + if cmd not in e: continue + e = e[cmd] + if type(e) == dict and "__init__" not in e: continue + s = e["__init__"] if isinstance(e, dict) else e + if not s: break + # if re.search(r"(?<=\{)([A-Za-z0-9-])+(?<=\})", s): + # if re.search(r"(?<=\{)([A-Za-z0-9-])+(?<=\})", s) == "-1": + # s = s.format(cmds[-1]) + # elif re.search(r"(?<=\{)([A-Za-z0-9-])+(?<=\})", s) == "-2": + # s - s.format(cmds[-2]) + if "{" and "}" in s: s - s.format(**zip([str(-g) for g in range(1, len(cmds)+1)[::-1]], cmds[:-1])) + res.append(s) + can = False + break + if can == True: + await ctx.send("Cannot find command info named `{}`".format(cd)) + return + out = [("Description: "+res[0])]+[("Syntax: "+res[1])]+[("Aliases: "+", ".join(res[2]))] + if len(res) == 4: + out.append("Details: "+res[3]) + embed.add_field(name=" ".join(cmds), value="\n\n".join(out), inline=False) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @commandB030.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_3_0"][1]["info"]) + async def info(self, ctx, *, req): + icinfo = icd["info"] + debug = [] + infoals = dict(list(als["ic"]["assets"].items())+list(als["ic"]["facilities"].items())) + for a, b in infoals.items(): + if not b == None: + if req in b: + debug.append(a) + else: + reqsl = req + if len(debug) > 1: + await ctx.send("Happened an unexpected or imposible thing, E1") + elif debug: + reqsl, = debug + else: + reqsl = req + reqsl = "_".join(reqsl.split(" ")) + check = list(icinfo["assets"].keys())+list(icinfo["facilities"]) + if not reqsl in check: + await ctx.send(f"Cannot find info of: {req}, check your input") + return + if reqsl in icinfo["assets"].keys(): + infoclass = "assets" + elif reqsl in icinfo["facilities"].keys(): + infoclass = "facilities" + theinfo = icinfo[infoclass][reqsl] + embed = discord.Embed(title=f"Info -- {infoclass.capitalize()}", color=discord.Colour.greyple(), timestamp= datetime.datetime.now()) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + embed.add_field(name=reqsl.replace("_", " ").capitalize(), value="_ _", inline=False) + output = [] + if infoclass == "assets": + # output.append("**IdleCorp Info(Examine):**\n"+theinfo["icinfo"]) + stuff = [] + if theinfo["market"] == True: + stuff.append("It's tradable in market") + elif theinfo["market"] == False: + stuff.append("It's not tradable in market") + if theinfo["retail"] == False: + stuff.append("It cannot sold in retail store") + stuff.append("It cannot be scrapped") + else: + stuff.append("It can sold in retail store") + stuff.append("It can be scrapped into {} scraps".format(theinfo["retail"])) + # output.append("\n".join(stuff)) + embed.add_field(name="IdleCorp Info(Examine):", value=theinfo["icinfo"]+"\n\n"+"\n".join(stuff), inline=False) + # output.append("**IdleCorp Wiki:**\n"+theinfo["icwiki"]) + embed.add_field(name="IdleCorp Wiki:", value=theinfo["icwiki"], inline=False) + # output.append("**Wikipedia:**\n"+theinfo["wikipedia"]) + embed.add_field(name="Wikipedia:", value=theinfo["wikipedia"], inline=False) + if theinfo.setdefault("icp"): + embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if not als["ic"]["assets"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["assets"][reqsl])) + else: output.append("Aliases: None") + stuff = [] + stuff.append(f"\n[IdleCorp Wiki](https://wiki.idlecorp.xyz/index.php/{reqsl})") + if reqsl == "led": + stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/Light-emitting_diode)") + elif reqsl == "rubber": + stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/synthetic_rubber)") + elif reqsl == "energy": + stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/electricity)") + elif reqsl == "lamp": + stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/light_fixture)") + elif reqsl == "ccd": + stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/charge-coupled_device)") + elif reqsl == "hq": + stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/Headquarters)") + elif theinfo["wikipedia"] != "None": + stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + output.append("\n".join(stuff)) + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "facilities": + # output.append("**IdleCorp Info(Examine):**\n"+theinfo["icinfo"]) + embed.add_field(name="IdleCorp Info(Examine):", value=theinfo["icinfo"], inline=False) + stuff = [] + for a, b in theinfo["construct"].items(): + if not a == "money": + stuff.append(str(b)+" **"+a.capitalize()+"**") + else: + stuff.append("$"+f"{b:,}") + # output.append("**Construction materials:**\n"+"\n".join(stuff)) + embed.add_field(name="Construction materials:", value="\n".join(stuff), inline=False) + # output.append("**IdleCorp Wiki:**\n"+theinfo["icwiki"]) + embed.add_field(name="IdleCorp Wiki:", value=theinfo["icwiki"], inline=False) + # output.append("**Wikipedia:**\n"+theinfo["wikipedia"]) + embed.add_field(name="Wikipedia:", value=theinfo["wikipedia"], inline=False) + if theinfo.setdefault("icp"): + embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if not als["ic"]["facilities"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["facilities"][reqsl])) + else: output.append("Aliases: None") + if reqsl == "steel_mill": + if random.randint(1, 50) == 1: + output.append("*I always typo this facility as \"still mill\"*") + if reqsl == "furniture_factory": + if random.randint(1, 5) == 1: + output.append("*Why the IdleCorp Wiki page has so many words...*") + if random.randint(1, 10) == 1: + output.append("*Because the IdleCorp Wiki page has too many work, I had to change the layout of all...*") + if reqsl.split("_")[-1] == "factory": + if random.randint(1, 20) == 1: + output.append("*I really want to know who made this facility page...*") + if reqsl == "research_chemical_factory": + if random.randint(1, 3) == 1: + output.append("*Why this facility has so many aliases...*") + stuff = [] + stuff.append(f"\n[IdleCorp Wiki](https://wiki.idlecorp.xyz/index.php/{reqsl})") + if reqsl == "": + stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + else: + stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + output.append("\n".join(stuff)) + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + # embed.add_field(name=reqsl.replace("_", " ").capitalize(), value="\n\n".join(output)) + await ctx.send(embed=embed) + + @commandB030.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_3_0"][1]["profit"]) + async def profit(self, ctx, *, args):#facility, number + correct = string_handler.location(str, int, args, True) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("Cannot determine arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args, True) + fac = args[0] + num = args[1] + if num == []: + num = 1 + fac = " ".join(fac).lower() + for a, b in als["ic"]["facilities"].items(): + if b != None: + if fac in b: + fac = a + fac = fac.split(" ") + fac = "_".join(fac).lower() + with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + if not fac in icd["facilities"].keys(): + await ctx.send("Invalid facility: {}".format(" ".join(args[0]))) + return + if type(num) == list: + for a in num: + num = a + if type(num) == str: + if num.endswith(('k', 'm', 'b')): + a = num[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + tnum = a.replace(',', '') + if num.endswith("k"): + num = float(tnum)*1000 + elif num.endswith("m"): + num = float(tnum)*1000000 + else: + num =float(tnum)*1000000000 + else: + await ctx.send("Number input error") + return + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", num): + num = float(num.replace(",", "")) + else: + await ctx.send("Number input error") + return + sol = calculate.product_profit(fac, "all", num) + if sol[0] == "None": + cs_pd = "None" + else: + cs_pd = list(sol[0].keys()) + cs_sp = list(sol[0].values()) + if sol[1] != "None:": + pd_pd = list(sol[1].keys()) + pd_sp = list(sol[1].values()) + else: + pd_pd = "None" + s = [] + s2 = [] + if not cs_pd == "None": + for a, b in zip(cs_pd, cs_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", "$"+b)))) + c = "\n".join(s) + else: + c = "None" + if not pd_pd == "None": + for a, b in zip(pd_pd, pd_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s2.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", "$"+b)))) + p = "\n".join(s2) + else: + p = "None" + if type(sol[2]) == list: + pfs = sol[2] + for a in list(pfs[0].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf = "**Max** | $"+a+"\n" + for a in list(pfs[1].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf += "**Min** | $"+a + else: + pf = sol[2] + try: + float(pf) + pf = f"{float(pf):,}" + except: + pf = pf.split(".") + pf = f"{int(pf[0]):,}.{pf[1]}" + pf = "$"+pf + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p, inline=False) + embed.add_field(name="Profit", value=pf, inline=False) + embed.add_field(name="Note", value="The result of this command can't get anything of region(s). In Alpha.0.2, this command just calculate for one-type-facility in **one action**! ", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @commandB030.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_3_0"][1]["rules"]) + async def rules(self, ctx, *, args=None): + if args != None: + arg = string_handler.filter(args) + check = 1 + for a in arg: + if a == []: + check = 0 + if check == 1: + check = string_handler.location(str, int, args) + if check != True: + await ctx.send("Arguments error") + return + else: + if args.isdigit(): + args = int(args) + if arg[1] != []: + if len(arg[1]) > 1: + await ctx.send("Too much argument: type number") + return + for a in arg[1]: + num = a + else: + num = None + if arg[0] != []: + if len(arg[0]) > 1: + await ctx.send("Too much argument: type string") + return + for a in arg[0]: + if a.startswith("--"): + flag = a[2:] + else: + await ctx.send("Argument error: type string") + return + else: + flag = None + if flag == None: + rule = dict([next(reversed(rulej.items()))]) + for a in rule.values(): + ru = a + for a in rule.keys(): + version = a + else: + ru = rulej[flag] + version = flag + if num == None: + prints = [] + for a, b in ru.items(): + if a == "end": + for c in b: + prints.append(c) + continue + if type(b) == list: + count = 1 + for c in b: + if a == "head_notes": + prints.append("*"+c+"*") + elif a == "rules": + prints.append(f"**{count}.**"+c) + count += 1 + else: + prints.append(c) + else: + prints.append(b) + #Version (END) + prints.append(f"\n**v.{version}** of the server rules") + half = int(len(prints)/2) + a = prints[:half] + b = prints[half:] + embed = discord.Embed(title="Server Rules", color=discord.Colour.orange(), timestamp= datetime.datetime.now()) + embed.add_field(name="_ _", value="\n".join(a), inline=False) + embed.add_field(name="_ _", value="\n".join(b), inline=False) + else: + rule = f"**{num}.**"+ru["rules"][num-1] + embed = discord.Embed(title="Server Rules", description=rule+f"\n\nv.{version}", color=discord.Colour.orange(), timestamp= datetime.datetime.now()) + # embed.add_field(name="Server Rules", value=rule+f"\n\nv.{version}", inline=False) + else: + ru = dict([next(reversed(rulej.items()))]) + for a in ru.values(): + rule = a + for a in ru.keys(): + version = a + prints = [] + for a, b in rule.items(): + if a == "end": + for c in b: + prints.append(c) + continue + if type(b) == list: + count = 1 + for c in b: + if a == "head_notes": + prints.append("*"+c+"*") + elif a == "rules": + prints.append(f"**{count}.**"+c) + count += 1 + else: + prints.append(c) + else: + prints.append(b) + #Version (END) + prints.append(f"\n**v.{version}** of the server rules") + half = int(len(prints)/2) + a = prints[:half] + b = prints[half:] + embed = discord.Embed(title="Server Rules", color=discord.Colour.orange(), timestamp= datetime.datetime.now()) + embed.add_field(name="_ _", value="\n".join(a), inline=False) + embed.add_field(name="_ _", value="\n".join(b), inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @commandB030.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_3_0"][1]["search"]) + async def search(self, ctx, ctn=None): + if ctn == None: + await ctx.send("What you want to search?Just need to enter something.") + else: + embed = discord.Embed(title="Search", color=discord.Color.from_rgb(int("35", 16), int("12", 16), int("38", 16)), timestamp= datetime.datetime.now()) + imgname = "" + if not str(datetime.datetime.now().date()) == "2021-04-01": + embed.add_field(name="Haven't this command", value="This command is not usable") + await ctx.send(embed=embed) + return + if ctn == "when": + embed.add_field(name="Result", value="ERROR: Time collection! Pleace make sure you have time to do this and try again") + img = Image.new("1", (100, 100), 255) + font = ImageFont.FreeTypeFont('Arial.ttf', size=20) + ImageDraw.Draw(img).text((50, 50), "Search", anchor="mm", fill="black", font=font, align="center") + imgnum = len([file for file in os.listdir() if file.endswith(".jpg")]) + imgname = f"Search{imgnum}.jpg" + img.save(imgname) + embed.set_thumbnail(url="attachment://"+imgname) + elif re.search(r'^#(?:[0-9a-fA-F]{3}){1,2}$', ctn.split(" ")[0]) or re.search(r'^(?:[0-9a-fA-F]{3}){1,2}$', ctn): + clr = ctn.split(" ")[0] + ctn = " ".join(ctn.split(" ")[1:]) + if clr.startswith("#"): + img = Image.new("RGB", (100,100), clr) + embed.add_field(name="Color", value=clr) + if ctn: + font = ImageFont.FreeTypeFont('Arial.ttf', size=15) + ImageDraw.Draw(img).multiline_text((50, 50), "\n".join(textwrap.wrap(ctn, 7)), anchor="mm", fill="black", font=font, align="center") + else: + img = Image.new("RGB", (100,100), "#"+clr) + embed.add_field(name="Color", value="#"+clr) + if ctn: + font = ImageFont.FreeTypeFont('Arial.ttf', size=15) + ImageDraw.Draw(img).multiline_text((50, 50), "\n".join(textwrap.wrap(ctn, 7)), anchor="mm", fill="black", font=font, align="center") + imgnum = len([file for file in os.listdir() if file.endswith(".jpg")]) + imgname = f"Search{imgnum}.jpg" + img.save(imgname) + embed.set_thumbnail(url="attachment://"+imgname) + elif ctn == "end": + embed.add_field(name="Result", value="When UTC...") + img = Image.new("1", (100, 100), 255) + font = ImageFont.FreeTypeFont('Arial.ttf', size=20) + ImageDraw.Draw(img).text((50, 50), "Search", anchor="mm", fill="black", font=font, align="center") + imgnum = len([file for file in os.listdir() if file.endswith(".jpg")]) + imgname = f"Search{imgnum}.jpg" + img.save(imgname) + embed.set_thumbnail(url="attachment://"+imgname) + else: + errors = ["Watch your self 3 second then close your eyes 1 second, search again", + "Internet error, pleace reconnect your internet", + "You are too alone, try again", + "Your brain is going to explode! try again!", + "Your pc is getting hacked, make sure your pc is right then try again", + "Your pc will EXPLODE!!"] + embed.add_field(name="Result", value="Error:\n"+random.choice(errors)) + img = Image.new("1", (100, 100), 255) + font = ImageFont.FreeTypeFont('Arial.ttf', size=20) + ImageDraw.Draw(img).text((50, 50), "Search", anchor="mm", fill="black", font=font, align="center") + imgnum = len([file for file in os.listdir() if file.endswith(".jpg")]) + imgname = f"Search{imgnum}.jpg" + img.save(imgname) + embed.set_thumbnail(url="attachment://"+imgname) + await ctx.send(file=discord.File(imgname), embed=embed) + if imgname: + os.remove(imgname) + + @commandB030.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_3_0"][1]["speed"]) + async def speed(self, ctx, *, args):#facilities, number + correct = string_handler.location(str, int, args, True) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("Can't determind arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args, True) + fac = args[0] + num = args[1] + if num == []: + num = 1 + fac = " ".join(fac).lower() + for a, b in als["ic"]["facilities"].items(): + if b != None: + if fac in b: + fac = a + fac = fac.split(" ") + fac = "_".join(fac).lower() + with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + if not fac in icd["facilities"].keys(): + await ctx.send("Cannot find facility: {}".format(" ".join(args[0]))) + return + if type(num) == list: + for a in num: + num = a + if type(num) == str: + if num.endswith(('k', 'm', 'b')): + a = num[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + tnum = a.replace(',', '') + if num.endswith("k"): + num = float(tnum)*1000 + elif num.endswith("m"): + num = float(tnum)*1000000 + else: + num =float(tnum)*1000000000 + else: + await ctx.send("Number input error") + return + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", num): + num = float(num.replace(",", "")) + else: + await ctx.send("Number input error") + return + sol = calculate.product_speed(fac, "all", num) + if sol[0] == "None": + cs_pd = "None" + else: + cs_pd = list(sol[0].keys()) + cs_sp = list(sol[0].values()) + if sol[1] != "None:": + pd_pd = list(sol[1].keys()) + pd_sp = list(sol[1].values()) + else: + pd_pd = "None" + s = [] + s2 = [] + if not cs_pd == "None": + for a, b in zip(cs_pd, cs_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", b)))) + c = "\n".join(s) + else: + c = "None" + if not pd_pd == "None": + for a, b in zip(pd_pd, pd_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s2.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", b)))) + p = "\n".join(s2) + else: + p = "None" + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p, inline=False) + embed.add_field(name="Note", value="The result of this command can't get anything of region(s). In Alpha.0.2, this command just calculate for one-type-facility in **one action**! ", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @commandB030.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_3_0"][1]["updates"]) + async def updates(self, ctx, *, args=None): + def defformver(ver): + if ver == "Alpha.0.2": + formver = "Alpha.1" + elif ver in ("Alpha.0.2.1", "Alpha.0.3.0", "Beta.0.1.0"): + formver = "Alpha.2" + else: + formver = "Alpha.2" + return formver + if args != None: + arg = string_handler.filter(args) + if arg[1]: + await ctx.send("Argument error: type number") + return + flags = string_handler.flags(arg[0]) + if flags[1]: + await ctx.send("Argument error: type string1") + return + if len(flags[0]) > 1: + await ctx.send("Argument error: type string2") + return + elif len(flags[0]) == 1: + for a in flags[0]: + flag = a + else: + flag = None + if flag != None: + if arg[0].index(flag) > 0: + await ctx.send("Argument error: type string3") + return + if flag != None: + flag = flag[2:] + if len(flags[2]) > 1: + await ctx.send("Argument error: type string4") + return + elif len(flags[2]) == 1: + for a in flags[2]: + mores = a + else: + mores = None + if flag == None: + theud = dict([next(reversed(udslist.items()))]) + for a in theud.keys(): + version = a + for a in theud.values(): + ud = a + else: + ud = udslist[flag] + version = flag + if mores != None: + more = mores.split(".") + stuff = [] + for a in more: + stuff.append(a.replace("_", " ")) + # if len(more) == 1: + # for a in more: + # for c, d in als["updates list"]["first"].items(): + # if a in c: + # a = c + # prints = ud[a] + # else: + fn = "" + b = ud + first = als["updates list"]["first"] + second = als["updates list"]["second"] + third = als["updates list"]["third"] + i = 0 + moo = [] + for a in more: + if i == 0: + for c, d in first.items(): + if a in d: + a = c + f = c + else: + if f != "plans to update": + for c, d in second.items(): + if a in d: + a = c + else: + for c, d in third.items(): + if a in d: + a = c + b = b[a] + moo.append(a) + i += 1 + more = moo + store = b + nothing = "\n**Nothing to show**" + if not store: + prints = nothing + else: + if type(store) == list: + prints = "\n".join(store) + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + elif type(store) == dict: + noth = 0 + store2 = [] + for a, b in store.items(): + if more[0] == "commands": + if a in ("adds", "changes", "deletes"): + if not b: + prints = nothing + noth = 1 + else: + store2.append("**"+a.capitalize()+":**") + for a, b in b.items(): + if a.istitle(): + store2.append(a+" -- "+b) + else: + store2.append("`"+a+"` -- "+b) + # prints = "\n".join(store) + else: + if a.istitle(): + store2.append(+a+" -- "+b) + else:store2.append("`"+a+"` -- "+b) + elif more[0] == "other": + if b: + store2.append("\""+a+"\" -- "+b) + elif more[0] == "plans to update": + if a in ud["plans to update"].keys(): + if not b: + prints = nothing + noth = 1 + else: + store2.append("**"+a.capitalize()+":**") + for a, b in b.items(): + store2.append("\""+a.capitalize()+"\" -- "+b.capitalize()) + # prints = "\n".join(store) + else: + store2.append("\""+a.capitalize()+"\" -- "+b.capitalize()) + if store2: + prints = "\n".join(store2) + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + elif type(store) == str: + if len(store.split(" ")) == 1: + prints = store.capitalize() + else: + prints = store + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + prints += f"\n\nVersion: **v.{version}**" + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + embed.add_field(name=version+fn, value=prints, inline=False) + else: + formver = defformver(version) + prints = [] + for a, b in ud.items(): + if type(b) == list: + if not b: + continue + if formver == "Alpha.1": + if a == "note": + A1 = "" + else: + A1 = ":" + else: + A1 = ":" + prints.append("**"+a.capitalize()+A1+"**") + for c in b: + prints.append("> "+c) + elif type(b) == dict: + prints.append("**"+a.capitalize()+":**") + for c, d in b.items(): + if not d: + continue + if a == "other": + prints.append("> \""+c+"\" -- "+d) + continue + prints.append("> **"+c.capitalize()+":**") + for e, f in d.items(): + if a == "commands": + if a.istitle(): + prints.append("> "+e+" -- "+f) + else: + prints.append("> `"+e+"` -- "+f) + if a == "plans to update": + prints.append("> \""+e+"\" -- "+f.capitalize()) + else: + prints.append(b) + b = [] + for a in prints: + if "{}" in a: + a = a.format(version) + b.append(a) + prints = b + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + embed.add_field(name=version, value="\n".join(prints), inline=False) + else: + theud = dict([next(reversed(udslist.items()))]) + for a in theud.keys(): + version = a + for a in theud.values(): + ud = a + formver = defformver(version) + prints = [] + for a, b in ud.items(): + if type(b) == list: + if formver == "Alpha.1": + if a == "note": + A1 = "" + else: + A1 = ":" + else: + if not b: + continue + A1 = ":" + prints.append("**"+a.capitalize()+A1+"**") + for c in b: + prints.append("> "+c) + elif type(b) == dict: + prints.append("**"+a.capitalize()+":**") + for c, d in b.items(): + if not d: + continue + if a == "other": + prints.append("> \""+c+"\" -- "+d) + continue + prints.append("> **"+c.capitalize()+":**") + for e, f in d.items(): + if a == "commands": + if e.istitle(): + prints.append("> "+e+" -- "+f) + else: + prints.append("> `"+e+"` -- "+f) + if a == "plans to update": + prints.append("> \""+e+"\" -- "+f.capitalize()) + else: + prints.append(b) + b = [] + for a in prints: + if "{}" in a: + a = a.format(version) + b.append(a) + prints = b + a = "\n".join(prints) + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + embed.add_field(name=version, value=a, inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @history.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["Beta_0_4_0"][0]) + async def Beta_0_4_0(self, ctx): + await ctx.send("History: Beta_4_0 commands:\n`command`") + + @Beta_0_4_0.group(name="command", invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["command"]) + async def commandB040(self, ctx): + await ctx.send("History: Command commands:\n`info`\n`help`\n`profit`\nupdates") + + @commandB040.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_4_0"][1]["info"]) + async def info(self, ctx, *, req): + icinfo = icd["info"] + debug = [] + infoals = dict(list(als["ic"]["assets"].items())+list(als["ic"]["facilities"].items())) + for a, b in infoals.items(): + if not b == None and req in b: + debug.append(a) + if len(debug) > 1: + await ctx.send("`EN0401`: Happened an unexpected or imposible thing, E1: Aliases") + return + elif debug: + reqsl, = debug + else: + reqsl = req + reqsl = "_".join(reqsl.split(" ")) + check = list(icinfo["assets"].keys())+list(icinfo["facilities"]) + if not reqsl in check: + await ctx.send(f"`EN0004`: Cannot find info of: {req}, check your input") + return + if reqsl in icinfo["assets"].keys(): + infoclass = "assets" + elif reqsl in icinfo["facilities"].keys(): + infoclass = "facilities" + theinfo = icinfo[infoclass][reqsl] + embed = discord.Embed(title=f"Info -- {infoclass.capitalize()}", color=discord.Colour.greyple(), timestamp= datetime.datetime.now()) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + embed.add_field(name=reqsl.replace("_", " ").capitalize(), value="_ _", inline=False) + output = [] + if infoclass == "assets": + # output.append("**IdleCorp Info(Examine):**\n"+theinfo["icinfo"]) + stuff = [] + if theinfo["market"] == True: + stuff.append("It's tradable in market") + elif theinfo["market"] == False: + stuff.append("It's not tradable in market") + if theinfo["retail"] == False: + stuff.append("It cannot sold in retail store") + stuff.append("It cannot be scrapped") + else: + stuff.append("It can sold in retail store") + stuff.append("It can be scrapped into {} scraps".format(theinfo["retail"])) + # output.append("\n".join(stuff)) + embed.add_field(name="IdleCorp Info(Examine):", value=theinfo["icinfo"]+"\n\n"+"\n".join(stuff), inline=False) + # output.append("**IdleCorp Wiki:**\n"+theinfo["icwiki"]) + embed.add_field(name="IdleCorp Wiki:", value=theinfo["icwiki"], inline=False) + # output.append("**Wikipedia:**\n"+theinfo["wikipedia"]) + embed.add_field(name="Wikipedia:", value=theinfo["wikipedia"], inline=False) + if theinfo.setdefault("icp"): + embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if not als["ic"]["assets"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["assets"][reqsl])) + else: output.append("Aliases: None") + stuff = [] + stuff.append(f"\n[IdleCorp Wiki](https://wiki.idlecorp.xyz/index.php/{reqsl})") + if reqsl == "led": + stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/Light-emitting_diode)") + elif reqsl == "rubber": + stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/synthetic_rubber)") + elif reqsl == "energy": + stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/electricity)") + elif reqsl == "lamp": + stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/light_fixture)") + elif reqsl == "ccd": + stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/charge-coupled_device)") + elif reqsl == "hq": + stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/Headquarters)") + elif theinfo["wikipedia"] != "None": + stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + output.append("\n".join(stuff)) + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "facilities": + # output.append("**IdleCorp Info(Examine):**\n"+theinfo["icinfo"]) + embed.add_field(name="IdleCorp Info(Examine):", value=theinfo["icinfo"], inline=False) + stuff = [] + for a, b in theinfo["construct"].items(): + if not a == "money": + stuff.append(f"{b}"+" **"+a.capitalize()+"**") + else: + stuff.append("$"+f"{b:,}") + # output.append("**Construction materials:**\n"+"\n".join(stuff)) + embed.add_field(name="Construction materials:", value="\n".join(stuff), inline=False) + # output.append("**IdleCorp Wiki:**\n"+theinfo["icwiki"]) + embed.add_field(name="IdleCorp Wiki:", value=theinfo["icwiki"], inline=False) + # output.append("**Wikipedia:**\n"+theinfo["wikipedia"]) + embed.add_field(name="Wikipedia:", value=theinfo["wikipedia"], inline=False) + if theinfo.setdefault("icp"): + embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if not als["ic"]["facilities"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["facilities"][reqsl])) + else: output.append("Aliases: None") + if reqsl == "steel_mill": + if random.randint(1, 50) == 1: + output.append("*I always typo this facility as \"still mill\"*") + if reqsl == "furniture_factory": + if random.randint(1, 5) == 1: + output.append("*Why the IdleCorp Wiki page has so many words...*") + if random.randint(1, 10) == 1: + output.append("*Because the IdleCorp Wiki page has too many work, I had to change the layout of all...*") + if reqsl.split("_")[-1] == "factory": + if random.randint(1, 20) == 1: + output.append("*I really want to know who made this facility page...*") + if reqsl == "research_chemical_factory": + if random.randint(1, 3) == 1: + output.append("*Why this facility has so many aliases...*") + stuff = [] + stuff.append(f"\n[IdleCorp Wiki](https://wiki.idlecorp.xyz/index.php/{reqsl})") + if reqsl == "": + stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + else: + stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + output.append("\n".join(stuff)) + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + # embed.add_field(name=reqsl.replace("_", " ").capitalize(), value="\n\n".join(output)) + await ctx.send(embed=embed) + + @commandB040.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_4_0"][1]["help"]) + async def help(self, ctx, *, cmd=None): + if cmd == None: + embed = discord.Embed(title="Help", description="Won't show Admin's, Owner's, Developer's commands", color=discord.Colour.green(), timestamp= datetime.datetime.now()) + for a, b in hps["commands"].items(): + embed.add_field(name=a.capitalize(), value=f"Descriptions/Features: {b[0]}\nSyntax: {b[1]}", inline=False) + else: + can = True + cd = cmd + cmds = cmd.split() + if len(cmds) == 3: + if cmds[-1] == "command": + cmds = [cmds[0]]+["command"] + out, fir = [], False + for a, b in hps["info"]["aliases"].items(): + for e, f in b.items(): + for a in cmds: + if isinstance(f, dict): + if ("__init__" in f) and (a in f["__init__"]): + fir = True + out.append(e) + else: + g = f + + for c, d in g.items(): + if a in d: + out.append(c) + elif isinstance(d, dict): + if "__init__" in d and d["__init__"] == a: + out.append(d["__init__"]) + continue + g = d + elif a in f: + fir = True + out.append(e) + cmds = out + if fir == False or cmds[0] not in hps["commands"]: + await ctx.send("`EN0004`: Cannot find command info named `{}`".format(cd)) + return + embed = discord.Embed(title="Help -- "+cmds[0].capitalize(), color=discord.Colour.green(), timestamp= datetime.datetime.now()) + res = hps["commands"][cmds[0]] + for a, b in hps["info"].items(): + if a == "aliases": + for c, d in b.items(): + e = d + for cmd in cmds: + if cmd not in e: continue + e = e[cmd] + res.append(f["__init__"] if isinstance(f, dict) else f) + can = False + break + elif a == "details": + for c, d in b.items(): + e = d + for cmd in cmds: + if cmd not in e: continue + e = e[cmd] + if type(e) == dict and "__init__" not in e: continue + s = e["__init__"] if isinstance(e, dict) else e + if not s: break + # if re.search(r"(?<=\{)([A-Za-z0-9-])+(?<=\})", s): + # if re.search(r"(?<=\{)([A-Za-z0-9-])+(?<=\})", s) == "-1": + # s = s.format(cmds[-1]) + # elif re.search(r"(?<=\{)([A-Za-z0-9-])+(?<=\})", s) == "-2": + # s - s.format(cmds[-2]) + if "{" and "}" in s: s - s.format(**zip([str(-g) for g in range(1, len(cmds)+1)[::-1]], cmds[:-1])) + res.append(s) + can = False + break + if can == True: + await ctx.send("`EN0004`: Cannot find command info named `{}`".format(cd)) + return + out = [("Description: "+res[0])]+[("Syntax: "+res[1])]+[("Aliases: "+", ".join(res[2]))] + if len(res) == 4: + out.append("Details: "+res[3]) + embed.add_field(name=" ".join(cmds), value="\n\n".join(out), inline=False) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + def B040product_profit(facility, types, num=1): + fac = icd["facilities"][facility] + if not types in ("consumes", "produces", "all"): + return + if types == "all": + tya = fac["consumes"] + tyb = fac["produces"] + else: + ty = fac[types] + if ty == "None": + return None + speed = fac["speed"] + con_pfr = {} + pro_pfr = {} + if types == "consumes": + for a, b in ty.items(): + money = icd["assets"][a] + c = b*int(num)*money + con_pf = repeating_dec_sol.repeating_dec_sol(c, speed) + con_pfr[a] = con_pf + return con_pfr + elif types == "produces": + for a, b in ty.items(): + money = icd["assets"][a] + c = b*int(num)*money + pro_pf = repeating_dec_sol.repeating_dec_sol(c, speed) + pro_pfr[a] = pro_pf + return pro_pfr + elif types == "all": + if not tya == "None": + for a, b in tya.items(): + if type(speed) == list: + speed = fac["speed"] + count = 0 + for d in speed: + if a == "money": + money = 1 + else: + money = icd["assets"][a] + c = b*int(num)*money + if c == int(c): + c = int(c) + else: + while c != int(c): + c *= 10 + d *= 10 + c = int(c) + con_pf = repeating_dec_sol.repeating_dec_sol(c, d) + con_pfr[a+(("_Min("+str(d)+")") if count == 1 else ("_Max("+str(d)+")"))] = con_pf + count = 1 + else: + if a == "money": + money = 1 + else: + money = icd["assets"][a] + c = b*int(num)*money + if c == int(c): + c = int(c) + else: + while c != int(c): + c *= 10 + speed *= 10 + c = int(c) + con_pf = repeating_dec_sol.repeating_dec_sol(c, speed) + con_pfr[a] = con_pf + else: + con_pfr = "None" + if not tyb == "None": + for a, b in tyb.items(): + speed = fac["speed"] + if type(speed) == list: + count = 0 + for d in speed: + if a == "money": + money = 1 + else: + money = icd["assets"][a] + c = b*int(num)*money + if c == int(c): + c = int(c) + else: + while c != int(c): + c *= 10 + d *= 10 + c = int(c) + pro_pf = repeating_dec_sol.repeating_dec_sol(c, d) + pro_pfr[a+(("_Min("+str(d)+")") if count == 1 else ("_Max("+str(d)+")"))] = pro_pf + count = 1 + else: + speed = fac["speed"] + if a == "money": + money = 1 + else: + money = icd["assets"][a] + c = b*int(num)*money + if c == int(c): + c = int(c) + else: + while c != int(c): + c *= 10 + speed *= 10 + c = int(c) + pro_pf = repeating_dec_sol.repeating_dec_sol(c, speed) + pro_pfr[a] = pro_pf + else: + pro_pfr = "None" + if con_pfr == "None": + if len(list(pro_pfr.values())) == 1: + for a in list(pro_pfr.values()): + pfs = a + else: + speed = fac["speed"] + assets = icd["assets"] + if type(speed) == list: + i = 0 + pfss = [] + for r in speed: + for a, b in tyb.items(): + if a == "money": + pdm = 1 + else: + pdm = assets[a] + pdttm = b*pdm*int(num) + csttm = [] + for a, b in tya.items(): + csm = assets[a] + csttm.append(csm*b*int(num)) + cstm = 0 + for a in csttm: + cstm += a + pfbf = pdttm-cstm + if pfbf == int(pfbf): + pfbf = int(pfbf) + else: + while pfbf != int(pfbf): + pfbf *= 10 + r *= 10 + pfbf = int(pfbf) + pfs = repeating_dec_sol.repeating_dec_sol(pfbf, r) + if i == 1: + pfss.append({"Min": pfs}) + else: + pfss.append({"Max": pfs}) + i += 1 + return [con_pfr, pro_pfr, pfss] + for a, b in tyb.items(): + if a == "money": + pdm = 1 + else: + pdm = assets[a] + pdttm = b*pdm*int(num) + csttm = [] + for a, b in tya.items(): + csm = assets[a] + csttm.append(csm*b*int(num)) + cstm = 0 + for a in csttm: + cstm += a + pfbf = pdttm-cstm + if pfbf == int(pfbf): + pfbf = int(pfbf) + else: + while pfbf != int(pfbf): + pfbf *= 10 + speed *= 10 + pfbf = int(pfbf) + pfs = repeating_dec_sol.repeating_dec_sol(pfbf, speed) + return [con_pfr, pro_pfr, pfs] + + @commandB040.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_4_0"][1]["profit"]) + async def profit(self, ctx, *, args):#facility, number + correct = string_handler.location(str, int, args, True) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("`EN0005`: Cannot determine arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args, True) + fac = args[0] + num = args[1] + if num == []: + num = 1 + fac = " ".join(fac).lower() + for a, b in als["ic"]["facilities"].items(): + if b != None: + if fac in b: + fac = a + fac = fac.split(" ") + fac = "_".join(fac).lower() + with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + if not fac in icd["facilities"].keys(): + await ctx.send("`EN0004`: Invalid facility: {}".format(" ".join(args[0]))) + return + if type(num) == list: + for a in num: + num = a + if type(num) == str: + if num.endswith(('k', 'm', 'b')): + a = num[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + tnum = a.replace(',', '') + if num.endswith("k"): + num = float(tnum)*1000 + elif num.endswith("m"): + num = float(tnum)*1000000 + else: + num =float(tnum)*1000000000 + else: + await ctx.send("`EN0006`: Number input error") + return + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", num): + num = float(num.replace(",", "")) + else: + await ctx.send("`EN0006`: Number input error") + return + sol = history.B040product_profit(fac, "all", num) + if sol[0] == "None": + cs_pd = "None" + else: + cs_pd = list(sol[0].keys()) + cs_sp = list(sol[0].values()) + if sol[1] != "None:": + pd_pd = list(sol[1].keys()) + pd_sp = list(sol[1].values()) + else: + pd_pd = "None" + s = [] + s2 = [] + if not cs_pd == "None": + for a, b in zip(cs_pd, cs_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", "$"+b)))) + c = "\n".join(s) + else: + c = "None" + if not pd_pd == "None": + for a, b in zip(pd_pd, pd_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s2.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", "$"+b)))) + p = "\n".join(s2) + else: + p = "None" + if type(sol[2]) == list: + pfs = sol[2] + for a in list(pfs[0].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf = "**Max** | $"+a+"\n" + for a in list(pfs[1].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf += "**Min** | $"+a + else: + pf = sol[2] + try: + float(pf) + pf = f"{float(pf):,}" + except: + pf = pf.split(".") + pf = f"{int(pf[0]):,}.{pf[1]}" + pf = "$"+pf + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p, inline=False) + embed.add_field(name="Profit", value=pf, inline=False) + embed.add_field(name="Note", value="The result of this command can't get anything of region(s). In Alpha.0.2, this command just calculate for one-type-facility in **one action**! ", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @commandB040.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_4_0"][1]["search"]) + async def search(self, ctx, ctn=None): + if ctn == None: + await ctx.send("What you want to search?Just need to enter something.") + else: + if ctn.split()[0] in ("--April", "--0401", "--april", "--aprilfool"): + datetime.date = datetime.date(2021, 4, 1) + else: + datetime.date = datetime.datetime.now().date() + embed = discord.Embed(title="Search", color=discord.Color.from_rgb(int("35", 16), int("12", 16), int("38", 16)), timestamp= datetime.datetime.now()) + imgname = "" + if not str(datetime.date) == "2021-04-01": + embed.add_field(name="Haven't this command", value="This command is not usable") + await ctx.send(embed=embed) + return + if ctn == "when": + embed.add_field(name="Result", value="ERROR: Time collection! Pleace make sure you have time to do this and try again") + img = Image.new("1", (100, 100), 255) + font = ImageFont.FreeTypeFont('Arial.ttf', size=20) + ImageDraw.Draw(img).text((50, 50), "Search", anchor="mm", fill="black", font=font, align="center") + imgnum = len([file for file in os.listdir() if file.endswith(".jpg")]) + imgname = f"Search{imgnum}.jpg" + img.save(imgname) + embed.set_thumbnail(url="attachment://"+imgname) + elif re.search(r'^#(?:[0-9a-fA-F]{3}){1,2}$', ctn.split(" ")[0]) or re.search(r'^(?:[0-9a-fA-F]{3}){1,2}$', ctn): + clr = ctn.split(" ")[0] + ctn = " ".join(ctn.split(" ")[1:]) + if clr.startswith("#"): + img = Image.new("RGB", (100,100), clr) + embed.add_field(name="Color", value=clr) + if ctn: + font = ImageFont.FreeTypeFont('Arial.ttf', size=15) + ImageDraw.Draw(img).multiline_text((50, 50), "\n".join(textwrap.wrap(ctn, 7)), anchor="mm", fill="black", font=font, align="center") + else: + img = Image.new("RGB", (100,100), "#"+clr) + embed.add_field(name="Color", value="#"+clr) + if ctn: + font = ImageFont.FreeTypeFont('Arial.ttf', size=15) + ImageDraw.Draw(img).multiline_text((50, 50), "\n".join(textwrap.wrap(ctn, 7)), anchor="mm", fill="black", font=font, align="center") + imgnum = len([file for file in os.listdir() if file.endswith(".jpg")]) + imgname = f"Search{imgnum}.jpg" + img.save(imgname) + embed.set_thumbnail(url="attachment://"+imgname) + elif ctn == "end": + embed.add_field(name="Result", value="When UTC...") + img = Image.new("1", (100, 100), 255) + font = ImageFont.FreeTypeFont('Arial.ttf', size=20) + ImageDraw.Draw(img).text((50, 50), "Search", anchor="mm", fill="black", font=font, align="center") + imgnum = len([file for file in os.listdir() if file.endswith(".jpg")]) + imgname = f"Search{imgnum}.jpg" + img.save(imgname) + embed.set_thumbnail(url="attachment://"+imgname) + else: + errors = ["Watch your self 3 second then close your eyes 1 second, search again", + "Internet error, pleace reconnect your internet", + "You are too alone, try again", + "Your brain is going to explode! try again!", + "Your pc is getting hacked, make sure your pc is right then try again", + "Your pc will EXPLODE!!"] + embed.add_field(name="Result", value="Error:\n"+random.choice(errors)) + img = Image.new("1", (100, 100), 255) + font = ImageFont.FreeTypeFont('Arial.ttf', size=20) + ImageDraw.Draw(img).text((50, 50), "Search", anchor="mm", fill="black", font=font, align="center") + imgnum = len([file for file in os.listdir() if file.endswith(".jpg")]) + imgname = f"Search{imgnum}.jpg" + img.save(imgname) + embed.set_thumbnail(url="attachment://"+imgname) + await ctx.send(file=discord.File(imgname), embed=embed) + if imgname: + os.remove(imgname) + + @commandB040.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_4_0"][1]["updates"]) + async def updates(self, ctx, *, args=None): + def defformver(ver): + if ver == "Alpha.0.2": + formver = "Alpha.1" + elif ver in ("Alpha.0.2.1", "Alpha.0.3.0", "Beta.0.1.0"): + formver = "Alpha.2" + else: + formver = "Alpha.2" + return formver + if args != None: + arg = string_handler.filter(args) + if arg[1]: + await ctx.send("`EN0008`: Argument error: type number") + return + flags = string_handler.flags(arg[0]) + if flags[1]: + await ctx.send("`EN0001`: Flag type error, `--`") + return + if len(flags[0]) > 1: + await ctx.send("`EN0002`: Too many flags") + return + elif len(flags[0]) == 1: + for a in flags[0]: + flag = a + else: + flag = None + if flag != None: + if arg[0].index(flag) > 0: + await ctx.send("`EN0007`: Argument flag error") + return + if flag != None: + flag = flag[2:] + if len(flags[2]) > 1: + await ctx.send("`EN0008`: String") + return + elif len(flags[2]) == 1: + for a in flags[2]: + mores = a + else: + mores = None + if flag == None: + theud = dict([next(reversed(udslist.items()))]) + for a in theud.keys(): + version = a + for a in theud.values(): + ud = a + else: + ud = udslist[flag] + version = flag + if mores != None: + more = mores.split(".") + stuff = [] + for a in more: + stuff.append(a.replace("_", " ")) + # if len(more) == 1: + # for a in more: + # for c, d in als["updates list"]["first"].items(): + # if a in c: + # a = c + # prints = ud[a] + # else: + fn = "" + b = ud + first = als["updates list"]["first"] + second = als["updates list"]["second"] + third = als["updates list"]["third"] + i = 0 + moo = [] + for a in more: + if i == 0: + for c, d in first.items(): + if a in d: + a = c + f = c + else: + if f != "plans to update": + for c, d in second.items(): + if a in d: + a = c + else: + for c, d in third.items(): + if a in d: + a = c + if a not in b: + await ctx.send("`EN0004`: The argument is invalid or unexist in this version of update") + b = b[a] + moo.append(a) + i += 1 + more = moo + store = b + nothing = "\n**Nothing to show**" + if not store: + prints = nothing + else: + if type(store) == list: + prints = "\n".join(store) + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + elif type(store) == dict: + noth = 0 + store2 = [] + for a, b in store.items(): + if more[0] == "commands": + if a in ("adds", "changes", "deletes"): + if not b: + prints = nothing + noth = 1 + else: + store2.append("**"+a.capitalize()+":**") + for a, b in b.items(): + if a.istitle(): + store2.append(a+" -- "+b) + else: + store2.append("`"+a+"` -- "+b) + # prints = "\n".join(store) + else: + if a.istitle(): + store2.append(+a+" -- "+b) + else:store2.append("`"+a+"` -- "+b) + elif more[0] == "other": + if b: + store2.append("\""+a+"\" -- "+b) + elif more[0] == "plans to update": + if a in ud["plans to update"].keys(): + if not b: + prints = nothing + noth = 1 + else: + store2.append("**"+a.capitalize()+":**") + for a, b in b.items(): + store2.append("\""+a.capitalize()+"\" -- "+b.capitalize()) + # prints = "\n".join(store) + else: + store2.append("\""+a.capitalize()+"\" -- "+b.capitalize()) + if store2: + prints = "\n".join(store2) + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + elif type(store) == str: + if len(store.split(" ")) == 1: + prints = store.capitalize() + else: + prints = store + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + prints += f"\n\nVersion: **v.{version}**" + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + embed.add_field(name=version+fn, value=prints, inline=False) + else: + formver = defformver(version) + prints = [] + for a, b in ud.items(): + if type(b) == list: + if not b: + continue + if formver == "Alpha.1": + if a == "note": + A1 = "" + else: + A1 = ":" + else: + A1 = ":" + prints.append("**"+a.capitalize()+A1+"**") + for c in b: + prints.append("> "+c) + elif type(b) == dict: + prints.append("**"+a.capitalize()+":**") + for c, d in b.items(): + if not d: + continue + if a == "other": + prints.append("> \""+c+"\" -- "+d) + continue + prints.append("> **"+c.capitalize()+":**") + for e, f in d.items(): + if a == "commands": + if a.istitle(): + prints.append("> "+e+" -- "+f) + else: + prints.append("> `"+e+"` -- "+f) + if a == "plans to update": + prints.append("> \""+e+"\" -- "+f.capitalize()) + else: + prints.append(b) + b = [] + for a in prints: + if "{}" in a: + a = a.format(version) + b.append(a) + prints = b + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + if len("\n".join(prints)) > 1000: + a, b = "\n".join(prints[:len(prints)//2]), "\n".join(prints[len(prints)//2:]) + embed.add_field(name=version, value=a, inline=False) + embed.add_field(name="_ _", value=b, inline=False) + else: + embed.add_field(name=version, value="\n".join(prints), inline=False) + else: + theud = dict([next(reversed(udslist.items()))]) + for a in theud.keys(): + version = a + for a in theud.values(): + ud = a + formver = defformver(version) + prints = [] + for a, b in ud.items(): + if type(b) == list: + if formver == "Alpha.1": + if a == "note": + A1 = "" + else: + A1 = ":" + else: + if not b: + continue + A1 = ":" + prints.append("**"+a.capitalize()+A1+"**") + for c in b: + prints.append("> "+c) + elif type(b) == dict: + prints.append("**"+a.capitalize()+":**") + for c, d in b.items(): + if not d: + continue + if a == "other": + prints.append("> \""+c+"\" -- "+d) + continue + prints.append("> **"+c.capitalize()+":**") + for e, f in d.items(): + if a == "commands": + if e.istitle(): + prints.append("> "+e+" -- "+f) + else: + prints.append("> `"+e+"` -- "+f) + if a == "plans to update": + prints.append("> \""+e+"\" -- "+f.capitalize()) + else: + prints.append(b) + b = [] + for a in prints: + if "{}" in a: + a = a.format(version) + b.append(a) + prints = b + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + if len("\n".join(prints)) > 1000: + a, b = "\n".join(prints[:len(prints)//2]), "\n".join(prints[len(prints)//2:]) + embed.add_field(name=version, value=a, inline=False) + embed.add_field(name="_ _", value=b, inline=False) + else: + a = "\n".join(prints) + embed.add_field(name=version, value=a, inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @history.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["Beta_0_5_0"][0]) + async def Beta_0_5_0(self, ctx): + await ctx.send("History: Beta_5_0 commands:\n`command`") + + @Beta_0_5_0.group(name="command", invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["command"]) + async def commandB050(self, ctx): + await ctx.send("History: Command commands:\n`profit`\n`info`\n`speed`") + + @commandB050.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_5_0"][1]["profit"]) + async def profit(self, ctx, *, args):#facility, number + correct = string_handler.location(str, int, args, True) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("`EN0005`: Cannot determine arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args, True) + fac = args[0] + num = args[1] + if num == []: + num = 1 + fac = " ".join(fac).lower() + for a, b in als["ic"]["facilities"].items(): + if b != None: + if fac in b: + fac = a + fac = fac.split(" ") + fac = "_".join(fac).lower() + with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + if not fac in icd["facilities"].keys(): + await ctx.send("`EN0004`: Invalid facility: {}".format(" ".join(args[0]))) + return + if type(num) == list: + for a in num: + num = a + if type(num) == str: + if num.endswith(('k', 'm', 'b')): + a = num[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + tnum = a.replace(',', '') + if num.endswith("k"): + num = float(tnum)*1000 + elif num.endswith("m"): + num = float(tnum)*1000000 + else: + num =float(tnum)*1000000000 + else: + await ctx.send("`EN0006`: Number input error") + return + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", num): + num = float(num.replace(",", "")) + else: + await ctx.send("`EN0006`: Number input error") + return + sol = calculate.product_profit(fac, "all", num) + if sol[0] == "None": + cs_pd = "None" + else: + cs_pd = list(sol[0].keys()) + cs_sp = list(sol[0].values()) + if sol[1] != "None:": + pd_pd = list(sol[1].keys()) + pd_sp = list(sol[1].values()) + else: + pd_pd = "None" + s = [] + s2 = [] + if not cs_pd == "None": + for a, b in zip(cs_pd, cs_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", "$"+b)))) + c = "\n".join(s) + else: + c = "None" + if not pd_pd == "None": + for a, b in zip(pd_pd, pd_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s2.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", "$"+b)))) + p = "\n".join(s2) + else: + p = "None" + if type(sol[2]) == list: + pfs = sol[2] + for a in list(pfs[0].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf = "**Max** | $"+a+"\n" + for a in list(pfs[1].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf += "**Min** | $"+a + else: + pf = sol[2] + try: + float(pf) + pf = f"{float(pf):,}" + except: + pf = pf.split(".") + pf = f"{int(pf[0]):,}.{pf[1]}" + pf = "$"+pf + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p, inline=False) + embed.add_field(name="Profit", value=pf, inline=False) + embed.add_field(name="Note", value="The result of this command can't get anything of region(s). In Alpha.0.2, this command just calculate for one-type-facility in **one action**!\nThe **profit** is meaning that if your sourse of the facility is from buying from npc market, then the profit, if you are not buying the sourse from npc market, then the **produces** part.", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @commandB050.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_5_0"][1]["info"]) + async def info(self, ctx, *, req): + icinfo = icd["info"] + debug = [] + infoals = {} + for a in als["ic"].values(): + infoals = infoals | a + for a, b in infoals.items(): + if not b == None and req in b: + debug.append(a) + if len(debug) > 1: + await ctx.send("`EN0401`: Happened an unexpected or imposible thing, E1: Aliases") + return + elif debug: + reqsl, = debug + else: + reqsl = req + reqsl = "_".join(reqsl.split(" ")) + if reqsl.endswith("_u"): reqsl, techlv = reqsl[:-2], 1 + elif reqsl.endswith("_uu"): reqsl, techlv = reqsl[:-3], 2 + else: techlv = 0 + check = [b for a in icinfo.values() for b in a.keys()] + if not reqsl in check: + await ctx.send(f"`EN0004`: Cannot find info of: {req}, check your input") + return + for a in icinfo: + if reqsl in icinfo[a]: + infoclass = a + theinfo = icinfo[infoclass][reqsl] + embed = discord.Embed(title=f"Info -- {infoclass.capitalize()}", color=discord.Colour.greyple(), timestamp= datetime.datetime.now()) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + embed.add_field(name=reqsl.replace("_", " ").capitalize(), value="_ _", inline=False) + output = [] + if infoclass == "assets": + # output.append("**IdleCorp Info(Examine):**\n"+theinfo["icinfo"]) + stuff = [] + if theinfo["market"] == True: + stuff.append("It's tradable in market") + elif theinfo["market"] == False: + stuff.append("It's not tradable in market") + if theinfo["retail"] == False: + stuff.append("It cannot sold in retail store") + stuff.append("It cannot be scrapped") + else: + stuff.append("It can sold in retail store") + stuff.append("It can be scrapped into {} scraps".format(theinfo["retail"])) + # output.append("\n".join(stuff)) + stuff2 = ["NPC market buy price(if valid): "+str(icd["assets"][reqsl]*2)] + stuff2.append("NPC market sell price: "+str(icd["assets"][reqsl])) + embed.add_field(name="IdleCorp Info(Examine):", value=theinfo["icinfo"]+"\n\n"+"\n".join(stuff)+"\n\n"+"\n".join(stuff2), inline=False) + # output.append("**IdleCorp Wiki:**\n"+theinfo["icwiki"]) + embed.add_field(name="IdleCorp Wiki:", value=theinfo["icwiki"], inline=False) + # output.append("**Wikipedia:**\n"+theinfo["wikipedia"]) + embed.add_field(name="Wikipedia:", value=theinfo["wikipedia"], inline=False) + if theinfo.setdefault("icp"): + embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["assets"]: + await ctx.send("`EN0402`: Cannot find assets -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["assets"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["assets"][reqsl])) + else: output.append("Aliases: None") + stuff = [] + stuff.append(f"\n[IdleCorp Wiki](https://wiki.idlecorp.xyz/index.php/{reqsl})") + if reqsl == "led": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/Light-emitting_diode)") + elif reqsl == "rubber": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/synthetic_rubber)") + elif reqsl == "energy": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/electricity)") + elif reqsl == "lamp": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/light_fixture)") + elif reqsl == "ccd": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/charge-coupled_device)") + elif reqsl == "hq": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/Headquarters)") + elif theinfo["wikipedia"] != "None": stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + output.append("\n".join(stuff)) + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "facilities": + # output.append("**IdleCorp Info(Examine):**\n"+theinfo["icinfo"]) + embed.add_field(name="IdleCorp Info(Examine):", value=theinfo["icinfo"], inline=False) + stuff = [] + for a, b in theinfo["construct"].items(): + if not a == "money": + stuff.append(f"{b:,}"+" **"+a.capitalize()+"**") + else: + stuff.append("$"+f"{b:,}") + # output.append("**Construction materials:**\n"+"\n".join(stuff)) + embed.add_field(name="Construction materials:", value="\n".join(stuff), inline=False) + # output.append("**IdleCorp Wiki:**\n"+theinfo["icwiki"]) + embed.add_field(name="IdleCorp Wiki:", value=theinfo["icwiki"], inline=False) + # output.append("**Wikipedia:**\n"+theinfo["wikipedia"]) + embed.add_field(name="Wikipedia:", value=theinfo["wikipedia"], inline=False) + stuff = "**Consumes**\n" + facpro = icd["facilities"][reqsl] + stuff += "None\n" if facpro["consumes"] == "None" else "\n".join([f"**{a.capitalize()}** | {b:,}" for a, b in facpro["consumes"].items()])+"\n" + stuff += "**Produces**\n" + stuff += "None\n" if facpro["produces"] == "None" else "\n".join([f"**{a.capitalize()}** | {b:,}" for a, b in facpro["produces"].items()])+"\n" + stuff += "Speed: "+str(icd["facilities"][reqsl]["speed"])+" seconds" + embed.add_field(name="Production:", value=stuff, inline=False) + if theinfo.setdefault("icp"): embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["facilities"]: + await ctx.send("`EN0402`: Cannot find facilities -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["facilities"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["facilities"][reqsl])) + else: output.append("Aliases: None") + if reqsl == "steel_mill": + if random.randint(1, 50) == 1: + output.append("*I always typo this facility as \"still mill\"*") + if reqsl == "furniture_factory": + if random.randint(1, 5) == 1: + output.append("*Why the IdleCorp Wiki page has so many words...*") + if random.randint(1, 10) == 1: + output.append("*Because the IdleCorp Wiki page has too many work, I had to change the layout of all...*") + if reqsl.split("_")[-1] == "factory": + if random.randint(1, 20) == 1: + output.append("*I really want to know who made this facility page...*") + if reqsl == "research_chemical_factory": + if random.randint(1, 3) == 1: + output.append("*Why this facility has so many aliases...*") + stuff = [] + stuff.append(f"\n[IdleCorp Wiki](https://wiki.idlecorp.xyz/index.php/{reqsl})") + if theinfo["wikipedia"] != "None": stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + output.append("\n".join(stuff)) + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "blueprints": + embed.add_field(name="IdleCorp Info(Examine):", value=theinfo["icinfo"]+"\n\nRarity: {}".format(theinfo["rarity"])+"\n\nAll blueprints **cannot** trade and be sold in the market and the retail stores.", inline=False) + stuff = [] + for a, b in theinfo["require"].items(): + stuff.append(f"{b:,}"+" **"+a.capitalize()+"**") + embed.add_field(name="Requires:", value="\n".join(stuff), inline=False) + embed.add_field(name="IdleCorp Wiki:", value=theinfo["icwiki"], inline=False) + if theinfo.setdefault("icp"): + embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["blueprints"]: + await ctx.send("`EN0402`: Cannot find blueprints -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["blueprints"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["blueprints"][reqsl])) + else: output.append("Aliases: None") + stuff = [] + stuff.append(f"\n[IdleCorp Wiki](https://wiki.idlecorp.xyz/index.php/{reqsl})") + output.append("\n".join(stuff)) + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "technologies": + stuff = [] + if techlv == 2: + if theinfo["upgrade"]["uu"] == "None": + await ctx.send("`EN0004`: The tech haven't \"uu\" upgrade") + return + stuff.append(theinfo["upgrade"]["uu"]["icinfo"]) + stuff.append("Rarity: "+theinfo["rarity"]) + stuff.append("It can be scrapped into {} scraps".format(theinfo["upgrade"]["uu"]["scrap"])) + stuff.append("\nAll technologies **can** trade and **cannot** be sold in the market and the retail stores respectively.") + elif techlv == 1: + if theinfo["upgrade"]["u"] == "None": + await ctx.send("`EN0004`: The tech haven't \"u\" upgrade") + return + stuff.append(theinfo["upgrade"]["u"]["icinfo"]) + stuff.append("Rarity: "+theinfo["rarity"]) + stuff.append("It can be scrapped into {} scraps".format(theinfo["upgrade"]["u"]["scrap"])) + stuff.append("\nAll technologies **can** trade and **cannot** be sold in the market and the retail stores respectively.") + if theinfo["upgrade"]["uu"] != "None": stuff.append("\nNext upgrade: "+reqsl.replace("_", " ")+"uu") + else: + stuff.append(theinfo["icinfo"]) + stuff.append("\nRarity: "+theinfo["rarity"]) + stuff.append("It can be scrapped into {} scraps".format(theinfo["scrap"])) + stuff.append("\nAll technologies **can** trade and **cannot** be sold in the market and the retail stores respectively.") + if theinfo["upgrade"]["u"] != "None": stuff.append("\nNext upgrade: "+reqsl.replace("_", " ")+"u") + stuff.append("The tech affected on "+theinfo["affect"].capitalize()) + embed.add_field(name="IdleCorp Info(Examine):", value="\n".join(stuff), inline=False) + stuff = "\n".join(["Level {} boost: {}".format(a, theinfo["boost"][a].replace("+", "and")) for a in range(len(theinfo["boost"]))]) + embed.add_field(name="IdleCorp Wiki:", value=theinfo["icwiki"], inline=False) + if theinfo.setdefault("icp"): embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["technologies"]: + await ctx.send("`EN0402`: Cannot find blueprints -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["technologies"][reqsl+("_u" if techlv == 1 else ("_uu" if techlv == 2 else ""))] == None: + output.append("Aliases: "+", ".join(als["ic"]["technologies"][reqsl+("_u" if techlv == 1 else ("_uu" if techlv == 2 else ""))])) + else: output.append("Aliases: None") + stuff = [] + stuff.append(f"\n[IdleCorp Wiki](https://wiki.idlecorp.xyz/index.php/{reqsl})") + if theinfo["wikipedia"] != "None": stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + output.append("\n".join(stuff)) + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "services": + embed.add_field(name="IdleCorp Info(Examine):", value=theinfo["icinfo"]+"\nAffect: "+theinfo["effect"]+"\nCost: **${:,}**".format(theinfo["cost"]), inline=False) + if theinfo.setdefault("icp"): embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["services"]: + await ctx.send("`EN0402`: Cannot find services -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["services"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["services"][reqsl])) + else: output.append("Aliases: None") + stuff = [] + if theinfo["wikipedia"] != "None": stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + if stuff: output.append("\n".join(stuff)) + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "pollicies": + embed.add_field(name="IdleCorp Info(Examine):", value="Affect: "+theinfo["affect"]+"\nCost: {} *Funding points*".format(theinfo["cost"]), inline=False) + if theinfo.setdefault("icp"): embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["services"]: + await ctx.send("`EN0402`: Cannot find services -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["policies"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["policies"][reqsl])) + else: output.append("Aliases: None") + stuff = [] + if theinfo["wikipedia"] != "None": stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + if stuff: output.append("\n".join(stuff)) + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + # embed.add_field(name=reqsl.replace("_", " ").capitalize(), value="\n\n".join(output)) + await ctx.send(embed=embed) + + @commandB050.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_5_0"][1]["speed"]) + async def speed(self, ctx, *, args):#facilities, number + correct = string_handler.location(str, int, args, True) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("`EN0007`: Can't determind arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args, True) + fac = args[0] + num = args[1] + if num == []: + num = 1 + fac = " ".join(fac).lower() + for a, b in als["ic"]["facilities"].items(): + if b != None: + if fac in b: + fac = a + fac = fac.split(" ") + fac = "_".join(fac).lower() + with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + if not fac in icd["facilities"].keys(): + await ctx.send("`EN0004`: Cannot find facility: {}".format(" ".join(args[0]))) + return + if type(num) == list: + for a in num: + num = a + if type(num) == str: + if num.endswith(('k', 'm', 'b')): + a = num[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + tnum = a.replace(',', '') + if num.endswith("k"): + num = float(tnum)*1000 + elif num.endswith("m"): + num = float(tnum)*1000000 + else: + num =float(tnum)*1000000000 + else: + await ctx.send("`EN0006`: Number input error") + return + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", num): + num = float(num.replace(",", "")) + else: + await ctx.send("`EN0006`: Number input error") + return + sol = calculate.product_speed(fac, "all", num) + if sol[0] == "None": + cs_pd = "None" + else: + cs_pd = list(sol[0].keys()) + cs_sp = list(sol[0].values()) + if sol[1] != "None:": + pd_pd = list(sol[1].keys()) + pd_sp = list(sol[1].values()) + else: + pd_pd = "None" + s = [] + s2 = [] + if not cs_pd == "None": + for a, b in zip(cs_pd, cs_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", b)))) + c = "\n".join(s) + else: + c = "None" + if not pd_pd == "None": + for a, b in zip(pd_pd, pd_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s2.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", b)))) + p = "\n".join(s2) + else: + p = "None" + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p, inline=False) + embed.add_field(name="Note", value="The result of this command can't get anything of region(s). In Alpha.0.2, this command just calculate for one-type-facility in **one action**! ", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @history.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["server"][0]) + async def server(self, ctx): + await ctx.send("Server history:\n`joins`") + + @server.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["server"][1]["joins"]) + async def joins(self, ctx): + await ctx.send("```2021-01-23 -- IdleCorp joined as the begin of the server setup\n2021-03-07 -- Teemaw joined```") + + @history.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["idlecorpprofit"][0]) + async def idlecorpprofit(self, ctx): + await ctx.send("IdleCorp Profit history:\n`begin`") + + @idlecorpprofit.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["idlecorpprofit"][1]["begin"]) + async def begin(self, ctx): + await ctx.send("welcome to suggest on what can add and will be added in the near future.") + + @history.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["Beta_0_6_0"][0]) + async def Beta_0_6_0(self, ctx): + await ctx.send("History: Beta_0_6_0 commands:\n`command`") + + @Beta_0_6_0.group(name="command", invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["command"]) + async def commandB060(self, ctx): + await ctx.send("History: Command commands:\n`profit`\n`info`\n`speed`") + + @commandB060.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_6_0"][1]["updates"]) + async def updates(self, ctx, *, args=None): + def defformver(ver): + if ver == "Alpha.0.2": + formver = "Alpha.1" + elif ver in ("Alpha.0.2.1", "Alpha.0.3.0", "Beta.0.1.0"): + formver = "Alpha.2" + else: + formver = "Alpha.2" + return formver + if args != None: + arg = string_handler.filter(args) + if arg[1]: + await ctx.send("`EN0008`: Argument error: type number") + return + flags = string_handler.flags(arg[0]) + if flags[1]: + await ctx.send("`EN0001`: Flag type error, `--`") + return + if len(flags[0]) > 1: + await ctx.send("`EN0002`: Too many flags") + return + elif len(flags[0]) == 1: + for a in flags[0]: + flag = a + else: + flag = None + if flag != None: + if arg[0].index(flag) > 0: + await ctx.send("`EN0007`: Argument flag error") + return + if flag != None: + flag = flag[2:] + if len(flags[2]) > 1: + await ctx.send("`EN0008`: String") + return + elif len(flags[2]) == 1: + for a in flags[2]: + mores = a + else: + mores = None + if flag == None: + theud = dict([next(reversed(udslist.items()))]) + for a in theud.keys(): + version = a + for a in theud.values(): + ud = a + else: + ud = udslist[flag] + version = flag + if mores != None: + more = mores.split(".") + stuff = [] + for a in more: + stuff.append(a.replace("_", " ")) + # if len(more) == 1: + # for a in more: + # for c, d in als["updates list"]["first"].items(): + # if a in c: + # a = c + # prints = ud[a] + # else: + fn = "" + b = ud + first = als["updates list"]["first"] + second = als["updates list"]["second"] + third = als["updates list"]["third"] + i = 0 + moo = [] + for a in more: + if i == 0: + for c, d in first.items(): + if a in d: + a = c + f = c + else: + if f != "plans to update": + for c, d in second.items(): + if a in d: + a = c + else: + for c, d in third.items(): + if a in d: + a = c + if a not in b: + await ctx.send("`EN0004`: The argument is invalid or unexist in this version of update") + b = b[a] + moo.append(a) + i += 1 + more = moo + store = b + nothing = "\n**Nothing to show**" + if not store: + prints = nothing + else: + if type(store) == list: + prints = "\n".join(store) + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + elif type(store) == dict: + noth = 0 + store2 = [] + for a, b in store.items(): + if more[0] == "commands": + if a in ("adds", "changes", "deletes"): + if not b: + prints = nothing + noth = 1 + else: + store2.append("**"+a.capitalize()+":**") + for a, b in b.items(): + if a.istitle(): + store2.append(a+" -- "+b) + else: + store2.append("`"+a+"` -- "+b) + # prints = "\n".join(store) + else: + if a.istitle(): + store2.append(+a+" -- "+b) + else:store2.append("`"+a+"` -- "+b) + elif more[0] == "other": + if b: + store2.append("\""+a+"\" -- "+b) + elif more[0] == "plans to update": + if a in ud["plans to update"].keys(): + if not b: + prints = nothing + noth = 1 + else: + store2.append("**"+a.capitalize()+":**") + for a, b in b.items(): + store2.append("\""+a.capitalize()+"\" -- "+b.capitalize()) + # prints = "\n".join(store) + else: + store2.append("\""+a.capitalize()+"\" -- "+b.capitalize()) + if store2: + prints = "\n".join(store2) + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + elif type(store) == str: + if len(store.split(" ")) == 1: + prints = store.capitalize() + else: + prints = store + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + prints += f"\n\nVersion: **v.{version}**" + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + embed.add_field(name=version+fn, value=prints, inline=False) + else: + formver = defformver(version) + prints = [] + for a, b in ud.items(): + if type(b) == list: + if not b: + continue + if formver == "Alpha.1": + if a == "note": + A1 = "" + else: + A1 = ":" + else: + A1 = ":" + prints.append("**"+a.capitalize()+A1+"**") + for c in b: + prints.append("> "+c) + elif type(b) == dict: + prints.append("**"+a.capitalize()+":**") + for c, d in b.items(): + if not d: + continue + if a == "other": + prints.append("> \""+c+"\" -- "+d) + continue + prints.append("> **"+c.capitalize()+":**") + for e, f in d.items(): + if a == "commands": + if a.istitle(): + prints.append("> "+e+" -- "+f) + else: + prints.append("> `"+e+"` -- "+f) + if a == "plans to update": + prints.append("> \""+e+"\" -- "+f.capitalize()) + else: + prints.append(b) + b = [] + for a in prints: + if "{}" in a: + a = a.format(version) + b.append(a) + prints = b + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + if len("\n".join(prints)) > 1000: + a, b = prints[:len(prints)//2], prints[len(prints)//2:] + tlist = (deque(a), deque(b)) + for i in range(2): + while len("\n".join(tlist[i])) > 1000: + if i == 0: tlist[1].appendleft(tlist[0].pop()) + else: tlist[0].append(tlist[1].popleft()) + a, b = tlist + embed.add_field(name=version, value="\n".join(a), inline=False) + embed.add_field(name="_ _", value="\n".join(b), inline=False) + else: + embed.add_field(name=version, value="\n".join(prints), inline=False) + else: + theud = dict([next(reversed(udslist.items()))]) + for a in theud.keys(): + version = a + for a in theud.values(): + ud = a + formver = defformver(version) + prints = [] + for a, b in ud.items(): + if type(b) == list: + if formver == "Alpha.1": + if a == "note": + A1 = "" + else: + A1 = ":" + else: + if not b: + continue + A1 = ":" + prints.append("**"+a.capitalize()+A1+"**") + for c in b: + prints.append("> "+c) + elif type(b) == dict: + prints.append("**"+a.capitalize()+":**") + for c, d in b.items(): + if not d: + continue + if a == "other": + prints.append("> \""+c+"\" -- "+d) + continue + prints.append("> **"+c.capitalize()+":**") + for e, f in d.items(): + if a == "commands": + if e.istitle(): + prints.append("> "+e+" -- "+f) + else: + prints.append("> `"+e+"` -- "+f) + if a == "plans to update": + prints.append("> \""+e+"\" -- "+f.capitalize()) + else: + prints.append(b) + b = [] + for a in prints: + if "{}" in a: + a = a.format(version) + b.append(a) + prints = b + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + if len("\n".join(prints)) > 1000: + a, b = prints[:len(prints)//2], prints[len(prints)//2:] + tlist = (deque(a), deque(b)) + for i in range(2): + while len("\n".join(tlist[i])) > 1000: + if i == 0: tlist[1].appendleft(tlist[0].pop()) + else: tlist[0].append(tlist[1].popleft()) + a, b = tlist + embed.add_field(name=version, value="\n".join(a), inline=False) + embed.add_field(name="_ _", value="\n".join(b), inline=False) + else: + a = "\n".join(prints) + embed.add_field(name=version, value=a, inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @commandB060.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_6_0"][1]["speed"]) + async def speed(self, ctx, *, args):#facilities, number + correct = string_handler.location(str, int, args, True) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("`EN0007`: Can't determind arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args, True) + print(args) + if args[0][0].startswith("--"): + flag, fac = args[0][0].lower()[2:], args[0][1:] + flagals = {"sec": "second", "s": "second", "min": "minute", "m": "minute", "hr": "hour", "h": "hour", "d": "day"} + if flag in flagals: flag = flagals[flag]; unit = flag + elif flag not in flagals.values(): + await ctx.send("`EN0003`: Invalid flag") + return + else: fac = args[0]; unit = "second" + num = args[1] + if num == []: + num = 1 + fac = " ".join(fac).lower() + for a, b in als["ic"]["facilities"].items(): + if b != None: + if fac in b: + fac = a + fac = fac.split(" ") + fac = "_".join(fac).lower() + with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + if not fac in icd["facilities"].keys(): + await ctx.send("`EN0004`: Cannot find facility: {}".format(" ".join(args[0]))) + return + if type(num) == list: + for a in num: + num = a + if type(num) == str: + if num.endswith(('k', 'm', 'b')): + a = num[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + tnum = a.replace(',', '') + if num.endswith("k"): + num = float(tnum)*1000 + elif num.endswith("m"): + num = float(tnum)*1000000 + else: + num =float(tnum)*1000000000 + else: + await ctx.send("`EN0006`: Number input error") + return + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", num): + num = float(num.replace(",", "")) + else: + await ctx.send("`EN0006`: Number input error") + return + if "flag" in locals(): num *= {"day": 60*60*24, "hour": 60*60, "minute": 60}.get(flag, 1) + sol = calculate.product_speed(fac, "all", num) + if sol[0] == "None": + cs_pd = "None" + else: + cs_pd = list(sol[0].keys()) + cs_sp = list(sol[0].values()) + if sol[1] != "None:": + pd_pd = list(sol[1].keys()) + pd_sp = list(sol[1].values()) + else: + pd_pd = "None" + s = [] + s2 = [] + if not cs_pd == "None": + for a, b in zip(cs_pd, cs_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", b)))) + c = "\n".join(s) + else: + c = "None" + if not pd_pd == "None": + for a, b in zip(pd_pd, pd_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s2.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", b)))) + p = "\n".join(s2) + else: + p = "None" + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), description="Unit: "+unit.capitalize(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p, inline=False) + embed.add_field(name="Note", value="The result of this command can't get anything of region(s). In Alpha.0.2, this command just calculate for one-type-facility in **one action**! ", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + ukwembed = discord.Embed(title="Did you know", color=discord.Colour.darker_gray(), timestamp= datetime.datetime.now()) + ukwembed.add_field(name="_ _", value=you_know.you_know()) + ukwembed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + ukwembed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + msg = await ctx.send(embed=ukwembed) + time.sleep(1.2) + await msg.edit(embed=embed) + + @commandB060.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_6_0"][1]["profit"]) + async def profit(self, ctx, *, args):#facility, number + correct = string_handler.location(str, int, args, True) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("`EN0005`: Cannot determine arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args, True) + if args[0][0].startswith("--"): + flag, fac = args[0][0].lower()[2:], args[0][1:] + flagals = {"sec": "second", "s": "second", "min": "minute", "m": "minute", "hr": "hour", "h": "hour", "d": "day"} + if flag in flagals: flag = flagals[flag]; unit = flag + elif flag not in flagals.values(): + await ctx.send("`EN0003`: Invalid flag") + return + else: fac = args[0]; unit = "second" + num = args[1] + if num == []: + num = 1 + fac = " ".join(fac).lower() + for a, b in als["ic"]["facilities"].items(): + if b != None: + if fac in b: + fac = a + fac = fac.split(" ") + fac = "_".join(fac).lower() + with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + if not fac in icd["facilities"].keys(): + await ctx.send("`EN0004`: Invalid facility: {}".format(" ".join(args[0]))) + return + if type(num) == list: + for a in num: + num = a + if type(num) == str: + if num.endswith(('k', 'm', 'b')): + a = num[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + tnum = a.replace(',', '') + if num.endswith("k"): + num = float(tnum)*1000 + elif num.endswith("m"): + num = float(tnum)*1000000 + else: + num =float(tnum)*1000000000 + else: + await ctx.send("`EN0006`: Number input error") + return + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", num): + num = float(num.replace(",", "")) + else: + await ctx.send("`EN0006`: Number input error") + return + if "flag" in locals(): num *= {"day": 60*60*24, "hour": 60*60, "minute": 60}.get(flag, 1) + sol = calculate.product_profit(fac, "all", num) + if sol[0] == "None": + cs_pd = "None" + else: + cs_pd = list(sol[0].keys()) + cs_sp = list(sol[0].values()) + if sol[1] != "None:": + pd_pd = list(sol[1].keys()) + pd_sp = list(sol[1].values()) + else: + pd_pd = "None" + s = [] + s2 = [] + if not cs_pd == "None": + for a, b in zip(cs_pd, cs_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", "$"+b)))) + c = "\n".join(s) + else: + c = "None" + if not pd_pd == "None": + for a, b in zip(pd_pd, pd_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s2.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", "$"+b)))) + p = "\n".join(s2) + else: + p = "None" + if type(sol[2]) == list: + pfs = sol[2] + for a in list(pfs[0].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf = "**Max** | $"+a+"\n" + for a in list(pfs[1].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf += "**Min** | $"+a + else: + pf = sol[2] + try: + float(pf) + pf = f"{float(pf):,}" + except: + pf = pf.split(".") + pf = f"{int(pf[0]):,}.{pf[1]}" + pf = "$"+pf + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), description="Unit: "+unit.capitalize(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p, inline=False) + embed.add_field(name="Profit", value=pf, inline=False) + embed.add_field(name="Note", value="The result of this command can't get anything of region(s).\nThe **profit** is meaning that if your sourse of the facility is from buying from npc market, then the profit, if you are not buying the sourse from npc market, then the **produces** part.", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + ukwembed = discord.Embed(title="Did you know", color=discord.Colour.darker_gray(), timestamp= datetime.datetime.now()) + ukwembed.add_field(name="_ _", value=you_know.you_know()) + ukwembed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + ukwembed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + msg = await ctx.send(embed=ukwembed) + time.sleep(1.2) + await msg.edit(embed=embed) + + @commandB060.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_6_0"][1]["profitcomplete"]) + async def profitcomplete(self, ctx, *, args):#facility, number + correct = string_handler.location(str, int, args, True) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("`EN0005`: Cannot determine arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args, True) + if args[0][0].startswith("--"): + flag, fac = args[0][0].lower()[2:], args[0][1:] + flagals = {"sec": "second", "s": "second", "min": "minute", "m": "minute", "hr": "hour", "h": "hour", "d": "day"} + if flag in flagals: flag = flagals[flag]; unit = flag + elif flag not in flagals.values(): + await ctx.send("`EN0003`: Invalid flag") + return + else: fac = args[0]; unit = "second" + num = args[1] + if num == []: + num = 1 + fac = " ".join(fac).lower() + for a, b in als["ic"]["facilities"].items(): + if b != None: + if fac in b: + fac = a + fac = fac.split(" ") + fac = "_".join(fac).lower() + with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + if not fac in icd["facilities"].keys(): + await ctx.send("`EN0004`: Invalid facility: {}".format(" ".join(args[0]))) + return + if type(num) == list: + for a in num: + num = a + if type(num) == str: + if num.endswith(('k', 'm', 'b')): + a = num[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + tnum = a.replace(',', '') + if num.endswith("k"): + num = float(tnum)*1000 + elif num.endswith("m"): + num = float(tnum)*1000000 + else: + num =float(tnum)*1000000000 + else: + await ctx.send("`EN0006`: Number input error") + return + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", num): + num = float(num.replace(",", "")) + else: + await ctx.send("`EN0006`: Number input error") + return + facratio = calculate.facratio(fac, num) + firstfac = calculate.firstfac(fac, facratio[2]) + remain = calculate.produce_remain(fac, facratio[2], num, firstfac[2]) + if "flag" in locals(): num *= {"day": 60*60*24, "hour": 60*60, "minute": 60}.get(flag, 1) + sol = calculate.product_profit(fac, "all", num) + soland = calculate.product_profitpland(fac, "all", num, firstfac[2]) + s2 = [] + count = 0 + print(sol, soland) + for a in (sol[0], sol[1], soland[1]): + s = [] + if not a == "None": + for b, c in zip(a.keys(), a.values()): + try: + float(c) + c = f"{float(c):,}" + except: + c = c.split(".") + c = f"{int(c[0]):,}.{c[1]}" + if count != 2: s.append(" | ".join(list(("**"+b.capitalize().replace("_", " ")+"**", "$"+c)))) + else: s.append(" | ".join(list(("**"+b.capitalize().replace("_", " ")+"**", "$"+c+"/land")))) + s2.append("\n".join(s)) + else: + s2.append("None") + print(s2) + count+=1 + c, p, pland = s2 + if type(sol[2]) == list: + pfs = sol[2] + for a in list(pfs[0].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf = "**Max** | $"+a+"\n" + for a in list(pfs[1].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf += "**Min** | $"+a + else: + pf = sol[2] + try: + float(pf) + pf = f"{float(pf):,}" + except: + pf = pf.split(".") + pf = f"{int(pf[0]):,}.{pf[1]}" + pf = "$"+pf + if type(soland[2]) == list: + pfs = soland[2] + for a in list(pfs[0].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pfland = "**Max** | $"+a+"\n" + for a in list(pfs[1].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pfland += "**Min** | $"+a + else: + pfland = soland[2] + try: + float(pfland) + pfland = f"{float(pfland):,}" + except: + pfland = pfland.split(".") + pfland = f"{int(pfland[0]):,}.{pfland[1]}" + pfland = "$"+pfland+"/land" + rem = [] + for a, b in remain[0]: + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + rem.append("**"+a.capitalize()+"** | "+b) + rem.append("") + for a, b in remain[1]: + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + rem.append("**"+a.capitalize()+"** | $"+b) + rem = "\n".join(rem) + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), description="Unit: "+unit.capitalize(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p+"\n\n"+pland, inline=False) + embed.add_field(name="Profit", value=pf+"\n\n"+pfland, inline=False) + embed.add_field(name="Complete Information", value="Ratio(order follow to above): "+facratio[0]+" "+facratio[1]+"\n\n**First Facility(First Fac)/Require facilities:**\n"+firstfac[0]+"\n"+firstfac[1], inline=False) + embed.add_field(name="Produce Remains", value=rem, inline=False) + embed.add_field(name="Note", value="The result of this command can't get anything of region(s).\nThe **profit** is meaning that if your sourse of the facility is from buying from npc market, then the profit, if you are not buying the sourse from npc market, then the **produces** part.", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + ukwembed = discord.Embed(title="Did you know", color=discord.Colour.darker_gray(), timestamp= datetime.datetime.now()) + ukwembed.add_field(name="_ _", value=you_know.you_know()) + ukwembed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + ukwembed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + msg = await ctx.send(embed=ukwembed) + time.sleep(1.2) + await msg.edit(embed=embed) + + @history.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["Beta_0_6_1"][0]) + async def Beta_0_6_1(self, ctx): + await ctx.send("History: Beta_0_6_1 commands:\n`command`") + + @Beta_0_6_1.group(name="command", invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["command"]) + async def commandB061(self, ctx): + await ctx.send("History: Command commands:\n`search`\n`profitcomplete`") + + @commandB061.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_6_1"][1]["search"]) + async def search(self, ctx, *, ctn=None): + if ctn == None: + await ctx.send("What you want to search?Just need to enter something.") + else: + if ctn.split()[0] in ("--April", "--20210401", "--april", "--aprilfool"): + datetimedate = datetime.datetime(2021, 4, 1) + ctn = " ".join(ctn.split(" ")[1:]) + else: + datetimedate = datetime.datetime.now().date() + embed = discord.Embed(title="Search", color=discord.Color.from_rgb(int("35", 16), int("12", 16), int("38", 16)), timestamp= datetime.datetime.now()) + imgname = "" + if str(datetimedate.date()) == "2021-04-01": + if ctn == "when": + embed.add_field(name="Result", value="ERROR: Time collection! Pleace make sure you have time to do this and try again") + img = Image.new("1", (100, 100), 255) + font = ImageFont.FreeTypeFont('Arial.ttf', size=20) + ImageDraw.Draw(img).text((50, 50), "Search", anchor="mm", fill="black", font=font, align="center") + imgnum = len([file for file in os.listdir() if file.endswith(".jpg")]) + imgname = f"Search{imgnum}.jpg" + img.save(imgname) + embed.set_thumbnail(url="attachment://"+imgname) + elif re.search(r'^#(?:[0-9a-fA-F]{3}){1,2}$', ctn.split(" ")[0]) or re.search(r'^(?:[0-9a-fA-F]{3}){1,2}$', ctn): + clr = ctn.split(" ")[0] + ctn = " ".join(ctn.split(" ")[1:]) + if clr.startswith("#"): + img = Image.new("RGB", (100,100), clr) + embed.add_field(name="Color", value=clr) + if ctn: + font = ImageFont.FreeTypeFont('Arial.ttf', size=15) + ImageDraw.Draw(img).multiline_text((50, 50), "\n".join(textwrap.wrap(ctn, 7)), anchor="mm", fill="black", font=font, align="center") + else: + img = Image.new("RGB", (100,100), "#"+clr) + embed.add_field(name="Color", value="#"+clr) + if ctn: + font = ImageFont.FreeTypeFont('Arial.ttf', size=15) + ImageDraw.Draw(img).multiline_text((50, 50), "\n".join(textwrap.wrap(ctn, 7)), anchor="mm", fill="black", font=font, align="center") + imgnum = len([file for file in os.listdir() if file.endswith(".jpg")]) + imgname = f"Search{imgnum}.jpg" + img.save(imgname) + embed.set_thumbnail(url="attachment://"+imgname) + elif ctn == "end": + embed.add_field(name="Result", value="When UTC...") + img = Image.new("1", (100, 100), 255) + font = ImageFont.FreeTypeFont('Arial.ttf', size=20) + ImageDraw.Draw(img).text((50, 50), "Search", anchor="mm", fill="black", font=font, align="center") + imgnum = len([file for file in os.listdir() if file.endswith(".jpg")]) + imgname = f"Search{imgnum}.jpg" + img.save(imgname) + embed.set_thumbnail(url="attachment://"+imgname) + else: + errors = ["Watch your self 3 second then close your eyes 1 second, search again", + "Internet error, pleace reconnect your internet", + "You are too alone, try again", + "Your brain is going to explode! try again!", + "Your pc is getting hacked, make sure your pc is right then try again", + "Your pc will EXPLODE!!"] + embed.add_field(name="Result", value="Error:\n"+random.choice(errors)) + img = Image.new("1", (100, 100), 255) + font = ImageFont.FreeTypeFont('Arial.ttf', size=20) + ImageDraw.Draw(img).text((50, 50), "Search", anchor="mm", fill="black", font=font, align="center") + imgnum = len([file for file in os.listdir() if file.endswith(".jpg")]) + imgname = f"Search{imgnum}.jpg" + img.save(imgname) + embed.set_thumbnail(url="attachment://"+imgname) + await ctx.send(file=discord.File(imgname), embed=embed) + if imgname: + os.remove(imgname) + else: + embed.add_field(name="Result", value=ctn, inline=False) + await ctx.send(embed=embed) + + def B061produce_remain(fac, facdt, num=1, land=1): + faclist = icd["facilities"] + faccs = faclist[fac]["consumes"] + facspeed = faclist[fac]["speed"] + assets = icd["assets"] + res1 = [] + res2 = [] + ld = [] + for a, b in facdt: + pd, = faclist[a]["produces"].keys() + f, = faclist[a]["produces"].values() + f = fractions.Fraction(f*b, faclist[a]["speed"]) + sp = f-fractions.Fraction(faccs[pd]*num, facspeed) + b = repeating_dec_sol.repeating_dec_sol(sp.numerator, sp.denominator) + res1.append((pd, (str(int(float(b))) if float(b).is_integer() else b) if re.fullmatch(r"[0-9]+[.][0-9]+", b) else b)) + b = sp*fractions.Fraction(str(assets[pd])) + ld.append(b) + b = repeating_dec_sol.repeating_dec_sol(b.numerator, b.denominator) + res2.append((pd, (str(int(float(b))) if float(b).is_integer() else b) if re.fullmatch(r"[0-9]+[.][0-9]+", b) else b)) + pfld = sum(ld)/land + res3 = repeating_dec_sol.repeating_dec_sol(pfld.numerator, pfld.denominator) + res3 = (str(int(float(b))) if float(b).is_integer() else b) if re.fullmatch(r"[0-9]+[.][0-9]+", b) else b + return [res1, res2, res3] + + def B061facratio(fac, num=1): + faclist = icd["facilities"] + faccs = faclist[fac]["consumes"] + facspeed = faclist[fac]["speed"] + if faccs == "None": + return [f"0:{num}", f"(0:{num}, 0:{num})", [("N/A", 0)]] + facpd = [] + for a in faccs: + for b in faclist: + for c in faclist[b]["produces"].keys(): + if c == a: + facpd.append((b, c)) + stuff = [b for a, b in facpd] + rep = [] + for a in range(len(stuff)): + for b in stuff: + if stuff.count(b) > 1: + rep.append(b) + energy = 0 + if "energy" in rep: + energy = 1 + if energy: facpd = [("solar_power_plant" if a == "coal_power_plant" else a, b) for a, b in facpd] + stuff1 = [] + depfrac1 = [] + depfrac2 = [] + firstfacdt = [] + for f, g in facpd: + # a = fractions.Fraction(faclist[f]["produces"][g], faclist[f]["speed"]) + b = fractions.Fraction(faccs[g], faclist[fac]["speed"])*num + count = 0 + while b > 0: + b-=fractions.Fraction(faclist[f]["produces"][g], faclist[f]["speed"]) + count += 1 + firstfacdt.append((f, count)) + stuff1.append(str(count)) + frac1 = fractions.Fraction(faccs[g], facspeed)/fractions.Fraction(faclist[f]["produces"][g], faclist[f]["speed"]) + afrac = [fractions.Fraction(faccs[g], faclist[fac]["speed"]), fractions.Fraction(faclist[f]["produces"][g], faclist[f]["speed"])] + if afrac.index(min(afrac)): + afrac = (max(afrac)/min(afrac), 1) + else: + afrac = (1, max(afrac)/min(afrac)) + depfrac1.append(":".join((str(int(float(f))) if float(f).is_integer() else f) if re.fullmatch(r"[0-9]+[.][0-9]+", f) else f for f in [repeating_dec_sol.repeating_dec_sol(a.numerator, a.denominator) for a in calculate.simratio(afrac)])) + bfrac = [] + for a in afrac: + if type(a) == fractions.Fraction: + b = repeating_dec_sol.repeating_dec_sol(a.numerator, a.denominator) + bfrac.append((str(int(float(b))) if float(b).is_integer() else b) if re.fullmatch(r"[0-9]+[.][0-9]+", b) else b) + else: bfrac.append(str(a)) + depfrac2.append(":".join(bfrac)) + # a = True + # b = [decimal.Decimal(str(1.2337)), decimal.Decimal(str(1.22)), decimal.Decimal(str(7.177))] + # re = b + # while a: + # bfr = [] + # stuff = [] + # for c in re: + # c*=10 + # bfr.append(c) + # stuff.append(True if int(c)!=float(c) else False) + # if True in stuff: a = True + # if list(set(stuff)) == [False]: a = False + # re = bfr + # for a, b in facpd: + # a, = faclist[f]["produces"].values() + # b = fractions.Fraction(faccs[g], facspeed) + # intrat = calculate.simratio([fractions.Fraction(faclist[a]["produces"][b], faclist[a]["speed"]) for a, b in facpd]+[fractions.Fraction(faccs[], 1)]) + # print(intrat) # ":".join([repeating_dec_sol.repeating_dec_sol(a.numerator, a.denominator) for a in intrat])+":1", + return (":".join(stuff1)+":1", ", ".join([f"({a}, {b})" for a, b in zip(depfrac1, depfrac2)]), firstfacdt) + + @commandB061.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_6_1"][1]["profitcomplete"]) + async def profitcomplete(self, ctx, *, args):#facility, number + correct = string_handler.location(str, int, args, True) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("`EN0005`: Cannot determine arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args, True) + if args[0][0].startswith("--"): + flag, fac = args[0][0].lower()[2:], args[0][1:] + flagals = {"sec": "second", "s": "second", "min": "minute", "m": "minute", "hr": "hour", "h": "hour", "d": "day"} + if flag in flagals: flag = flagals[flag]; unit = flag + elif flag not in flagals.values(): + await ctx.send("`EN0003`: Invalid flag") + return + else: fac = args[0]; unit = "second" + num = args[1] + if num == []: + num = 1 + fac = " ".join(fac).lower() + for a, b in als["ic"]["facilities"].items(): + if b != None: + if fac in b: + fac = a + fac = fac.split(" ") + fac = "_".join(fac).lower() + with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + if not fac in icd["facilities"].keys(): + await ctx.send("`EN0004`: Invalid facility: {}".format(" ".join(args[0]))) + return + if type(num) == list: + for a in num: + num = a + if type(num) == str: + if num.endswith(('k', 'm', 'b')): + a = num[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + tnum = a.replace(',', '') + if num.endswith("k"): + num = float(tnum)*1000 + elif num.endswith("m"): + num = float(tnum)*1000000 + else: + num =float(tnum)*1000000000 + else: + await ctx.send("`EN0006`: Number input error") + return + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", num): + num = float(num.replace(",", "")) + else: + await ctx.send("`EN0006`: Number input error") + return + facratio = history.B061facratio(fac, num) + firstfac = calculate.firstfac(fac, facratio[2]) + remain = history.B061produce_remain(fac, facratio[2], num, firstfac[2]) + if "flag" in locals(): num *= {"day": 60*60*24, "hour": 60*60, "minute": 60}.get(flag, 1) + sol = calculate.product_profit(fac, "all", num) + soland = calculate.product_profitpland(fac, "all", num, firstfac[2]) + s2 = [] + count = 0 + for a in (sol[0], sol[1], soland[1]): + s = [] + if not a == "None": + for b, c in zip(a.keys(), a.values()): + try: + float(c) + c = f"{float(c):,}" + except: + c = c.split(".") + c = f"{int(c[0]):,}.{c[1]}" + if count != 2: s.append(" | ".join(list(("**"+b.capitalize().replace("_", " ")+"**", "$"+c)))) + else: s.append(" | ".join(list(("**"+b.capitalize().replace("_", " ")+"**", "$"+c+"/land")))) + s2.append("\n".join(s)) + else: + s2.append("None") + count+=1 + c, p, pland = s2 + if type(sol[2]) == list: + pfs = sol[2] + for a in list(pfs[0].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf = "**Max** | $"+a+"\n" + for a in list(pfs[1].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf += "**Min** | $"+a + else: + pf = sol[2] + try: + float(pf) + pf = f"{float(pf):,}" + except: + pf = pf.split(".") + pf = f"{int(pf[0]):,}.{pf[1]}" + pf = "$"+pf + if type(soland[2]) == list: + pfs = soland[2] + for a in list(pfs[0].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pfland = "**Max** | $"+a+"\n" + for a in list(pfs[1].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pfland += "**Min** | $"+a + else: + pfland = soland[2] + try: + float(pfland) + pfland = f"{float(pfland):,}" + except: + pfland = pfland.split(".") + pfland = f"{int(pfland[0]):,}.{pfland[1]}" + pfland = "$"+pfland+"/land" + rem = [] + for a, b in remain[0]: + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + rem.append("**"+a.capitalize()+"** | "+b) + rem.append("") + for a, b in remain[1]: + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + rem.append("**"+a.capitalize()+"** | $"+b) + rem = "\n".join(rem) + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), description="Unit: "+unit.capitalize(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p+"\n\n"+pland, inline=False) + embed.add_field(name="Profit", value=pf+"\n\n"+pfland, inline=False) + embed.add_field(name="Complete Information", value="Ratio(order follow to above): "+facratio[0]+" "+facratio[1]+"\n\n**First Facility(First Fac)/Require facilities:**\n"+firstfac[0]+"\n"+firstfac[1], inline=False) + embed.add_field(name="Produce Remains", value=rem, inline=False) + embed.add_field(name="Note", value="The result of this command can't get anything of region(s).\nThe **profit** is meaning that if your sourse of the facility is from buying from npc market, then the profit, if you are not buying the sourse from npc market, then the **produces** part.", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + ukwembed = discord.Embed(title="Did you know", color=discord.Colour.darker_gray(), timestamp= datetime.datetime.now()) + ukwembed.add_field(name="_ _", value=you_know.you_know()) + ukwembed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + ukwembed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + msg = await ctx.send(embed=ukwembed) + time.sleep(3) + await msg.edit(embed=embed) + + @commandB061.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_6_1"][1]["updates"]) + async def updates(self, ctx, *, args=None): + def defformver(ver): + if ver == "Alpha.0.2": + formver = "Alpha.1" + elif ver in ("Alpha.0.2.1", "Alpha.0.3.0", "Beta.0.1.0"): + formver = "Alpha.2" + else: + formver = "Alpha.2" + return formver + if args != None: + arg = string_handler.filter(args) + if arg[1]: + await ctx.send("`EN0008`: Argument error: type number") + return + flags = string_handler.flags(arg[0]) + if flags[1]: + await ctx.send("`EN0001`: Flag type error, `--`") + return + if len(flags[0]) > 1: + await ctx.send("`EN0002`: Too many flags") + return + elif len(flags[0]) == 1: + for a in flags[0]: + flag = a + else: + flag = None + if flag != None: + if arg[0].index(flag) > 0: + await ctx.send("`EN0007`: Argument flag error") + return + if flag != None: + flag = flag[2:] + if len(flags[2]) > 1: + await ctx.send("`EN0008`: String") + return + elif len(flags[2]) == 1: + for a in flags[2]: + mores = a + else: + mores = None + if flag == None: + theud = dict([next(reversed(udslist.items()))]) + for a in theud.keys(): + version = a + for a in theud.values(): + ud = a + else: + ud = udslist[flag] + version = flag + if mores != None: + more = mores.split(".") + stuff = [] + for a in more: + stuff.append(a.replace("_", " ")) + # if len(more) == 1: + # for a in more: + # for c, d in als["updates list"]["first"].items(): + # if a in c: + # a = c + # prints = ud[a] + # else: + fn = "" + b = ud + first = als["updates list"]["first"] + second = als["updates list"]["second"] + third = als["updates list"]["third"] + i = 0 + moo = [] + for a in more: + if i == 0: + for c, d in first.items(): + if a in d: + a = c + else: + if a != "plans to update": + for c, d in second.items(): + if a in d: + a = c + else: + for c, d in third.items(): + if a in d: + a = c + if a not in b: + await ctx.send("`EN0004`: The argument is invalid or unexist in this version of update") + b = b[a] + moo.append(a) + i += 1 + more = moo + store = b + nothing = "\n**Nothing to show**" + if not store: + prints = nothing + else: + if type(store) == list: + prints = "\n".join(store) + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + elif type(store) == dict: + noth = 0 + store2 = [] + for a, b in store.items(): + if more[0] == "commands": + if a in ("adds", "changes", "deletes"): + if not b: + prints = nothing + noth = 1 + else: + store2.append("**"+a.capitalize()+":**") + for a, b in b.items(): + if a.istitle(): + store2.append(a+" -- "+b) + else: + store2.append("`"+a+"` -- "+b) + # prints = "\n".join(store) + else: + if a.istitle(): + store2.append(+a+" -- "+b) + else:store2.append("`"+a+"` -- "+b) + elif more[0] == "other": + if b: + store2.append("\""+a+"\" -- "+b) + elif more[0] == "plans to update": + if a in ud["plans to update"].keys(): + if not b: + prints = nothing + noth = 1 + else: + store2.append("**"+a.capitalize()+":**") + for a, b in b.items(): + store2.append("\""+a.capitalize()+"\" -- "+b.capitalize()) + # prints = "\n".join(store) + else: + store2.append("\""+a.capitalize()+"\" -- "+b.capitalize()) + if store2: + prints = "\n".join(store2) + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + elif type(store) == str: + if len(store.split(" ")) == 1: + prints = store.capitalize() + else: + prints = store + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + prints += f"\n\nVersion: **v.{version}**" + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + embed.add_field(name=version+fn, value=prints, inline=False) + else: + formver = defformver(version) + prints = [] + for a, b in ud.items(): + if type(b) == list: + if not b: + continue + if formver == "Alpha.1": + if a == "note": + A1 = "" + else: + A1 = ":" + else: + A1 = ":" + prints.append("**"+a.capitalize()+A1+"**") + for c in b: + prints.append("> "+c) + elif type(b) == dict: + prints.append("**"+a.capitalize()+":**") + for c, d in b.items(): + if not d: + continue + if a == "other": + prints.append("> \""+c+"\" -- "+d) + continue + prints.append("> **"+c.capitalize()+":**") + for e, f in d.items(): + if a == "commands": + if a.istitle(): + prints.append("> "+e+" -- "+f) + else: + prints.append("> `"+e+"` -- "+f) + if a == "plans to update": + prints.append("> \""+e+"\" -- "+f.capitalize()) + else: + prints.append(b) + b = [] + for a in prints: + if "{}" in a: + a = a.format(version) + b.append(a) + prints = b + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + if len("\n".join(prints)) > 1000: + a, b = prints[:len(prints)//2], prints[len(prints)//2:] + tlist = (deque(a), deque(b)) + for i in range(2): + while len("\n".join(tlist[i])) > 1000: + if i == 0: tlist[1].appendleft(tlist[0].pop()) + else: tlist[0].append(tlist[1].popleft()) + a, b = tlist + embed.add_field(name=version, value="\n".join(a), inline=False) + embed.add_field(name="_ _", value="\n".join(b), inline=False) + else: + embed.add_field(name=version, value="\n".join(prints), inline=False) + else: + theud = dict([next(reversed(udslist.items()))]) + for a in theud.keys(): + version = a + for a in theud.values(): + ud = a + formver = defformver(version) + prints = [] + for a, b in ud.items(): + if type(b) == list: + if formver == "Alpha.1": + if a == "note": + A1 = "" + else: + A1 = ":" + else: + if not b: + continue + A1 = ":" + prints.append("**"+a.capitalize()+A1+"**") + for c in b: + prints.append("> "+c) + elif type(b) == dict: + prints.append("**"+a.capitalize()+":**") + for c, d in b.items(): + if not d: + continue + if a == "other": + prints.append("> \""+c+"\" -- "+d) + continue + prints.append("> **"+c.capitalize()+":**") + for e, f in d.items(): + if a == "commands": + if e.istitle(): + prints.append("> "+e+" -- "+f) + else: + prints.append("> `"+e+"` -- "+f) + if a == "plans to update": + prints.append("> \""+e+"\" -- "+f.capitalize()) + else: + prints.append(b) + b = [] + for a in prints: + if "{}" in a: + a = a.format(version) + b.append(a) + prints = b + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + if len("\n".join(prints)) > 1000: + a, b = prints[:len(prints)//2], prints[len(prints)//2:] + tlist = (deque(a), deque(b)) + for i in range(2): + while len("\n".join(tlist[i])) > 1000: + if i == 0: tlist[1].appendleft(tlist[0].pop()) + else: tlist[0].append(tlist[1].popleft()) + a, b = tlist + embed.add_field(name=version, value="\n".join(a), inline=False) + embed.add_field(name="_ _", value="\n".join(b), inline=False) + else: + a = "\n".join(prints) + embed.add_field(name=version, value=a, inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @commandB061.group(name="task", invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["Beta_0_6_1"][1]["task"][0]) + async def taskB061(self, ctx): + command = ctx.message.content.split(" ") + if len(command) == 1: + await ctx.send("task add\ntask change\ntask remove\n""on_work, pause, finished, waiting") + else: + await ctx.send("Wrong subcommand") + + @taskB061.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_6_1"][1]["task"][1]["add"]) + async def add(self, ctx, task): + with open("data.json", mode="r", encoding="utf8") as f: + dt = json.load(f) + dt.setdefault("tasks", {}) + dt["tasks"].setdefault("on_work", []) + if task in dt["tasks"]["on_work"]: + await ctx.send("The task is already exist!") + return + dt["tasks"]["on_work"].append(task) + with open("data.json", mode="w", encoding="utf8") as f: + json.dump(dt, f, ensure_ascii=False, indent=4) + await ctx.send(f"Added {task} into tasks stats.") + + @taskB061.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_6_1"][1]["task"][1]["change"]) + async def change(self, ctx, task, status): + with open("data.json", mode="r", encoding="utf8") as f: + dt = json.load(f) + if dt["tasks"] == {}: + await ctx.send("Haven't any tasks") + return + if dt["tasks"]["on_work"] == []: + await ctx.send("Haven't any tasks") + return + if not status in ("on_work", "pause", "finished", "waiting"): + await ctx.send("Invalid status was given") + return + dt["tasks"].setdefault("pause", []) + dt["tasks"].setdefault("finished", []) + dt["tasks"].setdefault("waiting", []) + if task in dt["tasks"]["on_work"]: + work = "on_work" + elif task in dt["tasks"]["pause"]: + work = "pause" + elif task in dt["tasks"]["finished"]: + work = "finished" + elif task in dt["task"]["waiting"]: + work = "waiting" + else: + await ctx.send("The task which was given is not exist") + return + dt["tasks"][work].remove(task) + dt["tasks"][status].append(task) + with open("data.json", mode="w", encoding="utf8") as f: + json.dump(dt, f, ensure_ascii=False, indent=4) + await ctx.send(f"Changed \"{task}\" to {status}") + + @taskB061.command(aliases=als["cogs"]["history"]["history"][1]["Beta_0_6_1"][1]["task"][1]["remove"]) + async def remove(self, ctx, task): + with open("data.json", mode="r", encoding="utf8") as f: + dt = json.load(f) + count = 0 + same = 0 + for a, b in dt["tasks"].items(): + for c in b: + if task == c: + same += 1 + else: + if task in c: + count += 1 + success = 0 + if count == 0: + await ctx.send("Can't found") + return + elif count == 1: + for a, b in dt["tasks"].items(): + for s in b[:]: + if task == s: + success = 1 + b.remove(s) + await ctx.send("Remove success") + for s in b[:]: + if task in s and success == 0: + success = 1 + b.remove(s) + await ctx.send("Remove success") + if success == 0: + await ctx.send("Remove not success") + else: + await ctx.send("Invalid task") + with open("data.json", mode="w", encoding="utf8") as f: + json.dump(dt, f, indent=4) + + @history.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["Stable_1_0"][0]) + async def Stable_1_0(self, ctx): + await ctx.send("History: Stable_1_0 commands:\n`command`") + + @Stable_1_0.group(name="command", invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["command"]) + async def commandS10(self, ctx): + await ctx.send("History: Command commands:\n`search`\n`profitcomplete`") + + @commandS10.command(aliases=als["cogs"]["history"]["history"][1]["Stable_1_0"][1]["info"]) + async def info(self, ctx, *, req): + icinfo = icd["info"] + debug = [] + infoals = {} + for a in als["ic"].values(): + infoals.update(a) + for a, b in infoals.items(): + if not b == None and req in b: + debug.append(a) + if len(debug) > 1: + await ctx.send("`EN0401`: Happened an unexpected or imposible thing, E1: Aliases") + return + elif debug: + reqsl, = debug + else: + reqsl = req + reqsl = "_".join(reqsl.split(" ")) + if reqsl.endswith("_u"): reqsl, techlv = reqsl[:-2], 1 + elif reqsl.endswith("_uu"): reqsl, techlv = reqsl[:-3], 2 + else: techlv = 0 + check = [b for a in icinfo.values() for b in a.keys()] + if not reqsl in check: + await ctx.send(f"`EN0004`: Cannot find info of: {req}, check your input") + return + for a in icinfo: + if reqsl in icinfo[a]: + infoclass = a + theinfo = icinfo[infoclass][reqsl] + embed = discord.Embed(title=f"Info -- {infoclass.capitalize()}", color=discord.Colour.greyple(), timestamp= datetime.datetime.now()) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + embed.add_field(name=reqsl.replace("_", " ").capitalize(), value="_ _", inline=False) + ifimg = None + output = [] + if infoclass == "assets": + # output.append("**IdleCorp Info(Examine):**\n"+theinfo["icinfo"]) + stuff = [] + if theinfo["market"] == True: + stuff.append("It's tradable in market") + elif theinfo["market"] == False: + stuff.append("It's not tradable in market") + if theinfo["retail"] == False: + stuff.append("It cannot sold in retail store") + stuff.append("It cannot be scrapped") + else: + stuff.append("It can sold in retail store") + stuff.append("It can be scrapped into {} scraps".format(theinfo["retail"])) + # output.append("\n".join(stuff)) + stuff2 = ["NPC market buy price(if valid): "+str(icd["assets"][reqsl]*2)] + stuff2.append("NPC market sell price: "+str(icd["assets"][reqsl])) + embed.add_field(name="IdleCorp Info(Examine):", value=theinfo["icinfo"]+"\n\n"+"\n".join(stuff)+"\n\n"+"\n".join(stuff2), inline=False) + # output.append("**IdleCorp Wiki:**\n"+theinfo["icwiki"]) + embed.add_field(name="IdleCorp Wiki:", value=theinfo["icwiki"], inline=False) + # output.append("**Wikipedia:**\n"+theinfo["wikipedia"]) + embed.add_field(name="Wikipedia:", value=theinfo["wikipedia"], inline=False) + if theinfo.setdefault("icp"): + embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["assets"]: + await ctx.send("`EN0402`: Cannot find assets -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["assets"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["assets"][reqsl])) + else: output.append("Aliases: None") + stuff = [] + stuff.append(f"\n[IdleCorp Wiki](https://wiki.idlecorp.xyz/index.php/{reqsl})") + if reqsl == "led": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/Light-emitting_diode)") + elif reqsl == "rubber": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/synthetic_rubber)") + elif reqsl == "energy": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/electricity)") + elif reqsl == "lamp": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/light_fixture)") + elif reqsl == "ccd": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/charge-coupled_device)") + elif reqsl == "hq": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/Headquarters)") + elif theinfo["wikipedia"] != "None": stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + output.append("\n".join(stuff)) + ifimg = rf"images/info/{reqsl}.png" if Path(f"images/info/{reqsl}.png").is_file() else r"images/info/box.png" + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "facilities": + # output.append("**IdleCorp Info(Examine):**\n"+theinfo["icinfo"]) + embed.add_field(name="IdleCorp Info(Examine):", value=theinfo["icinfo"], inline=False) + stuff = [] + for a, b in theinfo["construct"].items(): + if not a == "money": + stuff.append(f"{b:,}"+" **"+a.capitalize()+"**") + else: + stuff.append("$"+f"{b:,}") + # output.append("**Construction materials:**\n"+"\n".join(stuff)) + embed.add_field(name="Construction materials:", value="\n".join(stuff), inline=False) + # output.append("**IdleCorp Wiki:**\n"+theinfo["icwiki"]) + embed.add_field(name="IdleCorp Wiki:", value=theinfo["icwiki"], inline=False) + # output.append("**Wikipedia:**\n"+theinfo["wikipedia"]) + embed.add_field(name="Wikipedia:", value=theinfo["wikipedia"], inline=False) + stuff = "**Consumes**\n" + facpro = icd["facilities"][reqsl] + stuff += "None\n" if facpro["consumes"] == "None" else "\n".join([f"**{a.capitalize().replace('_', ' ')}** | {b:,}" for a, b in facpro["consumes"].items()])+"\n" + stuff += "**Produces**\n" + stuff += "None\n" if facpro["produces"] == "None" else "\n".join([f"**{a.capitalize().replace('_', ' ')}** | {b:,}" for a, b in facpro["produces"].items()])+"\n" + stuff += "Speed: "+str(icd["facilities"][reqsl]["speed"])+" seconds" + embed.add_field(name="Production:", value=stuff, inline=False) + if theinfo.setdefault("icp"): embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["facilities"]: + await ctx.send("`EN0402`: Cannot find facilities -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["facilities"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["facilities"][reqsl])) + else: output.append("Aliases: None") + if reqsl == "steel_mill": + if random.randint(1, 50) == 1: + output.append("*I always typo this facility as \"still mill\"*") + if reqsl == "furniture_factory": + if random.randint(1, 5) == 1: + output.append("*Why the IdleCorp Wiki page has so many words...*") + if random.randint(1, 10) == 1: + output.append("*Because the IdleCorp Wiki page has too many work, I had to change the layout of all...*") + if reqsl.split("_")[-1] == "factory": + if random.randint(1, 20) == 1: + output.append("*I really want to know who made this facility page...*") + if reqsl == "research_chemical_factory": + if random.randint(1, 3) == 1: + output.append("*Why this facility has so many aliases...*") + stuff = [] + stuff.append(f"\n[IdleCorp Wiki](https://wiki.idlecorp.xyz/index.php/{reqsl})") + if theinfo["wikipedia"] != "None": stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + output.append("\n".join(stuff)) + if Path(f"images/info/{reqsl}.png").is_file(): ifimg = fr"images/info/{reqsl}.png" + elif reqsl.endswith("mine"): ifimg = r"images/info/mine.png" + elif reqsl in ("ccd_factory", "cpu_factory", "cell_phone_factory", "laptop_factory", "digital_camera_factory", "television_factory"): ifimg = "images/info/tech_facility.png" + elif reqsl in ("retail_store", "research_facility", "customer_support_center", "hq"): ifimg = r"images/info/office_building.png" + elif reqsl in ("research_chemical_factory", "prescription_drug_factory"): ifimg = r"images/info/chemical_plant.png" + else: ifimg = r"images/info/facility.png" + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "blueprints": + embed.add_field(name="IdleCorp Info(Examine):", value=theinfo["icinfo"]+"\n\nRarity: {}".format(theinfo["rarity"])+"\n\nAll blueprints **cannot** trade and be sold in the market and the retail stores.", inline=False) + stuff = [] + for a, b in theinfo["require"].items(): + stuff.append(f"{b:,}"+" **"+a.capitalize()+"**") + embed.add_field(name="Requires:", value="\n".join(stuff), inline=False) + embed.add_field(name="IdleCorp Wiki:", value=theinfo["icwiki"], inline=False) + if theinfo.setdefault("icp"): + embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["blueprints"]: + await ctx.send("`EN0402`: Cannot find blueprints -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["blueprints"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["blueprints"][reqsl])) + else: output.append("Aliases: None") + stuff = [] + stuff.append(f"\n[IdleCorp Wiki](https://wiki.idlecorp.xyz/index.php/{reqsl})") + output.append("\n".join(stuff)) + ifimg = r"images/info/blueprint.png" + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "technologies": + stuff = [] + if techlv == 2: + if theinfo["upgrade"]["uu"] == "None": + await ctx.send("`EN0004`: The tech haven't \"uu\" upgrade") + return + stuff.append(theinfo["upgrade"]["uu"]["icinfo"]) + stuff.append("Rarity: "+theinfo["rarity"]) + stuff.append("It can be scrapped into {} scraps".format(theinfo["upgrade"]["uu"]["scrap"])) + stuff.append("\nAll technologies **can** trade and **cannot** be sold in the market and the retail stores respectively.") + elif techlv == 1: + if theinfo["upgrade"]["u"] == "None": + await ctx.send("`EN0004`: The tech haven't \"u\" upgrade") + return + stuff.append(theinfo["upgrade"]["u"]["icinfo"]) + stuff.append("Rarity: "+theinfo["rarity"]) + stuff.append("It can be scrapped into {} scraps".format(theinfo["upgrade"]["u"]["scrap"])) + stuff.append("\nAll technologies **can** trade and **cannot** be sold in the market and the retail stores respectively.") + if theinfo["upgrade"]["uu"] != "None": stuff.append("\nNext upgrade: "+reqsl.replace("_", " ")+"uu") + else: + stuff.append(theinfo["icinfo"]) + stuff.append("\nRarity: "+theinfo["rarity"]) + stuff.append("It can be scrapped into {} scraps".format(theinfo["scrap"])) + stuff.append("\nAll technologies **can** trade and **cannot** be sold in the market and the retail stores respectively.") + if theinfo["upgrade"]["u"] != "None": stuff.append("\nNext upgrade: "+reqsl.replace("_", " ")+"u") + stuff.append("The tech affected on "+theinfo["affect"].capitalize()) + embed.add_field(name="IdleCorp Info(Examine):", value="\n".join(stuff), inline=False) + stuff = "\n".join(["Level {} boost: {}".format(a, theinfo["boost"][a].replace("+", "and")) for a in range(len(theinfo["boost"]))]) + embed.add_field(name="IdleCorp Wiki:", value=theinfo["icwiki"], inline=False) + if theinfo.setdefault("icp"): embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["technologies"]: + await ctx.send("`EN0402`: Cannot find blueprints -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["technologies"][reqsl+("_u" if techlv == 1 else ("_uu" if techlv == 2 else ""))] == None: + output.append("Aliases: "+", ".join(als["ic"]["technologies"][reqsl+("_u" if techlv == 1 else ("_uu" if techlv == 2 else ""))])) + else: output.append("Aliases: None") + stuff = [] + stuff.append(f"\n[IdleCorp Wiki](https://wiki.idlecorp.xyz/index.php/{reqsl})") + if theinfo["wikipedia"] != "None": stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + output.append("\n".join(stuff)) + ifimg = r"images/info/technology.png" + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "services": + embed.add_field(name="IdleCorp Info(Examine):", value=theinfo["icinfo"]+"\nAffect: "+theinfo["effect"]+"\nCost: **${:,}**".format(theinfo["cost"]), inline=False) + if theinfo.setdefault("icp"): embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["services"]: + await ctx.send("`EN0402`: Cannot find services -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["services"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["services"][reqsl])) + else: output.append("Aliases: None") + stuff = [] + if theinfo["wikipedia"] != "None": stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + if stuff: output.append("\n".join(stuff)) + ifimg = r"images/info/crane.png" + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "pollicies": + embed.add_field(name="IdleCorp Info(Examine):", value="Affect: "+theinfo["affect"]+"\nCost: {} *Funding points*".format(theinfo["cost"]), inline=False) + if theinfo.setdefault("icp"): embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["services"]: + await ctx.send("`EN0402`: Cannot find services -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["policies"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["policies"][reqsl])) + else: output.append("Aliases: None") + stuff = [] + if theinfo["wikipedia"] != "None": stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + if stuff: output.append("\n".join(stuff)) + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + # embed.add_field(name=reqsl.replace("_", " ").capitalize(), value="\n\n".join(output)) + if ifimg == None: await ctx.send(embed=embed) + else: + ifimg = discord.File(ifimg) + embed.set_thumbnail(url=r"attachment://"+ifimg.filename) + await ctx.send(embed=embed, file=ifimg) + + @commandS10.command(aliases=als["cogs"]["history"]["history"][1]["Stable_1_0"][1]["help"]) + async def help(self, ctx, *, cmd=None): + if cmd == None: + embed = discord.Embed(title="Help", description="Won't show Admin's, Owner's, Developer's commands", color=discord.Colour.green(), timestamp= datetime.datetime.now()) + for a, b in hps["commands"].items(): + embed.add_field(name=a.capitalize(), value=f"Descriptions/Features: {b[0]}\nSyntax: {b[1]}", inline=False) + else: + can = True + cd = cmd + cmds = cmd.split() + if len(cmds) == 3: + if cmds[-1] == "command": + cmds = [cmds[0]]+["command"] + out, fir = [], False + for a, b in hps["info"]["aliases"].items(): + for e, f in b.items(): + for a in cmds: + if isinstance(f, dict): + if e != cmds[0]: continue + if ("__init__" in f) and (a in f["__init__"]): + fir = True + out.append(e) + else: + g = f + + for c, d in g.items(): + if a in d: + out.append(c) + elif isinstance(d, dict): + if "__init__" in d and d["__init__"] == a: + out.append(d["__init__"]) + continue + g = d + elif a in f or a == e: + fir = True + out.append(e) + cmds = out + if fir == False or cmds[0] not in hps["commands"]: + await ctx.send("`EN0004`: Cannot find command info named `{}`".format(cd)) + return + embed = discord.Embed(title="Help -- "+cmds[0].capitalize(), color=discord.Colour.green(), timestamp= datetime.datetime.now()) + res = hps["commands"][cmds[0]] + for a, b in hps["info"].items(): + if a == "aliases": + for c, d in b.items(): + for e, f in d.items(): + g = f + if e != cmds[0]: continue + for cmd in cmds: + if cmd not in g: continue + if not isinstance(g, dict): break + g = g[cmd] + res.append(g["__init__"] if isinstance(g, dict) else g) + can = False + break + elif a == "details": + for c, d in b.items(): + e = d + for cmd in cmds: + if cmd not in e: continue + e = e[cmd] + if type(e) == dict and "__init__" not in e: continue + s = e["__init__"] if isinstance(e, dict) else e + if not s: break + # if re.search(r"(?<=\{)([A-Za-z0-9-])+(?<=\})", s): + # if re.search(r"(?<=\{)([A-Za-z0-9-])+(?<=\})", s) == "-1": + # s = s.format(cmds[-1]) + # elif re.search(r"(?<=\{)([A-Za-z0-9-])+(?<=\})", s) == "-2": + # s - s.format(cmds[-2]) + if "{" and "}" in s: s - s.format(**zip([str(-g) for g in range(1, len(cmds)+1)[::-1]], cmds[:-1])) + res.append(s) + can = False + break + if can == True: + await ctx.send("`EN0004`: Cannot find command info named `{}`".format(cd)) + return + out = [("Description: "+res[0])]+[("Syntax: "+res[1])]+[("Aliases: "+", ".join(res[2]))] + if len(res) == 4: + out.append("Details: "+res[3]) + embed.add_field(name=" ".join(cmds), value="\n\n".join(out), inline=False) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @history.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["Stable_1_0_1"][0]) + async def Stable_1_0_1(self, ctx): + await ctx.send("History: Stable_1_0_1 commands:\n`command`") + + @Stable_1_0_1.group(name="command", invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["command"]) + async def commandS101(self, ctx): + await ctx.send("History: Command commands:\n`search`\n`profitcomplete`") + + @commandS101.command(aliases=als["cogs"]["history"]["history"][1]["Stable_1_0_1"][1]["speed"]) + async def speed(self, ctx, *, args):#facilities, number + correct = string_handler.location(str, int, args, True) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("`EN0007`: Can't determind arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args, True) + print(args) + if args[0][0].startswith("--"): + flag, fac = args[0][0].lower()[2:], args[0][1:] + flagals = {"sec": "second", "s": "second", "min": "minute", "m": "minute", "hr": "hour", "h": "hour", "d": "day"} + if flag in flagals: flag = flagals[flag]; unit = flag + elif flag not in flagals.values(): + await ctx.send("`EN0003`: Invalid flag") + return + else: fac = args[0]; unit = "second" + num = args[1] + if num == []: + num = 1 + fac = " ".join(fac).lower() + for a, b in als["ic"]["facilities"].items(): + if b != None: + if fac in b: + fac = a + fac = fac.split(" ") + fac = "_".join(fac).lower() + with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + if not fac in icd["facilities"].keys(): + await ctx.send("`EN0004`: Cannot find facility: {}".format(" ".join(args[0]))) + return + if type(num) == list: + for a in num: + num = a + if type(num) == str: + if num.endswith(('k', 'm', 'b')): + a = num[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + tnum = a.replace(',', '') + if num.endswith("k"): + num = float(tnum)*1000 + elif num.endswith("m"): + num = float(tnum)*1000000 + else: + num =float(tnum)*1000000000 + else: + await ctx.send("`EN0006`: Number input error") + return + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", num): + num = float(num.replace(",", "")) + else: + await ctx.send("`EN0006`: Number input error") + return + if "flag" in locals(): num *= {"day": 60*60*24, "hour": 60*60, "minute": 60}.get(flag, 1) + sol = calculate.product_speed(fac, "all", num) + if sol[0] == "None": + cs_pd = "None" + else: + cs_pd = list(sol[0].keys()) + cs_sp = list(sol[0].values()) + if sol[1] != "None:": + pd_pd = list(sol[1].keys()) + pd_sp = list(sol[1].values()) + else: + pd_pd = "None" + s = [] + s2 = [] + if not cs_pd == "None": + for a, b in zip(cs_pd, cs_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", b)))) + c = "\n".join(s) + else: + c = "None" + if not pd_pd == "None": + for a, b in zip(pd_pd, pd_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s2.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", b)))) + p = "\n".join(s2) + else: + p = "None" + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), description="Unit: "+unit.capitalize(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p, inline=False) + embed.add_field(name="Note", value="The result of this command can't get anything of region(s). In Alpha.0.2, this command just calculate for one-type-facility in **one action**! ", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + ukwembed = discord.Embed(title="Did you know", color=discord.Colour.darker_gray(), timestamp= datetime.datetime.now()) + ukwembed.add_field(name="_ _", value=you_know.you_know()) + ukwembed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + ukwembed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + msg = await ctx.send(embed=ukwembed) + time.sleep(3) + await msg.edit(embed=embed) + + @commandS101.command(aliases=als["cogs"]["history"]["history"][1]["Stable_1_0_1"][1]["profit"]) + async def profit(self, ctx, *, args):#facility, number + correct = string_handler.location(str, int, args, True) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("`EN0005`: Cannot determine arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args, True) + if args[0][0].startswith("--"): + flag, fac = args[0][0].lower()[2:], args[0][1:] + flagals = {"sec": "second", "s": "second", "min": "minute", "m": "minute", "hr": "hour", "h": "hour", "d": "day"} + if flag in flagals: flag = flagals[flag]; unit = flag + elif flag not in flagals.values(): + await ctx.send("`EN0003`: Invalid flag") + return + else: fac = args[0]; unit = "second" + num = args[1] + if num == []: + num = 1 + fac = " ".join(fac).lower() + for a, b in als["ic"]["facilities"].items(): + if b != None: + if fac in b: + fac = a + fac = fac.split(" ") + fac = "_".join(fac).lower() + with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + if not fac in icd["facilities"].keys(): + await ctx.send("`EN0004`: Invalid facility: {}".format(" ".join(args[0]))) + return + if type(num) == list: + for a in num: + num = a + if type(num) == str: + if num.endswith(('k', 'm', 'b')): + a = num[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + tnum = a.replace(',', '') + if num.endswith("k"): + num = float(tnum)*1000 + elif num.endswith("m"): + num = float(tnum)*1000000 + else: + num =float(tnum)*1000000000 + else: + await ctx.send("`EN0006`: Number input error") + return + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", num): + num = float(num.replace(",", "")) + else: + await ctx.send("`EN0006`: Number input error") + return + if "flag" in locals(): num *= {"day": 60*60*24, "hour": 60*60, "minute": 60}.get(flag, 1) + sol = calculate.product_profit(fac, "all", num) + if sol[0] == "None": + cs_pd = "None" + else: + cs_pd = list(sol[0].keys()) + cs_sp = list(sol[0].values()) + if sol[1] != "None:": + pd_pd = list(sol[1].keys()) + pd_sp = list(sol[1].values()) + else: + pd_pd = "None" + s = [] + s2 = [] + if not cs_pd == "None": + for a, b in zip(cs_pd, cs_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", "$"+b)))) + c = "\n".join(s) + else: + c = "None" + if not pd_pd == "None": + for a, b in zip(pd_pd, pd_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s2.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", "$"+b)))) + p = "\n".join(s2) + else: + p = "None" + if type(sol[2]) == list: + pfs = sol[2] + for a in list(pfs[0].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf = "**Max** | $"+a+"\n" + for a in list(pfs[1].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf += "**Min** | $"+a + else: + pf = sol[2] + try: + float(pf) + pf = f"{float(pf):,}" + except: + pf = pf.split(".") + pf = f"{int(pf[0]):,}.{pf[1]}" + pf = "$"+pf + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), description="Unit: "+unit.capitalize(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p, inline=False) + embed.add_field(name="Profit", value=pf, inline=False) + embed.add_field(name="Note", value="The result of this command can't get anything of region(s).\nThe **profit** is meaning that if your sourse of the facility is from buying from npc market, then the profit, if you are not buying the sourse from npc market, then the **produces** part.", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + ukwembed = discord.Embed(title="Did you know", color=discord.Colour.darker_gray(), timestamp= datetime.datetime.now()) + ukwembed.add_field(name="_ _", value=you_know.you_know()) + ukwembed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + ukwembed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + msg = await ctx.send(embed=ukwembed) + time.sleep(3) + await msg.edit(embed=embed) + + @commandS101.command(aliases=als["cogs"]["history"]["history"][1]["Stable_1_0_1"][1]["profitcomplete"]) + async def profitcomplete(self, ctx, *, args):#facility, number + correct = string_handler.location(str, int, args, True) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("`EN0005`: Cannot determine arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args, True) + if args[0][0].startswith("--"): + flag, fac = args[0][0].lower()[2:], args[0][1:] + flagals = {"sec": "second", "s": "second", "min": "minute", "m": "minute", "hr": "hour", "h": "hour", "d": "day"} + if flag in flagals.values(): flag = flag; unit = flag + elif flag not in flagals.values(): + await ctx.send("`EN0003`: Invalid flag") + return + else: fac = args[0]; unit = "second" + num = args[1] + if num == []: + num = 1 + fac = " ".join(fac).lower() + for a, b in als["ic"]["facilities"].items(): + if b != None: + if fac in b: + fac = a + fac = fac.split(" ") + fac = "_".join(fac).lower() + with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + if not fac in icd["facilities"].keys(): + await ctx.send("`EN0004`: Invalid facility: {}".format(" ".join(args[0]))) + return + if type(num) == list: + for a in num: + num = a + if type(num) == str: + if num.endswith(('k', 'm', 'b')): + a = num[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + tnum = a.replace(',', '') + if num.endswith("k"): + num = float(tnum)*1000 + elif num.endswith("m"): + num = float(tnum)*1000000 + else: + num =float(tnum)*1000000000 + else: + await ctx.send("`EN0006`: Number input error") + return + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", num): + num = float(num.replace(",", "")) + else: + await ctx.send("`EN0006`: Number input error") + return + facratio = calculate.facratio(fac, num) + firstfac = calculate.firstfac(fac, facratio[2]) + remain = calculate.produce_remain(fac, facratio[2], num, firstfac[2]) + if "flag" in locals(): num *= {"day": 60*60*24, "hour": 60*60, "minute": 60}.get(flag, 1) + sol = calculate.product_profit(fac, "all", num) + soland = calculate.product_profitpland(fac, "all", num, firstfac[2]) + s2 = [] + count = 0 + for a in (sol[0], sol[1], soland[1]): + s = [] + if not a == "None": + for b, c in zip(a.keys(), a.values()): + try: + float(c) + c = f"{float(c):,}" + except: + c = c.split(".") + c = f"{int(c[0]):,}.{c[1]}" + if count != 2: s.append(" | ".join(list(("**"+b.capitalize().replace("_", " ")+"**", "$"+c)))) + else: s.append(" | ".join(list(("**"+b.capitalize().replace("_", " ")+"**", "$"+c+"/land")))) + s2.append("\n".join(s)) + else: + s2.append("None") + count+=1 + c, p, pland = s2 + if type(sol[2]) == list: + pfs = sol[2] + for a in list(pfs[0].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf = "**Max** | $"+a+"\n" + for a in list(pfs[1].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf += "**Min** | $"+a + else: + pf = sol[2] + try: + float(pf) + pf = f"{float(pf):,}" + except: + pf = pf.split(".") + pf = f"{int(pf[0]):,}.{pf[1]}" + pf = "$"+pf + if type(soland[2]) == list: + pfs = soland[2] + for a in list(pfs[0].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pfland = "**Max** | $"+a+"/land\n" + for a in list(pfs[1].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pfland += "**Min** | $"+a+"/land" + else: + pfland = soland[2] + try: + float(pfland) + pfland = f"{float(pfland):,}" + except: + pfland = pfland.split(".") + pfland = f"{int(pfland[0]):,}.{pfland[1]}" + pfland = "$"+pfland+"/land" + rem = [] + for a, b in remain[0]: + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + rem.append("**"+a.capitalize()+"** | "+b) + rem.append("") + for a, b in remain[1]: + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + rem.append("**"+a.capitalize()+"** | $"+b) + rem = "\n".join(rem) + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), description="Unit: "+unit.capitalize(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p+"\n\n"+pland, inline=False) + embed.add_field(name="Profit", value=pf+"\n\n"+pfland, inline=False) + embed.add_field(name="Complete Information", value="Ratio(order follow to above): "+facratio[0]+" "+facratio[1]+"\n\n**First Facility(First Fac)/Require facilities:**\n"+firstfac[0]+"\n"+firstfac[1], inline=False) + embed.add_field(name="Produce Remains", value=rem, inline=False) + embed.add_field(name="Note", value="The result of this command can't get anything of region(s).\nThe **profit** is meaning that if your sourse of the facility is from buying from npc market, then the profit, if you are not buying the sourse from npc market, then the **produces** part.", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + ukwembed = discord.Embed(title="Did you know", color=discord.Colour.darker_gray(), timestamp= datetime.datetime.now()) + ukwembed.add_field(name="_ _", value=you_know.you_know()) + ukwembed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + ukwembed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + msg = await ctx.send(embed=ukwembed) + time.sleep(3) + await msg.edit(embed=embed) + + @commandS101.group(name="suggest", invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["Stable_1_0_1"][1]["suggest"][0]) + async def suggestS101(self, ctx): + command = ctx.message.content.split(" ") + if len(command) == 1: + await ctx.send("Commands:\n`suggest add`\n`suggest edit`\n`suggest vote`\n`suggest info`"+("\n`suggest change`\n`suggest remove`" if [a for a in ctx.author.roles if a.name in ("Owner", "ICP Developer")] else "")) + else: + await ctx.send("Wrong subcommand") + + @suggestS101.command(aliases=als["cogs"]["history"]["history"][1]["Stable_1_0_1"][1]["suggest"][1]["info"]) + async def info(self, ctx, suggest_id:int): + with db.get_connection().cursor() as cursor: + cursor.execute("SELECT * FROM \"BenChueng0422/IdleCorp-Profit\".\"suggestions\" WHERE suggestion_id = {}".format(suggest_id)) + if not cursor: + await ctx.send("`EN0006`: The suggestion id was invalid.") + return + value = dict(zip([a[0] for a in cursor.description], cursor.fetchall()[0])) + embed = discord.Embed(title="Suggestion info", color=discord.Colour.from_rgb(255, 255, 190), description="**{}**".format(len(value["votes"])), timestamp=datetime.datetime.now()) + embed.set_author(name=str(self.bot.get_user(value["user_id"])), icon_url=self.bot.get_user(value["user_id"]).avatar_url) + embed.add_field(name="{} \t\t\t [{}]".format(value["suggestion_id"], value["status"].capitalize().replace("_", " ")), value="{}\n\nSuggestion creator: <@!{}>\nCreated at: {} {}:{}".format(value["suggestions"], value["user_id"], value["date"].date(), value["date"].hour, value["date"].minute)) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @suggestS101.command(aliases=als["cogs"]["history"]["history"][1]["Stable_1_0_1"][1]["updates"]) + async def updates(self, ctx, *, args=None): + def defformver(ver): + if ver == "Alpha.0.2": + formver = "Alpha.1" + elif ver in ("Alpha.0.2.1", "Alpha.0.3.0", "Beta.0.1.0"): + formver = "Alpha.2" + else: + formver = "Alpha.2" + return formver + if args != None: + arg = string_handler.filter(args) + if arg[1]: + await ctx.send("`EN0008`: Argument error: type number") + return + flags = string_handler.flags(arg[0]) + if flags[1]: + await ctx.send("`EN0001`: Flag type error, `--`") + return + if len(flags[0]) > 1: + await ctx.send("`EN0002`: Too many flags") + return + elif len(flags[0]) == 1: + for a in flags[0]: + flag = a + else: + flag = None + if flag != None: + if arg[0].index(flag) > 0: + await ctx.send("`EN0007`: Argument flag error") + return + if flag != None: + flag = flag[2:] + if len(flags[2]) > 1: + await ctx.send("`EN0008`: String") + return + elif len(flags[2]) == 1: + for a in flags[2]: + mores = a + else: + mores = None + if flag == None: + theud = dict([next(reversed(udslist.items()))]) + for a in theud.keys(): + version = a + for a in theud.values(): + ud = a + else: + ud = udslist[flag] + version = flag + if mores != None: + more = mores.split(".") + stuff = [] + for a in more: + stuff.append(a.replace("_", " ")) + # if len(more) == 1: + # for a in more: + # for c, d in als["updates list"]["first"].items(): + # if a in c: + # a = c + # prints = ud[a] + # else: + fn = "" + b = ud + first = als["updates list"]["first"] + second = als["updates list"]["second"] + third = als["updates list"]["third"] + i = 0 + moo = [] + for a in more: + if i == 0: + for c, d in first.items(): + if a in d: + a = c + else: + if a != "plans to update": + for c, d in second.items(): + if a in d: + a = c + else: + for c, d in third.items(): + if a in d: + a = c + if a not in b: + await ctx.send("`EN0004`: The argument is invalid or unexist in this version of update") + b = b[a] + moo.append(a) + i += 1 + more = moo + store = b + nothing = "\n**Nothing to show**" + if not store: + prints = nothing + else: + if type(store) == list: + prints = "\n".join(store) + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + elif type(store) == dict: + noth = 0 + store2 = [] + for a, b in store.items(): + if more[0] == "commands": + if a in ("adds", "changes", "deletes"): + if not b: + prints = nothing + noth = 1 + else: + store2.append("**"+a.capitalize()+":**") + for a, b in b.items(): + if a.istitle(): + store2.append(a+" -- "+b) + else: + store2.append("`"+a+"` -- "+b) + # prints = "\n".join(store) + else: + if a.istitle(): + store2.append(+a+" -- "+b) + else:store2.append("`"+a+"` -- "+b) + elif more[0] == "other": + if b: + store2.append("\""+a+"\" -- "+b) + elif more[0] == "plans to update": + if a in ud["plans to update"].keys(): + if not b: + prints = nothing + noth = 1 + else: + store2.append("**"+a.capitalize()+":**") + for a, b in b.items(): + store2.append("\""+a.capitalize()+"\" -- "+(b if b.startswith("v") else b.capitalize())) + # prints = "\n".join(store) + else: + store2.append("\""+a.capitalize()+"\" -- "+(b if b.startswith("v") else b.capitalize())) + if store2: + prints = "\n".join(store2) + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + elif type(store) == str: + if len(store.split(" ")) == 1: + prints = store.capitalize() + else: + prints = store + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + prints += f"\n\nVersion: **v.{version}**" + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + embed.add_field(name=version+fn, value=prints, inline=False) + else: + formver = defformver(version) + prints = [] + for a, b in ud.items(): + if type(b) == list: + if not b: + continue + if formver == "Alpha.1": + if a == "note": + A1 = "" + else: + A1 = ":" + else: + A1 = ":" + prints.append("**"+a.capitalize()+A1+"**") + for c in b: + prints.append("> "+c) + elif type(b) == dict: + if not next([len(a) for a in b.values()]): continue + prints.append("**"+a.capitalize()+":**") + for c, d in b.items(): + if not d: + continue + if a == "other": + prints.append("> \""+c+"\" -- "+d) + continue + prints.append("> **"+c.capitalize()+":**") + for e, f in d.items(): + if a == "commands": + if a.istitle(): + prints.append("> "+e+" -- "+f) + else: + prints.append("> `"+e+"` -- "+f) + if a == "plans to update": + prints.append("> \""+e+"\" -- "+f.capitalize()) + else: + prints.append(b) + b = [] + for a in prints: + if "{}" in a: + a = a.format(version) + b.append(a) + prints = b + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + if len("\n".join(prints)) > 1000: + a, b = prints[:len(prints)//2], prints[len(prints)//2:] + tlist = (deque(a), deque(b)) + for i in range(2): + while len("\n".join(tlist[i])) > 1000: + if i == 0: tlist[1].appendleft(tlist[0].pop()) + else: tlist[0].append(tlist[1].popleft()) + a, b = tlist + embed.add_field(name=version, value="\n".join(a), inline=False) + embed.add_field(name="_ _", value="\n".join(b), inline=False) + else: + embed.add_field(name=version, value="\n".join(prints), inline=False) + else: + theud = dict([next(reversed(udslist.items()))]) + for a in theud.keys(): + version = a + for a in theud.values(): + ud = a + formver = defformver(version) + prints = [] + for a, b in ud.items(): + if type(b) == list: + if formver == "Alpha.1": + if a == "note": + A1 = "" + else: + A1 = ":" + else: + if not b: + continue + A1 = ":" + prints.append("**"+a.capitalize()+A1+"**") + for c in b: + prints.append("> "+c) + elif type(b) == dict: + if not next((len(a) for a in b.values())): continue + prints.append("**"+a.capitalize()+":**") + for c, d in b.items(): + if not d: + continue + if a == "other": + prints.append("> \""+c+"\" -- "+d) + continue + prints.append("> **"+c.capitalize()+":**") + for e, f in d.items(): + if a == "commands": + if e.istitle(): + prints.append("> "+e+" -- "+f) + else: + prints.append("> `"+e+"` -- "+f) + if a == "plans to update": + prints.append("> \""+e+"\" -- "+f.capitalize()) + else: + prints.append(b) + b = [] + for a in prints: + if "{}" in a: + a = a.format(version) + b.append(a) + prints = b + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + if len("\n".join(prints)) > 1000: + a, b = prints[:len(prints)//2], prints[len(prints)//2:] + tlist = (deque(a), deque(b)) + for i in range(2): + while len("\n".join(tlist[i])) > 1000: + if i == 0: tlist[1].appendleft(tlist[0].pop()) + else: tlist[0].append(tlist[1].popleft()) + a, b = tlist + embed.add_field(name=version, value="\n".join(a), inline=False) + embed.add_field(name="_ _", value="\n".join(b), inline=False) + else: + a = "\n".join(prints) + embed.add_field(name=version, value=a, inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @history.group(invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["Stable_1_0_2"][0]) + async def Stable_1_0_2(self, ctx): + await ctx.send("History: Stable_1_0_2 commands:\n`command`") + + @Stable_1_0_2.group(name="command", invoke_without_command=True, aliases=als["cogs"]["history"]["history"][1]["command"]) + async def commandS102(self, ctx): + await ctx.send("History: Command commands:\n`search`\n`profitcomplete`") + + @commandS102.command(aliases=als["cogs"]["history"]["history"][1]["Stable_1_0_2"][1]["updates"]) + async def updates(self, ctx, *, args=None): + def defformver(ver): + if ver == "Alpha.0.2": + formver = "Alpha.1" + elif ver in ("Alpha.0.2.1", "Alpha.0.3.0", "Beta.0.1.0"): + formver = "Alpha.2" + else: + formver = "Alpha.2" + return formver + if args != None: + arg = string_handler.filter(args) + if arg[1]: + await ctx.send("`EN0008`: Argument error: type number") + return + flags = string_handler.flags(arg[0]) + if flags[1]: + await ctx.send("`EN0001`: Flag type error, `--`") + return + if len(flags[0]) > 1: + await ctx.send("`EN0002`: Too many flags") + return + elif len(flags[0]) == 1: + for a in flags[0]: + flag = a + else: + flag = None + if flag != None: + if arg[0].index(flag) > 0: + await ctx.send("`EN0007`: Argument flag error") + return + if flag != None: + flag = flag[2:] + if len(flags[2]) > 1: + await ctx.send("`EN0008`: String") + return + elif len(flags[2]) == 1: + for a in flags[2]: + mores = a + else: + mores = None + if flag == None: + theud = dict([next(reversed(udslist.items()))]) + for a in theud.keys(): + version = a + for a in theud.values(): + ud = a + else: + ud = udslist[flag] + version = flag + if mores != None: + more = mores.split(".") + stuff = [] + for a in more: + stuff.append(a.replace("_", " ")) + # if len(more) == 1: + # for a in more: + # for c, d in als["updates list"]["first"].items(): + # if a in c: + # a = c + # prints = ud[a] + # else: + fn = "" + b = ud + first = als["updates list"]["first"] + second = als["updates list"]["second"] + third = als["updates list"]["third"] + i = 0 + moo = [] + for a in more: + if i == 0: + for c, d in first.items(): + if a in d: + a = c + else: + if a != "plans to update": + for c, d in second.items(): + if a in d: + a = c + else: + for c, d in third.items(): + if a in d: + a = c + if a not in b: + await ctx.send("`EN0004`: The argument is invalid or unexist in this version of update") + b = b[a] + moo.append(a) + i += 1 + more = moo + store = b + nothing = "\n**Nothing to show**" + if not store: + prints = nothing + else: + if type(store) == list: + prints = "\n".join(store) + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + elif type(store) == dict: + noth = 0 + store2 = [] + for a, b in store.items(): + if more[0] == "commands": + if a in ("adds", "changes", "deletes"): + if not b: + prints = nothing + noth = 1 + else: + store2.append("**"+a.capitalize()+":**") + for a, b in b.items(): + if a.istitle(): + store2.append(a+" -- "+b) + else: + store2.append("`"+a+"` -- "+b) + # prints = "\n".join(store) + else: + if a.istitle(): + store2.append(+a+" -- "+b) + else:store2.append("`"+a+"` -- "+b) + elif more[0] == "other": + if b: + store2.append("\""+a+"\" -- "+b) + elif more[0] == "plans to update": + if a in ud["plans to update"].keys(): + if not b: + prints = nothing + noth = 1 + else: + store2.append("**"+a.capitalize()+":**") + for a, b in b.items(): + store2.append("\""+a.capitalize()+"\" -- "+(b if b.startswith("v") else b.capitalize())) + # prints = "\n".join(store) + else: + store2.append("\""+a.capitalize()+"\" -- "+(b if b.startswith("v") else b.capitalize())) + if store2: + prints = "\n".join(store2) + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + elif type(store) == str: + if len(store.split(" ")) == 1: + prints = store.capitalize() + else: + prints = store + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + prints += f"\n\nVersion: **v.{version}**" + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + embed.add_field(name=version+fn, value=prints, inline=False) + else: + formver = defformver(version) + prints = [] + for a, b in ud.items(): + if type(b) == list: + if not b: + continue + if formver == "Alpha.1": + if a == "note": + A1 = "" + else: + A1 = ":" + else: + A1 = ":" + prints.append("**"+a.capitalize()+A1+"**") + for c in b: + prints.append("> "+c) + elif type(b) == dict: + if not next((len(a) for a in b.values())): continue + prints.append("**"+a.capitalize()+":**") + for c, d in b.items(): + if not d: + continue + if a == "other": + prints.append("> \""+c+"\" -- "+d) + continue + prints.append("> **"+c.capitalize()+":**") + for e, f in d.items(): + if a == "commands": + if a.istitle(): + prints.append("> "+e+" -- "+f) + else: + prints.append("> `"+e+"` -- "+f) + if a == "plans to update": + prints.append("> \""+e+"\" -- "+f.capitalize()) + else: + prints.append(b) + b = [] + for a in prints: + if "{}" in a: + a = a.format(version) + b.append(a) + prints = b + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + if len("\n".join(prints)) > 1000: + a, b = prints[:len(prints)//2], prints[len(prints)//2:] + tlist = (deque(a), deque(b)) + for i in range(2): + while len("\n".join(tlist[i])) > 1000: + if i == 0: tlist[1].appendleft(tlist[0].pop()) + else: tlist[0].append(tlist[1].popleft()) + a, b = tlist + embed.add_field(name=version, value="\n".join(a), inline=False) + embed.add_field(name="_ _", value="\n".join(b), inline=False) + else: + embed.add_field(name=version, value="\n".join(prints), inline=False) + else: + theud = dict([next(reversed(udslist.items()))]) + for a in theud.keys(): + version = a + for a in theud.values(): + ud = a + formver = defformver(version) + prints = [] + for a, b in ud.items(): + if type(b) == list: + if formver == "Alpha.1": + if a == "note": + A1 = "" + else: + A1 = ":" + else: + if not b: + continue + A1 = ":" + prints.append("**"+a.capitalize()+A1+"**") + for c in b: + prints.append("> "+c) + elif type(b) == dict: + if not next((len(a) for a in b.values())): continue + prints.append("**"+a.capitalize()+":**") + for c, d in b.items(): + if not d: + continue + if a == "other": + prints.append("> \""+c+"\" -- "+d) + continue + prints.append("> **"+c.capitalize()+":**") + for e, f in d.items(): + if a == "commands": + if e.istitle(): + prints.append("> "+e+" -- "+f) + else: + prints.append("> `"+e+"` -- "+f) + if a == "plans to update": + prints.append("> \""+e+"\" -- "+f.capitalize()) + else: + prints.append(b) + b = [] + for a in prints: + if "{}" in a: + a = a.format(version) + b.append(a) + prints = b + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + if len("\n".join(prints)) > 1000: + a, b = prints[:len(prints)//2], prints[len(prints)//2:] + tlist = (deque(a), deque(b)) + for i in range(2): + while len("\n".join(tlist[i])) > 1000: + if i == 0: tlist[1].appendleft(tlist[0].pop()) + else: tlist[0].append(tlist[1].popleft()) + a, b = tlist + embed.add_field(name=version, value="\n".join(a), inline=False) + embed.add_field(name="_ _", value="\n".join(b), inline=False) + else: + a = "\n".join(prints) + embed.add_field(name=version, value=a, inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + +def setup(bot): + bot.add_cog(history(bot)) \ No newline at end of file diff --git a/cmds/info.py b/cmds/info.py new file mode 100644 index 0000000..56eceb2 --- /dev/null +++ b/cmds/info.py @@ -0,0 +1,248 @@ +import discord +from discord.ext import commands +import json +import datetime +import asyncio +from cmds.calculate import calculate +import random +from pathlib import Path + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) +with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + +class info(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command(aliases=als["cogs"]["info"]["info"]) + async def info(self, ctx, *, req): + icinfo = icd["info"] + debug = [] + infoals = {} + for a in als["ic"].values(): + infoals.update(a) + for a, b in infoals.items(): + if not b == None and req in b: + debug.append(a) + if len(debug) > 1: + await ctx.send("`EN0401`: Happened an unexpected or imposible thing, E1: Aliases") + return + elif debug: + reqsl, = debug + else: + reqsl = req + reqsl = "_".join(reqsl.split(" ")) + if reqsl.endswith("_u"): reqsl, techlv = reqsl[:-2], 1 + elif reqsl.endswith("_uu"): reqsl, techlv = reqsl[:-3], 2 + else: techlv = 0 + check = [b for a in icinfo.values() for b in a.keys()] + if not reqsl in check: + await ctx.send(f"`EN0004`: Cannot find info of: {req}, check your input") + return + for a in icinfo: + if reqsl in icinfo[a]: + infoclass = a + theinfo = icinfo[infoclass][reqsl] + embed = discord.Embed(title=f"Info -- {infoclass.capitalize()}", color=discord.Colour.greyple(), timestamp= datetime.datetime.now()) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + embed.add_field(name=reqsl.replace("_", " ").capitalize(), value="_ _", inline=False) + ifimg = None + output = [] + if infoclass == "assets": + # output.append("**IdleCorp Info(Examine):**\n"+theinfo["icinfo"]) + stuff = [] + if theinfo["market"] == True: + stuff.append("It's tradable in market") + elif theinfo["market"] == False: + stuff.append("It's not tradable in market") + if theinfo["retail"] == False: + stuff.append("It cannot sold in retail store") + stuff.append("It cannot be scrapped") + else: + stuff.append("It can sold in retail store") + stuff.append("It can be scrapped into {} scraps".format(theinfo["retail"])) + # output.append("\n".join(stuff)) + stuff2 = ["NPC market buy price(if valid): "+str(icd["assets"][reqsl]*2)] + stuff2.append("NPC market sell price: "+str(icd["assets"][reqsl])) + embed.add_field(name="IdleCorp Info(Examine):", value=theinfo["icinfo"]+"\n\n"+"\n".join(stuff)+"\n\n"+"\n".join(stuff2), inline=False) + # output.append("**IdleCorp Wiki:**\n"+theinfo["icwiki"]) + embed.add_field(name="IdleCorp Wiki:", value=theinfo["icwiki"], inline=False) + # output.append("**Wikipedia:**\n"+theinfo["wikipedia"]) + embed.add_field(name="Wikipedia:", value=theinfo["wikipedia"], inline=False) + if theinfo.setdefault("icp"): + embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["assets"]: + await ctx.send("`EN0402`: Cannot find assets -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["assets"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["assets"][reqsl])) + else: output.append("Aliases: None") + stuff = [] + stuff.append(f"\n[IdleCorp Wiki](https://wiki.idlecorp.xyz/index.php/{reqsl})") + if reqsl == "led": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/Light-emitting_diode)") + elif reqsl == "rubber": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/synthetic_rubber)") + elif reqsl == "energy": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/electricity)") + elif reqsl == "lamp": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/light_fixture)") + elif reqsl == "ccd": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/charge-coupled_device)") + elif reqsl == "hq": stuff.append("[Wikipedia](https://en.wikipedia.org/wiki/Headquarters)") + elif theinfo["wikipedia"] != "None": stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + output.append("\n".join(stuff)) + ifimg = rf"images/info/{reqsl}.png" if Path(f"images/info/{reqsl}.png").is_file() else r"images/info/box.png" + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "facilities": + # output.append("**IdleCorp Info(Examine):**\n"+theinfo["icinfo"]) + embed.add_field(name="IdleCorp Info(Examine):", value=theinfo["icinfo"], inline=False) + stuff = [] + for a, b in theinfo["construct"].items(): + if not a == "money": + stuff.append(f"{b:,}"+" **"+a.capitalize()+"**") + else: + stuff.append("$"+f"{b:,}") + # output.append("**Construction materials:**\n"+"\n".join(stuff)) + embed.add_field(name="Construction materials:", value="\n".join(stuff), inline=False) + # output.append("**IdleCorp Wiki:**\n"+theinfo["icwiki"]) + embed.add_field(name="IdleCorp Wiki:", value=theinfo["icwiki"], inline=False) + # output.append("**Wikipedia:**\n"+theinfo["wikipedia"]) + embed.add_field(name="Wikipedia:", value=theinfo["wikipedia"], inline=False) + if reqsl in icd["facilities"]: + stuff = "**Consumes**\n" + facpro = icd["facilities"][reqsl] + stuff += "None\n" if facpro["consumes"] == "None" else "\n".join([f"**{a.capitalize().replace('_', ' ')}** | {b:,}" for a, b in facpro["consumes"].items()])+"\n" + stuff += "**Produces**\n" + stuff += "None\n" if facpro["produces"] == "None" else "\n".join([f"**{a.capitalize().replace('_', ' ')}** | {b:,}" for a, b in facpro["produces"].items()])+"\n" + stuff += "Speed: "+str(icd["facilities"][reqsl]["speed"])+" seconds" + embed.add_field(name="Production:", value=stuff, inline=False) + if theinfo.setdefault("icp"): embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["facilities"]: + await ctx.send("`EN0402`: Cannot find facilities -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["facilities"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["facilities"][reqsl])) + else: output.append("Aliases: None") + if reqsl == "steel_mill": + if random.randint(1, 50) == 1: + output.append("*I always typo this facility as \"still mill\"*") + if reqsl == "furniture_factory": + if random.randint(1, 5) == 1: + output.append("*Why the IdleCorp Wiki page has so many words...*") + if random.randint(1, 10) == 1: + output.append("*Because the IdleCorp Wiki page has too many work, I had to change the layout of all...*") + if reqsl.split("_")[-1] == "factory": + if random.randint(1, 20) == 1: + output.append("*I really want to know who made this facility page...*") + if reqsl == "research_chemical_factory": + if random.randint(1, 3) == 1: + output.append("*Why this facility has so many aliases...*") + stuff = [] + stuff.append(f"\n[IdleCorp Wiki](https://wiki.idlecorp.xyz/index.php/{reqsl})") + if theinfo["wikipedia"] != "None": stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + output.append("\n".join(stuff)) + if Path(f"images/info/{reqsl}.png").is_file(): ifimg = fr"images/info/{reqsl}.png" + elif reqsl.endswith("mine"): ifimg = r"images/info/mine.png" + elif reqsl in ("ccd_factory", "cpu_factory", "cell_phone_factory", "laptop_factory", "digital_camera_factory", "television_factory"): ifimg = "images/info/tech_facility.png" + elif reqsl in ("retail_store", "research_facility", "customer_support_center", "hq"): ifimg = r"images/info/office_building.png" + elif reqsl in ("research_chemical_factory", "prescription_drug_factory"): ifimg = r"images/info/chemical_plant.png" + else: ifimg = r"images/info/facility.png" + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "blueprints": + embed.add_field(name="IdleCorp Info(Examine):", value=theinfo["icinfo"]+"\n\nRarity: {}".format(theinfo["rarity"])+"\n\nAll blueprints **cannot** trade and be sold in the market and the retail stores.", inline=False) + stuff = [] + for a, b in theinfo["require"].items(): + stuff.append(f"{b:,}"+" **"+a.capitalize()+"**") + embed.add_field(name="Requires:", value="\n".join(stuff), inline=False) + embed.add_field(name="IdleCorp Wiki:", value=theinfo["icwiki"], inline=False) + if theinfo.setdefault("icp"): + embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["blueprints"]: + await ctx.send("`EN0402`: Cannot find blueprints -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["blueprints"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["blueprints"][reqsl])) + else: output.append("Aliases: None") + stuff = [] + stuff.append(f"\n[IdleCorp Wiki](https://wiki.idlecorp.xyz/index.php/{reqsl})") + output.append("\n".join(stuff)) + ifimg = r"images/info/blueprint.png" + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "technologies": + stuff = [] + if techlv == 2: + if theinfo["upgrade"]["uu"] == "None": + await ctx.send("`EN0004`: The tech haven't \"uu\" upgrade") + return + stuff.append(theinfo["upgrade"]["uu"]["icinfo"]) + stuff.append("Rarity: "+theinfo["rarity"]) + stuff.append("It can be scrapped into {} scraps".format(theinfo["upgrade"]["uu"]["scrap"])) + stuff.append("\nAll technologies **can** trade and **cannot** be sold in the market and the retail stores respectively.") + elif techlv == 1: + if theinfo["upgrade"]["u"] == "None": + await ctx.send("`EN0004`: The tech haven't \"u\" upgrade") + return + stuff.append(theinfo["upgrade"]["u"]["icinfo"]) + stuff.append("Rarity: "+theinfo["rarity"]) + stuff.append("It can be scrapped into {} scraps".format(theinfo["upgrade"]["u"]["scrap"])) + stuff.append("\nAll technologies **can** trade and **cannot** be sold in the market and the retail stores respectively.") + if theinfo["upgrade"]["uu"] != "None": stuff.append("\nNext upgrade: "+reqsl.replace("_", " ")+"uu") + else: + stuff.append(theinfo["icinfo"]) + stuff.append("\nRarity: "+theinfo["rarity"]) + stuff.append("It can be scrapped into {} scraps".format(theinfo["scrap"])) + stuff.append("\nAll technologies **can** trade and **cannot** be sold in the market and the retail stores respectively.") + if theinfo["upgrade"]["u"] != "None": stuff.append("\nNext upgrade: "+reqsl.replace("_", " ")+"u") + stuff.append("The tech affected on "+theinfo["affect"].capitalize()) + embed.add_field(name="IdleCorp Info(Examine):", value="\n".join(stuff), inline=False) + stuff = "\n".join(["Level {} boost: {}".format(a, theinfo["boost"][a].replace("+", "and")) for a in range(len(theinfo["boost"]))]) + embed.add_field(name="IdleCorp Wiki:", value=theinfo["icwiki"], inline=False) + if theinfo.setdefault("icp"): embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["technologies"]: + await ctx.send("`EN0402`: Cannot find blueprints -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["technologies"][reqsl+("_u" if techlv == 1 else ("_uu" if techlv == 2 else ""))] == None: + output.append("Aliases: "+", ".join(als["ic"]["technologies"][reqsl+("_u" if techlv == 1 else ("_uu" if techlv == 2 else ""))])) + else: output.append("Aliases: None") + stuff = [] + stuff.append(f"\n[IdleCorp Wiki](https://wiki.idlecorp.xyz/index.php/{reqsl})") + if theinfo["wikipedia"] != "None": stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + output.append("\n".join(stuff)) + ifimg = r"images/info/technology.png" + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "services": + embed.add_field(name="IdleCorp Info(Examine):", value=theinfo["icinfo"]+"\nAffect: "+theinfo["effect"]+"\nCost: **${:,}**".format(theinfo["cost"]), inline=False) + if theinfo.setdefault("icp"): embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["services"]: + await ctx.send("`EN0402`: Cannot find services -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["services"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["services"][reqsl])) + else: output.append("Aliases: None") + stuff = [] + if theinfo["wikipedia"] != "None": stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + if stuff: output.append("\n".join(stuff)) + ifimg = r"images/info/crane.png" + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + elif infoclass == "pollicies": + embed.add_field(name="IdleCorp Info(Examine):", value="Affect: "+theinfo["affect"]+"\nCost: {} *Funding points*".format(theinfo["cost"]), inline=False) + if theinfo.setdefault("icp"): embed.add_field(name="IdleCorp Profit:", value=theinfo["icp"], inline=False) + if reqsl not in als["ic"]["services"]: + await ctx.send("`EN0402`: Cannot find services -- {} aliases, an unexpect error".format(reqsl.replace("_", " ").capitalize())) + return + if not als["ic"]["policies"][reqsl] == None: + output.append("Aliases: "+", ".join(als["ic"]["policies"][reqsl])) + else: output.append("Aliases: None") + stuff = [] + if theinfo["wikipedia"] != "None": stuff.append(f"[Wikipedia](https://en.wikipedia.org/wiki/{reqsl})") + if stuff: output.append("\n".join(stuff)) + embed.add_field(name="_ _", value="\n\n".join(output), inline=False) + # embed.add_field(name=reqsl.replace("_", " ").capitalize(), value="\n\n".join(output)) + if ifimg == None: await ctx.send(embed=embed) + else: + ifimg = discord.File(ifimg) + embed.set_thumbnail(url=r"attachment://"+ifimg.filename) + await ctx.send(embed=embed, file=ifimg) + +def setup(bot): + bot.add_cog(info(bot)) \ No newline at end of file diff --git a/cmds/isdigit.py b/cmds/isdigit.py new file mode 100644 index 0000000..a529e4a --- /dev/null +++ b/cmds/isdigit.py @@ -0,0 +1,19 @@ +import discord +from discord.ext import commands +import json +import datetime +import asyncio + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) + +class isdigit(commands.Cog): + def __init__(self, bot): + self.bot = bot + + def isdigit(string): + a = int(''.join(filter(str.isdigit, string))) + return a + +def setup(bot): + bot.add_cog(isdigit(bot)) \ No newline at end of file diff --git a/cmds/main.py b/cmds/main.py new file mode 100644 index 0000000..b87a9c0 --- /dev/null +++ b/cmds/main.py @@ -0,0 +1,26 @@ +import discord +from discord.ext import commands +import json +import datetime +import asyncio + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) + +class main(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command(aliases=als["cogs"]["main"]["send"]) + async def send(self, ctx, channel:discord.TextChannel): + await channel.send("This is Message") + + # @commands.Cog.listener() + # async def on_message(self, message): + # if self.bot.user in message.mentions: + # await message.channel.send(f"The bot prefix is: `{self.bot.command_prefix}`") + +def setup(bot): + bot.add_cog(main(bot)) \ No newline at end of file diff --git a/cmds/member_jnl.py b/cmds/member_jnl.py new file mode 100644 index 0000000..f365a6c --- /dev/null +++ b/cmds/member_jnl.py @@ -0,0 +1,30 @@ +import discord +from discord.ext import commands, tasks +import json +import datetime +import asyncio + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) + +class member_jnl(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.Cog.listener() + async def on_member_join(self, member): + await self.bot.wait_until_ready() + guild = self.bot.get_guild(jdata['guild_id']) + channel = guild.get_channel(801057721205522432) + await channel.send(f"Welcome {member.mention} <:smile:{jdata['guild_id']}>, you can go to <#801060352108134440> to read Rules.") + + #成員退出 + @commands.Cog.listener() + async def on_member_remove(self, member): + await self.bot.wait_until_ready() + guild = self.bot.get_guild(jdata['guild_id']) + channel = guild.get_channel(801057721205522432) + await channel.send(f"**{member}** leaved here(•_•)") + +def setup(bot): + bot.add_cog(member_jnl(bot)) \ No newline at end of file diff --git a/cmds/ncguide.py b/cmds/ncguide.py new file mode 100644 index 0000000..066bd67 --- /dev/null +++ b/cmds/ncguide.py @@ -0,0 +1,96 @@ +from re import template +import discord +from discord.ext import commands +import json +import os +import datetime +import asyncio +import random + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) +with open("newcomerguide.json", mode="r", encoding="utf8") as f: + ncgl = json.load(f) + +class ncguide(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command(aliases=als["cogs"]["ncguide"]["ncguide"]) + async def ncguide(self, ctx, *, parts=""): + temp_ver = "1.0" + if not parts: + res = [] + for a in ncgl["guide"][0]["pages"]: + res += a["content"]+["~~**--------------------------------------------------------**~~"] + if a["name"] == "thanks": + res.pop() + length = 0 + b = [] + c = [] + for a in res: + if length+len(a)>1000: + b.append("\n".join(c)) + c = [] + length = 0 + c.append(a) + length += len(a)+2 + b.append("\n".join(c)) + res = b + if sum([len(a) for a in res])>6000: embed = discord.Embed(title="New comer guide", color=discord.Colour.from_rgb(200, 225, 255), description="Structure&template version: {}&{}\nVersion: {}".format(ncgl["guide"][0]["structure_version"], temp_ver, ncgl["guide"][0]["version"])) + else: embed = discord.Embed(title="New comer guide", color=discord.Colour.from_rgb(200, 225, 255), description="Structure&template version: {}&{}\nVersion: {}".format(ncgl["guide"][0]["structure_version"], temp_ver, ncgl["guide"][0]["version"]), timestamp=datetime.datetime.now()) + embeds = [embed] + ind = 1 + for a in res: + print(embeds, a) + embeds[-1].add_field(name="_ _", value=a, inline=False) + if ind%6 == 0 and len(res[ind:])>0: + if len(res[ind:])>6: embeds.append(discord.Embed(color=discord.Colour.from_rgb(200, 225, 255))) + else: embeds.append(discord.Embed(color=discord.Colour.from_rgb(200, 225, 255), timestamp=datetime.datetime.now())) + ind += 1 + print(embeds) + embeds[-1].set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + for a in embeds: + await ctx.send(embed=a) + return + elif parts in ("versions", "vers"): + await ctx.send("Valid guide versions:\n{}".format("\n".join(["`{}`".format(a["version"]) for a in ncgl["guide"]]))) + return + arg = parts.lower() + for a, b in ((".", ""), ("fac", "facilities"), ("&", "and"), (" n ", " and "), ("prod", "production"), ("pro", "production"), ("trade", "trading"), ("mk", "market"), ("res", "research"), ("tech", "technology"), ("reg", "region"), ("log", "logistics"), ("mod", "modifiers"), ("ser", "services"), ("sv", "services"), ("ric", "reincorporation"), ("ri", "reincorporation"), ("reincorp", "reincorporation"), ("misc", "miscellaneous")): + arg = arg.replace(a, b) + alsche = {"i": "intro", "it": "intro", "a": "assets", "f and p": "facilities and production", "t and m": "trading and market", "r and t": "research and technology", "r and l": "region and logistics", "m and s": "modifiers and services", "r and m": "reincorporation and miscellaneous", "t": "thanks", "thx": "thanks", "end": "thanks"} + if arg in alsche: arg = alsche[arg] + a = [] + for b in alsche.values(): a += b.split() + if arg in a: + for a, b in alsche.items(): + if arg in b: arg = b + if arg not in [a["name"] for a in ncgl["guide"][0]["pages"]]: + await ctx.send("`EN0004`: The part \"{}\" was invalid.".format(parts)) + return + guidev = ncgl["guide"][0] + embed = discord.Embed(title="New comer guide", description="Structure&template version: {}&{}\nVersion: {}".format(guidev["structure_version"], temp_ver, guidev["version"]), color=discord.Colour.from_rgb(200, 225, 255), timestamp=datetime.datetime.now()) + res = [] + c = [] + length = 0 + for a in next((a["content"] for a in guidev["pages"] if a["name"] == arg)): + if length+len(a)>1000: + res.append("\n".join(c)) + c = [] + length = 0 + c.append(a) + length += len(a)+2 + res.append("\n".join(c)) + for a in range(len(res)): + if not a: + embed.add_field(name=arg.capitalize(), value=res[a], inline=False) + continue + embed.add_field(name="_ _", value=res[a], inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + +def setup(bot): + bot.add_cog(ncguide(bot)) \ No newline at end of file diff --git a/cmds/profit.py b/cmds/profit.py new file mode 100644 index 0000000..d9f22e1 --- /dev/null +++ b/cmds/profit.py @@ -0,0 +1,165 @@ +import discord +from discord.ext import commands +import json +import datetime +import asyncio +import os +import sys +from cmds.repeating_decimal_sol import repeating_dec_sol +from cmds.calculate import calculate +from cmds.custom_exception import custom_exception +from cmds.string_handler import string_handler +from cmds.you_know import you_know +import re, time + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) + +class profit(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command(aliases=als["cogs"]["profit"]["profit"]) + async def profit(self, ctx, *, args):#facility, number + correct = string_handler.location(str, int, args, True) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("`EN0005`: Cannot determine arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args, True) + if args[0][0].startswith("--"): + flag, fac = args[0][0].lower()[2:], args[0][1:] + flagals = {"sec": "second", "s": "second", "min": "minute", "m": "minute", "hr": "hour", "h": "hour", "d": "day"} + if flag in flagals: flag = flagals[flag]; unit = flag + elif flag not in flagals.values(): + await ctx.send("`EN0003`: Invalid flag") + return + else: fac = args[0]; unit = "second" + num = args[1] + if num == []: + num = 1 + fac = " ".join(fac).lower() + for a, b in als["ic"]["facilities"].items(): + if b != None: + if fac in b: + fac = a + fac = fac.split(" ") + fac = "_".join(fac).lower() + with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + if not fac in icd["facilities"].keys(): + await ctx.send("`EN0004`: Invalid facility: {}".format(" ".join(args[0]))) + return + if type(num) == list: + for a in num: + num = a + if type(num) == str: + if num.endswith(('k', 'm', 'b')): + a = num[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + tnum = a.replace(',', '') + if num.endswith("k"): + num = float(tnum)*1000 + elif num.endswith("m"): + num = float(tnum)*1000000 + else: + num =float(tnum)*1000000000 + else: + await ctx.send("`EN0006`: Number input error") + return + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", num): + num = float(num.replace(",", "")) + else: + await ctx.send("`EN0006`: Number input error") + return + if "flag" in locals(): num *= {"day": 60*60*24, "hour": 60*60, "minute": 60}.get(flag, 1) + sol = calculate.product_profit(fac, "all", num) + if sol[0] == "None": + cs_pd = "None" + else: + cs_pd = list(sol[0].keys()) + cs_sp = list(sol[0].values()) + if sol[1] != "None:": + pd_pd = list(sol[1].keys()) + pd_sp = list(sol[1].values()) + else: + pd_pd = "None" + s = [] + s2 = [] + if not cs_pd == "None": + for a, b in zip(cs_pd, cs_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", "$"+b)))) + c = "\n".join(s) + else: + c = "None" + if not pd_pd == "None": + for a, b in zip(pd_pd, pd_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s2.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", "$"+b)))) + p = "\n".join(s2) + else: + p = "None" + if type(sol[2]) == list: + pfs = sol[2] + for a in list(pfs[0].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf = "**Max** | $"+a+"\n" + for a in list(pfs[1].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf += "**Min** | $"+a + else: + pf = sol[2] + try: + float(pf) + pf = f"{float(pf):,}" + except: + pf = pf.split(".") + pf = f"{int(pf[0]):,}.{pf[1]}" + pf = "$"+pf + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), description="Unit: "+unit.capitalize(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p, inline=False) + embed.add_field(name="Profit", value=pf, inline=False) + embed.add_field(name="Note", value="The result of this command is for calculation the basic values only, the actual profit may vary.\nThe calculation on **profit** also takes into account the consumption of the facility. While the **produce** section describes the gross profit without taking into account consumption.", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + ukwembed = discord.Embed(title="Did you know", color=discord.Colour.darker_gray(), timestamp= datetime.datetime.now()) + ukwembed.add_field(name="_ _", value=you_know.you_know()) + ukwembed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + ukwembed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + msg = await ctx.send(embed=ukwembed) + time.sleep(3) + await msg.edit(embed=embed) + +def setup(bot): + bot.add_cog(profit(bot)) \ No newline at end of file diff --git a/cmds/profitcomplete.py b/cmds/profitcomplete.py new file mode 100644 index 0000000..6343e89 --- /dev/null +++ b/cmds/profitcomplete.py @@ -0,0 +1,200 @@ +import discord +from discord.ext import commands +import json +import datetime +import asyncio +import os +import sys +from cmds.repeating_decimal_sol import repeating_dec_sol +from cmds.calculate import calculate +from cmds.custom_exception import custom_exception +from cmds.string_handler import string_handler +from cmds.you_know import you_know +import re, time + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) + +class profitcomplete(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command(aliases=als["cogs"]["profitcomplete"]["profitcomplete"]) + async def profitcomplete(self, ctx, *, args):#facility, number + correct = string_handler.location(str, int, args, True) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("`EN0005`: Cannot determine arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args, True) + if args[0][0].startswith("--"): + flag, fac = args[0][0].lower()[2:], args[0][1:] + flagals = {"sec": "second", "s": "second", "min": "minute", "m": "minute", "hr": "hour", "h": "hour", "d": "day"} + if flag in flagals: flag = flag; unit = flag + elif flag not in flagals.values(): + await ctx.send("`EN0003`: Invalid flag") + return + else: fac = args[0]; unit = "second" + num = args[1] + if num == []: + num = 1 + fac = " ".join(fac).lower() + for a, b in als["ic"]["facilities"].items(): + if b != None: + if fac in b: + fac = a + fac = fac.split(" ") + fac = "_".join(fac).lower() + with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + if not fac in icd["facilities"].keys(): + await ctx.send("`EN0004`: Invalid facility: {}".format(" ".join(args[0]))) + return + if type(num) == list: + for a in num: + num = a + if type(num) == str: + if num.endswith(('k', 'm', 'b')): + a = num[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + tnum = a.replace(',', '') + if num.endswith("k"): + num = float(tnum)*1000 + elif num.endswith("m"): + num = float(tnum)*1000000 + else: + num =float(tnum)*1000000000 + else: + await ctx.send("`EN0006`: Number input error") + return + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", num): + num = float(num.replace(",", "")) + else: + await ctx.send("`EN0006`: Number input error") + return + facratio = calculate.facratio(fac, num) + firstfac = calculate.firstfac(fac, facratio[2]) + remain = calculate.produce_remain(fac, facratio[2], num, firstfac[2]) + if "flag" in locals(): num *= {"day": 60*60*24, "hour": 60*60, "minute": 60}.get(flag, 1) + sol = calculate.product_profit(fac, "all", num) + soland = calculate.product_profitpland(fac, "all", num, firstfac[2]) + s2 = [] + count = 0 + for a in (sol[0], sol[1], soland[1]): + s = [] + if not a == "None": + for b, c in zip(a.keys(), a.values()): + try: + float(c) + c = f"{float(c):,}" + except: + c = c.split(".") + c = f"{int(c[0]):,}.{c[1]}" + if count != 2: s.append(" | ".join(list(("**"+b.capitalize().replace("_", " ")+"**", "$"+c)))) + else: s.append(" | ".join(list(("**"+b.capitalize().replace("_", " ")+"**", "$"+c+"/land")))) + s2.append("\n".join(s)) + else: + s2.append("None") + count+=1 + c, p, pland = s2 + if type(sol[2]) == list: + pfs = sol[2] + for a in list(pfs[0].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf = "**Max** | $"+a+"\n" + for a in list(pfs[1].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pf += "**Min** | $"+a + else: + pf = sol[2] + try: + float(pf) + pf = f"{float(pf):,}" + except: + pf = pf.split(".") + pf = f"{int(pf[0]):,}.{pf[1]}" + pf = "$"+pf + if type(soland[2]) == list: + pfs = soland[2] + for a in list(pfs[0].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pfland = "**Max** | $"+a+"/land\n" + for a in list(pfs[1].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + pfland += "**Min** | $"+a+"/land" + else: + pfland = soland[2] + try: + float(pfland) + pfland = f"{float(pfland):,}" + except: + pfland = pfland.split(".") + pfland = f"{int(pfland[0]):,}.{pfland[1]}" + pfland = "$"+pfland+"/land" + rem = [] + for a, b in remain[0]: + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + rem.append("**"+a.capitalize()+"** | "+b) + rem.append("") + for a, b in remain[1]: + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + rem.append("**"+a.capitalize()+"** | $"+b) + rem = "\n".join(rem) + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), description="Unit: "+unit.capitalize(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p+"\n\n"+pland, inline=False) + embed.add_field(name="Profit", value=pf+"\n\n"+pfland, inline=False) + embed.add_field(name="Complete Information", value="Ratio(order follow to above): "+facratio[0]+" "+facratio[1]+"\n\n**First Facility(First Fac)/Require facilities:**\n"+firstfac[0]+"\n"+firstfac[1], inline=False) + embed.add_field(name="Produce Remains", value=rem, inline=False) + embed.add_field(name="Note", value="The result of this command is for calculation the basic values only, the actual profit may vary.\nThe calculation on **profit** also takes into account the consumption of the facility. While the **produce** section describes the gross profit without taking into account consumption.", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + ukwembed = discord.Embed(title="Did you know", color=discord.Colour.darker_gray(), timestamp= datetime.datetime.now()) + ukwembed.add_field(name="_ _", value=you_know.you_know()) + ukwembed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + ukwembed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + msg = await ctx.send(embed=ukwembed) + time.sleep(3) + await msg.edit(embed=embed) + +def setup(bot): + bot.add_cog(profitcomplete(bot)) \ No newline at end of file diff --git a/cmds/profitfileexport.py b/cmds/profitfileexport.py new file mode 100644 index 0000000..cc5e0f4 --- /dev/null +++ b/cmds/profitfileexport.py @@ -0,0 +1,360 @@ +import discord +from discord.ext import commands +import json +import datetime +import asyncio +import os, io, pathlib +import sys +from cmds.repeating_decimal_sol import repeating_dec_sol +from cmds.calculate import calculate +from cmds.custom_exception import custom_exception +from cmds.string_handler import string_handler +from cmds.you_know import you_know +import re, time +import zipfile + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) +with open("profitfiledata.json", mode="r", encoding="utf8") as f: + pffdt = json.load(f) + +class profitfileexport(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command(aliases=als["cogs"]["profitfileexport"]["profitfileexport"]) + async def profitfileexport(self, ctx, *, args=""): + args = args.split(" ") + theals = {"sec": "second", "s": "second", "min": "minute", "m": "minute", "hr": "hour", "h": "hour", "d": "day"} + flags = [a for a in args if a.startswith("--")] + oriargs = args + args = list(set(args)-set(flags)) + comp = emb = pastver = False + if "--zip" in flags: + if oriargs.index("--zip") != 0: + await ctx.send("`EN0007`: The position of flag is invalid") + return + comp = True + flags.remove("--zip") + if "--embed" in flags: + if oriargs.index("--embed") != 0: + await ctx.send("`EN0007`: The position of flag is invalid") + return + emb = True + flags.remove("--embed") + if "--Beta" in flags: + if (oriargs.index("--Beta") != 0) and (oriargs.index("--Beta") != 1 and len([a for a in oriargs if a.startswith("--")]) != 2): + await ctx.send("`EN0007`: The position of flag is invalid") + return + pastver = True + flags.remove("--Beta") + if len(flags) > 0: + await ctx.send("`EN0003`: Invalid flag detected") + return + if len(args) > 2: + await ctx.send("`EN0006`: Too many arguments") + return + t = 0 + if not args: + arg = "" + else: + arg, = args + for a in [arg]: + if pastver: + pasts = [("1.0" if a[8:]=="p" else a[10:]) for a in os.listdir(r"icpfiles/Ori-files")] + if a in pasts: + if comp: + resf = discord.File(r"icpfiles/RARs/"+os.listdir(r"icpfiles/RARs")[pasts.index(a)]) + else: + resf = discord.File(r"icpfiles/Ori-files/"+os.listdir(r"icpfiles/Ori-files")[pasts.index(a)]+r"/profit.txt") + await ctx.send("Version: v.Beta."+a, file=resf) + return + elif not a: + if comp: resf = discord.File(r"icpfiles/RARs/"+os.listdir(r"icpfiles/RARs")[-1]) + else: resf = discord.File(r"icpfiles/Ori-files/"+os.listdir(r"icpfiles/Ori-files")[-1]+r"/profit.txt") + await ctx.send("Version: v.Beta."+pasts[-1], file=resf) + return + else: + await ctx.send("`EN0004`: Invalid Beta version") + return + else: + if a in pffdt: ver = a + else: ver = list(pffdt.keys())[-1] + t+=1 + if arg: + if arg not in list(theals.keys())+list(theals.values()): + await ctx.send("`EN0004`: Invalid argument detected") + return + if arg in theals.values(): unit = arg + elif arg in theals: unit = theals[arg] + else: + await ctx.send("`EN0003`: Invalid flag") + return + else: unit = "second" + with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + result = [] + num = {"day": 60*60*24, "hour": 60*60, "minute": 60}.get(unit, 1) + for fac in icd["facilities"]: + facratio = calculate.facratio(fac) + if emb: firstfac = calculate.firstfac(fac, facratio[2]) + else: firstfac = calculate.firstfac(fac, facratio[2], True) + remain = calculate.produce_remain(fac, facratio[2], 1, firstfac[2]) + sol = calculate.product_profit(fac, "all", num) + soland = calculate.product_profitpland(fac, "all", num, firstfac[2]) + if type(icd["facilities"][fac]["speed"]) == list or fac == "car_factory": + print(("facratio", facratio), ("firstfac", firstfac), ("remain", remain), ("sol", sol), ("soland", soland), sep="\n\n") + s2 = [] + count = 0 + for a in (sol[0], sol[1], soland[1]): + s = [] + if not a == "None": + for b, c in zip(a.keys(), a.values()): + try: + float(c) + c = f"{float(c):,}" + except: + c = c.split(".") + c = f"{int(c[0]):,}.{c[1]}" + if emb: + if count != 2: s.append(" | ".join(list(("> **"+b.capitalize().replace("_", " ")+"**", "$"+c)))) + else: s.append(" | ".join(list(("**"+b.capitalize().replace("_", " ")+"**", "$"+c+"/land")))) + else: + if count != 2: s.append(" | ".join(list(("| "+b.capitalize().replace("_", " "), "$"+c)))) + else: s.append(" | ".join(list(("| "+b.capitalize().replace("_", " "), "$"+c+"/land")))) + s2.append("\n".join(s)) + else: + if emb:s2.append("> None") + else: s2.append("| None") + count+=1 + c, p, pland = s2 + if type(sol[2]) == list: + pfs = sol[2] + for a in list(pfs[0].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + if emb: pf = "> **Max** | $"+a+"\n" + else: pf = "| Max | $"+a+"\n" + for a in list(pfs[1].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + if emb: pf += "> **Min** | $"+a + else: pf += "| Min | $"+a + else: + pf = sol[2] + try: + float(pf) + pf = f"{float(pf):,}" + except: + pf = pf.split(".") + pf = f"{int(pf[0]):,}.{pf[1]}" + if emb: pf = "> $"+pf + else: pf = "| $"+pf + if type(soland[2]) == list: + pfs = soland[2] + for a in list(pfs[0].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + if emb: pfland = "> **Max** | $"+a+"\n" + else: pfland = "| Max | $"+a+"\n" + for a in list(pfs[1].values()): + try: + float(a) + a = f"{float(a):,}" + except: + a = a.split(".") + a = f"{int(a[0]):,}.{a[1]}" + if emb: pfland += "> **Min** | $"+a + else: pfland += "| Min | $"+a + else: + pfland = soland[2] + try: + float(pfland) + pfland = f"{float(pfland):,}" + except: + pfland = pfland.split(".") + pfland = f"{int(pfland[0]):,}.{pfland[1]}" + if emb: pfland = "> $"+pfland+"/land" + else: pfland = "| $"+pfland+"/land" + rem = [] + for a, b in remain[0]: + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + if emb: rem.append("> **"+a.capitalize()+"** | "+b) + else: rem.append("| "+a.capitalize()+" | "+b) + if emb: rem.append("> ") + else: rem.append("------") + for a, b in remain[1]: + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + if emb: rem.append("> **"+a.capitalize()+"** | $"+b) + else: rem.append("| "+a.capitalize()+" | $"+b) + rem = "\n".join(rem) + if type(icd["facilities"][fac]["speed"])==list: + sp = [str(a)+"s" for a in icd["facilities"][fac]["speed"]] + sp.insert(1, "to") + if emb: result.append([fac.capitalize().replace("_", " "), "**Construct materials**\n"+"\n".join([f"> **{a.capitalize().replace('_', ' ')}** | {b}" if a != "money" else f"> ${b}" for a, b in icd["info"]["facilities"][fac]["construct"].items()])+"\n\n**Consumes**\n"+c+"\n**Produces**\n"+p+"\n\n**Profit**\n"+pf+"\n\nRatio(order follow to above): "+facratio[0]+" "+facratio[1]+"\nFirst Facility(First Fac)\n"+firstfac[0]+"\n"+firstfac[1]+"\n**Produce Remains**\n"+rem+"\n"+"Speed: "+(" ".join(sp) if type(icd["facilities"][fac]["speed"])==list else str(icd["facilities"][fac]["speed"])+"s")+"\n\n\n_ _"]) + else: result.append(fac.capitalize().replace("_", " ")+"\nConstruct materials\n"+"\n".join([f"| {a.capitalize().replace('_', ' ')} | {b}" if a != "money" else f"| ${b}" for a, b in icd["info"]["facilities"][fac]["construct"].items()])+"\nConsumes\n"+c+"\nProduces\n"+p+"\nProfit\n"+pf+"\nRatio(order follow to above): "+facratio[0]+" "+facratio[1]+"\nFirst Facility(First Fac)\n"+firstfac[0]+"\n"+firstfac[1]+"\nProduce Remains\n------\n"+rem+"\n------\n"+"Speed: "+(" ".join(sp) if type(icd["facilities"][fac]["speed"])==list else str(icd["facilities"][fac]["speed"])+"s")) + # embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), description="Unit: "+unit.capitalize(), timestamp= datetime.datetime.now()) + # embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + # embed.add_field(name="Consumes", value=c, inline=False) + # embed.add_field(name="Produces", value=p+"\n\n"+pland, inline=False) + # embed.add_field(name="Profit", value=pf+"\n\n"+pfland, inline=False) + # embed.add_field(name="Complete Information", value="Ratio(order follow to above): "+facratio[0]+" "+facratio[1]+"\n\n**First Facility(First Fac)/Require facilities:**\n"+firstfac[0]+"\n"+firstfac[1], inline=False) + # embed.add_field(name="Produce Remains", value=rem, inline=False) + # embed.add_field(name="Note", value="The result of this command can't get anything of region(s).\nThe **profit** is meaning that if your sourse of the facility is from buying from npc market, then the profit, if you are not buying the sourse from npc market, then the **produces** part.", inline=False) + # embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + if not emb: + ver = list(pffdt)[-1] + fdt = io.BytesIO(("Unit: "+unit.capitalize()+"\n\n"+"\n\n".join(result)).encode()) + if comp: + faclist = [] + for a in icd["facilities"]: + stuff = [] + i = [0, 0] + for b, c in icd["facilities"][a].items(): + if b in ("consumes", "produces"): + e = ["consumes", "produces"].index(b) + if i[e]==0: + stuff.append(b.capitalize()) + if c == "None": + stuff.append("| None") + else: + for d, f in c.items(): + if d == "money": + stuff.append(f"| ${f}") + stuff.append("| {} | {}".format(d.capitalize().replace("_", " "), f)) + if b == "consumes": i[0]+=1 + else: i[1]+=1 + if type(icd["facilities"][a]["speed"]) == list: + speed = [] + for b in icd["facilities"][a]["speed"]: + b = string_handler.numberToBase(b, 60) + if len(b)<2: b.insert(0, 0) + speed.append(":".join(["0"+str(a) if len(str(a))<2 else str(a) for a in b])) + speed.insert(1, "to") + speed = " ".join(speed) + else: + b = string_handler.numberToBase(icd["facilities"][a]["speed"], 60) + if len(b)<2: b.insert(0, 0) + speed = ":".join(["0"+str(a) if len(str(a))<2 else str(a) for a in b]) + faclist.append(a.capitalize().replace("_", " ")+"\nConstruct materials\n"+"\n".join([f"| {a.capitalize().replace('_', ' ')} | {b}" if a != "money" else f"| ${b}" for a, b in icd["info"]["facilities"][a]["construct"].items()])+"\n"+"\n".join(stuff)+"\nEvery "+speed) + facspeed = [] + num = {"day": 60*60*24, "hour": 60*60, "minute": 60}.get(unit, 1) + for f in icd["facilities"]: + sol = calculate.product_speed(f, "all", num) + if sol[0] == "None": + cs_pd = "None" + else: + cs_pd = list(sol[0].keys()) + cs_sp = list(sol[0].values()) + if sol[1] != "None:": + pd_pd = list(sol[1].keys()) + pd_sp = list(sol[1].values()) + else: + pd_pd = "None" + s = [] + s2 = [] + stuff = ["Consumes"] + if not cs_pd == "None": + for a, b in zip(cs_pd, cs_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s.append("| "+" | ".join((a.capitalize().replace("_", " "), b))) + stuff.append("\n".join(s)) + else: + stuff.append("| None") + stuff.append("Produces") + if not pd_pd == "None": + for a, b in zip(pd_pd, pd_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s2.append("| "+" | ".join((a.capitalize().replace("_", " "), b))) + stuff.append("\n".join(s2)) + else: + stuff.append("| None") + if type(icd["facilities"][f]["speed"]) == list: + speed = [] + for b in icd["facilities"][f]["speed"]: + b = string_handler.numberToBase(b, 60) + if len(b)<2: b.insert(0, 0) + speed.append(":".join(["0"+str(a) if len(str(a))<2 else str(a) for a in b])) + speed.insert(1, "to") + speed = " ".join(speed) + else: + b = string_handler.numberToBase(icd["facilities"][f]["speed"], 60) + if len(b)<2: b.insert(0, 0) + speed = ":".join(["0"+str(a) if len(str(a))<2 else str(a) for a in b]) + facspeed.append(f.capitalize().replace("_", " ")+"\n"+"\n".join(stuff)+"\nEvery "+speed) + with io.BytesIO() as buffer: + zf = zipfile.ZipFile(buffer, "x", zipfile.ZIP_DEFLATED, compresslevel=9) + zf.writestr("profit.txt", fdt.getvalue()) + zf.writestr("facility_list.txt", io.BytesIO("\n\n".join(faclist).encode()).getvalue()) + zf.writestr("production_speed.txt", io.BytesIO(("Unit: "+unit.capitalize()+"\n\n"+"\n\n".join(facspeed)).encode()).getvalue()) + for a, b in pffdt[ver].items(): + zf.writestr(a, io.BytesIO("\n".join(b).encode()).getvalue()) + zf.close() + buffer.seek(0) + resf = discord.File(buffer, "IdleCorp Profit.zip") + else: resf = discord.File(fdt, "profit.txt") + await ctx.send(content="Version: v."+ver, file=resf) + else: + embed = [discord.Embed(title="Profit Embed Full")] + check = 0 + for a, b in result: + if check+len(a+b) > 5800: + embed.append(discord.Embed()) + check = 0 + check+=len(a+b) + if len(b)>1024: + b = b.split("\n") + embed[-1].add_field(name=a, value="\n".join(b[:len(b)//2]), inline=False) + embed[-1].add_field(name="_ _", value="\n".join(b[len(b)//2:]), inline=False) + else: + embed[-1].add_field(name=a, value=b, inline=False) + for a in embed: + if not ctx.author.dm_channel: + await ctx.author.create_dm() + await ctx.author.dm_channel.send(embed=a) + await ctx.send("It has sent via your DM") + # ukwembed = discord.Embed(title="Did you know", color=discord.Colour.darker_gray(), timestamp= datetime.datetime.now()) + # ukwembed.add_field(name="_ _", value=you_know.you_know()) + # ukwembed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + # ukwembed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + # msg = await ctx.send(embed=ukwembed) + # time.sleep(3) + # await msg.edit(embed=embed) + # await msg.edit(content="Version:", embed=None, file=resf) + +def setup(bot): + bot.add_cog(profitfileexport(bot)) \ No newline at end of file diff --git a/cmds/repeating_decimal_sol.py b/cmds/repeating_decimal_sol.py new file mode 100644 index 0000000..cb2e612 --- /dev/null +++ b/cmds/repeating_decimal_sol.py @@ -0,0 +1,69 @@ +import discord +from discord.ext import commands, tasks +import json +import datetime +import asyncio +from pathlib import Path + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) + +class repeating_dec_sol(commands.Cog): + def __init__(self, bot): + self.bot = bot + + def repeating_dec_sol(numerator, denominator): + negative = False + if denominator == 0: + return 'Undefined' + if numerator == 0: + return '0' + if numerator*denominator < 0: + negative = True + if numerator % denominator == 0: + return str(numerator/denominator) + + num = abs(numerator) + den = abs(denominator) + + result = "" + result += str(num // den) + result += "." + + quotient_num = [] + while num: + # In case the remainder is equal to zero, there are no repeating + # decimals. Therefore, we don't need to add any parenthesis and we can + # break the while loop and return the result. + remainder = num % den + if remainder == 0: + for i in quotient_num: + result += str(i[-1]) + break + num = remainder*10 + quotient = num // den + + # If the new numerator and quotient are not already in the list, we + # append them to the list. + if [num, quotient] not in quotient_num: + quotient_num.append([num, quotient]) + # If the new numerator and quotient are instead already in the list, we + # break the execution and we prepare to return the final result. + # We take track of the index position, in order to add the parenthesis + # at the output in the right place. + elif [num, quotient] in quotient_num: + index = quotient_num.index([num, quotient]) + for i in quotient_num[:index]: + result += str(i[-1]) + result += "(" + for i in quotient_num[index:]: + result += str(i[-1]) + result += ")" + break + if negative: + if result[:1] == "-": continue#fixed in v.1.0 + result = "-" + result + return result + +def setup(bot): + bot.add_cog(repeating_dec_sol(bot)) \ No newline at end of file diff --git a/cmds/rules.py b/cmds/rules.py new file mode 100644 index 0000000..fe8dbee --- /dev/null +++ b/cmds/rules.py @@ -0,0 +1,132 @@ +import discord +from discord.ext import commands +import json +import datetime +import asyncio +from cmds.calculate import calculate +from cmds.string_handler import string_handler + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) +with open("rules.json", mode="r", encoding="utf8") as f: + rulej = json.load(f) + +class rules(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command(aliases=als["cogs"]["rules"]["rules"]) + async def rules(self, ctx, *, args=None): + if args != None: + arg = string_handler.filter(args) + check = 1 + for a in arg: + if a == []: + check = 0 + if check == 1: + check = string_handler.location(str, int, args) + if check != True: + await ctx.send("`EN0007`: Arguments error") + return + else: + if args.isdigit(): + args = int(args) + if arg[1] != []: + if len(arg[1]) > 1: + await ctx.send("`EN0007`: Too much argument: type number") + return + for a in arg[1]: + num = a + else: + num = None + if arg[0] != []: + if len(arg[0]) > 1: + await ctx.send("`EN0007`: Too much argument: type string") + return + for a in arg[0]: + if a.startswith("--"): + flag = a[2:] + else: + await ctx.send("`EN0007`: Argument error: type string") + return + else: + flag = None + if flag == None: + rule = dict([next(reversed(rulej.items()))]) + for a in rule.values(): + ru = a + for a in rule.keys(): + version = a + else: + ru = rulej[flag] + version = flag + if num == None: + prints = [] + for a, b in ru.items(): + if a == "end": + for c in b: + prints.append(c) + continue + if type(b) == list: + count = 1 + for c in b: + if a == "head_notes": + prints.append("*"+c+"*") + elif a == "rules": + prints.append(f"**{count}.**"+c) + count += 1 + else: + prints.append(c) + else: + prints.append(b) + #Version (END) + prints.append(f"\n**v.{version}** of the server rules") + half = int(len(prints)/2) + a = prints[:half] + b = prints[half:] + embed = discord.Embed(title="Server Rules", color=discord.Colour.orange(), timestamp= datetime.datetime.now()) + embed.add_field(name="_ _", value="\n".join(a), inline=False) + embed.add_field(name="_ _", value="\n".join(b), inline=False) + else: + rule = f"**{num}.**"+ru["rules"][num-1] + embed = discord.Embed(title="Server Rules", description=rule+f"\n\nv.{version}", color=discord.Colour.orange(), timestamp= datetime.datetime.now()) + # embed.add_field(name="Server Rules", value=rule+f"\n\nv.{version}", inline=False) + else: + ru = dict([next(reversed(rulej.items()))]) + for a in ru.values(): + rule = a + for a in ru.keys(): + version = a + prints = [] + for a, b in rule.items(): + if a == "end": + for c in b: + prints.append(c) + continue + if type(b) == list: + count = 1 + for c in b: + if a == "head_notes": + prints.append("*"+c+"*") + elif a == "rules": + prints.append(f"**{count}.**"+c) + count += 1 + else: + prints.append(c) + else: + prints.append(b) + #Version (END) + prints.append(f"\n**v.{version}** of the server rules") + half = int(len(prints)/2) + a = prints[:half] + b = prints[half:] + embed = discord.Embed(title="Server Rules", color=discord.Colour.orange(), timestamp= datetime.datetime.now()) + embed.add_field(name="_ _", value="\n".join(a), inline=False) + embed.add_field(name="_ _", value="\n".join(b), inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + +def setup(bot): + bot.add_cog(rules(bot)) \ No newline at end of file diff --git a/cmds/search.py b/cmds/search.py new file mode 100644 index 0000000..556d0a6 --- /dev/null +++ b/cmds/search.py @@ -0,0 +1,84 @@ +import discord +from discord.ext import commands +import json +import datetime +import asyncio +from cmds.calculate import calculate +from cmds.string_handler import string_handler +import re +from PIL import Image, ImageColor, ImageDraw, ImageFont +import textwrap +import random +import os, io +import time + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) + +class search(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command(aliases=als["cogs"]["search"]["search"]) + async def search(self, ctx, *, ctn=None): + if ctn == None: + await ctx.send("What you want to search?Just need to enter something.") + else: + if ctn.split()[0] in ("--April", "--20210401", "--april", "--aprilfool"): + datetimedate = datetime.datetime(2021, 4, 1) + ctn = " ".join(ctn.split(" ")[1:]) + else: + datetimedate = datetime.datetime.now().date() + embed = discord.Embed(title="Search", color=discord.Color.from_rgb(int("35", 16), int("12", 16), int("38", 16)), timestamp= datetime.datetime.now()) + imgname = "" + if str(datetimedate.date()) == "2021-04-01": + if ctn == "when": + embed.add_field(name="Result", value="ERROR: Time collection! Pleace make sure you have time to do this and try again") + img = Image.new("1", (100, 100), 255) + font = ImageFont.FreeTypeFont('Arial.ttf', size=20) + ImageDraw.Draw(img).text((50, 50), "Search", anchor="mm", fill="black", font=font, align="center") + elif re.search(r'^#(?:[0-9a-fA-F]{3}){1,2}$', ctn.split(" ")[0]) or re.search(r'^(?:[0-9a-fA-F]{3}){1,2}$', ctn): + clr = ctn.split(" ")[0] + ctn = " ".join(ctn.split(" ")[1:]) + if clr.startswith("#"): + img = Image.new("RGB", (100,100), clr) + embed.add_field(name="Color", value=clr) + if ctn: + font = ImageFont.FreeTypeFont('Arial.ttf', size=15) + ImageDraw.Draw(img).multiline_text((50, 50), "\n".join(textwrap.wrap(ctn, 7)), anchor="mm", fill="black", font=font, align="center") + else: + img = Image.new("RGB", (100,100), "#"+clr) + embed.add_field(name="Color", value="#"+clr) + if ctn: + font = ImageFont.FreeTypeFont('Arial.ttf', size=15) + ImageDraw.Draw(img).multiline_text((50, 50), "\n".join(textwrap.wrap(ctn, 7)), anchor="mm", fill="black", font=font, align="center") + elif ctn == "end": + embed.add_field(name="Result", value="When UTC...") + img = Image.new("1", (100, 100), 255) + font = ImageFont.FreeTypeFont('Arial.ttf', size=20) + ImageDraw.Draw(img).text((50, 50), "Search", anchor="mm", fill="black", font=font, align="center") + else: + errors = ["Watch your self 3 second then close your eyes 1 second, search again", + "Internet error, pleace reconnect your internet", + "You are too alone, try again", + "Your brain is going to explode! try again!", + "Your pc is getting hacked, make sure your pc is right then try again", + "Your pc will EXPLODE!!"] + embed.add_field(name="Result", value="Error:\n"+random.choice(errors)) + img = Image.new("1", (100, 100), 255) + font = ImageFont.FreeTypeFont('Arial.ttf', size=20) + ImageDraw.Draw(img).text((50, 50), "Search", anchor="mm", fill="black", font=font, align="center") + with io.BytesIO() as buffer: + img.save(buffer, format='png') + buffer.seek(0) + imgg = discord.File(buffer, "search.png") + embed.set_thumbnail(url="attachment://"+imgg.filename) + await ctx.send(file=imgg, embed=embed) + else: + embed.add_field(name="Result", value=ctn, inline=False) + await ctx.send(embed=embed) + +def setup(bot): + bot.add_cog(search(bot)) \ No newline at end of file diff --git a/cmds/speed.py b/cmds/speed.py new file mode 100644 index 0000000..259cc5d --- /dev/null +++ b/cmds/speed.py @@ -0,0 +1,136 @@ +import discord +from discord.ext import commands, tasks +import json +import datetime +import asyncio +from pathlib import Path +from cmds.string_handler import string_handler +from cmds.custom_exception import custom_exception +from cmds.calculate import calculate +from cmds.you_know import you_know +import re, time + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) + +class speed(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command(aliases=als["cogs"]["speed"]["speed"]) + async def speed(self, ctx, *, args):#facilities, number + correct = string_handler.location(str, int, args, True) + if correct == True: + pass + elif correct[0] == False: + if correct[1][0] == "int": + raise custom_exception.MissingRequiredArgument("number") + await ctx.send("`EN0007`: Can't determind arguments") + return + elif correct == "int": + raise custom_exception.MissingRequiredArgument("number") + args = string_handler.filter(args, True) + print(args) + if args[0][0].startswith("--"): + flag, fac = args[0][0].lower()[2:], args[0][1:] + flagals = {"sec": "second", "s": "second", "min": "minute", "m": "minute", "hr": "hour", "h": "hour", "d": "day"} + if flag in flagals: flag = flagals[flag]; unit = flag + elif flag not in flagals.values(): + await ctx.send("`EN0003`: Invalid flag") + return + else: fac = args[0]; unit = "second" + num = args[1] + if num == []: + num = 1 + fac = " ".join(fac).lower() + for a, b in als["ic"]["facilities"].items(): + if b != None: + if fac in b: + fac = a + fac = fac.split(" ") + fac = "_".join(fac).lower() + with open("icdetail.json", mode="r", encoding="utf8") as f: + icd = json.load(f) + if not fac in icd["facilities"].keys(): + await ctx.send("`EN0004`: Cannot find facility: {}".format(" ".join(args[0]))) + return + if type(num) == list: + for a in num: + num = a + if type(num) == str: + if num.endswith(('k', 'm', 'b')): + a = num[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + tnum = a.replace(',', '') + if num.endswith("k"): + num = float(tnum)*1000 + elif num.endswith("m"): + num = float(tnum)*1000000 + else: + num =float(tnum)*1000000000 + else: + await ctx.send("`EN0006`: Number input error") + return + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", num): + num = float(num.replace(",", "")) + else: + await ctx.send("`EN0006`: Number input error") + return + if "flag" in locals(): num *= {"day": 60*60*24, "hour": 60*60, "minute": 60}.get(flag, 1) + sol = calculate.product_speed(fac, "all", num) + if sol[0] == "None": + cs_pd = "None" + else: + cs_pd = list(sol[0].keys()) + cs_sp = list(sol[0].values()) + if sol[1] != "None:": + pd_pd = list(sol[1].keys()) + pd_sp = list(sol[1].values()) + else: + pd_pd = "None" + s = [] + s2 = [] + if not cs_pd == "None": + for a, b in zip(cs_pd, cs_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", b)))) + c = "\n".join(s) + else: + c = "None" + if not pd_pd == "None": + for a, b in zip(pd_pd, pd_sp): + try: + float(b) + b = f"{float(b):,}" + except: + b = b.split(".") + b = f"{int(b[0]):,}.{b[1]}" + s2.append(" | ".join(list(("**"+a.capitalize().replace("_", " ")+"**", b)))) + p = "\n".join(s2) + else: + p = "None" + fac_ = fac.replace("_", " ") + embed = discord.Embed(title=fac_.capitalize(), color=discord.Colour.blue(), description="Unit: "+unit.capitalize(), timestamp= datetime.datetime.now()) + embed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + embed.add_field(name="Consumes", value=c, inline=False) + embed.add_field(name="Produces", value=p, inline=False) + embed.add_field(name="Note", value="The result of this command is for calculation the basic values only, The actual production speeds may vary", inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + ukwembed = discord.Embed(title="Did you know", color=discord.Colour.darker_gray(), timestamp= datetime.datetime.now()) + ukwembed.add_field(name="_ _", value=you_know.you_know()) + ukwembed.set_author(name=self.bot.user.name, icon_url=self.bot.user.avatar_url) + ukwembed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + msg = await ctx.send(embed=ukwembed) + time.sleep(3) + await msg.edit(embed=embed) + +def setup(bot): + bot.add_cog(speed(bot)) \ No newline at end of file diff --git a/cmds/status.py b/cmds/status.py new file mode 100644 index 0000000..8820042 --- /dev/null +++ b/cmds/status.py @@ -0,0 +1,118 @@ +import discord +from discord import embeds +from discord.ext import commands, tasks +import json +import datetime +import asyncio +from pathlib import Path +import bitdotio + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) + +db = bitdotio.bitdotio("83JQ_sPGfbNhEz7Hs4Gwzk4yqQXf") + +class status(commands.Cog): + def __init__(self, bot): + self.bot = bot + self.tasks_status.start() + self.suggestions_status.start() + + @tasks.loop(seconds=20) + async def tasks_status(self): + await self.bot.wait_until_ready() + with db.get_connection().cursor() as cursor: + cursor.execute("SELECT datetime FROM \"BenChueng0422/IdleCorp-Profit\".\"check_update log\" WHERE tables = \'tasks\'") + datacheck = cursor.fetchone()[0] + # execute SQL query using execute() method. + cursor.execute("SELECT * from \"BenChueng0422/IdleCorp-Profit\".\"tasks\"") + # Get the fields name (only once!) + # field_name = [field[0] for field in cursor.description] + # Fetch a single row using fetchone() method. + values = cursor.fetchall() + # create the row dictionary to be able to call row['login'] + date = values[-1][-1] + if date == datacheck: + return + rows = dict(values[:-1]) + # bd.partial_update_column("BenChueng0422", "IdleCorp-Profit", "tasks", "") + # print(bd.list_columns("BenChueng0422", "IdleCorp-Profit", "tasks")) + # print(bd.retrieve_column("BenChueng0422", "IdleCorp-Profit", "tasks", "on_work")) + # guild = self.bot.get_guild(jdata["guild_id"]) + channel = self.bot.get_channel(801052238377648138) + message = await channel.fetch_message(802863649709752340) + # datafile = Path("data.json") + # if datafile.is_file(): + # with open("data.json", mode="r", encoding="utf8") as jf: + # dt = json.load(jf) + # embed = discord.Embed(title="Tasks") + # try: + # dt.get("tasks") + # try: + # dt["tasks"].get("on_work") + # count = 0 + # mark = 0 + # for a, b in dt["tasks"].items(): + # count += 1 + # if not dt["tasks"][a] == []: + # pass + # else: + # mark += 1 + # if mark == count: + # raise + # except: + # raise + # tasks = {} + # for a, b in dt["tasks"].items(): + # if not dt["tasks"][a] == []: + # for b in dt["tasks"][a]: + # tasks[b] = a + # works = {} + # for a, b in tasks.items(): + # works.setdefault(b, []).append(a) + # for a, b in works.items(): + # dd = "\n".join(b) + # embed.add_field(name=a, value=dd, inline=False) + # except: + # embed.add_field(name="None", value="None", inline=False) + embed = discord.Embed(title="Tasks") + for a, b in rows.items(): + if b and len("\n".join(b)): + embed.add_field(name=a, value="\n".join(b), inline=False) + with db.get_connection().cursor() as cursor: + cursor.execute("UPDATE \"BenChueng0422/IdleCorp-Profit\".\"check_update log\" SET datetime = \'{}\' WHERE tables = \'tasks\'".format(date)) + await message.edit(content=None, embed=embed) + + + @tasks.loop(seconds=10) + async def suggestions_status(self): + await self.bot.wait_until_ready() + with db.get_connection().cursor() as cursor: + cursor.execute("SELECT datetime FROM \"BenChueng0422/IdleCorp-Profit\".\"check_update log\" WHERE tables = \'suggestions\'") + date = cursor.fetchone()[0] + cursor.execute("SELECT datetime FROM \"BenChueng0422/IdleCorp-Profit\".\"last_update log\" WHERE tables = \'suggestions\'") + datacheck = cursor.fetchone()[0] + cursor.execute("SELECT * from \"BenChueng0422/IdleCorp-Profit\".\"suggestions\"") + values = cursor.fetchall() + if date == datacheck: + return + value = sorted([dict(zip([a[0] for a in cursor.description], a)) for a in values], key=lambda k: len(k["votes"]), reverse=True) + channel = self.bot.get_channel(856913820978642964) + message = await channel.fetch_message(856914255064203274) + embed = discord.Embed(title="Suggestions") + res = [[]] + ind = 0 + for a in value: + if len("\n".join(res[ind]+["{} [{}] Votes: **{}** -- by: <@!{}>".format(a["suggestion_id"], a["status"].capitalize().replace("_", " "), len(a["votes"]), a["user_id"])]))>1000: + ind += 1 + res.append([]) + if ind>5: break + res[ind].append("{} [{}] Votes: **{}** -- by: <@!{}>".format(a["suggestion_id"], a["status"].capitalize().replace("_", " "), len(a["votes"]), a["user_id"])) + for a in res: + embed.add_field(name="_ _", value="\n".join(a), inline=False) + with db.get_connection().cursor() as cursor: + cursor.execute("UPDATE \"BenChueng0422/IdleCorp-Profit\".\"check_update log\" SET datetime = \'{}\' WHERE tables = \'suggestions\'".format(date)) + await message.edit(content=None, embed=embed) + +def setup(bot): + bot.add_cog(status(bot)) \ No newline at end of file diff --git a/cmds/string_handler.py b/cmds/string_handler.py new file mode 100644 index 0000000..bd9094f --- /dev/null +++ b/cmds/string_handler.py @@ -0,0 +1,128 @@ +import discord +from discord.ext import commands, tasks +import json +import datetime +import asyncio +from pathlib import Path +import re + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) + +class string_handler(commands.Cog): + def __init__(self, bot): + self.bot = bot + + def filter(arg, spec_digit=False): + num = [] + string = [] + for a in arg.split(" "): + if spec_digit == False: + if a.isdigit(): + num.append(int(a)) + else: + string.append(a) + else: + if a.endswith(('k', 'm', 'b')): + ad = a[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", ad): + num.append(a) + else: + string.append(a) + elif re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + num.append(a) + else: + string.append(a) + return [string, num] + + def location(first, second, arg, spec_digit=False): + mark = [] + if first == str: + mark.append("str") + elif first == int: + mark.append("int") + if second == str: + mark.append("str") + elif second == int: + mark.append("int") + if mark[0]==mark[1]: + return None + sec = [] + for a in arg.split(" "): + if len(sec) > 0: + if sec[-1] == "str": + if spec_digit == False: + if not a.isdigit(): + continue + else: + if a.endswith(('k', 'm', 'b')): + ad = a[:-1] + if not re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", ad): + continue + elif not re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + continue + else: + if spec_digit == False: + if a.isdigit(): + continue + else: + if a.endswith(('k', 'm', 'b')): + ad = a[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", ad): + continue + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + continue + if spec_digit == False: + if a.isdigit(): + sec.append("int") + else: + sec.append("str") + else: + if a.endswith(('k', 'm', 'b')): + ad = a[:-1] + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", ad): + sec.append("int") + else: + sec.append("str") + else: + if re.search(r"^(?:[0-9]{1,3})(?:[,][0-9]{3}){1,}(?:[.][0-9]{1,})?$|^(?:[0-9]{1,})(?:[.][0-9]{1,})?$", a): + sec.append("int") + else: + sec.append("str") + if len(sec) == 1: + for a in sec: + return a + if sec == mark: + return True + else: + return [False, sec] + + def flags(arg): + if type(arg) == list: + pass + else: + arg = arg.split() + flags = [] + flags_1 = [] + other = [] + for a in arg: + if a.startswith("--"): + flags.append(a) + elif a.startswith("-"): + flags_1.append(a) + else: + other.append(a) + return [flags, flags_1, other] + + def numberToBase(n, b): + if n == 0: + return [0] + digits = [] + while n: + digits.append(int(n % b)) + n //= b + return digits[::-1] + +def setup(bot): + bot.add_cog(string_handler(bot)) \ No newline at end of file diff --git a/cmds/suggestions.py b/cmds/suggestions.py new file mode 100644 index 0000000..9b84c81 --- /dev/null +++ b/cmds/suggestions.py @@ -0,0 +1,116 @@ +import discord +from discord.ext import commands +import json +import datetime +import asyncio +from cmds.calculate import calculate +import re +import decimal, math, numexpr, random +import bitdotio + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) + +db = bitdotio.bitdotio("6cCg_cknNfbKVqNk84Q2JeV8vVXL") + +class suggestions(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.group(invoke_without_command=True, aliases=als["cogs"]["suggestions"]["suggest"][0]) + async def suggest(self, ctx): + command = ctx.message.content.split(" ") + if len(command) == 1: + await ctx.send("Commands:\n`suggest add`\n`suggest edit`\n`suggest vote`\n`suggest info`"+("\n`suggest change`\n`suggest remove`" if [a for a in ctx.author.roles if a.name in ("Owner", "ICP Developer")] else "")) + else: + await ctx.send("Wrong subcommand") + + @suggest.command(aliases=als["cogs"]["suggestions"]["suggest"][1]["add"]) + async def add(self, ctx, *, suggest): + with db.get_connection().cursor() as cursor: + cursor.execute("SELECT suggestion_id FROM \"BenChueng0422/IdleCorp-Profit\".\"suggestions\"") + check = [a[0] for a in cursor.fetchall()] + n_unique = True + while n_unique: + suggest_id = random.randint(1, 9999999) + if suggest_id not in check: n_unique = False + cursor.execute("INSERT INTO \"BenChueng0422/IdleCorp-Profit\".\"suggestions\" (suggestions, user_id, suggestion_id) VALUES (\'{}\', {}, {}); UPDATE \"BenChueng0422/IdleCorp-Profit\".\"last_update log\" SET datetime = \'{}\' WHERE tables = \'suggestions\'".format(suggest, ctx.author.id, suggest_id, datetime.datetime.now())) + await ctx.send("Added suggestion \"{}\"".format(suggest)) + + @suggest.command(aliases=als["cogs"]["suggestions"]["suggest"][1]["edit"]) + async def edit(self, ctx, suggest_id: int, *, new_suggest): + with db.get_connection().cursor() as cursor: + cursor.execute("SELECT suggestion_id, user_id FROM \"BenChueng0422/IdleCorp-Profit\".\"suggestions\"") + check = dict(cursor.fetchall()) + if suggest_id not in check: + await ctx.send("`EN0006`: The suggestion id was invalid.") + return + if ctx.author.id != check[suggest_id] or not [a for a in ctx.author.roles if a.name in ("Owner", "ICP Developer")]: + await ctx.send("`EN0006`: You were not the creator of the suggestion.") + return + cursor.execute("UPDATE \"BenChueng0422/IdleCorp-Profit\".\"suggestions\" SET suggestions = \'{}\' WHERE suggestion_id = {}; UPDATE \"BenChueng0422/IdleCorp-Profit\".\"last_update log\" SET datetime = \'{}\' WHERE tables = \'suggestions\'".format(new_suggest, suggest_id, datetime.datetime.now())) + await ctx.send("Edited the suggestion `{}` to \"{}\"".format(suggest_id, new_suggest)) + + @suggest.command(aliases=als["cogs"]["suggestions"]["suggest"][1]["vote"]) + async def vote(self, ctx, suggest_id:int): + with db.get_connection().cursor() as cursor: + cursor.execute("SELECT votes FROM \"BenChueng0422/IdleCorp-Profit\".\"suggestions\" WHERE suggestion_id = {}".format(suggest_id)) + value = cursor.fetchall() + if not value: + await ctx.send("`EN0006`: The suggestion id was invalid.") + return + if ctx.author.id in value[0][0]: + await ctx.send("`EN0004`: You already voted the suggestion.") + return + value[0][0].append(ctx.author.id) + cursor.execute("UPDATE \"BenChueng0422/IdleCorp-Profit\".\"suggestions\" SET votes = \'{}\'::JSON WHERE suggestion_id = {}; UPDATE \"BenChueng0422/IdleCorp-Profit\".\"last_update log\" SET datetime = \'{}\' WHERE tables = \'suggestions\'".format(value[0][0], suggest_id, datetime.datetime.now())) + await ctx.send("You has voted the suggestion `{}`".format(suggest_id)) + + @suggest.command(aliases=als["cogs"]["suggestions"]["suggest"][1]["info"]) + async def info(self, ctx, suggest_id:int): + with db.get_connection().cursor() as cursor: + cursor.execute("SELECT * FROM \"BenChueng0422/IdleCorp-Profit\".\"suggestions\" WHERE suggestion_id = {}".format(suggest_id)) + if not cursor: + await ctx.send("`EN0006`: The suggestion id was invalid.") + return + value = dict(zip([a[0] for a in cursor.description], cursor.fetchall()[0])) + embed = discord.Embed(title="Suggestion info", color=discord.Colour.from_rgb(255, 255, 190), description="**{}**".format(len(value["votes"])), timestamp=datetime.datetime.now()) + embed.set_author(name=str(self.bot.get_user(value["user_id"])), icon_url=self.bot.get_user(value["user_id"]).avatar_url) + embed.add_field(name="{} \t\t\t [{}]".format(value["suggestion_id"], value["status"].capitalize().replace("_", " ")), value="{}\n\nSuggestion creator: <@!{}>\nCreated at: {} {}:{} (UTC)".format(value["suggestions"], value["user_id"], value["date"].date(), value["date"].hour, value["date"].minute)) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + + @suggest.command(aliases=als["cogs"]["suggestions"]["suggest"][1]["change"]) + @commands.has_any_role(801052590389329930, 801052697498746920) + async def change(self, ctx, suggest_id, status): + alias = {"ir": "in_review", "i": "in_review", "v": "verified", "p": "pass", "np": "not_pass", "n": "not_pass", "d": "done"} + if status in alias: status = alias[status] + if status not in ("in_review", "verified", "pass", "not_pass", "done"): + await ctx.send("`EN0004`: The status was invalid.") + return + with db.get_connection().cursor() as cursor: + cursor.execute("SELECT status FROM \"BenChueng0422/IdleCorp-Profit\".\"suggestions\" WHERE suggestion_id = {}".format(suggest_id)) + if not cursor: + await ctx.send("`EN0006`: The suggestion id was invalid.") + return + if status == cursor.fetchone()[0]: + await ctx.send("`EN0004`: The status of the suggestion was already `{}`".format(status)) + return + cursor.execute("UPDATE \"BenChueng0422/IdleCorp-Profit\".\"suggestions\" SET status = \'{}\' WHERE suggestion_id = {}; UPDATE \"BenChueng0422/IdleCorp-Profit\".\"last_update log\" SET datetime = \'{}\' WHERE tables = \'suggestions\'".format(status, suggest_id, datetime.datetime.now())) + await ctx.send("Changed the suggestion into `{}`".format(status)) + + @suggest.command(aliases=als["cogs"]["suggestions"]["suggest"][1]["remove"]) + @commands.has_any_role(801052590389329930, 801052697498746920) + async def remove(self, ctx, suggest_id): + with db.get_connection().cursor() as cursor: + cursor.execute("SELECT user_id FROM \"BenChueng0422/IdleCorp-Profit\".\"suggestions\" WHERE suggestion_id = {}".format(suggest_id)) + if not cursor: + await ctx.send("`EN0006`: The suggestion id was invalid.") + return + cursor.execute("DELETE FROM \"BenChueng0422/IdleCorp-Profit\".\"suggestions\" WHERE suggestion_id = {}".format(suggest_id)) + await ctx.send("Deleted the suggestion `{}`".format(suggest_id)) + +def setup(bot): + bot.add_cog(suggestions(bot)) \ No newline at end of file diff --git a/cmds/task_status.py b/cmds/task_status.py new file mode 100644 index 0000000..626877a --- /dev/null +++ b/cmds/task_status.py @@ -0,0 +1,116 @@ +import re +import discord +from discord.ext import commands +import json +import datetime +import asyncio +import bitdotio + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) + +db = bitdotio.bitdotio("83JQ_sPGfbNhEz7Hs4Gwzk4yqQXf") + +class tasks_status(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.group(invoke_without_command=True, aliases=als["cogs"]["task_status"]["task"][0]) + @commands.has_any_role(801052590389329930, 801052697498746920) + async def task(self, ctx): + command = ctx.message.content.split(" ") + if len(command) == 1: + await ctx.send("Commands:\n`task add`\n`task change`\n`task remove`\nParameters: on_work, pause, finished, waiting") + else: + await ctx.send("Wrong subcommand") + + def task_aliases(_dict, mark): + out = [] + mark = mark.lower() + for a, b in _dict.items(): + ind = 0 + for b in b: + if mark == b.lower(): + return (a, ind) + if mark in b.lower(): + out.append((a, ind)) + ind += 1 + if len(out)>1: + return (False, len(out)) + return out[0] + + @task.command(aliases=als["cogs"]["task_status"]["task"][1]["add"]) + async def add(self, ctx, *, args): + arg = [a.strip() for a in args.split("|")] + check = {"o": "on_work", "p": "paused", "f": "finished", "w": "waiting"} + if arg[-1] in check: arg = arg[:-1]+[check[arg[-1]]] + _type = "on_work" if arg[-1] not in ("on_work", "paused", "finished", "waiting") else arg[-1] + print(arg) + task = " ".join(arg[:-1] if arg[-1] in ("on_work", "paused", "finished", "waiting") else arg) + print(task) + with db.get_connection().cursor() as cursor: + cursor.execute("SELECT * FROM \"BenChueng0422/IdleCorp-Profit\".\"tasks\" WHERE type != \'last_time\'") + fetch = dict(cursor.fetchall()) + if task in sum(list(fetch.values()), start=[]): + await ctx.send("`ED1001`: The task you sent was exixt in the list.") + return + cursor.execute("UPDATE \"BenChueng0422/IdleCorp-Profit\".\"tasks\" AS t SET value = c.value FROM (VALUES (\'{}\', \'{}\'::JSON), (\'last_time\', \'\"{}\"\'::JSON)) AS c(type, value) WHERE c.type = t.type".format(_type, json.dumps(fetch[_type]+[task]), datetime.datetime.now())) + await ctx.send(f"Added `{task}` into the tasks stats.") + + @task.command(aliases=als["cogs"]["task_status"]["task"][1]["change"]) + async def change(self, ctx, *, args): + arg = [a.strip() for a in args.split("|")] + check = {"o": "on_work", "p": "paused", "f": "finished", "w": "waiting"} + if arg[-1] in check: arg = arg[:-1]+[check[arg[-1]]] + _type = "on_work" if arg[-1] not in ("on_work", "paused", "finished", "waiting") else arg[-1] + task = " ".join(arg[:-1]) if arg[-1] in ("on_work", "paused", "finished", "waiting") else " ".join(arg) + with db.get_connection().cursor() as cursor: + cursor.execute("SELECT * FROM \"BenChueng0422/IdleCorp-Profit\".\"tasks\"") + value = dict(cursor.fetchall()) + res = tasks_status.task_aliases(value, task) + if not res[0]: + if res[1] == 0: + await ctx.send("`EN0004`: Invalid task, haven't any task was matched.") + else: + await ctx.send("`EN0004`: Invalid task, more than one tasks were matched.") + return + # s = [] + # for a, b in value.items(): + # for c in b: + # if task in c: + # s.append(a) + # if len(s) > 1: + # await ctx.send("`EN0004`: More than one tasks were matched.") + # return + # if _type in s: + if _type == res[0]: + await ctx.send("`EN0004`: The task were matched in same status.") + return + task = value[res[0]][res[1]] + value[res[0]].pop(res[1]) + value[_type].append(task) + cursor.execute("UPDATE \"BenChueng0422/IdleCorp-Profit\".\"tasks\" AS t SET value = c.value FROM (VALUES (\'{}\', \'{}\'::JSON), (\'{}\', \'{}\'::JSON), (\'last_time\', \'\"{}\"\'::JSON)) AS c(type, value) WHERE c.type = t.type".format(res[0], json.dumps(value[res[0]]), _type, json.dumps(value[_type]), str(datetime.datetime.now()))) + await ctx.send(f"Changed `{task}` to {_type}") + + @task.command(aliases=als["cogs"]["task_status"]["task"][1]["remove"]) + async def remove(self, ctx, *, task): + task = task.strip() + with db.get_connection().cursor() as cursor: + cursor.execute("SELECT * FROM \"BenChueng0422/IdleCorp-Profit\".\"tasks\"") + value = dict(cursor.fetchall()) + res = tasks_status.task_aliases(value, task) + if not res[0]: + if res[1] == 0: + await ctx.send("`EN0004`: Invalid task, haven't any task was matched.") + else: + await ctx.send("`EN0004`: Invalid task, more than one tasks were matched.") + return + task = value[res[0]][res[1]] + value[res[0]].pop(res[1]) + cursor.execute("UPDATE \"BenChueng0422/IdleCorp-Profit\".\"tasks\" AS t SET value = c.value FROM (VALUES (\'{}\', \'{}\'::JSON), (\'last_time\', \'\"{}\"\'::JSON)) AS c(type, value) WHERE c.type = t.type".format(res[0], json.dumps(value[res[0]]), str(datetime.datetime.now()))) + await ctx.send(f"The task `{task}` has removed sucessfully.") + +def setup(bot): + bot.add_cog(tasks_status(bot)) \ No newline at end of file diff --git a/cmds/updates.py b/cmds/updates.py new file mode 100644 index 0000000..1537f1a --- /dev/null +++ b/cmds/updates.py @@ -0,0 +1,299 @@ +import discord +from discord.ext import commands +import json +import datetime +import asyncio +from cmds.string_handler import string_handler +from collections import deque + +with open('setting.json', mode='r', encoding='utf8') as jfile: + jdata = json.load(jfile) +with open("aliases.json", mode="r", encoding="utf8") as f: + als = json.load(f) +with open("updates.json", mode="r", encoding="utf8") as f: + udslist = json.load(f) + +class updates(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command(aliases=als["cogs"]["updates"]["updates"]) + async def updates(self, ctx, *, args=None): + def defformver(ver): + if ver == "Alpha.0.2": + formver = "Alpha.1" + elif ver in ("Alpha.0.2.1", "Alpha.0.3.0", "Beta.0.1.0"): + formver = "Alpha.2" + else: + formver = "Alpha.2" + return formver + if args != None: + arg = string_handler.filter(args) + if arg[1]: + await ctx.send("`EN0008`: Argument error: type number") + return + flags = string_handler.flags(arg[0]) + if flags[1]: + await ctx.send("`EN0001`: Flag type error, `--`") + return + if len(flags[0]) > 1: + await ctx.send("`EN0002`: Too many flags") + return + elif len(flags[0]) == 1: + for a in flags[0]: + flag = a + else: + flag = None + if flag != None: + if arg[0].index(flag) > 0: + await ctx.send("`EN0007`: Argument flag error") + return + if flag != None: + flag = flag[2:] + if len(flags[2]) > 1: + await ctx.send("`EN0008`: String") + return + elif len(flags[2]) == 1: + for a in flags[2]: + mores = a + else: + mores = None + if flag == None: + theud = dict([next(reversed(udslist.items()))]) + for a in theud.keys(): + version = a + for a in theud.values(): + ud = a + else: + ud = udslist[flag] + version = flag + if mores != None: + more = mores.split(".") + stuff = [] + for a in more: + stuff.append(a.replace("_", " ")) + # if len(more) == 1: + # for a in more: + # for c, d in als["updates list"]["first"].items(): + # if a in c: + # a = c + # prints = ud[a] + # else: + fn = "" + b = ud + first = als["updates list"]["first"] + second = als["updates list"]["second"] + third = als["updates list"]["third"] + i = 0 + moo = [] + for a in more: + if i == 0: + for c, d in first.items(): + if a in d: + a = c + else: + if a != "plans to update": + for c, d in second.items(): + if a in d: + a = c + else: + for c, d in third.items(): + if a in d: + a = c + if a not in b: + await ctx.send("`EN0004`: The argument is invalid or unexist in this version of update") + b = b[a] + moo.append(a) + i += 1 + more = moo + store = b + nothing = "\n**Nothing to show**" + if not store: + prints = nothing + else: + if type(store) == list: + prints = "\n".join(store) + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + elif type(store) == dict: + noth = 0 + store2 = [] + for a, b in store.items(): + if more[0] == "commands": + if a in ("adds", "changes", "deletes"): + if not b: + prints = nothing + noth = 1 + else: + store2.append("**"+a.capitalize()+":**") + for a, b in b.items(): + if a.istitle(): + store2.append(a+" -- "+b) + else: + store2.append("`"+a+"` -- "+b) + # prints = "\n".join(store) + else: + if a.istitle(): + store2.append(+a+" -- "+b) + else:store2.append("`"+a+"` -- "+b) + elif more[0] == "other": + if b: + store2.append("\""+a+"\" -- "+b) + elif more[0] == "plans to update": + if a in ud["plans to update"].keys(): + if not b: + prints = nothing + noth = 1 + else: + store2.append("**"+a.capitalize()+":**") + for a, b in b.items(): + store2.append("\""+a.capitalize()+"\" -- "+(b if b.startswith("v") else b.capitalize())) + # prints = "\n".join(store) + else: + store2.append("\""+a.capitalize()+"\" -- "+(b if b.startswith("v") else b.capitalize())) + if store2: + prints = "\n".join(store2) + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + elif type(store) == str: + if len(store.split(" ")) == 1: + prints = store.capitalize() + else: + prints = store + store = [] + for a in more: + store.append(a.capitalize()) + a = " - ".join(store) + fn = f" -- {a}" + prints += f"\n\nVersion: **v.{version}**" + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + embed.add_field(name=version+fn, value=prints, inline=False) + else: + formver = defformver(version) + prints = [] + for a, b in ud.items(): + if type(b) == list: + if not b: + continue + if formver == "Alpha.1": + if a == "note": + A1 = "" + else: + A1 = ":" + else: + A1 = ":" + prints.append("**"+a.capitalize()+A1+"**") + for c in b: + prints.append("> "+c) + elif type(b) == dict: + if not sum([len(a) for a in b.values()]): continue + prints.append("**"+a.capitalize()+":**") + for c, d in b.items(): + if not d: + continue + if a == "other": + prints.append("> \""+c+"\" -- "+d) + continue + prints.append("> **"+c.capitalize()+":**") + for e, f in d.items(): + if a == "commands": + if a.istitle(): + prints.append("> "+e+" -- "+f) + else: + prints.append("> `"+e+"` -- "+f) + if a == "plans to update": + prints.append("> \""+e+"\" -- "+f.capitalize()) + else: + prints.append(b) + b = [] + for a in prints: + if "{}" in a: + a = a.format(version) + b.append(a) + prints = b + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + if len("\n".join(prints)) > 1000: + a, b = prints[:len(prints)//2], prints[len(prints)//2:] + tlist = (deque(a), deque(b)) + for i in range(2): + while len("\n".join(tlist[i])) > 1000: + if i == 0: tlist[1].appendleft(tlist[0].pop()) + else: tlist[0].append(tlist[1].popleft()) + a, b = tlist + embed.add_field(name=version, value="\n".join(a), inline=False) + embed.add_field(name="_ _", value="\n".join(b), inline=False) + else: + embed.add_field(name=version, value="\n".join(prints), inline=False) + else: + theud = dict([next(reversed(udslist.items()))]) + for a in theud.keys(): + version = a + for a in theud.values(): + ud = a + formver = defformver(version) + prints = [] + for a, b in ud.items(): + if type(b) == list: + if formver == "Alpha.1": + if a == "note": + A1 = "" + else: + A1 = ":" + else: + if not b: + continue + A1 = ":" + prints.append("**"+a.capitalize()+A1+"**") + for c in b: + prints.append("> "+c) + elif type(b) == dict: + if not sum([len(a) for a in b.values()]): continue + prints.append("**"+a.capitalize()+":**") + for c, d in b.items(): + if not d: + continue + if a == "other": + prints.append("> \""+c+"\" -- "+d) + continue + prints.append("> **"+c.capitalize()+":**") + for e, f in d.items(): + if a == "commands": + if e.istitle(): + prints.append("> "+e+" -- "+f) + else: + prints.append("> `"+e+"` -- "+f) + if a == "plans to update": + prints.append("> \""+e+"\" -- "+f.capitalize()) + else: + prints.append(b) + b = [] + for a in prints: + if "{}" in a: + a = a.format(version) + b.append(a) + prints = b + embed = discord.Embed(title="Bot Updates", color=discord.Colour.blurple(), timestamp= datetime.datetime.now()) + if len("\n".join(prints)) > 1000: + a, b = prints[:len(prints)//2], prints[len(prints)//2:] + tlist = (deque(a), deque(b)) + for i in range(2): + while len("\n".join(tlist[i])) > 1000: + if i == 0: tlist[1].appendleft(tlist[0].pop()) + else: tlist[0].append(tlist[1].popleft()) + a, b = tlist + embed.add_field(name=version, value="\n".join(a), inline=False) + embed.add_field(name="_ _", value="\n".join(b), inline=False) + else: + a = "\n".join(prints) + embed.add_field(name=version, value=a, inline=False) + embed.set_footer(text=self.bot.user.name+" | "+jdata["version"], icon_url=self.bot.user.avatar_url) + await ctx.send(embed=embed) + +def setup(bot): + bot.add_cog(updates(bot)) \ No newline at end of file diff --git a/cmds/you_know.py b/cmds/you_know.py new file mode 100644 index 0000000..6388b44 --- /dev/null +++ b/cmds/you_know.py @@ -0,0 +1,22 @@ +import discord +from discord.ext import commands +import json +import os +import datetime +import asyncio +import random + +with open("setting.json", mode="r", encoding="utf8") as jfile: + jdata = json.load(jfile) + +class you_know(commands.Cog): + def __init__(self, bot): + self.bot = bot + + def you_know(): + with open("you_know.json", mode="r", encoding="utf8") as f: + ykl = json.load(f) + return random.choice(ykl["list"]) + +def setup(bot): + bot.add_cog(you_know(bot)) \ No newline at end of file diff --git a/codes.json b/codes.json new file mode 100644 index 0000000..d1f5ca5 --- /dev/null +++ b/codes.json @@ -0,0 +1,57 @@ +{ + "codes": { + "update": { + "UD02101": "`listcogs`: From send respectively become in one message.", + "UD04101": "Added the command `listcogs` into `history`.", + "UA37101": "Version 1.0: Added `UD02101`(Beta: `Up-12D2111`), `UD04101`(Beta: Up-12D2111), `UA37101`, `UD08101`, `EN1001`, `EN1002`, `EN0301`, `EN0302`, `EN0001`, `EN0002`, `EN0003`, `EN0004`, `EN0005`, `EN0006`, `EN0007`, `EN0008`, `EN0401`.", + "UD08101": "Load aliases added \"codes\" -- \"cd\", \"help\" -- \"h\", \"info\" -- \"if\", \"updates\" -- \"ud\", all singletons turn lists, loading changes by this.", + "UA37102": "Version 1.1: Added `UA31102`, `EN0402`, changed `EN0008` -- \"Appeared unexpect argument type\" become \"Appeared unexpect argument type.\"", + "UD08102": "Load aliases added \"profitfileexport\" -- \"pffep\", \"you_know\" -- \"yk\", \"rules\" -- \"rs\", loading changes by this.", + "UN12101": "In \"Plans to update\", when some version number is starts with \"v\", it will be capitalized.", + "UD02201": "`task_status`: Added SQL system with bitdotio(PostgreSQL) instead of repl.it data.json file, won't affected by that.", + "UN22201": "`task-status`: Made the status showing system more efficiency and lower the limitation.", + "UD29201": "`Did_you_know`: \"IdleCorp Profit project has started since 2020-12!\" -- the start day, \n\"IdleCorp is more complex than other general idle games\" -- Nothing special, \n\"You can do more--\\|times for\\| \\|\\\"if\\\"\\|\" -- the easter eggs of the `info` command, \n\"IdleCorp Profit has started as a text file at the beginning\" -- Nothing special, \n\"Find more easter eggs!\" -- easter eggs are hided, \n\"Well this \\\"Did you know\\\" not really a easter egg\" -- A fact, \n\"You can find more thing (or info) in the IdleCorp wiki!\" -- Nothing special, \n\"IdleCorp Profit just has profit.txt when the first version has been released\" -- A fact that the come from of \"Profit\" in \"IdleCorp Profit\", \n\"Discord and the bot\" -- Nothing special, \n\"Idle Corporations!\" -- Maybe the come from of \"IdleCorp\", \n\"History will be more history!\" -- When in javascript version, history really history, \n\"Version 1!\" -- The v.1.0 released, \n\"Stable version!\" -- Fisrt stable version v.1.0 released\nTotally 13 added.", + "UD08103": "Load aliases added \"calculationcmds\" -- \"cc\", \"cclc\", \"clc\", \"profitfileexport\" -- \"pffep\", \"suggestions\" -- \"sgt\", \"sg\", \"ncguide\" -- \"ncg\", removed \"data_backup\"", + "UA37103": "Version 1.2: Added `UD08102`, `UN12101`, `ED1001`, `UD02201`, `UN22201`, `UD29201`, `UD08103`.", + "UD02102": "All admin commands: use has_any_role(), instead of has_any_role([]), cogs_commands from has_role(\"Owner\") became same with others.", + "UA37104": "Version 1.2.1: Added `UD02102`", + "UD29202": "`Did_you_know`: \"History's codes has more than thousand lines!\" -- python version history's codes lines, \n\"IdleCorp Helper (or calculator) bot right here!\" -- IdleCorp Profit bot, \n\"Newcomer guide is here!\" -- the guide combined into the command `ncguide`\nTotally 3 added.", + "UA37105": "Version 1.2.2: Added `UD29202`" + }, + "error": { + "EN1001": "`codes `: Entered code is invalid.", + "EN0301": "Need permission role: \"ICP Developer\" or \"Owner\".", + "EN1002": "`code`: If the code starts with \"U\", it's belongs to update, if it's \"E\", it's belongs to error.", + "EN0302": "Need permission role: \"Admin\".", + "EN0001": "Flags error, flags must be starts with \"--\" or \"-\", looks for the requirement.", + "EN0002": "Flags error, the number of flags is invalid.", + "EN0003": "Flag(s) is/are invalid.", + "EN0004": "Check the name(s) (or/and number(s)) you entered is valid (If it's flag, mark it as flag mark(`-`/`--`), if it's a bug, report it) or it's not a bug.", + "EN0401": "Appeared multiple result when checking.", + "EN0005": "Missing argument(s) or name(s) or flag(s).", + "EN0006": "The number(s) argument(s) is invalid.", + "EN0007": "The argument(s) location(s) or type or numbers or argument(s) wrong.", + "EN0008": "Appeared unexpect argument type.", + "EN0402": "Cannot find aliases for some special cases.", + "ED1001": "`task add`: The task was exixt in tasks list." + } + }, + "oldnew": { + "Up-12D2111": "UD02101", + "Up-12D2112": "UD04101" + }, + "oldver": { + "beta": { + "update": { + "Up-12D2111": "From send respectively become in one message.", + "Up-12D2112": "Added the command `listcogs` into `history`" + } + }, + "1.0": { + "error": { + "EN0008": "Appeared unexpect argument type" + } + } + }, + "version": "1.2.1" +} \ No newline at end of file diff --git a/help.json b/help.json new file mode 100644 index 0000000..08107f5 --- /dev/null +++ b/help.json @@ -0,0 +1,243 @@ +{ + "commands": { + "ping": ["Can show the gateway latency of the bot", + "ping"], + "version": ["Can show the version of the bot", + "version"], + "botinfo": ["Show the bot and server information", + "botinfo"], + "speed": ["Calculate the result of facility's consumes and produces speed per second", + "speed [--] [number]"], + "profit": ["Calculate the result of facility's consumes and produces profit per second", + "profit [--] [number]"], + "profitcomplete": ["`profit` and more things of the profit.txt", + "profitcomplete [--] [number]"], + "history": ["Use the pass version of commands", + "history <|server_icon> > "], + "info": ["Show the info of about IdleCorp items", + "info "], + "rules": ["Can show the server rules in every version", + "rules [--] [rule number]"], + "search": ["Can search something", + "search [--] [thing]"], + "updates": ["can show the bot updates in every version", + "updates [--] [update(split with \".\")]"], + "codes": ["Cam show the details of codes", + "codes "], + "help": ["Can show the details and informations of commands", + "help [command]"], + "profitfileexport": ["Export a profit.txt or something into embeds, text file or a ZIP/RAR file", + "profitfileexport [--] [version]"], + "calculate": ["Quick calculate with the command", + "calculate "], + "suggest": ["Suggest some suggestions", + "suggest "], + "ncguide": ["The categoried new comer guide", + "ncguide [part]"] + }, + "info": { + "aliases": { + "bot_main": { + "ping": ["p"], + "version": ["v"] + }, + "calculationcmds": { + "calculate": ["cal", "="] + }, + "codes": { + "codes": { + "__init__": ["cds"], + "update": ["u", "ud"], + "error": ["e"] + } + }, + "cog_commands": { + "listcogs": ["lc"], + "load": ["ld"], + "unload": ["ul"], + "reload": ["rl"], + "sss": ["ss"] + }, + "help": { + "help": ["h"] + }, + "history": { + "history": { + "__init__": ["ht"], + "command": ["cm", "cmd"], + "Alpha_0_1": { + "__init__": ["A01"], + "profit": ["pf"] + }, + "Alpha_0_2_1": { + "__init__": ["A021"], + "listcogs": ["lc"] + }, + "Alpha_0_3_0": { + "__init__": ["A030"], + "speed": ["sp"], + "profit": ["pf"] + }, + "server_icon": { + "__init__": ["si", "icon"], + "1": ["one"] + }, + "Beta_0_3_0": { + "__init__": ["B030"], + "help": ["h"], + "info": ["if"], + "profit": ["pf"], + "rules": ["rs"], + "search": ["sc"], + "speed": ["sp"], + "updates": ["uds"] + }, + "Beta_0_4_0": { + "__init__": ["B040"], + "info": ["if"], + "help": ["h"], + "profit": ["pf"], + "search": ["sc"], + "updates": ["uds"] + } + } + }, + "info": { + "info": ["if"] + }, + "main": { + "send": ["sd"] + }, + "ncguide": { + "ncguide": ["ncg"] + }, + "profit": { + "profit": ["pf"] + }, + "profitcomplete": { + "profitcomplete": ["pfc"] + }, + "profitfileexport": { + "profitfileexport": ["pffep"] + }, + "rules": { + "rules": ["rs"] + }, + "speed": { + "speed": ["sp"] + }, + "suggestions": { + "suggest": { + "__init__": ["sug", "sgt", "sg"], + "add": ["a"], + "edit": ["e"], + "vote": ["v"], + "info": ["if", "i"], + "change": ["cg", "c"], + "remove": ["r", "rm"] + } + }, + "task_status": { + "task": { + "__init__": ["t"], + "add": ["a"], + "change": ["c"], + "remove": ["r"] + } + }, + "updates": { + "updates": ["uds", "changelog"] + } + }, + "details": { + "bot_main": { + "ping": "", + "version": "" + }, + "codes": { + "codes": { + "__init__": "", + "update": "Show the update codes details", + "error": "Show the error codes details" + } + }, + "cog_commands": { + "listcogs": "Show a list of cogs", + "load": "Load cogs", + "unload": "Unload cogs", + "reload": "Reload cogs", + "sss": "SHow status of cogs" + }, + "help": { + "help": "Show the details of every commands" + }, + "history": { + "history": { + "__init__": "", + "command": "Use commands in history", + "Alpha_0_1": { + "__init__": "Use the vereion {-1} history", + "profit": "Calculate" + }, + "Alpha_0_2_1": { + "__init__": "Use the vereion {-1} history", + "listcogs": "List" + }, + "Alpha_0_3_0": { + "__init__": "Use the vereion {-1} history", + "speed": "Calculate", + "profit": "Calculate" + }, + "server_icon": { + "__init__": "Show the server icons in history", + "1": "Version {-1}" + }, + "Beta_0_3_0": { + "__init__": "Use the vereion {-1} history", + "help": "", + "info": "", + "profit": "", + "rules": "", + "search": "", + "speed": "", + "updates": "" + }, + "Beta_0_4_0": { + "__init__": "Use the vereion {-1} history", + "info": "", + "help": "", + "profit": "", + "search": "", + "updates": "" + } + } + }, + "info": { + "info": "Show the information of IdleCorp assets and stuff" + }, + "main": { + "send": "" + }, + "profit": { + "profit": "" + }, + "rules": { + "rules": "" + }, + "speed": { + "speed": "" + }, + "task_status": { + "task": { + "__init__": "Change the rask", + "add": "Add tasks", + "change": "Change tasks status", + "remove": "Remove tasks" + } + }, + "updates": { + "updates": "Show bot updates details" + } + } + } +} \ No newline at end of file diff --git a/icdetail.json b/icdetail.json new file mode 100644 index 0000000..c39cc7c --- /dev/null +++ b/icdetail.json @@ -0,0 +1,1616 @@ +{ + "facilities": { + "tree_farm": { + "consumes": "None", + "produces": { + "wood": 2 + }, + "speed": 5 + }, + "oil_well": { + "consumes": "None", + "produces": { + "crude_oil": 10 + }, + "speed": 10 + }, + "coal_mine": { + "consumes": "None", + "produces": { + "coal": 8 + }, + "speed": 10 + }, + "iron_mine": { + "consumes": "None", + "produces": { + "iron": 1 + }, + "speed": 20 + }, + "oil_refinery": { + "consumes": { + "crude_oil": 5 + }, + "produces": { + "gasoline": 1 + }, + "speed": 30 + }, + "steel_mill": { + "consumes": { + "iron": 1, + "coal": 4 + }, + "produces": { + "steel": 1 + }, + "speed": 35 + }, + "bauxite_mine": { + "consumes": "None", + "produces": { + "bauxite": 40 + }, + "speed": 25 + }, + "rubber_factory": { + "consumes": { + "crude_oil": 8 + }, + "produces": { + "rubber": 1 + }, + "speed": 40 + }, + "gas_station": { + "consumes": { + "gasoline": 2 + }, + "produces": { + "money": 15 + }, + "speed": 15 + }, + "furniture_factory": { + "consumes": { + "wood": 10 + }, + "produces": { + "furniture": 1 + }, + "speed": 240 + }, + "aluminum_factory": { + "consumes": { + "bauxite": 10 + }, + "produces": { + "aluminum": 25 + }, + "speed": 25 + }, + "led_factory": { + "consumes": { + "silicon": 2 + }, + "produces": { + "led": 40 + }, + "speed": 50 + }, + "polyester_factory": { + "consumes": { + "crude_oil": 110 + }, + "produces": { + "polyester": 14 + }, + "speed": 25 + }, + "silicon_mine": { + "consumes": "None", + "produces": { + "silicon": 4 + }, + "speed": 260 + }, + "bicycle_factory": { + "consumes": { + "steel": 12, + "rubber": 8 + }, + "produces": { + "bicycle": 1 + }, + "speed": 90 + }, + "gold_mine": { + "consumes": "None", + "produces": { + "gold": 4 + }, + "speed": 300 + }, + "lamp_factory": { + "consumes": { + "plastic": 6, + "led": 12 + }, + "produces": { + "lamp": 2 + }, + "speed": 15 + }, + "cotton_farm": { + "consumes": "None", + "produces": { + "cotton": 4 + }, + "speed": 20 + }, + "plastic_factory": { + "consumes": { + "crude_oil": 20 + }, + "produces": { + "plastic": 200 + }, + "speed": 25 + }, + "ccd_factory": { + "consumes": { + "silicon": 6 + }, + "produces": { + "ccd": 1 + }, + "speed": 65 + }, + "glass_factory": { + "consumes": { + "silicon": 2 + }, + "produces": { + "glass": 8 + }, + "speed": 35 + }, + "cpu_factory": { + "consumes": { + "gold": 1, + "silicon": 8 + }, + "produces": { + "cpu": 5 + }, + "speed": 120 + }, + "clothing_factory": { + "consumes": { + "polyester": 20, + "cotton": 10 + }, + "produces": { + "clothing": 10 + }, + "speed": 40 + }, + "cell_phone_factory": { + "consumes": { + "plastic": 5, + "glass": 1, + "cpu": 1 + }, + "produces": { + "cell_phone": 1 + }, + "speed": 45 + }, + "coal_power_plant": { + "consumes": { + "coal": 50 + }, + "produces": { + "energy": 35 + }, + "speed": 30 + }, + "laptop_factory": { + "consumes": { + "plastic": 8, + "glass": 2, + "cpu": 1 + }, + "produces": { + "laptop": 1 + }, + "speed": 90 + }, + "research_chemical_factory": { + "consumes": { + "crude_oil": 10 + }, + "produces": { + "research_chemical": 4 + }, + "speed": 30 + }, + "solar_power_plant": { + "consumes": "None", + "produces": { + "energy": 60 + }, + "speed": 90 + }, + "rocket_fuel_factory": { + "consumes": { + "energy": 10 + }, + "produces": { + "rocket_fuel": 1 + }, + "speed": 900 + }, + "digital_camera_factory": { + "consumes": { + "ccd": 1, + "plastic": 100 + }, + "produces": { + "digital_camera": 1 + }, + "speed": 80 + }, + "television_factory": { + "consumes": { + "plastic": 36, + "glass": 12, + "cpu": 1 + }, + "produces": { + "television": 1 + }, + "speed": 180 + }, + "gasoline_engine_factory": { + "consumes": { + "steel": 15, + "rubber": 6 + }, + "produces": { + "gasoline_engine": 1 + }, + "speed": 260 + }, + "car_factory": { + "consumes": { + "gasoline_engine": 1, + "plastic": 1000, + "glass": 28, + "steel": 40, + "cpu": 1, + "rubber": 30 + }, + "produces": { + "car": 1 + }, + "speed": 600 + }, + "prescription_drug_factory": { + "consumes": { + "research_chemical": 1 + }, + "produces": { + "prescription_drug": 2 + }, + "speed": 50 + }, + "airport": { + "consumes": { + "jet_fuel": 10, + "energy": 25 + }, + "produces": { + "money": 1000 + }, + "speed": [30, 60] + } + }, + "assets": { + "crude_oil": 0.1, + "bauxite": 0.1, + "wood": 0.15, + "coal": 0.2, + "plastic": 0.5, + "led": 2, + "iron": 2, + "polyester": 2, + "aluminum": 4, + "gasoline": 5, + "cotton": 5, + "jet_fuel": 5, + "rubber": 7, + "steel": 8, + "energy": 10, + "silicon": 25, + "lamp": 25, + "glass": 30, + "clothing": 30, + "furniture": 60, + "gold": 60, + "rocket_fuel": 100, + "research_chemical": 100, + "cpu": 200, + "bicycle": 240, + "prescription_drug": 500, + "ccd": 500, + "cell_phone": 800, + "laptop": 2000, + "digital_camera": 2000, + "television": 4000, + "gasoline_engine": 5000, + "car": 20000, + "rocket": 100000000 + }, + "info": { + "assets": { + "land": { + "icinfo": "So much room for facilities!", + "market": false, + "retail": false, + "icwiki": "Land is a special kind of asset that determines how many facilities you can build. Each land you own will allow you to build one facility. The price of land goes up the more land you already have. You can buy land the same way you buy other assets, but land cannot be sold.\nNote: Land can be removed from a region, using $$liquidate, which will sell everything in the region. Land and Factories are sold for 40% of what you paid. Assets are sold at the current sell price value of the NPC market.", + "wikipedia": "Land is the solid surface of the Earth that is not permanently covered by water.The vast majority of human activity throughout history has occurred in land areas that support agriculture, habitat, and various natural resources.", + "icp": "Land is important for IdleCorp, also important for real life." + }, + "scrap": { + "icinfo": "One man's scrap is another man's XP.", + "market": true, + "retail": false, + "icwiki": "Scrap is an asset used to Level your Factories, Mines, and Facilities", + "wikipedia": "Scrap consists of recyclable materials left over from product manufacturing and consumption, such as parts of vehicles, building supplies, and surplus materials. Unlike waste, scrap has monetary value, especially recovered metals, and non-metallic materials are also recovered for recycling.", + "icp": "XP is used to produce more asset+ when not facility+, that;s not really a good news if don't want primary resourse become asset+ because it will make facility fewer resourse comes. In real life, it probably can be recycled to become other things." + }, + "crude_oil": { + "icinfo": "Full of useful organic compounds.", + "market": true, + "retail": false, + "icwiki": "Crude oil is an asset extracted from the region using Oil wells. The oil can be processed into several other commodities. Crude oil is a naturally occurring, yellowish-black liquid found in geological formations beneath the Earth's surface. It is commonly refined into various types of fuels.", + "wikipedia": "Petroleum, is a naturally occurring, yellowish-black liquid found in geological formations beneath the Earth's surface." + }, + "bauxite": { + "icinfo": "A mineral precursor for aluminum.", + "market": true, + "retail": false, + "icwiki": "Bauxite is a sedimentary rock with a relatively high aluminum content. It is the world's main source of aluminum. Bauxite can be mined using a Bauxite mine.", + "wikipedia": "Bauxite is a sedimentary rock with a relatively high aluminium content. It is the world's main source of aluminium and gallium.", + "icp": "So this will be with sourse of aluminum." + }, + "wood": { + "icinfo": "Useful for construction or as fuel.", + "market": true, + "retail": false, + "icwiki": "Wood is an asset grown in the region using Tree farms. The wood can be processed into other commodities or sold.", + "wikipedia": "Wood is a porous and fibrous structural tissue found in the stems and roots of trees and other woody plants.Wood has been used for thousands of years for fuel, as a construction material, for making tools and weapons, furniture and paper.", + "icp": "Don't waste too much paper, wood not that much, trees need time to grown." + }, + "coal": { + "icinfo": "A great source of carbon and non-renewable energy.", + "market": true, + "retail": false, + "icwiki": "Coal is an asset extracted from the region using Coal mines. The coal can be processed into other assets or sold. Coal is a combustible black or brownish-black sedimentary rock. Coal is mostly carbon with variable amounts of other elements. Coal is used in creating electricity and it is the most common way of producing electricity. However, coal also emits harmful chemicals in the air. People are finding alternatives to coal for energy.", + "wikipedia": "oal is a combustible black or brownish-black sedimentary rock, formed as rock strata called coal seams. Coal is mostly carbon with variable amounts of other elements; chiefly hydrogen, sulfur, oxygen, and nitrogen.Coal is formed when dead plant matter decays into peat and is converted into coal by the heat and pressure of deep burial over millions of years.", + "icp": "Coal is limitted in real life, but not in IdleCorp." + }, + "plastic": { + "icinfo": "Light and disposable. Worry about the mess later!", + "market": true, + "retail": false, + "icwiki": "Plastic is a synthetic compound that can be molded into solid objects. Plastic is an asset manufactured in Plastic Factories and used to build several other assets or can be sold.", + "wikipedia": "Plastics are a wide range of synthetic or semi-synthetic materials that use polymers as a main ingredient. Their plasticity makes it possible for plastics to be moulded, extruded or pressed into solid objects of various shapes.Most modern plastics are derived from fossil fuel based petrochemicals like natural gas or petroleum; however, recent industrial methods use variants made from renewable materials, such as corn or cotton derivatives." + }, + "led": { + "icinfo": "A electrical diode capable of emitting light.", + "market": true, + "retail": false, + "icwiki": "LED is an asset manufactured in a LED factory and used to build other assets or can be sold. A light-emitting diode (LED) is a semiconductor light source that emits light when current flows through it.", + "wikipedia": "A light-emitting diode (LED) is a semiconductor light source that emits light when current flows through it. Electrons in the semiconductor recombine with electron holes, releasing energy in the form of photons. The color of the light (corresponding to the energy of the photons) is determined by the energy required for electrons to cross the band gap of the semiconductor.White light is obtained by using multiple semiconductors or a layer of light-emitting phosphor on the semiconductor device.", + "icp": "LED is good light sourse, long life and often used in TV and LED moniter." + }, + "iron": { + "icinfo": "A common ferrous metal.", + "market": true, + "retail": false, + "icwiki": "Iron can be extracted from a region using Iron mines. Iron is a chemical element with the symbol Fe. It is by mass the most common element on Earth, forming much of Earth's outer and inner core.", + "wikipedia": "Iron is a chemical element with symbol Fe and atomic number 26. It is by mass the most common element on Earth, right in front of oxygen (32.1% and 30.1%, respectively), forming much of Earth's outer and inner core. It is the fourth most common element in the Earth's crust.", + "icp": "It's common appear in industry." + }, + "polyester": { + "icinfo": "Synthetic fibers useful for clothing.", + "market": true, + "retail": false, + "icwiki": "Polyester is an asset manufactured in a Polyester factory and used to build other assets or can be sold. Polyester is a synthetic fiber that can be spun together with natural fibers to produce clothing with blended properties. Cotton-polyester blends can be strong, wrinkle- and tear-resistant, and reduce shrinking.", + "wikipedia": "Polyester is a category of polymers that contain the ester functional group in every repeat unit of their main chain.As a specific material, it most commonly refers to a type called polyethylene terephthalate (PET). Polyesters include naturally occurring chemicals, such as in the cutin of plant cuticles, as well as synthetics such as polybutyrate. Natural polyesters and a few synthetic ones are biodegradable, but most synthetic polyesters are not. The material is used extensively in clothing." + }, + "aluminum": { + "icinfo": "A light, soft, and non-ferrous metal.", + "market": true, + "retail": false, + "icwiki": "Aluminum can be produced by an Aluminum factory. It can be used for building BP's or sold. Aluminum is a chemical element with the symbol Al. Aluminum makes up about 8% of the Earth's crust, where it is the most abundant metal. The chief ore of aluminum is bauxite. Bauxite ore is heated in a pressure vessel along with a sodium hydroxide solution at a temperature of 150 to 200 °C (300 to 390 °F). At these temperatures, the aluminum is dissolved and recovered using the Bayer process.", + "wikipedia": "Aluminium (aluminum in American and Canadian English) is a chemical element with the symbol Al and atomic number 13. Aluminium has a density lower than those of other common metals, at approximately one third that of steel. It has a great affinity towards oxygen, and forms a protective layer of oxide on the surface when exposed to air." + }, + "gasoline": { + "icinfo": "Full of combustible hydrocarbons.", + "market": true, + "retail": false, + "icwiki": "Gasoline is a clear petroleum-derived flammable liquid that is used primarily as a fuel in most spark-ignited internal combustion engines. Gasoline is an asset manufactured using an Oil refinery. Gasoline can be used in exports, consumed by Gas stations or sold.", + "wikipedia": "Gasoline or petrol is a transparent, petroleum-derived flammable liquid that is used primarily as a fuel in most spark-ignited internal combustion engines. It consists mostly of organic compounds obtained by the fractional distillation of petroleum, enhanced with a variety of additives." + }, + "cotton": { + "icinfo": "Natural fibers from a cotton plant.", + "market": true, + "retail": false, + "icwiki": "Cotton is a soft, fluffy fiber that grows in a boll, around the seeds of the cotton plants. Cotton is an asset grown in the region using Cotton farms. The cotton can be processed into other commodities or sold.", + "wikipedia": "Cotton is a soft, fluffy staple fiber that grows in a boll, or protective case, around the seeds of the cotton plants of the genus Gossypium in the mallow family Malvaceae. The fiber is almost pure cellulose." + }, + "jet_fuel": { + "icinfo": "Probably useful for airplanes...", + "market": true, + "retail": false, + "icwiki": "Jet fuel is an that is produced by an Oil refinery with the Jet fuel refining technology.", + "wikipedia": "fuel or aviation turbine fuel (ATF, also abbreviated avtur) is a type of aviation fuel designed for use in aircraft powered by gas-turbine engines. It is colorless to straw-colored in appearance." + }, + "rubber": { + "icinfo": "A soft water-tight material.", + "market": true, + "retail": false, + "icwiki": "Rubber is an asset manufactured in a Rubber factory and used to build other assets or can be sold. Synthetic rubber, like natural rubber, has uses in the automotive industry for tires, door and window profiles, hoses, belts, matting, and flooring.", + "wikipedia": "A synthetic rubber is any artificial elastomer. They are polymers synthesized from petroleum byproducts. Synthetic rubber, just like natural rubber, has many uses in the automotive industry for tires, door and window profiles, seals such as O-rings and gaskets, hoses, belts, matting, and flooring." + }, + "steel": { + "icinfo": "A strong carbon-iron alloy.", + "market": true, + "retail": false, + "icwiki": "Steel is an asset that can be produced using Steel mills and can build several other assets or can be sold. Steel is an alloy of iron and carbon or coal, sometimes, other elements. Because of its high tensile strength and low cost, this material is best used in buildings, infrastructure, tools, ships, trains, cars, machines, and electrical appliances.", + "wikipedia": "Steel is an alloy of iron with typically a few tenths of a percent of carbon to improve its strength and fracture resistance compared to iron. Many other elements may be present or added.", + "icp": "A strong alloy in real life. In IdleCorp, it's commonly appear in facilities construction material." + }, + "energy": { + "icinfo": "E=mc^2", + "market": true, + "retail": false, + "icwiki": "Energy can be produced using Coal power plants or Solar power plants. In physics, energy is the quantitative property that must be transferred to an object in order to perform work on any object. It can neither be created nor destroyed. Energy is also proportional to mass and is explained by the famous formula e=mc^2.", + "wikipedia": "Electricity is the set of physical phenomena associated with the presence and motion of matter that has a property of electric charge. Electricity is related to magnetism, both being part of the phenomenon of electromagnetism, as described by Maxwell's equations.", + "icp": "Remember to reduce the power uses, it's good for lots of people." + }, + "silicon": { + "icinfo": "An abundant semiconductor.", + "market": true, + "retail": false, + "icwiki": "Silicon is an asset extracted from the region using Silicon mines. The silicon can be processed into other assets or sold. Very highly purified elemental silicon is used in semiconductor electronics (< 10%) is essential to the metal–oxide–silicon (MOS) transistors and integrated circuit chips used in most modern technology (such as computers and cell phones, for example).", + "wikipedia": "Silicon is a chemical element with the symbol Si and atomic number 14. It is a hard, brittle crystalline solid with a blue-grey metallic lustre, and is a tetravalent metalloid and semiconductor.It is relatively unreactive because of its high chemical affinity for oxygen" + }, + "lamp": { + "icinfo": "Produces enough light to work with. Just beware of moths.", + "market": true, + "retail": 1, + "icwiki": "The lamp is an asset manufactured in a Lamp factory and is a product that can be sold for capital. A lamp is a device that produces visible light from electric currents. It is a common form of artificial lighting and is handy to modern society, providing interior lighting for buildings and exterior light for evening and nighttime activities. In technical usage, a replaceable component that produces light from electricity is called a lamp.", + "wikipedia": "A light fixture, light fitting, or luminaire is an electrical device that contains an electric lamp that provides illumination. All light fixtures have a fixture body and one or more lamps. The lamps may be in sockets for easy replacement—or, in the case of some LED fixtures, hard-wired in place." + }, + "glass": { + "icinfo": "A transparent material.", + "market": true, + "retail": false, + "icwiki": "Glass is an asset that can be produced using Glass factories, and used to build several other asset's or can be sold. Glass is most often formed by rapid cooling (quenching) of the molten form. The most familiar, and historically the oldest, types of manufactured glass are \"silicate glasses\" based on the chemical compound silica (silicon dioxide), the primary constituent of sand. Soda-lime glass, containing around 70% silica, accounts for around 90% of manufactured glass.", + "wikipedia": "Glass is a non-crystalline, often transparent amorphous solid, that has widespread practical, technological, and decorative use in, for example, window panes, tableware, and optics. Glass is most often formed by rapid cooling (quenching) of the molten form; some glasses such as volcanic glass are naturally occurring." + }, + "clothing": { + "icinfo": "Cover yourself up!", + "market": true, + "retail": 1, + "icwiki": "Clothing is an asset manufactured in the Clothing factories and is a product that can be sold for capital. Clothing (also known as clothes, apparel and attire) is items worn on the body. Clothing is typically made of fabrics or textiles. The wearing of clothing is mostly restricted to human beings and is a feature of all human societies. The amount and type of clothing worn depend on gender, body type, social, and geographic considerations.", + "wikipedia": "Clothing (also known as clothes, apparel and attire) are items worn on the body. Clothing is typically made of fabrics or textiles but over time has included garments made from animal skin or other thin sheets of materials put together." + }, + "furniture": { + "icinfo": "Great for home owners who value comfort.", + "market": true, + "retail": 1, + "icwiki": "Furniture is an asset manufactured in the Furniture factories and is a product that can be sold for capital. Furniture refers to movable objects intended to support various human activities such as seating (e.g., chairs, stools, and sofas), eating (tables), and sleeping (e.g., beds).", + "wikipedia": "Furniture refers to movable objects intended to support various human activities such as seating, eating, and sleeping. Furniture is also used to hold objects at a convenient height for work, or to store things. Furniture can be a product of design and is considered a form of decorative art." + }, + "gold": { + "icinfo": "A beautiful, non-reactive metal.", + "market": true, + "retail": false, + "icwiki": "Gold is an asset extracted from the region using Gold mines. The gold can be processed into other assets or sold. Gold often occurs in free elemental (native) form, as nuggets or grains, in rocks, in veins, and in alluvial deposits. Gold's high malleability, ductility, resistance to corrosion and most other chemical reactions, and conductivity of electricity have led to its continued use in corrosion resistant electrical connectors in all types of computerized devices (its chief industrial use).", + "wikipedia": "Gold is a chemical element with the symbol Au and atomic number 79, making it one of the higher atomic number elements that occur naturally. In a pure form, it is a bright, slightly reddish yellow, dense, soft, malleable, and ductile metal.", + "icp": "It's a good metal." + }, + "rocket_fuel": { + "icinfo": "It's not rocket science.", + "market": false, + "retail": false, + "icwiki": "Rocket fuel is an asset manufactured using Rocket fuel factories and can be sold. \nNote: This asset is a remaining item from an old version. Rocket fuel was used to fuel Rockets.", + "wikipedia": "Rocket propellant is the reaction mass of a rocket. This reaction mass is ejected at the highest achievable velocity from a rocket engine to produce thrust. The energy required can either come from the propellants themselves, as with a chemical rocket, or from an external source, as with ion engines.", + "icp": "It's get gave up." + }, + "research_chemical": { + "icinfo": "Research grade chemicals.", + "market": true, + "retail": false, + "icwiki": "Research chemical is an asset manufactured in a Research chemical factory and used to build other assets or can be sold. Research chemicals are chemical substances used by scientists for medical and scientific research purposes.", + "wikipedia": "Research chemicals are chemical substances used by scientists for medical and scientific research purposes. One characteristic of a research chemical is that it is for laboratory research use only; a research chemical is not intended for human or veterinary use." + }, + "cpu": { + "icinfo": "Following Moore's Law since 1971.", + "market": true, + "retail": false, + "icwiki": "CPU is an asset manufactured in the CPU factories and used to build several other assets or can be sold. A central processing unit (CPU), also called a main processor is the electronic circuitry within a computer that executes instructions that make up a computer program. The CPU performs basic arithmetic, logic, controlling, and input/output (I/O) operations specified by the instructions in the program.", + "wikipedia": "A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, and input/output (I/O) operations specified by the instructions in the program. This contrasts with external components such as main memory and I/O circuitry.", + "icp": "CPU can be strong." + }, + "bicycle": { + "icinfo": "Useful for your commute.", + "market": true, + "retail": 1, + "icwiki": "Bicycle is an asset manufactured in the Bicycle Factories and is a product that can be sold for capital. A bicycle, a.k.a a bike or cycle, is a human-powered, pedal-driven vehicle, having two wheels attached to a frame, one behind the other.", + "wikipedia": "A bicycle, also called a bike or cycle, is a human-powered or motor-powered, pedal-driven, single-track vehicle, having two wheels attached to a frame, one behind the other. A bicycle rider is called a cyclist, or bicyclist.", + "icp": "Bicycle usually in sports." + }, + "prescription_drug": { + "icinfo": "Laughter, it's said, is the best medicine.", + "market": true, + "retail": 1, + "icwiki": "The prescription drug is an asset manufactured in a Prescription drug factory and is a product that can be sold for capital. A prescription drug (also prescription medication or prescription medicine) is a pharmaceutical drug that legally requires a medical prescription to be dispensed.", + "wikipedia": "A prescription drug (also prescription medication or prescription medicine) is a pharmaceutical drug that legally requires a medical prescription to be dispensed. In contrast, over-the-counter drugs can be obtained without a prescription.", + "icp": "Don't sick is better." + }, + "ccd": { + "icinfo": "An array of semiconductors capable of taking digital images.", + "market": true, + "retail": false, + "icwiki": "CCD is an asset manufactured in a CCD factory and used to build other assets or can be sold. A charge-coupled device (CCD) is a device for the movement of electrical charge, usually from within the device to an area where the charge can be manipulated, such as conversion into a digital value. CCD is a major technology for digital imaging.", + "wikipedia": "A charge-coupled device (CCD) is an integrated circuit containing an array of linked, or coupled, capacitors. Under the control of an external circuit, each capacitor can transfer its electric charge to a neighboring capacitor. CCD sensors are a major technology used in digital imaging.", + "icp": "A special hardware." + }, + "cell_phone": { + "icinfo": "What? Don't you guys have phones?", + "market": true, + "retail": 1, + "icwiki": "A cell phone is an asset manufactured in the Cell phone factories and is a product that can be sold for capital. A mobile phone, cellular phone, or cell phone is a portable telephone that can make and receive calls over a radio frequency link while the user is moving within a telephone service area.", + "wikipedia": "A mobile phone, cellular phone, cell phone, cellphone, handphone, or hand phone, sometimes shortened to simply mobile, cell or just phone, is a portable telephone that can make and receive calls over a radio frequency link while the user is moving within a telephone service area.", + "icp": "Everyone should have this thing." + }, + "laptop": { + "icinfo": "Great for on the go productivity.", + "market": true, + "retail": 2, + "icwiki": "Laptop is an asset manufactured in the Laptop factories and is a product that can be sold for capital. A laptop computer is a small, portable personal computer (PC) with a \"clamshell\" form factor, typically having a thin LCD or LED computer screen mounted on the inside of the upper lid of the clamshell and an alphanumeric keyboard on the inside of the lower lid. Its name comes from lap, as it was deemed to be placed on a person's lap when being used.", + "wikipedia": "A laptop or laptop computer is a small, portable personal computer (PC) with a \"clamshell\" form factor, typically having a thin LCD or LED computer screen mounted on the inside of the upper lid of the clamshell and an alphanumeric keyboard on the inside of the lower lid. The clamshell is opened up to use the computer. Laptops are folded shut for transportation, and thus are suitable for mobile use." + }, + "digital_camera": { + "icinfo": "A digital camera for taking photos of your favorite moments.", + "market": true, + "retail": 2, + "icwiki": "The digital camera is an asset manufactured in the Digital camera factories and is a product that can be sold for capital. A digital camera or digicam is a camera that captures photographs in digital memory. High-end, high-definition dedicated cameras are still commonly used by professionals and those who desire to take higher-quality photographs.", + "wikipedia": " digital camera is a camera that captures photographs in digital memory. Most cameras produced today are digital, largely replacing those that capture images on photographic film. While there are still dedicated digital cameras, many more cameras are now incorporated into mobile devices like smartphones." + }, + "television": { + "icinfo": "What's cable?", + "market": true, + "retail": 4, + "icwiki": "Television is an asset manufactured in the Television factory and is a product that can be sold for capital. Television (TV), sometimes shortened to tele or telly, is a telecommunication medium used for transmitting moving images in two or three dimensions and sound. Television is a mass medium for advertising, entertainment, news, and sports.", + "wikipedia": "Television (TV), sometimes shortened to tele or telly, is a telecommunication medium used for transmitting moving images in monochrome (black and white), or in color, and in two or three dimensions and sound. The term can refer to a television set, a television show, or the medium of television transmission. Television is a mass medium for advertising, entertainment, news, and sports.", + "icp": "Big moniter." + }, + "gasoline_engine": { + "icinfo": "Transforms combustion of gasoline into rotational motion.", + "market": true, + "retail": false, + "icwiki": "The gasoline engine is an asset that can be produced using Gasoline engine factories and is used to build other assets or can be sold. A gasoline engine (American English) or Petrol engine (British English) is an internal combustion engine with spark-ignition, designed to run on petrol (gasoline) and similar volatile fuels.", + "wikipedia": "Petrol engine or gasoline engine is an internal combustion engine with spark-ignition, designed to run on petrol and similar volatile fuels. In most petrol engines, the fuel and air are usually pre-mixed before compression." + }, + "car": { + "icinfo": "An essential transportation utility in a modern society.", + "market": true, + "retail": 23, + "icwiki": "A Car is an asset manufactured in the Car factories and is a product that can be sold for capital. A car (or automobile) is a wheeled motor vehicle used for transportation. Most definitions of cars say that they run primarily on roads, seat one to eight people, have four tires, and mainly transport people rather than goods.", + "wikipedia": "A car is a wheeled motor vehicle used for transportation. Most definitions of cars say that they run primarily on roads, seat one to eight people, have four wheels, and mainly transport people rather than goods.", + "icp": "It's expensive but not the most profit." + }, + "rocket": { + "icinfo": "Maybe it is rocket science.", + "market": false, + "retail": false, + "icwiki": "Rocket is an asset in the market and is a product that can be sold for capital. \nNote: This asset is a remaining item from an old version. Rocket's are not currently buildable.", + "wikipedia": "A rocket is a projectile that spacecraft, aircraft or other vehicle use to obtain thrust from a rocket engine. Rocket engine exhaust is formed entirely from propellant carried within the rocket.Rocket engines work by action and reaction and push rockets forward simply by expelling their exhaust in the opposite direction at high speed, and can therefore work in the vacuum of space.", + "icp": "The system had been removed." + } + }, + "facilities": { + "tree_farm": { + "icinfo": "Sustainably farmed lumber.", + "construct": { + "money": 100 + }, + "icwiki": "he tree farm is used to farm wood from your region.", + "wikipedia": "A tree farm is a privately owned forest managed for timber production. The term, tree farm, also is used to refer to tree plantations, tree nurseries, and Christmas tree farms.", + "icp": "Used to produce wood, log." + }, + "oil_well": { + "icinfo": "A well bringing crude oil to the surface.", + "construct": { + "iron": 100, + "money": 100 + }, + "icwiki": "The Oil Well is used to harvest crude oil from the ground.", + "wikipedia": "An oil well is a boring in the Earth that is designed to bring petroleum oil hydrocarbons to the surface. Usually some natural gas is released as associated petroleum gas along with the oil. A well that is designed to produce only gas may be termed a gas well.", + "icp": "Produce oil to make gasoline and plastic." + }, + "coal_mine": { + "icinfo": "A mine extracting coal from the ground.", + "construct": { + "wood": 1000, + "money": 250 + }, + "icwiki": "The coal mine is a facility", + "wikipedia": "Coal mining is the process of extracting coal from the ground. Coal is valued for its energy content and since the 1880s, has been widely used to generate electricity. Steel and cement industries use coal as a fuel for extraction of iron from iron ore and for cement production.", + "icp": "A kind of sourse of coal." + }, + "iron_mine": { + "icinfo": "A mine extracting iron from the ground.", + "construct": { + "wood": 2000, + "money": 250 + }, + "icwiki": "The coal mine is a facility", + "wikipedia": "Blank", + "icp": "A sourse of any iron type." + }, + "oil_refinery": { + "icinfo": "Refines crude oil into gasoline.", + "construct": { + "steel": 50, + "iron": 200, + "crude_oil": 100, + "money": 240 + }, + "icwiki": "The oil refinery is a facility", + "wikipedia": "An oil refinery or petroleum refinery is an industrial process plant where crude oil is transformed and refined into useful products such as petroleum naphtha, gasoline, diesel fuel, asphalt base, heating oil, kerosene, liquefied petroleum gas, jet fuel and fuel oils.", + "icp": "Secondary resourse." + }, + "steel_mill": { + "icinfo": "Makes steel by smelting iron with coal.", + "construct": { + "coal": 250, + "iron": 500, + "money": 150 + }, + "icwiki": "The steel mill is a facility", + "wikipedia": "A steel mill or steelworks is an industrial plant for the manufacture of steel. It may be an integrated steel works carrying out all steps of steelmaking from smelting iron ore to rolled product, but may also be a plant where steel semi-finished casting products are made from molten pig iron or from scrap.", + "icp": "Used to make string metal." + }, + "bauxite_mine": { + "icinfo": "A mine extracting bauxite from the ground.", + "construct": { + "steel": 50, + "wood": 5000, + "money": 150 + }, + "icwiki": "The Bauxite mine is used to mine Bauxite which can be used in the production of Aluminum.", + "wikipedia": "None", + "icp": "Bauxite sourse." + }, + "rubber_factory": { + "icinfo": "Produces synthetic rubber by processing crude oil.", + "construct": { + "steel": 100, + "wood": 2500, + "money": 325 + }, + "icwiki": "The rubber factory is a facility", + "wikipedia": "None", + "icp": "A place to make rubber, used oil." + }, + "gas_station": { + "icinfo": "Sells gasoline to the public.", + "construct": { + "rubber": 100, + "steel": 100, + "money": 300 + }, + "icwiki": "The gas station is a facility", + "wikipedia": "A filling station is a facility that sells fuel and engine lubricants for motor vehicles.A filling station that sells only electric energy is also known as a charging station, while a typical filling station can also be known as a fueling station or gas station." + }, + "furniture_factory": { + "icinfo": "Manufactures furniture by woodworking.", + "construct": { + "steel": 100, + "wood": 5000, + "money": 450 + }, + "icwiki": "The furniture factory is a facility\nThis factory is considered by many players to be a key factory. You NEED this factory to progress to getting a logistics center, which is where you can generally get aided by other players for resources. Want to get a good retail set-up? You need others to give you the resources. Want to be an end-product wholesaler? You need CPUs and other penultimate tier resources. The fact that a logistics center is pretty much necessary makes furniture factories also necessary.\nLater on, when mass reincorporating without the free logistics center from the season pass, the speed one can get the 250 furniture requirement to build the logistics center can make or break your tokens attained in a certain timeframe by a large margin.", + "wikipedia": "None", + "icp": "Used wood to make furniture." + }, + "aluminum_factory": { + "icinfo": "A factory producing aluminum by processing bauxite.", + "construct": { + "steel": 150, + "rubber": 300, + "money": 450 + }, + "icwiki": "The aluminum factory is a facility", + "wikipedia": "None" + }, + "led_factory": { + "icinfo": "A factory producing LEDs by processing silicon.", + "construct": { + "steel": 200, + "wood": 2000, + "silicon": 10, + "money": 2850 + }, + "icwiki": "The LED factory is a facility", + "wikipedia": "None", + "icp": "Produce good light." + }, + "polyester_factory": { + "icinfo": "A factory producing polyester by processing crude oil.", + "construct": { + "steel": 500, + "wood": 10000, + "money": 500 + }, + "icwiki": "The polyester factory is a facility", + "wikipedia": "None", + "icp": "Used resourse to produce polyester." + }, + "silicon_mine": { + "icinfo": "A mine extracting silicon from the ground.", + "construct": { + "steel": 400, + "wood": 25000, + "money": 2050 + }, + "icwiki": "Silicon mine produce", + "wikipedia": "None", + "icp": "Make silicon." + }, + "bicycle_factory": { + "icinfo": "Manufactures bicycles by combining other assets.", + "construct": { + "steel": 500, + "rubber": 200, + "wood": 10000, + "money": 3100 + }, + "icwiki": "The bicycle factory is a facility", + "wikipedia": "None", + "icp": "Use many things to produce." + }, + "gold_mine": { + "icinfo": "A mine extracting gold from the ground.", + "construct": { + "steel": 1000, + "wood": 50000, + "money": 4500 + }, + "icwiki": "Gold mine produce", + "wikipedia": "Gold mining is the resource extraction of gold by mining." + }, + "lamp_factory": { + "icinfo": "A factory producing lamps by combining other assets.", + "construct": { + "rubber": 2000, + "wood": 25000, + "money": 10250 + }, + "icwiki": "The Lamp factory is a facility", + "wikipedia": "None" + }, + "cotton_farm": { + "icinfo": "A farm producing cotton from cotton plants.", + "construct": { + "wood": 100000, + "money": 15000 + }, + "icwiki": "The cotton farm is a facility", + "wikipedia": "None", + "icp": "Don't need things can produce cotton." + }, + "plastic_factory": { + "icinfo": "Produces plastic by processing crude oil.", + "construct": { + "steel": 200, + "rubber": 6000, + "wood": 5000, + "money": 5650 + }, + "icwiki": "The plastic factory is a facility", + "wikipedia": "None", + "icp": "Use oil make thing." + }, + "ccd_factory": { + "icinfo": "A factory producing CCDs by processing silicon.", + "construct": { + "steel": 5000, + "glass": 500, + "money": 14000 + }, + "icwiki": "The CCD factory is a facility", + "wikipedia": "None" + }, + "glass_factory": { + "icinfo": "Produces glass by processing silicon.", + "construct": { + "steel": 6000, + "aluminum": 500, + "money": 30000 + }, + "icwiki": "The glass factory is a facility", + "wikipedia": "None", + "icp": "Why not made of sand?" + }, + "cpu_factory": { + "icinfo": "Manufactures CPUs by combining other assets.", + "construct": { + "wood": 100000, + "aluminum": 10000, + "glass": 1000, + "money": 15000 + }, + "icwiki": "The CPU factory is a facility", + "wikipedia": "None", + "icp": "Make the strong processer." + }, + "clothing_factory": { + "icinfo": "A factory producing clothing from cotton and polyester.", + "construct": { + "steel": 1000, + "wood": 100000, + "money": 137000 + }, + "icwiki": "The Clothing factory is a facility", + "wikipedia": "None" + }, + "cell_phone_factory": { + "icinfo": "Manufactures cell phones by combining other assets.", + "construct": { + "steel": 10000, + "wood": 50000, + "aluminum": 50000, + "cpu": 100, + "glass": 2000, + "money": 32500 + }, + "icwiki": "The cell phone factory is a facility", + "wikipedia": "None", + "icp": "Make some phone." + }, + "coal_power_plant": { + "icinfo": "Produces energy by burning coal.", + "construct": { + "steel": 50000, + "wood": 200000, + "money": 70000 + }, + "icwiki": "Produces energy by burning coal.", + "wikipedia": "A coal-fired power station or coal power plant is a thermal power station which burns coal to generate electricity. Coal-fired power stations generate over a third of the world's electricity but cause hundreds of thousands of early deaths each year, mainly from air pollution.", + "icp": "Not a good power resourse in real life." + }, + "laptop_factory": { + "icinfo": "Manufactures laptops by combining other assets.", + "construct": { + "steel": 10000, + "wood": 100000, + "aluminum": 10000, + "glass": 10000, + "money": 365000 + }, + "icwiki": "__Sus__taining __it__", + "wikipedia": "None" + }, + "research_chemical_factory": { + "icinfo": "A factory producing research chemicals by processing crude oil.", + "construct": { + "steel": 10000, + "rubber": 50000, + "aluminum": 10000, + "money": 330000 + }, + "icwiki": "Sustaining it require", + "wikipedia": "None", + "icp": "Researches." + }, + "solar_power_plant": { + "icinfo": "Produces energy using solar power.", + "construct": { + "steel": 5000, + "aluminum": 25000, + "glass": 25000, + "money": 110000 + }, + "icwiki": "The solar power plant is a facility", + "wikipedia": "Solar power is the conversion of energy from sunlight into electricity, either directly using photovoltaics (PV), indirectly using concentrated solar power, or a combination. Concentrated solar power systems use lenses or mirrors and solar tracking systems to focus a large area of sunlight into a small beam. Photovoltaic cells convert light into an electric current using the photovoltaic effect.", + "icp": "A clean energy resourse, and no need consumes." + }, + "rocket_fuel_factory": { + "icinfo": "Produces rocket fuel by processing energy.", + "construct": { + "money": 1000000 + }, + "icwiki": "[Blank]", + "wikipedia": "None", + "icp": "It's get gave up too." + }, + "digital_camera_factory": { + "icinfo": "A factory producing digital cameras by combining other assets.", + "construct": { + "steel": 10000, + "aluminum": 100000, + "glass": 20000, + "money": 320000 + }, + "icwiki": "__Sus__taining __it__ require", + "wikipedia": "None", + "icp": "Digital things sourse." + }, + "television_factory": { + "icinfo": "Manufactures televisions by combining other assets.", + "construct": { + "rubber": 10000, + "steel": 10000, + "aluminum": 150000, + "glass": 10000, + "money": 10000 + }, + "icwiki": "Sustaining is require", + "wikipedia": "None", + "icp": "Some place to make big moniter." + }, + "gasoline_engine_factory": { + "icinfo": "Manufactures gasoline engines by combining other assets.", + "construct": { + "steel": 100000, + "rubber": 100000, + "money": 500000 + }, + "icwiki": "The Gasoline engine factory is a facility", + "wikipedia": "None", + "icp": "A engine factory." + }, + "car_factory": { + "icinfo": "Manufactures cars by combining other assets.", + "construct": { + "steel": 100000, + "rubber": 10000, + "laptop": 1000, + "furniture": 3000, + "money": 6750000 + }, + "icwiki": "The car factory is a facility", + "wikipedia": "The automotive industry comprises a wide range of companies and organizations involved in the design, development, manufacturing, marketing, and selling of motor vehicles.It is one of the world's largest industries by revenue.", + "icp": "Big machines." + }, + "logistics_center": { + "icinfo": "Allows you to export assets and increases your hourly asset purchase limit.", + "construct": { + "steel": 10000, + "aluminum": 250000, + "glass": 10000, + "furniture": 250, + "money": 8605000 + }, + "icwiki": "The logistics center allows for corporations to export assets between regions and access to the market. In addition,each logistics center increases the hourly buy limit by $1,000,000.", + "wikipedia": "A logistics center, or depot, is a facility dedicated to logistical operations. A logistics center might be a warehouse, freight forwarder, or a repair depot." + }, + "prescription_drug_factory": { + "icinfo": "A factory producing prescription drugs by processing research chemicals.", + "construct": { + "rubber": 100000, + "aluminum": 250000, + "glass": 10000, + "money": 13000000 + }, + "icwiki": "Sustaining it require", + "wikipedia": "None", + "icp": "Make drugs have a good profit." + }, + "airport": { + "icinfo": "Allows for jets to land and take off along with amenities for their passengers. Each additional region that you have an airport built in will reduce the production time of this facility.", + "construct": { + "steel": 50000, + "glass": 200000, + "furniture": 2000, + "money": 13480000 + }, + "icwiki": "Airports have a variable production interval which changes depending on how many total airports you have built in the current region.", + "wikipedia": "An airport is an aerodrome with extended facilities, mostly for commercial air transport.Airports often have facilities to park and maintain aircraft, and a control tower.", + "icp": "Unstable time." + }, + "retail_store": { + "icinfo": "Allows consumers to buy products directly from you.", + "construct": { + "steel": 100000, + "clothing": 500, + "aluminum": 100000, + "glass": 100000, + "furniture": 5000, + "money": 15485000 + }, + "icwiki": "The retail store is a facility created in the 1.7.~~1~~0 Update. It sells products automatically to customers. For more info on the facilities, please see the Retail page.", + "wikipedia": "The retail format (also known as the retail formula) influences the consumer's store choice and addresses the consumer's expectations. At its most basic level, a retail format is a simple marketplace, that is; a location where goods and services are exchanged.", + "icp": "Make good price, sell high price." + }, + "research_facility": { + "icinfo": "Allows you to research new technologies.", + "construct": { + "steel": 100000, + "laptop": 600, + "clothing": 100, + "research_chemical": 100000, + "money": 12877000 + }, + "icwiki": "The research facility allows corporations to perform research. The research facility must be built in the region in which research would be performed.Note that you can research multiple blueprints at once by building the research centers in different regions.\nResearch allows corporations to discover blueprints by spending 1,000,000 energy and $1,000,000, with an additional expense of 500,000 energy+ for every research facility beyond 6 in the region, which can then be instantly finished with 4x gratitude points. Blueprints can be developed into their respective technologies to be installed in a region.", + "wikipedia": "A research institute, research centre, or research center is an establishment founded for doing research. Research institutes may specialize in basic research or may be oriented to applied research. Although the term often implies natural science research, there are also many research institutes in the social science as well, especially for sociological and historical research purposes.", + "icp": "Do some research, get some good blueprints." + }, + "customer_support_center": { + "icinfo": "Provides support to your retail customers.", + "construct": { + "steel": 100000, + "laptop": 1000, + "aluminum": 100000, + "glass": 100000, + "furniture": 5000, + "money": 43300000 + }, + "icwiki": "The Customer Support Center (commonly called csc for short) is a facility created in the 1.7.~~1~~0 Update. It is a support facility for your retail store(s). It directly affects your retail reputation, which affects your retail demand per hour.\nCustomer support centers provide a range of customer services to assist customers in making cost-effective and correct use of a product. It includes assistance in planning, installation, training, troubleshooting, maintenance, upgrading, and disposal of a product.", + "wikipedia": "None", + "icp": "Support customers." + }, + "hq": { + "icinfo": "Unlocks retail store commands. You only need one hq for your entire corporation.", + "construct": { + "logistics expension": 1, + "steel": 100000, + "laptop": 20000, + "television": 2000, + "glass": 100000, + "furniture": 10000, + "money": 17600000 + }, + "icwiki": "The HQ or retail headquarters is a facility created in the 1.7.~~1~~0 Update. It is a support facility for your retail store(s). It provides the ability to use commands that work with your retail stores. For example; add/ remove retail products, adjust product sell price. Only one of this building type is required to manage retail stores, no matter what region the retail stores are in.\nHeadquarters (commonly referred to as HQ) denotes the location where most, if not all, of the important functions of an organization are coordinated. In the United States, the corporate headquarters represents the entity at the center or the top of a corporation taking full responsibility for managing all business activities. In the United Kingdom, the term head office is most commonly used for the headquarters of large corporations.", + "wikipedia": "Headquarters denotes the location where most, if not all, of the important functions of an organization are coordinated. In the United States, the corporate headquarters represents the entity at the center or the top of a corporation taking full responsibility for managing all business activities.", + "icp": "Retails HQ." + } + }, + "blueprints": { + "oil_mapping_blueprint": { + "icinfo": "A blueprint for `oil mapping`. You can develop this technology by typing `$$develop oil mapping`", + "rarity": "common", + "require": { + "steel": 10000, + "cpu": 1000 + }, + "icp": "Very common" + }, + "coal_detector_blueprint": { + "icinfo": "A blueprint for `coal detector`. You can develop this technology by typing `$$develop coal detector`", + "rarity": "common", + "require": { + "coal": 10000, + "steel": 1000000 + } + }, + "log_loader_blueprint": { + "icinfo": "A blueprint for `log loader`. You can develop this technology by typing `$$develop log loader`", + "rarity": "common", + "require": { + "steel": 1000000, + "rubber": 100000 + } + }, + "advanced_woodworking_blueprint": { + "icinfo": "A blueprint for `advanced woodworking`. You can develop this technology by typing `$$develop advanced woodworking`", + "rarity": "uncommon", + "require": { + "steel": 50000, + "plastic": 50000 + } + }, + "bauxite_detector_blueprint": { + "icinfo": "A blueprint for `bauxite detector`. You can develop this technology by typing `$$develop bauxite detector`", + "rarity": "uncommon", + "require": { + "steel": 1000000, + "aluminum": 800000, + "bauxite": 50000 + } + }, + "jet_fuel_refining_blueprint": { + "icinfo": "A blueprint for `jet fuel refining`. You can develop this technology by typing `$$develop jet fuel refining`", + "rarity": "uncommon", + "require": { + "steel": 1000000, + "rubber": 100000, + "aluminum": 100000 + } + }, + "gold_detector_blueprint": { + "icinfo": "A blueprint for `gold detector`. You can develop this technology by typing `$$develop gold detector`", + "rarity": "uncommon", + "require": { + "steel": 100000, + "gold": 50000 + } + }, + "vacuum_distillation_blueprint": { + "icinfo": "A blueprint for `vacuum distillation`. You can develop this technology by typing `$$develop vacuum distillation`", + "rarity": "uncommon", + "require": { + "steel": 1000000, + "rubber": 800, + "aluminum": 800000 + } + }, + "robotic_automation_blueprint": { + "icinfo": "A blueprint for `robotic automation`. You can develop this technology by typing `$$develop robotic automation`", + "rarity": "rare", + "require": { + "steel": 1000000, + "rubber": 500000, + "aluminum": 1000000, + "cpu": 10000, + "plastc": 5000000 + } + }, + "factory_specialization_blueprint": { + "icinfo": "A blueprint for `factory specialization`. You can develop this technology by typing `$$develop factory specialization`", + "rarity": "rare", + "require": { + "steel": 1000000, + "rubber": 500000, + "alluminum": 1000000 + } + }, + "mining_specialization_blueprint": { + "icinfo": "A blueprint for `mining specialization`. You can develop this technology by typing `$$develop mining specialization`", + "rarity": "rare", + "require": { + "steel": 1000000, + "rubber": 500000, + "aluminum": 1000000 + } + }, + "oil_specialization_blueprint": { + "icinfo": "A blueprint for `oil specialization`. You can develop this technology by typing `$$develop oil specialization`", + "rarity": "rare", + "require": { + "steel": 1000000, + "rubber": 500000, + "aluminum": 1000000 + } + }, + "energy_specialization_blueprint": { + "icinfo": "A blueprint for `energy specialization`. You can develop this technology by typing `$$develop energy specialization`", + "rarity": "rare", + "require": { + "steel": 1000000, + "rubber": 500000, + "aluminum": 1000000 + } + }, + "logistics_expansion_blueprint": { + "icinfo": "A blueprint for `logistics expansion`. You can develop this technology by typing `$$develop logistics expansion`", + "rarity": "superior", + "require": { + "steel": 400000, + "gold": 100000, + "cpu": 10000, + "plastic": 1000000 + } + }, + "airport_tram_blueprint": { + "icinfo": "A blueprint for `airport tram`. You can develop this technology by typing `$$develop airport tram`", + "rarity": "superior", + "require": { + "steel": 1000000, + "rubber": 500000, + "aluminum": 1000000 + } + }, + "quality_control_blueprint": { + "icinfo": "A blueprint for `quality control`. You can develop this technology by typing `$$develop quality control`", + "rarity": "superior", + "require": { + "steel": 1000000, + "aluminum": 1000000, + "silicon": 200000 + } + }, + "reincorporation_computer_blueprint": { + "icinfo": "A blueprint for `reincorporation computer`. You can develop this technology by typing `$$develop reincorporation computer`", + "rarity": "superior", + "require": { + "scrap": 100000, + "cpu": 10000 + } + } + }, + "technologies": { + "oil_mapping": { + "icinfo": "Improves all `oil well` you own in this region. Each `oil well` now produces **14x** of `crude oil`.", + "rarity": "common", + "scrap": 2040, + "upgrade": { + "u": { + "icinfo": "Improves all `oil well` you own in this region. Each `oil well` now produces **18x** of `crude oil`.", + "scrap": 6120 + }, + "uu": { + "icinfo": "Improves all `oil well` you own in this region. Each `oil well` now produces **100x** of `crude oil`.", + "scrap": 18360 + } + }, + "boost": ["14", "18", "100"], + "affect": "oil well", + "icwiki": "Improves all oil wells of a corporation in the region it is installed in to produce **14x** crude oil instead of 10x.", + "wikipedia": "None" + }, + "coal_detector": { + "icinfo": "Improves all `coal mine` you own in this region. Each `coal mine` now produces **12x** of `coal`.", + "rarity": "common", + "scrap": 1800, + "upgrade": { + "u": { + "icinfo": "Improves all `coal mine` you own in this region. Each `coal mine` now produces **16x** of `coal`.", + "scrap": 5400 + }, + "uu": { + "icinfo": "Improves all `coal mine` you own in this region. Each `coal mine` now produces **80x** of `coal`.", + "scrap": 16200 + } + }, + "boost": ["12", "16", "80"], + "affect": "coal mine", + "icwiki": "Improves all coal mines of a corporation in the region it is installed in to produce 12x coal instead of 8x.\nThe u version makes it produce 16x coal, and the uu version produces 80x coal. It is 5x more powerful to have a uu version versus u version. If you will produce coal for coal power plants, then rushing a uu is a must!", + "wikipedia": "None" + }, + "log_loader": { + "icinfo": "Improves all `tree farm` you own in this region. Each `tree farm` now takes `00:04` for production.", + "rarity": "common", + "scrap": 1800, + "upgrade": { + "u": { + "icinfo": "Improves all `tree farm` you own in this region. Each `tree farm` now takes `00:03` for production.", + "scrap": 5400 + }, + "uu": { + "icinfo": "Improves all `tree farm` you own in this region. Each `tree farm` now takes `00:03` for production and produces **4x** of `wood`.", + "scrap": 5400 + } + }, + "boost": ["-1 Second", "-2 Second", "-2 Second + 4"], + "affect": "tree farm", + "icwiki": "Improves all tree farms of a corporation in the region it is installed in to reduce its production time to 0:04 from 0:05.", + "wikipedia": "A loader is a heavy equipment machine used in construction to move or load materials such as soil, rock, sand, demolition debris, etc. into or onto another type of machinery (such as a dump truck, conveyor belt, feed-hopper, or railroad car).", + "icp": "Just loading log on trucks" + }, + "advanced_woodworking": { + "icinfo": "Improves all `furniture factory` you own in this region. Each `furniture factory` now takes `03:20` for production.", + "rarity": "uncommon", + "scrap": 2100, + "upgrade": { + "u": { + "icinfo": "Improves all `furniture factory` you own in this region. Each `furniture factory` now takes `02:40` for production.", + "scrap": 6300 + }, + "uu": { + "icinfo": "Improves all `furniture factory` you own in this region. Each `furniture factory` now takes `00:30` for production.", + "scrap": 18900 + } + }, + "boost": ["-40 Second", "-80 Second", "-210 Second"], + "affect": "furniture factory", + "icwiki": "Improves all furniture factories of a corporation in the region it is installed in to reduce its production time to 3:20 from 4:00.", + "wikipedia": "None" + }, + "bauxite_detector": { + "icinfo": "Improves all `bauxite mine` you own in this region. Each `bauxite mine` now produces **50x** of `bauxite`.", + "rarity": "uncommon", + "scrap": 2400, + "upgrade": { + "u": { + "icinfo": "Improves all `bauxite mine` you own in this region. Each `bauxite mine` now produces **60x** of `bauxite`.", + "scrap": 7200 + }, + "uu": "None" + }, + "boost": ["50", "60"], + "affect": "bauxite mine", + "icwiki": "Improves all bauxite mines of a corporation in the region it is installed in to produce 50x bauxite instead of 40x.", + "wikipedia": "None" + }, + "jet_fuel_refining": { + "icinfo": "Changes all `oil refinery` you own in this region. Each `oil refinery` now produces `jet fuel` instead of `gasoline`.", + "rarity": "uncommon", + "scrap": 2000, + "upgrade": { + "u": { + "icinfo": "Changes all `oil refinery` you own in this region. Each `oil refinery` now produces `jet fuel` instead of `gasoline` and takes `0:08` instead of `0:30`.", + "scrap": 6000 + }, + "uu": "None" + }, + "boost": ["jet fuel", "-22 Second"], + "affect": "oil refinery", + "icwiki": "Improves all Oil refineries of a corporation in the region it is installed in to produce 1x Jet fuel instead of 1x Gasoline every 30 seconds. This is the only way to produce Jet fuel.\nThe u version makes it produce 1x Jet fuel in 8 seconds instead of 30 seconds.", + "wikipedia": "None" + }, + "gold_detector": { + "icinfo": "Improves all `gold mine` you own in this region. Each `gold mine` now produces **6x** of `gold`.", + "rarity": "uncommon", + "scrap": 2800, + "upgrade": { + "u": { + "icinfo": "Improves all `gold mine` you own in this region. Each `gold mine` now produces **8x** of `gold`.", + "scrap": 8400 + }, + "uu": { + "icinfo": "Improves all `gold mine` you own in this region. Each `gold mine` now produces **10x** of `gold`.", + "scrap": 25200 + } + }, + "boost": ["6", "8", "10"], + "affect": "gold mine", + "icwiki": "Improves all gold mines of a corporation in the region it is installed in to produce 6x gold instead of 4x.", + "wikipedia": "None" + }, + "vacuum_distillation": { + "icinfo": "Changes all `oil refinery` you own in this region. Each `oil refinery` now takes `0:15` for production.", + "rarity": "uncommon", + "scrap": 2400, + "upgrade": { + "u": { + "icinfo": "Changes all `oil refinery` you own in this region. Each `oil refinery` now takes `0:08` for production.", + "scrap": 7200 + }, + "uu": "None" + }, + "boost": ["-15 Second", "-22 Second"], + "affect": "oil refinery", + "icwiki": "Changes all oil refinery you own in this region. Each oil refinery now takes 0:15 for production when installed. The u version further decreases to 0:08 of production time.", + "wikipedia": "Vacuum distillation is distillation performed under reduced pressure, which allows the purification of compounds not readily distilled at ambient pressures or simply to save time or energy. This technique separates compounds based on differences in their boiling points. This technique is used when the boiling point of the desired compound is difficult to achieve or will cause the compound to decompose." + }, + "robotic_automation": { + "icinfo": "Changes **all facilities** you own in this region. Each facility now has `2.5%` increased production.", + "rarity": "rare", + "scrap": 4000, + "upgrade": { + "u": { + "icinfo": "Changes **all facilities** you own in this region. Each facility now has `4%` increased production.", + "scrap": 12000 + }, + "uu": { + "icinfo": "Changes **all facilities** you own in this region. Each facility now has `6%` increased production.", + "scrap": 36000 + } + }, + "boost": ["2.5%", "4%", "6%"], + "affect": "all facilities", + "icwiki": "Improves all facilities by 2.5% when installed.", + "wikipedia": "Robotic process automation is a form of business process automation technology based on metaphorical software robots or on artificial intelligence/digital workers.", + "icp": "Strong tech" + }, + "factory_specialization": { + "icinfo": "If you have more than **50x** of a factory in the region, raises the level of all of those factories' you own in the region by `4`.", + "rarity": "rare", + "scrap": 3000, + "upgrade": { + "u": "None", + "uu": "None" + }, + "boost": ["+4 levels"], + "affect": "all factories", + "icwiki": "If you have more than 50x of a factory in the region, raises the level of all of those factories' you own in the region by 4.\nThe u version and uu version is not available at this time.", + "wikipedia": "None" + }, + "mining_specialization": { + "icinfo": "If you have more than **100x** mines in the region, raises the level of all mines you own in the region by `4`.", + "rarity": "rare", + "scrap": 3000, + "upgrade": { + "u": "None", + "uu": "None" + }, + "boost": ["+4 levels"], + "affect": "all mines", + "icwiki": "If you have more than 100x mines in the region, raises the level of all mines you own in the region by 4.\nThe u version and uu version is not available at this time.", + "wikipedia": "None" + }, + "oil_specialization": { + "icinfo": "If you have more than **50x** `oil well` in the region, raises the level of all `oil well` you own in the region by `4`.", + "rarity": "rare", + "scrap": 3000, + "upgrade": { + "u": "None", + "uu": "None" + }, + "boost": ["+4 levels"], + "affect": "oil well", + "icwiki": "If you have more than 50x oil well in the region, raises the level of all oil well you own in the region by 4.\nThe u version and uu version is not available at this time.", + "wikipedia": "None" + }, + "energy_specialization": { + "icinfo": "If you have more than `100x` energy plants in the region, raises the level of all energy plants you own in the region by `4`.", + "rarity": "rare", + "scrap": 3000, + "upgrade": { + "u": "None", + "uu": "None" + }, + "boost": ["+4 levels"], + "affect": "all energy plants", + "icwiki": "If you have more than 100x energy plants in the region, raises the level of all energy plants you own in the region by 4.\nThe u version and uu version is not available at this time.", + "wikipedia": "None" + }, + "logistics_expansion": { + "icinfo": "Improves all `logistics center` you own in this region. Each `logistics center` now increases your asset purchase limit by `$4,000,000.00`.", + "rarity": "superior", + "scrap": 5000, + "upgrade": { + "u": { + "icinfo": "Improves all `logistics center` you own in this region. Each `logistics center` now increases your asset purchase limit by `$5,000,000.00`.", + "scrap": 15000 + }, + "uu": "None" + }, + "boost": ["2x", "2.5x"], + "affect": "logistics center", + "icwiki": "Improves all logistics centers of a corporation in the region it is installed in to increase a corporation's purchase limit by $2,000,000.00 each instead of $1,000,000.00 each.", + "wikipedia": "None" + }, + "airport_tram": { + "icinfo": "Changes all `airport` you own in this region. Each `airport` now takes `0:04` less for production (but never less than 0:20).", + "rarity": "superior", + "scrap": 3000, + "upgrade": { + "u": { + "icinfo": "Changes all `airport` you own in this region. Each `airport` now takes `0:08` less for production (but never less than 0:20).", + "scrap": 9000 + }, + "uu": "None" + }, + "boost": ["-4 Second", "-8 Second"], + "affect": "airport", + "icwiki": "Improves all Airports of a corporation in the region it is installed in to reduce the production time by -4 seconds. But never less then 0:30 seconds.\nThe u version makes it reduce the production time by -8 seconds. But never less then 0:30 seconds. A uu version is not available at this time.", + "wikipedia": "This is a list of automated people mover systems located at airport complexes around the world. These systems are used to transport people from one location within an airport to another. Many different types of people movers are used at airports, including automated guideway transit, monorail, and maglev." + }, + "quality_control": { + "icinfo": "Raises the level of all facilities you own in the region by `2`.", + "rarity": "superior", + "scrap": 3000, + "upgrade": { + "u": { + "icinfo": "Raises the level of all facilities you own in the region by `4`.", + "scrap": 9000 + }, + "uu": "None" + }, + "boost": ["+2 levels", "+4 levels"], + "affect": "all facilities", + "icwiki": "Improves all facilities of a corporation in the region it is installed in to raises the level of all facilities you own in the region by 2.\nThe u version makes it raises the level of all facilities you own in the region by 4. A uu version is not available at this time.", + "wikipedia": "Quality control is a process by which entities review the quality of all factors involved in production. ISO 9000 defines quality control as \"A part of quality management focused on fulfilling quality requirements\"." + }, + "reincorporation_computer": { + "icinfo": "If you have at least **4x** technologies installed in this region, reduces your *reincorporation cooldown* in this region to **2 hours**.", + "rarity": "superior", + "scrap": 3000, + "upgrade": { + "u": "None", + "uu": "None" + }, + "boost": ["Decreased to 2 hours"], + "affect": "reincorporation cooldown", + "icwiki": "If you have at least 4x technologies installed in this region, reduces your reincorporation cooldown in this region to 2 hours.\nThe u version and uu version is not available at this time.", + "wikipedia": "None" + } + }, + "services": { + "medium_park": { + "icinfo": "Some more greenery never hurts either.", + "effect": "**+2** Happiness", + "cost": 1000000, + "wikipedia": "None" + }, + "region_office": { + "icinfo": "Democracy at work.", + "effect": "Access to enable and disable regional policies.", + "cost": 100000000, + "wikipedia": "None" + }, + "large_park": { + "icinfo": "A much needed relief from the monotony of factory work.", + "effect": "**+3** Happiness", + "cost": 10000000, + "wikipedia": "None" + }, + "land_management_office": { + "icinfo": "An office dedicated to monitoring and administering land in the region.", + "effect": "**-5.0%** land price", + "cost": 500000000, + "wikipedia": "None" + }, + "university": { + "icinfo": "Higher education is the key to success, right?", + "effect": "`-10:00` to research time", + "cost": 200000000, + "wikipedia": "A university is an institution of higher education and research which awards academic degrees in various academic disciplines. Universities typically offer both undergraduate and postgraduate programs. In the United States, universities must offer graduate degrees; institutions offering only undergraduate degrees are colleges.", + "icp": "A big school" + }, + "small_park": { + "icinfo": "Some greenery never hurts.", + "effect": "**+1** Happiness", + "cost": 100000, + "wikipedia": "None" + }, + "fiber_infrastructure": { + "icinfo": "No more copper.", + "effect": "**+5** to facility levels", + "cost": 10000000000, + "wikipedia": "Fiber to the x or fiber in the loop is a generic term for any broadband network architecture using optical fiber to provide all or part of the local loop used for last mile telecommunications. As fiber optic cables are able to carry much more data than copper cables, especially over long distances, copper telephone networks built in the 20th century are being replaced by fiber.", + "icp": "Hard spell word, anyway, it's a fast facility" + } + }, + "policies": { + "land_grant": { + "affect": "**-5%** to `land` price, **+25%** to all facilities' build price", + "cost": 5, + "wikipedia": "A land grant is a gift of real estate – land or its use privileges – made by a government or other authority as an incentive, means of enabling works, or as a reward for services to an individual, especially in return for military service. Grants of land are also awarded to individuals and companies as incentives to develop unused land in relatively unpopulated countries; the process of awarding land grants are not limited to the countries named below." + }, + "high_income_tax": { + "affect": "**-5** Happiness in a region, **+5** Funding points", + "cost": 0, + "wikipedia": "None" + }, + "organic_farming": { + "affect": "**+10%** to Soil health, **+10%** to all farms' build price", + "cost": 2, + "wikipedia": "Organic farming is an agricultural system which originated early in the 20th century in reaction to rapidly changing farming practices. Certified organic agriculture accounts for 70 million hectares globally, with over half of that total in Australia." + }, + "research_grant": { + "affect": "`-10:00` research time, **+10%** energy price", + "cost": 3, + "wikipedia": "None" + }, + "low_income_tax": { + "affect": "**+2** Happiness in a region", + "cost": 4, + "wikipedia": "None", + "icp": "Good thing" + }, + "tourism_compaign": { + "affect": "**-4s** to `airport` production time (but never less than 0:30), airports require an additional **4x** of `jet fuel`", + "cost": 5, + "wikipedia": "None" + }, + "regional_planning": { + "affect": "**-25%** to all facilities' build price, **+5%** to `land` price", + "cost": 1, + "wikipedia": "Regional planning deals with the efficient placement of land-use activities, infrastructure, and settlement growth across a larger area of land than an individual city or town. Regional planning is related to urban planning as it relates land use practices on a broader scale. It also includes formulating laws that will guide the efficient planning and management of such said regions.Regional planning can be comprehensive by covering various subjects, but it more often specifies a particular subject, which requires region-wide consideration." + }, + "public_logistics_access": { + "affect": "All corporations can export and buy assets as if they had an additional `logistics center` in this region (this does **not** affect market access), **+10%** to all facilities' build price", + "cost": 1, + "wikipedia": "None" + }, + "solar_subsidies": { + "affect": "**-10%** solar power plant build price, **-10%** energy price", + "cost": 3, + "wikipedia": "None" + } + } + } +} \ No newline at end of file diff --git a/icpfiles/Ori-files/Idle Corp/Produce speed.txt b/icpfiles/Ori-files/Idle Corp/Produce speed.txt new file mode 100644 index 0000000..974b1fe --- /dev/null +++ b/icpfiles/Ori-files/Idle Corp/Produce speed.txt @@ -0,0 +1,282 @@ +speed pre second +tree farm +$100.00 +Produces +| 0.4x wood +Every 00:05 + +oil well +$300.00 +Produces +| 1x crude oil +Every 00:10 + +coal mine +$400.00 +Produces +| 0.8x coal +Every 00:10 + +iron mine +$550.00 +Produces +| 0.05x iron +Every 00:20 + +oil refinery +$1,050.00 +Consumes +| 0.1666x crude oil +Produces +| 0.0333x gasoline +Every 00:30 + +steel mill +$1,200.00 +Consumes +| 0.02857x iron +| 0.11428x coal +Produces +| 0.02857x steel +Every 00:35 + +bauxite mine +$1,300.00 +Produces +| 1.6x bauxite +Every 00:25 + +rubber factory +$1,500.00 +Consumes +| 0.2x crude oil +Produces +| 0.025x rubber +Every 00:40 + +gas station +$1,800.00 +Consumes +| 0.13333x gasoline +Produces +| $1.00 +Every 00:15 + +furniture factory +$2,000.00 +Consumes +| 0.04166x wood +Produces +| 0.004166x furniture +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +| 0.4x bauxite +Produces +| 0.12x aluminum +Every 00:25 + +led factory +$5,000.00 +Consumes +| 0.04x silicon +Produces +| 0.8x led +Every 00:50 + +polyester factory +$6,000.00 +Consumes +| 4.4x crude oil +Produces +| 0.56x polyester +Every 00:25 + +silicon mine +$9,000.00 +Produces +| 0.02x silicon +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +| 0.13333x steel +| 0.088888x rubber +Produces +| 0.011111x bicycle +Every 01:30 + +gold mine +$20,000.00 +Produces +| 0.01333x gold +Every 05:00 + +lamp factory +$28,000.00 +Consumes +| 0.4x plastic +| 0.8x led +Produces +| 0.13333x lamp +Every 00:15 + +cotton farm +$30,000.00 +Produces +| 0.2x cotton +Every 00:20 + +plastic factory +$50,000.00 +Consumes +| 0.8x crude oil +Produces +| 8x plastic +Every 00:25 + +ccd factory +$69,000.00 +Consumes +| 0.0923x silicon +Produces +| 0.01538x ccd +Every 01:05 + +glass factory +$80,000.00 +Consumes +| 0.05714x silicon +Produces +| 0.228x glass +Every 00:35 + +cpu factory +$100,000.00 +Consumes +| 0.00833x gold +| 0.0666x silicon +Produces +| 0.04166x cpu +Every 02:00 + +clothing factory +$160,000.00 +Consumes +| 0.5x polyester +| 0.25x cotton +Produces +| 0.25x clothing +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +| 0.1111x plastic +| 0.1111x glass +| 0.1111x cpu +Produces +| 0.1111x cell phone +Every 00:45 + +coal power plant +$500,000.00 +Consumes +| 1.6666x coal +Produces +| 1.1666x energy +Every 00:30 + +laptop factory +$800,000.00 +Consumes +| 0.0888x plastic +| 0.0222x glass +| 0.0111x cpu +Produces +| 0.0111x laptop +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +| 0.3333x crude oil +Produces +| 0.1333x research chemical +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +| 0.6666x energy +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +| 0.0111x energy +Produces +| 0.0011x rocket fuel +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +| 0.0125x ccd +| 1.25x plastic +Produces +| 0.0125x digital camera +Every 01:20 + +television factory +$1,500,000.00 +Consumes +| 0.2x plastic +| 0.0666x glass +| 0.0055x cpu +Produces +| 0.0055x television +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +| 0.05769x steel +| 0.02307x rubber +Produces +| 0.0038x gasoline engine +Every 04:20 + +car factory +$10,000,000.00 +Consumes +| 0.00166x gasoline engine +| 1.6666x plastic +| 0.0466x glass +| 0.0666x steel +| 0.00166x cpu +| 0.05x rubber +Produces +| 0.00166x car +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +| 0.02x research chemical +Produces +| 0.04x prescription drug +Every 00:50 + +airport +$20,000,000.00 +Consumes +| 0.1666-0.3333x jet fuel +| 0.4166-0.8333x energy +Produces +| $16.6666-33.3333 +Every 01:00 to 00:30 \ No newline at end of file diff --git a/icpfiles/Ori-files/Idle Corp/Profit.txt b/icpfiles/Ori-files/Idle Corp/Profit.txt new file mode 100644 index 0000000..1665d9a --- /dev/null +++ b/icpfiles/Ori-files/Idle Corp/Profit.txt @@ -0,0 +1,732 @@ +money IO (pre second) +tree farm +$100.00 +Produces +$0.06/fac +Profit +$0.06/fac +$0.06/land +Every 00:05 + +oil well +$300.00 +Produces +$0.1/fac +Profit +$0.1/fac +$0.1/land +Every 00:10 + +coal mine +$400.00 +Produces +$0.16/fac +Profit +$0.16/fac +$0.16/land +Every 00:10 + +iron mine +$550.00 +Produces +$0.1/fac +Profit +$0.1/fac +$0.1/land +Every 00:20 + +oil refinery +$1,050.00 +Consumes +$0.0166/fac +Produces +$0.1666/fac +Profit +$0.15/fac +1:6 +First Fac +oil well*1 +land 2 +$0.075/land +-- +oil-0.8333 +-- +$0.0833 +-- +Every 00:30 + +steel mill +$1,200.00 +Consumes +$0.057/fac +$0.0228/fac +Produces +$0.2285/fac +Profit +$0.148/fac +4:7((4:7, 1:1.75), (1:7)) +First Fac +iron mine*1 +coal mine*1 +land 3 +$0.0495/land +-- +iron-0.0214 +coal-0.6857 +-- +$0.0428 +$0.137 +-- +Every 00:35 + +bauxite mine +$1,300.00 +Produces +$0.16/fac +Profit +$0.16/fac +$0.16/land +Every 00:25 + +rubber factory +$1,500.00 +Consumes +$0.02/fac +Produces +$0.175/fac +Profit +$0.155/fac +31:200(1:6.4516) +First Fac +oil well*1 +land 2 +$0.0775/land +-- +oil-0.8 +-- +$0.08 +-- +Every 00:40 + +gas station +$1,800.00 +Consumes +$0.666/fac +Produces +$1/fac +Profit +$0.333/fac +1:1 +First Fac +oil well*1 +oil refinery*4 +land 6 +$0.0555/land +-- +oil-0.333 +-- +$0.0333 +-- +Every 00:15 + +furniture factory +$2,000.00 +Consumes +$0.00625/fac +Produces +$0.25/fac +Profit +$0.2437/fac +5:48(1:9.6) +First Fac +tree farm*1 +land 2 +$0.1218/fac +-- +wood-0.35833 +-- +$0.0537 +-- +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +$0.04/fac +Produces +$0.48/fac +Profit +$0.44/fac +1:4 +First Fac +bauxite mine*1 +land 2 +$0.22/land +-- +bauxite-1.2 +-- +$0.12 +-- +Every 00:25 + +led factory +$5,000.00 +Consumes +$1/fac +Produces +$1.6/fac +Profit +$0.6/fac +1:1 +First Fac +silicon mine*2 +land 3 +$0.2/land +Every 00:50 + +polyester factory +$6,000.00 +Consumes +$0.44/fac +Produces +$1.12/fac +Profit +$0.68/fac +1:1(22:5, 4.4:1) +First Fac +oil well*5 +land 6 +$0.1133/land +-- +oil-0.6 +-- +$0.06 +-- +Every 00:25 + +silicon mine +$9,000.00 +Produces +$0.5/fac +Profit +$0.5/fac +$0.5/land +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +$1.0666/fac +$0.622/fac +Produces +$2.6666/fac +Profit +$0.9777/fac +1:1((14:3, 4.6666:1), (32:9, 3.5555:1)) +First Fac +steel mill*5 +rubber fac*4 +land 10 +$0.0977/land +-- +steel-0.00952 +rubber-0.0111 +-- +$0.07619 +$0.0777 +-- +Every 01:30 + +gold mine +$20,000.00 +Produces +$0.8/fac +Profit +$0.8/fac +$0.8/land +Every 05:00 + +lamp factory +$28,000.00 +Consumes +$0.2/fac +$1.6/fac +Produces +$3.3333/fac +Profit +$ 1.5333/fac +1:1((1:20), (1:1)) +First Fac +plastic fac*1 +led fac*1 +land 3 +$0.5111/land +-- +plastic-7.6 +-- +$3.8 +-- +Every 00:15 + +cotton farm +$30,000.00 +Produces +$1/fac +Profit +$1/fac +$1/land +Every 00:20 + +plastic factory +$50,000.00 +Consumes +$0.08/fac +Produces +$4/fac +Profit +$3.92/fac +4:5(1:1.25) +First Fac +oil well*1 +land 2 +$1.96/land +-- +oil-0.2 +-- +$0.02 +-- +Every 00:25 + +ccd factory +$69,000.00 +Consumes +$2.307/fac +Produces +$7.6923/fac +Profit +$5.3846/fac +1:1(60:13, 4.615:1) +First Fac +silicon mine*5 +land 6 +$0.8974/land +-- +silicon-0.00769 +-- +$0.1923 +-- +Every 01:05 + +glass factory +$80,000.00 +Consumes +$1.4285/fac +Produces +$6.8571/fac +Profit +$5.4285/fac +1:1(20:7, 2.857:1) +First Fac +silicon mine*3 +land 4 +$1.3571/land +-- +silicon-0.00285 +-- +$0.0714 +-- +Every 00:35 + +cpu factory +$100,000.00 +Consumes +$0.5/fac +$1.6666/fac +Produces +$8.3333/fac +Profit +$6.1666/fac +1:1((5:8, 1:1.6), (10:3, 3.333:1)) +First Fac +gold mine*1 +silicon mine*4 +land 6 +$1.0277/land +-- +gold-0.005 +silicon-0.0133 +-- +$0.3 +$0.3333 +-- +Every 02:00 + +clothing factory +$160,000.00 +Consumes +$1/fac +$1.25/fac +Produces +$7.5/fac +Profit +$5.25/fac +1:1((25:28, 1:1.12), (5:4, 1.25:1)) +First Fac +oil well*5 +polyester fac*1 +cotton farm*2 +land 4 +$1.3125/land +-- +oil-0.6 +polyester-0.06 +cotton-0.15 +-- +$0.06 +$0.12 +$0.75 +-- +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +$0.0555/fac +$0.6666/fac +$4.4444/fac +Produces +$17.7777/fac +Profit +$12.6111/fac +8:15((1:72), (7:72, 1:10.2857), (8:15, 1:1.875)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$0.9700/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.8888 +glass-0.2063 +cpu-0.01944 +-- +$0.02 +$0.4047 +$0.3 +$3.9444 +$6.1904 +$3.8888 +-- +Every 00:45 + +coal power plant +$500,000.00 +Consumes +$0.3333/fac +Produces +$11.6666/fac +Profit +$11.3333/fac +1:1(25:12, 2.0833:1) +First Fac +coal mine*3 +land 4 +$2.8333/land +-- +coal-0.7333 +-- +$0.1466 +-- +Every 00:30 + +laptop factory +$800,000.00 +Consumes +$0.0444/fac +$0.6666/fac +$2.2222/fac +Produces +$22.2222/fac +Profit +$19.2888/fac +4:15((1:90), (7:72, 1:10.2857), (4:15, 1:3.75)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$1.4837/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.9111 +glass-0.2063 +cpu-0.03055 +-- +$0.02 +$0.4047 +$0.3 +$3.9555 +$6.1904 +$6.1111 +-- +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +$0.0333/fac +Produces +$13.3333/fac +Profit +$13.3/fac +1:3 +First Fac +oil well*1 +land*2 +$6.65/land +-- +oil-0.6666 +-- +$0.0666 +-- +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +$6.6666/fac +Profit +$6.6666/fac +$6.6666/land +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +$0.1111/fac +Produces +$0.1111/fac +Profit +$0/fac +1:60 +First Fac +solar power plant*1 +land 2 +$0/land +-- +energy-0.6555 +-- +$6.5555 +-- +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +$6.25/fac +$0.625/fac +Produces +$25/fac +Profit +$18.125/fac +13:16((13:16, 1:1.2307), (5:32, 1:6.4)) +First Fac +silicon mine*5 +oil well*1 +ccd fac*1 +plastic fac*1 +land 9 +$2.01388/land +-- +silicon-0.00769 +oil-0.2 +-- +$0.1923 +$0.02 +-- +Every 01:20 + +television factory +$1,500,000.00 +Consumes +$0.1/fac +$2/fac +$1.1111/fac +Produces +$22.2222/fac +Profit +$19.0111/fac +7:24((1:40), (7:24, 1:3.4285), (2:15, 1:7.5)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$1.4623/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.8 +glass-0.1619 +cpu-0.03611 +-- +$0.02 +$0.4047 +$0.3 +$3.9 +$4.8571 +$7.2222 +-- +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +$0.4615/fac +$0.1615/fac +Produces +$19.2307/fac +Profit +$18.6076/fac +1:1((105:52, 2.0192:1), (12:13, 1:1.0833)) +First Fac +iron mine*2 +coal mine*1 +oil well*1 +steel mill*3 +rubber fac*1 +land 9 +$2.0675/land +-- +coal-0.4571 +oil-0.8 +steel-0.0280 +rubber-0.0019 +-- +$0.0914 +$0.08 +$0.2241 +$0.0134 +-- +Every 04:20 + +car factory +$10,000,000.00 +Consumes +$8.3333/fac +$0.8333/fac +$1.4/fac +$0.5333/fac +$0.3333/fac +$0.35/fac +Produces +$33.3333/fac +Profit +$21.55/fac +1:1((13:30, 1:2.3076), (5:24, 1:4.8), (49:240, 1:4.8979), (7:3, 2.3333:1), (1:25), (2:1)) +First Fac +iron mine*4 +coal mine*1 +oil well*2 +steel mill*3 +rubber fac*1 +silicon mine*7 +gold mine*1 +gasengine fac*1 +plastic fac*1 +glass fac*1 +steel mill*3 +cpu fac*1 +rubber fac*2 +land 28 +$0.7696/land +-- +coal-0.1142 +steel-0.0280 +rubber-0.0019 +silicon-0.0161 +gold-0.005 +oil-0.6 +gasengine-0.0021 +plastic-6.3333 +glass-0.1819 +steel-0.0190 +cpu-0.04 +-- +$0.0228 +$0.2241 +$0.0134 +$0.4047 +$0.3 +$0.06 +$10.8974 +$0.3166 +$5.4571 +$0.1523 +$8 +-- +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +$2/fac +Produces +$20/fac +Profit +$18/fac +3:20(1:6.666) +First Fac +oil well*1 +res chem fac*1 +land 3 +$6/land +-- +oil-0.6666 +res chem-0.1133 +-- +$0.0666 +$11.33 +-- +Every 00:50 + +airport +$20,000,000.00 +Consumes +$0.8333-1.6666/fac +$4.1666-3.3333/fac +Produces +$16.666-33.333/fac +Profit +$11.666-23.333/fac(Avar. $15.555/fac) +5:6((N/A, jet fuel from market), (5:8-5:4, 1:1.6-1.25:1)(Avar. 5:6, 1:1.2)) +First Fac(logistics center always just need 1) +(logistics ctr*1) +solar power plant*1 +land 3/2 +$3.888-7.777/land(Avar. $5.185185/land)/ +$5.833-11.666/land(Avar. $7.777/land) +-- +jet fuel-N/A(Can't calculate) +energy-0.25--0.1666(This is negative)(Avar. 0.111) +-- +jet fuel-N/A(Can't calculate) +energy-2.5--1.6666(This is negative)(Avar. 1.111) +-- +Every 01:00 to 00:30(Avar. 00:45) \ No newline at end of file diff --git a/icpfiles/Ori-files/Idle Corp/Readme.md b/icpfiles/Ori-files/Idle Corp/Readme.md new file mode 100644 index 0000000..70dd059 --- /dev/null +++ b/icpfiles/Ori-files/Idle Corp/Readme.md @@ -0,0 +1,29 @@ +Because my English not too well, there will have some gramma mistakes or any word mistake is normal. +All calculate were after recalculated because to prevent some calculate errors(rounded decimal) but if it less than three decimal, it will use it, and won't recalculate. +Decimal, if it is repeatly decimal, it will round down at least two(e.g. 2.2222 >> 2.22 / 2.312222 >> 2.3122), if it is long decimal, it will at least show 3, not below 2, if I haven't mistakes. +All rank is follow by the origanal faclist, if I haven't any mistakes. +The faclist format is follow by that list too. +I am not sure it won't have any error and mistakes but the profit is used to referring, all profit and prices is change by region, techs and policies. +All assets prices is follow to IdleCorp Wiki(I have checked, that all are sell prices so if you want to know the buy prices, just 2 times of the sell price, and I won't change any prices in Profit.txt to buy price(include of jet fuel price)). +In Profit.txt, the consumes haven't sum together, if you want to know te total consumes, you sum it together by yourself. +Maybe will have some miss so don't need to supprise. +All numbers won't show as fractions. +You still need to follow to the actual region production modifiers to change. + +Profit.txt Format +follow to origanal faclist, with the following format: +``` +Profit +(Produces-Consumes)(pre second) +(used to refer) +First Fac(just the first builded factory) +(when in 100% speed) + +(pre land) +-- +(pre second)(if it have by-product(s)) +-- +(pre second)(if it have by-product(s)) +-- +(Haven't the total profit and total by-products' profit, if you want it, calculate it by yourself) +``` \ No newline at end of file diff --git a/icpfiles/Ori-files/Idle Corp/factorlist.txt b/icpfiles/Ori-files/Idle Corp/factorlist.txt new file mode 100644 index 0000000..145a1b0 --- /dev/null +++ b/icpfiles/Ori-files/Idle Corp/factorlist.txt @@ -0,0 +1,281 @@ +tree farm +$100.00 +Produces +| 2x wood +Every 00:05 + +oil well +$300.00 +Produces +| 10x crude oil +Every 00:10 + +coal mine +$400.00 +Produces +| 8x coal +Every 00:10 + +iron mine +$550.00 +Produces +| 1x iron +Every 00:20 + +oil refinery +$1,050.00 +Consumes +| 5x crude oil +Produces +| 1x gasoline +Every 00:30 + +steel mill +$1,200.00 +Consumes +| 1x iron +| 4x coal +Produces +| 1x steel +Every 00:35 + +bauxite mine +$1,300.00 +Produces +| 40x bauxite +Every 00:25 + +rubber factory +$1,500.00 +Consumes +| 8x crude oil +Produces +| 1x rubber +Every 00:40 + +gas station +$1,800.00 +Consumes +| 2x gasoline +Produces +| $15.00 +Every 00:15 + +furniture factory +$2,000.00 +Consumes +| 10x wood +Produces +| 1x furniture +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +| 10x bauxite +Produces +| 3x aluminum +Every 00:25 + +led factory +$5,000.00 +Consumes +| 2x silicon +Produces +| 40x led +Every 00:50 + +polyester factory +$6,000.00 +Consumes +| 110x crude oil +Produces +| 14x polyester +Every 00:25 + +silicon mine +$9,000.00 +Produces +| 4x silicon +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +| 12x steel +| 8x rubber +Produces +| 1x bicycle +Every 01:30 + +gold mine +$20,000.00 +Produces +| 4x gold +Every 05:00 + +lamp factory +$28,000.00 +Consumes +| 6x plastic +| 12x led +Produces +| 2x lamp +Every 00:15 + +cotton farm +$30,000.00 +Produces +| 4x cotton +Every 00:20 + +plastic factory +$50,000.00 +Consumes +| 20x crude oil +Produces +| 200x plastic +Every 00:25 + +ccd factory +$69,000.00 +Consumes +| 6x silicon +Produces +| 1x ccd +Every 01:05 + +glass factory +$80,000.00 +Consumes +| 2x silicon +Produces +| 8x glass +Every 00:35 + +cpu factory +$100,000.00 +Consumes +| 1x gold +| 8x silicon +Produces +| 5x cpu +Every 02:00 + +clothing factory +$160,000.00 +Consumes +| 20x polyester +| 10x cotton +Produces +| 10x clothing +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +| 5x plastic +| 1x glass +| 1x cpu +Produces +| 1x cell phone +Every 00:45 + +coal power plant +$500,000.00 +Consumes +| 50x coal +Produces +| 35x energy +Every 00:30 + +laptop factory +$800,000.00 +Consumes +| 8x plastic +| 2x glass +| 1x cpu +Produces +| 1x laptop +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +| 10x crude oil +Produces +| 4x research chemical +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +| 60x energy +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +| 10x energy +Produces +| 1x rocket fuel +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +| 1x ccd +| 100x plastic +Produces +| 1x digital camera +Every 01:20 + +television factory +$1,500,000.00 +Consumes +| 36x plastic +| 12x glass +| 1x cpu +Produces +| 1x television +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +| 15x steel +| 6x rubber +Produces +| 1x gasoline engine +Every 04:20 + +car factory +$10,000,000.00 +Consumes +| 1x gasoline engine +| 1,000x plastic +| 28x glass +| 40x steel +| 1x cpu +| 30x rubber +Produces +| 1x car +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +| 1x research chemical +Produces +| 2x prescription drug +Every 00:50 + +airport +$20,000,000.00 +Consumes +| 10x jet fuel +| 25x energy +Produces +| $1,000.00 +Every 01:00 to 00:30 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.1/Produce speed.txt b/icpfiles/Ori-files/IdleCorp_v1.1/Produce speed.txt new file mode 100644 index 0000000..974b1fe --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.1/Produce speed.txt @@ -0,0 +1,282 @@ +speed pre second +tree farm +$100.00 +Produces +| 0.4x wood +Every 00:05 + +oil well +$300.00 +Produces +| 1x crude oil +Every 00:10 + +coal mine +$400.00 +Produces +| 0.8x coal +Every 00:10 + +iron mine +$550.00 +Produces +| 0.05x iron +Every 00:20 + +oil refinery +$1,050.00 +Consumes +| 0.1666x crude oil +Produces +| 0.0333x gasoline +Every 00:30 + +steel mill +$1,200.00 +Consumes +| 0.02857x iron +| 0.11428x coal +Produces +| 0.02857x steel +Every 00:35 + +bauxite mine +$1,300.00 +Produces +| 1.6x bauxite +Every 00:25 + +rubber factory +$1,500.00 +Consumes +| 0.2x crude oil +Produces +| 0.025x rubber +Every 00:40 + +gas station +$1,800.00 +Consumes +| 0.13333x gasoline +Produces +| $1.00 +Every 00:15 + +furniture factory +$2,000.00 +Consumes +| 0.04166x wood +Produces +| 0.004166x furniture +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +| 0.4x bauxite +Produces +| 0.12x aluminum +Every 00:25 + +led factory +$5,000.00 +Consumes +| 0.04x silicon +Produces +| 0.8x led +Every 00:50 + +polyester factory +$6,000.00 +Consumes +| 4.4x crude oil +Produces +| 0.56x polyester +Every 00:25 + +silicon mine +$9,000.00 +Produces +| 0.02x silicon +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +| 0.13333x steel +| 0.088888x rubber +Produces +| 0.011111x bicycle +Every 01:30 + +gold mine +$20,000.00 +Produces +| 0.01333x gold +Every 05:00 + +lamp factory +$28,000.00 +Consumes +| 0.4x plastic +| 0.8x led +Produces +| 0.13333x lamp +Every 00:15 + +cotton farm +$30,000.00 +Produces +| 0.2x cotton +Every 00:20 + +plastic factory +$50,000.00 +Consumes +| 0.8x crude oil +Produces +| 8x plastic +Every 00:25 + +ccd factory +$69,000.00 +Consumes +| 0.0923x silicon +Produces +| 0.01538x ccd +Every 01:05 + +glass factory +$80,000.00 +Consumes +| 0.05714x silicon +Produces +| 0.228x glass +Every 00:35 + +cpu factory +$100,000.00 +Consumes +| 0.00833x gold +| 0.0666x silicon +Produces +| 0.04166x cpu +Every 02:00 + +clothing factory +$160,000.00 +Consumes +| 0.5x polyester +| 0.25x cotton +Produces +| 0.25x clothing +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +| 0.1111x plastic +| 0.1111x glass +| 0.1111x cpu +Produces +| 0.1111x cell phone +Every 00:45 + +coal power plant +$500,000.00 +Consumes +| 1.6666x coal +Produces +| 1.1666x energy +Every 00:30 + +laptop factory +$800,000.00 +Consumes +| 0.0888x plastic +| 0.0222x glass +| 0.0111x cpu +Produces +| 0.0111x laptop +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +| 0.3333x crude oil +Produces +| 0.1333x research chemical +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +| 0.6666x energy +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +| 0.0111x energy +Produces +| 0.0011x rocket fuel +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +| 0.0125x ccd +| 1.25x plastic +Produces +| 0.0125x digital camera +Every 01:20 + +television factory +$1,500,000.00 +Consumes +| 0.2x plastic +| 0.0666x glass +| 0.0055x cpu +Produces +| 0.0055x television +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +| 0.05769x steel +| 0.02307x rubber +Produces +| 0.0038x gasoline engine +Every 04:20 + +car factory +$10,000,000.00 +Consumes +| 0.00166x gasoline engine +| 1.6666x plastic +| 0.0466x glass +| 0.0666x steel +| 0.00166x cpu +| 0.05x rubber +Produces +| 0.00166x car +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +| 0.02x research chemical +Produces +| 0.04x prescription drug +Every 00:50 + +airport +$20,000,000.00 +Consumes +| 0.1666-0.3333x jet fuel +| 0.4166-0.8333x energy +Produces +| $16.6666-33.3333 +Every 01:00 to 00:30 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.1/Profit.txt b/icpfiles/Ori-files/IdleCorp_v1.1/Profit.txt new file mode 100644 index 0000000..1665d9a --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.1/Profit.txt @@ -0,0 +1,732 @@ +money IO (pre second) +tree farm +$100.00 +Produces +$0.06/fac +Profit +$0.06/fac +$0.06/land +Every 00:05 + +oil well +$300.00 +Produces +$0.1/fac +Profit +$0.1/fac +$0.1/land +Every 00:10 + +coal mine +$400.00 +Produces +$0.16/fac +Profit +$0.16/fac +$0.16/land +Every 00:10 + +iron mine +$550.00 +Produces +$0.1/fac +Profit +$0.1/fac +$0.1/land +Every 00:20 + +oil refinery +$1,050.00 +Consumes +$0.0166/fac +Produces +$0.1666/fac +Profit +$0.15/fac +1:6 +First Fac +oil well*1 +land 2 +$0.075/land +-- +oil-0.8333 +-- +$0.0833 +-- +Every 00:30 + +steel mill +$1,200.00 +Consumes +$0.057/fac +$0.0228/fac +Produces +$0.2285/fac +Profit +$0.148/fac +4:7((4:7, 1:1.75), (1:7)) +First Fac +iron mine*1 +coal mine*1 +land 3 +$0.0495/land +-- +iron-0.0214 +coal-0.6857 +-- +$0.0428 +$0.137 +-- +Every 00:35 + +bauxite mine +$1,300.00 +Produces +$0.16/fac +Profit +$0.16/fac +$0.16/land +Every 00:25 + +rubber factory +$1,500.00 +Consumes +$0.02/fac +Produces +$0.175/fac +Profit +$0.155/fac +31:200(1:6.4516) +First Fac +oil well*1 +land 2 +$0.0775/land +-- +oil-0.8 +-- +$0.08 +-- +Every 00:40 + +gas station +$1,800.00 +Consumes +$0.666/fac +Produces +$1/fac +Profit +$0.333/fac +1:1 +First Fac +oil well*1 +oil refinery*4 +land 6 +$0.0555/land +-- +oil-0.333 +-- +$0.0333 +-- +Every 00:15 + +furniture factory +$2,000.00 +Consumes +$0.00625/fac +Produces +$0.25/fac +Profit +$0.2437/fac +5:48(1:9.6) +First Fac +tree farm*1 +land 2 +$0.1218/fac +-- +wood-0.35833 +-- +$0.0537 +-- +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +$0.04/fac +Produces +$0.48/fac +Profit +$0.44/fac +1:4 +First Fac +bauxite mine*1 +land 2 +$0.22/land +-- +bauxite-1.2 +-- +$0.12 +-- +Every 00:25 + +led factory +$5,000.00 +Consumes +$1/fac +Produces +$1.6/fac +Profit +$0.6/fac +1:1 +First Fac +silicon mine*2 +land 3 +$0.2/land +Every 00:50 + +polyester factory +$6,000.00 +Consumes +$0.44/fac +Produces +$1.12/fac +Profit +$0.68/fac +1:1(22:5, 4.4:1) +First Fac +oil well*5 +land 6 +$0.1133/land +-- +oil-0.6 +-- +$0.06 +-- +Every 00:25 + +silicon mine +$9,000.00 +Produces +$0.5/fac +Profit +$0.5/fac +$0.5/land +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +$1.0666/fac +$0.622/fac +Produces +$2.6666/fac +Profit +$0.9777/fac +1:1((14:3, 4.6666:1), (32:9, 3.5555:1)) +First Fac +steel mill*5 +rubber fac*4 +land 10 +$0.0977/land +-- +steel-0.00952 +rubber-0.0111 +-- +$0.07619 +$0.0777 +-- +Every 01:30 + +gold mine +$20,000.00 +Produces +$0.8/fac +Profit +$0.8/fac +$0.8/land +Every 05:00 + +lamp factory +$28,000.00 +Consumes +$0.2/fac +$1.6/fac +Produces +$3.3333/fac +Profit +$ 1.5333/fac +1:1((1:20), (1:1)) +First Fac +plastic fac*1 +led fac*1 +land 3 +$0.5111/land +-- +plastic-7.6 +-- +$3.8 +-- +Every 00:15 + +cotton farm +$30,000.00 +Produces +$1/fac +Profit +$1/fac +$1/land +Every 00:20 + +plastic factory +$50,000.00 +Consumes +$0.08/fac +Produces +$4/fac +Profit +$3.92/fac +4:5(1:1.25) +First Fac +oil well*1 +land 2 +$1.96/land +-- +oil-0.2 +-- +$0.02 +-- +Every 00:25 + +ccd factory +$69,000.00 +Consumes +$2.307/fac +Produces +$7.6923/fac +Profit +$5.3846/fac +1:1(60:13, 4.615:1) +First Fac +silicon mine*5 +land 6 +$0.8974/land +-- +silicon-0.00769 +-- +$0.1923 +-- +Every 01:05 + +glass factory +$80,000.00 +Consumes +$1.4285/fac +Produces +$6.8571/fac +Profit +$5.4285/fac +1:1(20:7, 2.857:1) +First Fac +silicon mine*3 +land 4 +$1.3571/land +-- +silicon-0.00285 +-- +$0.0714 +-- +Every 00:35 + +cpu factory +$100,000.00 +Consumes +$0.5/fac +$1.6666/fac +Produces +$8.3333/fac +Profit +$6.1666/fac +1:1((5:8, 1:1.6), (10:3, 3.333:1)) +First Fac +gold mine*1 +silicon mine*4 +land 6 +$1.0277/land +-- +gold-0.005 +silicon-0.0133 +-- +$0.3 +$0.3333 +-- +Every 02:00 + +clothing factory +$160,000.00 +Consumes +$1/fac +$1.25/fac +Produces +$7.5/fac +Profit +$5.25/fac +1:1((25:28, 1:1.12), (5:4, 1.25:1)) +First Fac +oil well*5 +polyester fac*1 +cotton farm*2 +land 4 +$1.3125/land +-- +oil-0.6 +polyester-0.06 +cotton-0.15 +-- +$0.06 +$0.12 +$0.75 +-- +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +$0.0555/fac +$0.6666/fac +$4.4444/fac +Produces +$17.7777/fac +Profit +$12.6111/fac +8:15((1:72), (7:72, 1:10.2857), (8:15, 1:1.875)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$0.9700/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.8888 +glass-0.2063 +cpu-0.01944 +-- +$0.02 +$0.4047 +$0.3 +$3.9444 +$6.1904 +$3.8888 +-- +Every 00:45 + +coal power plant +$500,000.00 +Consumes +$0.3333/fac +Produces +$11.6666/fac +Profit +$11.3333/fac +1:1(25:12, 2.0833:1) +First Fac +coal mine*3 +land 4 +$2.8333/land +-- +coal-0.7333 +-- +$0.1466 +-- +Every 00:30 + +laptop factory +$800,000.00 +Consumes +$0.0444/fac +$0.6666/fac +$2.2222/fac +Produces +$22.2222/fac +Profit +$19.2888/fac +4:15((1:90), (7:72, 1:10.2857), (4:15, 1:3.75)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$1.4837/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.9111 +glass-0.2063 +cpu-0.03055 +-- +$0.02 +$0.4047 +$0.3 +$3.9555 +$6.1904 +$6.1111 +-- +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +$0.0333/fac +Produces +$13.3333/fac +Profit +$13.3/fac +1:3 +First Fac +oil well*1 +land*2 +$6.65/land +-- +oil-0.6666 +-- +$0.0666 +-- +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +$6.6666/fac +Profit +$6.6666/fac +$6.6666/land +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +$0.1111/fac +Produces +$0.1111/fac +Profit +$0/fac +1:60 +First Fac +solar power plant*1 +land 2 +$0/land +-- +energy-0.6555 +-- +$6.5555 +-- +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +$6.25/fac +$0.625/fac +Produces +$25/fac +Profit +$18.125/fac +13:16((13:16, 1:1.2307), (5:32, 1:6.4)) +First Fac +silicon mine*5 +oil well*1 +ccd fac*1 +plastic fac*1 +land 9 +$2.01388/land +-- +silicon-0.00769 +oil-0.2 +-- +$0.1923 +$0.02 +-- +Every 01:20 + +television factory +$1,500,000.00 +Consumes +$0.1/fac +$2/fac +$1.1111/fac +Produces +$22.2222/fac +Profit +$19.0111/fac +7:24((1:40), (7:24, 1:3.4285), (2:15, 1:7.5)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$1.4623/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.8 +glass-0.1619 +cpu-0.03611 +-- +$0.02 +$0.4047 +$0.3 +$3.9 +$4.8571 +$7.2222 +-- +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +$0.4615/fac +$0.1615/fac +Produces +$19.2307/fac +Profit +$18.6076/fac +1:1((105:52, 2.0192:1), (12:13, 1:1.0833)) +First Fac +iron mine*2 +coal mine*1 +oil well*1 +steel mill*3 +rubber fac*1 +land 9 +$2.0675/land +-- +coal-0.4571 +oil-0.8 +steel-0.0280 +rubber-0.0019 +-- +$0.0914 +$0.08 +$0.2241 +$0.0134 +-- +Every 04:20 + +car factory +$10,000,000.00 +Consumes +$8.3333/fac +$0.8333/fac +$1.4/fac +$0.5333/fac +$0.3333/fac +$0.35/fac +Produces +$33.3333/fac +Profit +$21.55/fac +1:1((13:30, 1:2.3076), (5:24, 1:4.8), (49:240, 1:4.8979), (7:3, 2.3333:1), (1:25), (2:1)) +First Fac +iron mine*4 +coal mine*1 +oil well*2 +steel mill*3 +rubber fac*1 +silicon mine*7 +gold mine*1 +gasengine fac*1 +plastic fac*1 +glass fac*1 +steel mill*3 +cpu fac*1 +rubber fac*2 +land 28 +$0.7696/land +-- +coal-0.1142 +steel-0.0280 +rubber-0.0019 +silicon-0.0161 +gold-0.005 +oil-0.6 +gasengine-0.0021 +plastic-6.3333 +glass-0.1819 +steel-0.0190 +cpu-0.04 +-- +$0.0228 +$0.2241 +$0.0134 +$0.4047 +$0.3 +$0.06 +$10.8974 +$0.3166 +$5.4571 +$0.1523 +$8 +-- +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +$2/fac +Produces +$20/fac +Profit +$18/fac +3:20(1:6.666) +First Fac +oil well*1 +res chem fac*1 +land 3 +$6/land +-- +oil-0.6666 +res chem-0.1133 +-- +$0.0666 +$11.33 +-- +Every 00:50 + +airport +$20,000,000.00 +Consumes +$0.8333-1.6666/fac +$4.1666-3.3333/fac +Produces +$16.666-33.333/fac +Profit +$11.666-23.333/fac(Avar. $15.555/fac) +5:6((N/A, jet fuel from market), (5:8-5:4, 1:1.6-1.25:1)(Avar. 5:6, 1:1.2)) +First Fac(logistics center always just need 1) +(logistics ctr*1) +solar power plant*1 +land 3/2 +$3.888-7.777/land(Avar. $5.185185/land)/ +$5.833-11.666/land(Avar. $7.777/land) +-- +jet fuel-N/A(Can't calculate) +energy-0.25--0.1666(This is negative)(Avar. 0.111) +-- +jet fuel-N/A(Can't calculate) +energy-2.5--1.6666(This is negative)(Avar. 1.111) +-- +Every 01:00 to 00:30(Avar. 00:45) \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.1/Readme.md b/icpfiles/Ori-files/IdleCorp_v1.1/Readme.md new file mode 100644 index 0000000..05ec2d6 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.1/Readme.md @@ -0,0 +1,35 @@ +Because my English not too well, there will have some gramma mistakes or any word mistake is normal. +All calculate were after recalculated because to prevent some calculate errors(rounded decimal) but if it less than three decimal, it will use it, and won't recalculate. +Decimal, if it is repeatly decimal, it will round down at least two(e.g. 2.2222 >> 2.22 / 2.312222 >> 2.3122), if it is long decimal, it will at least show 3, not below 2, if I haven't mistakes. +All rank is follow by the origanal faclist, if I haven't any mistakes. +The faclist format is follow by that list too. +I am not sure it won't have any error and mistakes but the profit is used to referring, all profit and prices is change by region, techs and policies. +All assets prices is follow to IdleCorp Wiki(I have checked, that all are sell prices so if you want to know the buy prices, just 2 times of the sell price, and I won't change any prices in Profit.txt to buy price(include of jet fuel price)). +In Profit.txt, the consumes haven't sum together, if you want to know te total consumes, you sum it together by yourself. +Maybe will have some miss so don't need to supprise. +All numbers won't show as fractions. +You still need to follow to the actual region production modifiers to change. + +Profit.txt Format +follow to origanal faclist, with the following format: +``` +Profit +(Produces-Consumes)(pre second) +(used to refer)(When the either one Fac in First Fac is more than 1, it will show as 1:1)(the detail of () is arrange of faclist) +First Fac(just the first builded factory) +(when in 100% speed) + +(pre land) +-- +(pre second)(if it have by-product(s)) +-- +(pre second)(if it have by-product(s)) +-- +(Haven't the total profit and total by-products' profit, if you want it, calculate it by yourself) +``` + + + +ReadmeV1.1 +ProfitV1.0 +IdleCorpV1.1 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.1/factorlist.txt b/icpfiles/Ori-files/IdleCorp_v1.1/factorlist.txt new file mode 100644 index 0000000..145a1b0 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.1/factorlist.txt @@ -0,0 +1,281 @@ +tree farm +$100.00 +Produces +| 2x wood +Every 00:05 + +oil well +$300.00 +Produces +| 10x crude oil +Every 00:10 + +coal mine +$400.00 +Produces +| 8x coal +Every 00:10 + +iron mine +$550.00 +Produces +| 1x iron +Every 00:20 + +oil refinery +$1,050.00 +Consumes +| 5x crude oil +Produces +| 1x gasoline +Every 00:30 + +steel mill +$1,200.00 +Consumes +| 1x iron +| 4x coal +Produces +| 1x steel +Every 00:35 + +bauxite mine +$1,300.00 +Produces +| 40x bauxite +Every 00:25 + +rubber factory +$1,500.00 +Consumes +| 8x crude oil +Produces +| 1x rubber +Every 00:40 + +gas station +$1,800.00 +Consumes +| 2x gasoline +Produces +| $15.00 +Every 00:15 + +furniture factory +$2,000.00 +Consumes +| 10x wood +Produces +| 1x furniture +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +| 10x bauxite +Produces +| 3x aluminum +Every 00:25 + +led factory +$5,000.00 +Consumes +| 2x silicon +Produces +| 40x led +Every 00:50 + +polyester factory +$6,000.00 +Consumes +| 110x crude oil +Produces +| 14x polyester +Every 00:25 + +silicon mine +$9,000.00 +Produces +| 4x silicon +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +| 12x steel +| 8x rubber +Produces +| 1x bicycle +Every 01:30 + +gold mine +$20,000.00 +Produces +| 4x gold +Every 05:00 + +lamp factory +$28,000.00 +Consumes +| 6x plastic +| 12x led +Produces +| 2x lamp +Every 00:15 + +cotton farm +$30,000.00 +Produces +| 4x cotton +Every 00:20 + +plastic factory +$50,000.00 +Consumes +| 20x crude oil +Produces +| 200x plastic +Every 00:25 + +ccd factory +$69,000.00 +Consumes +| 6x silicon +Produces +| 1x ccd +Every 01:05 + +glass factory +$80,000.00 +Consumes +| 2x silicon +Produces +| 8x glass +Every 00:35 + +cpu factory +$100,000.00 +Consumes +| 1x gold +| 8x silicon +Produces +| 5x cpu +Every 02:00 + +clothing factory +$160,000.00 +Consumes +| 20x polyester +| 10x cotton +Produces +| 10x clothing +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +| 5x plastic +| 1x glass +| 1x cpu +Produces +| 1x cell phone +Every 00:45 + +coal power plant +$500,000.00 +Consumes +| 50x coal +Produces +| 35x energy +Every 00:30 + +laptop factory +$800,000.00 +Consumes +| 8x plastic +| 2x glass +| 1x cpu +Produces +| 1x laptop +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +| 10x crude oil +Produces +| 4x research chemical +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +| 60x energy +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +| 10x energy +Produces +| 1x rocket fuel +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +| 1x ccd +| 100x plastic +Produces +| 1x digital camera +Every 01:20 + +television factory +$1,500,000.00 +Consumes +| 36x plastic +| 12x glass +| 1x cpu +Produces +| 1x television +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +| 15x steel +| 6x rubber +Produces +| 1x gasoline engine +Every 04:20 + +car factory +$10,000,000.00 +Consumes +| 1x gasoline engine +| 1,000x plastic +| 28x glass +| 40x steel +| 1x cpu +| 30x rubber +Produces +| 1x car +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +| 1x research chemical +Produces +| 2x prescription drug +Every 00:50 + +airport +$20,000,000.00 +Consumes +| 10x jet fuel +| 25x energy +Produces +| $1,000.00 +Every 01:00 to 00:30 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.2/Produce speed.txt b/icpfiles/Ori-files/IdleCorp_v1.2/Produce speed.txt new file mode 100644 index 0000000..974b1fe --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.2/Produce speed.txt @@ -0,0 +1,282 @@ +speed pre second +tree farm +$100.00 +Produces +| 0.4x wood +Every 00:05 + +oil well +$300.00 +Produces +| 1x crude oil +Every 00:10 + +coal mine +$400.00 +Produces +| 0.8x coal +Every 00:10 + +iron mine +$550.00 +Produces +| 0.05x iron +Every 00:20 + +oil refinery +$1,050.00 +Consumes +| 0.1666x crude oil +Produces +| 0.0333x gasoline +Every 00:30 + +steel mill +$1,200.00 +Consumes +| 0.02857x iron +| 0.11428x coal +Produces +| 0.02857x steel +Every 00:35 + +bauxite mine +$1,300.00 +Produces +| 1.6x bauxite +Every 00:25 + +rubber factory +$1,500.00 +Consumes +| 0.2x crude oil +Produces +| 0.025x rubber +Every 00:40 + +gas station +$1,800.00 +Consumes +| 0.13333x gasoline +Produces +| $1.00 +Every 00:15 + +furniture factory +$2,000.00 +Consumes +| 0.04166x wood +Produces +| 0.004166x furniture +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +| 0.4x bauxite +Produces +| 0.12x aluminum +Every 00:25 + +led factory +$5,000.00 +Consumes +| 0.04x silicon +Produces +| 0.8x led +Every 00:50 + +polyester factory +$6,000.00 +Consumes +| 4.4x crude oil +Produces +| 0.56x polyester +Every 00:25 + +silicon mine +$9,000.00 +Produces +| 0.02x silicon +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +| 0.13333x steel +| 0.088888x rubber +Produces +| 0.011111x bicycle +Every 01:30 + +gold mine +$20,000.00 +Produces +| 0.01333x gold +Every 05:00 + +lamp factory +$28,000.00 +Consumes +| 0.4x plastic +| 0.8x led +Produces +| 0.13333x lamp +Every 00:15 + +cotton farm +$30,000.00 +Produces +| 0.2x cotton +Every 00:20 + +plastic factory +$50,000.00 +Consumes +| 0.8x crude oil +Produces +| 8x plastic +Every 00:25 + +ccd factory +$69,000.00 +Consumes +| 0.0923x silicon +Produces +| 0.01538x ccd +Every 01:05 + +glass factory +$80,000.00 +Consumes +| 0.05714x silicon +Produces +| 0.228x glass +Every 00:35 + +cpu factory +$100,000.00 +Consumes +| 0.00833x gold +| 0.0666x silicon +Produces +| 0.04166x cpu +Every 02:00 + +clothing factory +$160,000.00 +Consumes +| 0.5x polyester +| 0.25x cotton +Produces +| 0.25x clothing +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +| 0.1111x plastic +| 0.1111x glass +| 0.1111x cpu +Produces +| 0.1111x cell phone +Every 00:45 + +coal power plant +$500,000.00 +Consumes +| 1.6666x coal +Produces +| 1.1666x energy +Every 00:30 + +laptop factory +$800,000.00 +Consumes +| 0.0888x plastic +| 0.0222x glass +| 0.0111x cpu +Produces +| 0.0111x laptop +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +| 0.3333x crude oil +Produces +| 0.1333x research chemical +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +| 0.6666x energy +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +| 0.0111x energy +Produces +| 0.0011x rocket fuel +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +| 0.0125x ccd +| 1.25x plastic +Produces +| 0.0125x digital camera +Every 01:20 + +television factory +$1,500,000.00 +Consumes +| 0.2x plastic +| 0.0666x glass +| 0.0055x cpu +Produces +| 0.0055x television +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +| 0.05769x steel +| 0.02307x rubber +Produces +| 0.0038x gasoline engine +Every 04:20 + +car factory +$10,000,000.00 +Consumes +| 0.00166x gasoline engine +| 1.6666x plastic +| 0.0466x glass +| 0.0666x steel +| 0.00166x cpu +| 0.05x rubber +Produces +| 0.00166x car +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +| 0.02x research chemical +Produces +| 0.04x prescription drug +Every 00:50 + +airport +$20,000,000.00 +Consumes +| 0.1666-0.3333x jet fuel +| 0.4166-0.8333x energy +Produces +| $16.6666-33.3333 +Every 01:00 to 00:30 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.2/Profit.txt b/icpfiles/Ori-files/IdleCorp_v1.2/Profit.txt new file mode 100644 index 0000000..75b7395 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.2/Profit.txt @@ -0,0 +1,732 @@ +money IO (pre second) +tree farm +$100.00 +Produces +$0.06/fac +Profit +$0.06/fac +$0.06/land +Every 00:05 + +oil well +$300.00 +Produces +$0.1/fac +Profit +$0.1/fac +$0.1/land +Every 00:10 + +coal mine +$400.00 +Produces +$0.16/fac +Profit +$0.16/fac +$0.16/land +Every 00:10 + +iron mine +$550.00 +Produces +$0.1/fac +Profit +$0.1/fac +$0.1/land +Every 00:20 + +oil refinery +$1,050.00 +Consumes +$0.0166/fac +Produces +$0.1666/fac +Profit +$0.15/fac +1:6 +First Fac +oil well*1 +land 2 +$0.075/land +-- +oil-0.8333 +-- +$0.0833 +-- +Every 00:30 + +steel mill +$1,200.00 +Consumes +$0.057/fac +$0.0228/fac +Produces +$0.2285/fac +Profit +$0.148/fac +4:7((4:7, 1:1.75), (1:7)) +First Fac +iron mine*1 +coal mine*1 +land 3 +$0.0495/land +-- +iron-0.0214 +coal-0.6857 +-- +$0.0428 +$0.137 +-- +Every 00:35 + +bauxite mine +$1,300.00 +Produces +$0.16/fac +Profit +$0.16/fac +$0.16/land +Every 00:25 + +rubber factory +$1,500.00 +Consumes +$0.02/fac +Produces +$0.175/fac +Profit +$0.155/fac +31:200(1:6.4516) +First Fac +oil well*1 +land 2 +$0.0775/land +-- +oil-0.8 +-- +$0.08 +-- +Every 00:40 + +gas station +$1,800.00 +Consumes +$0.666/fac +Produces +$1/fac +Profit +$0.333/fac +1:1 +First Fac +oil well*1 +oil refinery*4 +land 6 +$0.0555/land +-- +oil-0.333 +-- +$0.0333 +-- +Every 00:15 + +furniture factory +$2,000.00 +Consumes +$0.00625/fac +Produces +$0.25/fac +Profit +$0.2437/fac +5:48(1:9.6) +First Fac +tree farm*1 +land 2 +$0.1218/fac +-- +wood-0.35833 +-- +$0.0537 +-- +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +$0.04/fac +Produces +$0.48/fac +Profit +$0.44/fac +1:4 +First Fac +bauxite mine*1 +land 2 +$0.22/land +-- +bauxite-1.2 +-- +$0.12 +-- +Every 00:25 + +led factory +$5,000.00 +Consumes +$1/fac +Produces +$1.6/fac +Profit +$0.6/fac +1:1 +First Fac +silicon mine*2 +land 3 +$0.2/land +Every 00:50 + +polyester factory +$6,000.00 +Consumes +$0.44/fac +Produces +$1.12/fac +Profit +$0.68/fac +4.4:1(22:5, 4.4:1) +First Fac +oil well*5 +land 6 +$0.1133/land +-- +oil-0.6 +-- +$0.06 +-- +Every 00:25 + +silicon mine +$9,000.00 +Produces +$0.5/fac +Profit +$0.5/fac +$0.5/land +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +$1.0666/fac +$0.622/fac +Produces +$2.6666/fac +Profit +$0.9777/fac +4.6666:3.5555:1((14:3, 4.6666:1), (32:9, 3.5555:1)) +First Fac +steel mill*5 +rubber fac*4 +land 10 +$0.0977/land +-- +steel-0.00952 +rubber-0.0111 +-- +$0.07619 +$0.0777 +-- +Every 01:30 + +gold mine +$20,000.00 +Produces +$0.8/fac +Profit +$0.8/fac +$0.8/land +Every 05:00 + +lamp factory +$28,000.00 +Consumes +$0.2/fac +$1.6/fac +Produces +$3.3333/fac +Profit +$ 1.5333/fac +1:1((1:20), (1:1)) +First Fac +plastic fac*1 +led fac*1 +land 3 +$0.5111/land +-- +plastic-7.6 +-- +$3.8 +-- +Every 00:15 + +cotton farm +$30,000.00 +Produces +$1/fac +Profit +$1/fac +$1/land +Every 00:20 + +plastic factory +$50,000.00 +Consumes +$0.08/fac +Produces +$4/fac +Profit +$3.92/fac +4:5(1:1.25) +First Fac +oil well*1 +land 2 +$1.96/land +-- +oil-0.2 +-- +$0.02 +-- +Every 00:25 + +ccd factory +$69,000.00 +Consumes +$2.307/fac +Produces +$7.6923/fac +Profit +$5.3846/fac +4.615:1(60:13, 4.615:1) +First Fac +silicon mine*5 +land 6 +$0.8974/land +-- +silicon-0.00769 +-- +$0.1923 +-- +Every 01:05 + +glass factory +$80,000.00 +Consumes +$1.4285/fac +Produces +$6.8571/fac +Profit +$5.4285/fac +2.857:1(20:7, 2.857:1) +First Fac +silicon mine*3 +land 4 +$1.3571/land +-- +silicon-0.00285 +-- +$0.0714 +-- +Every 00:35 + +cpu factory +$100,000.00 +Consumes +$0.5/fac +$1.6666/fac +Produces +$8.3333/fac +Profit +$6.1666/fac +1:3.333:1((5:8, 1:1.6), (10:3, 3.333:1)) +First Fac +gold mine*1 +silicon mine*4 +land 6 +$1.0277/land +-- +gold-0.005 +silicon-0.0133 +-- +$0.3 +$0.3333 +-- +Every 02:00 + +clothing factory +$160,000.00 +Consumes +$1/fac +$1.25/fac +Produces +$7.5/fac +Profit +$5.25/fac +1:1.25:1((25:28, 1:1.12), (5:4, 1.25:1)) +First Fac +oil well*5 +polyester fac*1 +cotton farm*2 +land 4 +$1.3125/land +-- +oil-0.6 +polyester-0.06 +cotton-0.15 +-- +$0.06 +$0.12 +$0.75 +-- +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +$0.0555/fac +$0.6666/fac +$4.4444/fac +Produces +$17.7777/fac +Profit +$12.6111/fac +1:1:1:1((1:72), (7:72, 1:10.2857), (8:15, 1:1.875)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$0.9700/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.8888 +glass-0.2063 +cpu-0.01944 +-- +$0.02 +$0.4047 +$0.3 +$3.9444 +$6.1904 +$3.8888 +-- +Every 00:45 + +coal power plant +$500,000.00 +Consumes +$0.3333/fac +Produces +$11.6666/fac +Profit +$11.3333/fac +2.0833:1(25:12, 2.0833:1) +First Fac +coal mine*3 +land 4 +$2.8333/land +-- +coal-0.7333 +-- +$0.1466 +-- +Every 00:30 + +laptop factory +$800,000.00 +Consumes +$0.0444/fac +$0.6666/fac +$2.2222/fac +Produces +$22.2222/fac +Profit +$19.2888/fac +1:1:1:1((1:90), (7:72, 1:10.2857), (4:15, 1:3.75)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$1.4837/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.9111 +glass-0.2063 +cpu-0.03055 +-- +$0.02 +$0.4047 +$0.3 +$3.9555 +$6.1904 +$6.1111 +-- +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +$0.0333/fac +Produces +$13.3333/fac +Profit +$13.3/fac +1:3 +First Fac +oil well*1 +land*2 +$6.65/land +-- +oil-0.6666 +-- +$0.0666 +-- +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +$6.6666/fac +Profit +$6.6666/fac +$6.6666/land +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +$0.1111/fac +Produces +$0.1111/fac +Profit +$0/fac +1:60 +First Fac +solar power plant*1 +land 2 +$0/land +-- +energy-0.6555 +-- +$6.5555 +-- +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +$6.25/fac +$0.625/fac +Produces +$25/fac +Profit +$18.125/fac +1:1:1((13:16, 1:1.2307), (5:32, 1:6.4)) +First Fac +silicon mine*5 +oil well*1 +ccd fac*1 +plastic fac*1 +land 9 +$2.01388/land +-- +silicon-0.00769 +oil-0.2 +-- +$0.1923 +$0.02 +-- +Every 01:20 + +television factory +$1,500,000.00 +Consumes +$0.1/fac +$2/fac +$1.1111/fac +Produces +$22.2222/fac +Profit +$19.0111/fac +1:1:1:1((1:40), (7:24, 1:3.4285), (2:15, 1:7.5)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$1.4623/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.8 +glass-0.1619 +cpu-0.03611 +-- +$0.02 +$0.4047 +$0.3 +$3.9 +$4.8571 +$7.2222 +-- +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +$0.4615/fac +$0.1615/fac +Produces +$19.2307/fac +Profit +$18.6076/fac +2.0192:1:1((105:52, 2.0192:1), (12:13, 1:1.0833)) +First Fac +iron mine*2 +coal mine*1 +oil well*1 +steel mill*3 +rubber fac*1 +land 9 +$2.0675/land +-- +coal-0.4571 +oil-0.8 +steel-0.0280 +rubber-0.0019 +-- +$0.0914 +$0.08 +$0.2241 +$0.0134 +-- +Every 04:20 + +car factory +$10,000,000.00 +Consumes +$8.3333/fac +$0.8333/fac +$1.4/fac +$0.5333/fac +$0.3333/fac +$0.35/fac +Produces +$33.3333/fac +Profit +$21.55/fac +1:1:1:2.3333:1:2:1((13:30, 1:2.3076), (5:24, 1:4.8), (49:240, 1:4.8979), (7:3, 2.3333:1), (1:25), (2:1)) +First Fac +iron mine*4 +coal mine*1 +oil well*2 +steel mill*3 +rubber fac*1 +silicon mine*7 +gold mine*1 +gasengine fac*1 +plastic fac*1 +glass fac*1 +steel mill*3 +cpu fac*1 +rubber fac*2 +land 28 +$0.7696/land +-- +coal-0.1142 +steel-0.0280 +rubber-0.0019 +silicon-0.0161 +gold-0.005 +oil-0.6 +gasengine-0.0021 +plastic-6.3333 +glass-0.1819 +steel-0.0190 +cpu-0.04 +-- +$0.0228 +$0.2241 +$0.0134 +$0.4047 +$0.3 +$0.06 +$10.8974 +$0.3166 +$5.4571 +$0.1523 +$8 +-- +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +$2/fac +Produces +$20/fac +Profit +$18/fac +1:1(1:6.666) +First Fac +oil well*1 +res chem fac*1 +land 3 +$6/land +-- +oil-0.6666 +res chem-0.1133 +-- +$0.0666 +$11.33 +-- +Every 00:50 + +airport +$20,000,000.00 +Consumes +$0.8333-1.6666/fac +$4.1666-3.3333/fac +Produces +$16.666-33.333/fac +Profit +$11.666-23.333/fac(Avar. $15.555/fac) +1:1((N/A, jet fuel from market), (5:8-5:4, 1:1.6-1.25:1)(Avar. 5:6, 1:1.2)) +First Fac(logistics center always just need 1) +(logistics ctr*1) +solar power plant*1 +land 3/2 +$3.888-7.777/land(Avar. $5.185185/land)/ +$5.833-11.666/land(Avar. $7.777/land) +-- +jet fuel-N/A(Can't calculate) +energy-0.25--0.1666(This is negative)(Avar. 0.111) +-- +jet fuel-N/A(Can't calculate) +energy-2.5--1.6666(This is negative)(Avar. 1.111) +-- +Every 01:00 to 00:30(Avar. 00:45) \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.2/Readme.md b/icpfiles/Ori-files/IdleCorp_v1.2/Readme.md new file mode 100644 index 0000000..c963363 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.2/Readme.md @@ -0,0 +1,36 @@ +Because my English not too well, there will have some gramma mistakes or any word mistake is normal. +All calculate were after recalculated because to prevent some calculate errors(rounded decimal) but if it less than three decimal, it will use it, and won't recalculate. +Decimal, if it is repeatly decimal, it will round down at least two(e.g. 2.2222 >> 2.22 / 2.312222 >> 2.3122), if it is long decimal, it will at least show 3, not below 2, if I haven't mistakes. +All rank is follow by the origanal faclist, if I haven't any mistakes. +The faclist format is follow by that list too. +I am not sure it won't have any error and mistakes but the profit is used to referring, all profit and prices is change by region, techs and policies. +All assets prices is follow to IdleCorp Wiki(I have checked, that all are sell prices so if you want to know the buy prices, just 2 times of the sell price, and I won't change any prices in Profit.txt to buy price(include of jet fuel price)). +In Profit.txt, the consumes haven't sum together, if you want to know te total consumes, you sum it together by yourself. +Maybe will have some miss so don't need to supprise. +All numbers won't show as fractions. +You still need to follow to the actual region production modifiers to change. +Hope You will understand how to look Profit.txt + +Profit.txt Format +follow to origanal faclist, with the following format: +``` +Profit +(Produces-Consumes)(pre second) +(used to refer)(the ratio of orginal ratio is 1:1 and not really is 1:1 now will show all fac ratio like 1:1:1 or 1:4:1, the ratio of the left of the rightest number is arrange of faclist(mean the consumes list)) +First Fac(just the first builded factory) +(when in 100% speed) + +(pre land) +-- +(pre second)(if it have by-product(s)) +-- +(pre second)(if it have by-product(s)) +-- +(Haven't the total profit and total by-products' profit, if you want it, calculate it by yourself) +``` + + + +ReadmeV1.1 +ProfitV1.1 +IdleCorpV1.2 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.2/UpdateNote.txt b/icpfiles/Ori-files/IdleCorp_v1.2/UpdateNote.txt new file mode 100644 index 0000000..36818b0 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.2/UpdateNote.txt @@ -0,0 +1,2 @@ +Now the ratio won't show as 1:1 when it's not 1:1 +Details pleace look at Readme.txt \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.2/factorlist.txt b/icpfiles/Ori-files/IdleCorp_v1.2/factorlist.txt new file mode 100644 index 0000000..145a1b0 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.2/factorlist.txt @@ -0,0 +1,281 @@ +tree farm +$100.00 +Produces +| 2x wood +Every 00:05 + +oil well +$300.00 +Produces +| 10x crude oil +Every 00:10 + +coal mine +$400.00 +Produces +| 8x coal +Every 00:10 + +iron mine +$550.00 +Produces +| 1x iron +Every 00:20 + +oil refinery +$1,050.00 +Consumes +| 5x crude oil +Produces +| 1x gasoline +Every 00:30 + +steel mill +$1,200.00 +Consumes +| 1x iron +| 4x coal +Produces +| 1x steel +Every 00:35 + +bauxite mine +$1,300.00 +Produces +| 40x bauxite +Every 00:25 + +rubber factory +$1,500.00 +Consumes +| 8x crude oil +Produces +| 1x rubber +Every 00:40 + +gas station +$1,800.00 +Consumes +| 2x gasoline +Produces +| $15.00 +Every 00:15 + +furniture factory +$2,000.00 +Consumes +| 10x wood +Produces +| 1x furniture +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +| 10x bauxite +Produces +| 3x aluminum +Every 00:25 + +led factory +$5,000.00 +Consumes +| 2x silicon +Produces +| 40x led +Every 00:50 + +polyester factory +$6,000.00 +Consumes +| 110x crude oil +Produces +| 14x polyester +Every 00:25 + +silicon mine +$9,000.00 +Produces +| 4x silicon +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +| 12x steel +| 8x rubber +Produces +| 1x bicycle +Every 01:30 + +gold mine +$20,000.00 +Produces +| 4x gold +Every 05:00 + +lamp factory +$28,000.00 +Consumes +| 6x plastic +| 12x led +Produces +| 2x lamp +Every 00:15 + +cotton farm +$30,000.00 +Produces +| 4x cotton +Every 00:20 + +plastic factory +$50,000.00 +Consumes +| 20x crude oil +Produces +| 200x plastic +Every 00:25 + +ccd factory +$69,000.00 +Consumes +| 6x silicon +Produces +| 1x ccd +Every 01:05 + +glass factory +$80,000.00 +Consumes +| 2x silicon +Produces +| 8x glass +Every 00:35 + +cpu factory +$100,000.00 +Consumes +| 1x gold +| 8x silicon +Produces +| 5x cpu +Every 02:00 + +clothing factory +$160,000.00 +Consumes +| 20x polyester +| 10x cotton +Produces +| 10x clothing +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +| 5x plastic +| 1x glass +| 1x cpu +Produces +| 1x cell phone +Every 00:45 + +coal power plant +$500,000.00 +Consumes +| 50x coal +Produces +| 35x energy +Every 00:30 + +laptop factory +$800,000.00 +Consumes +| 8x plastic +| 2x glass +| 1x cpu +Produces +| 1x laptop +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +| 10x crude oil +Produces +| 4x research chemical +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +| 60x energy +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +| 10x energy +Produces +| 1x rocket fuel +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +| 1x ccd +| 100x plastic +Produces +| 1x digital camera +Every 01:20 + +television factory +$1,500,000.00 +Consumes +| 36x plastic +| 12x glass +| 1x cpu +Produces +| 1x television +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +| 15x steel +| 6x rubber +Produces +| 1x gasoline engine +Every 04:20 + +car factory +$10,000,000.00 +Consumes +| 1x gasoline engine +| 1,000x plastic +| 28x glass +| 40x steel +| 1x cpu +| 30x rubber +Produces +| 1x car +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +| 1x research chemical +Produces +| 2x prescription drug +Every 00:50 + +airport +$20,000,000.00 +Consumes +| 10x jet fuel +| 25x energy +Produces +| $1,000.00 +Every 01:00 to 00:30 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3.1/Copyright_Notice.txt b/icpfiles/Ori-files/IdleCorp_v1.3.1/Copyright_Notice.txt new file mode 100644 index 0000000..d235113 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3.1/Copyright_Notice.txt @@ -0,0 +1,11 @@ +Copyright Notice + +------------------ +1.You can post it on anywhere, include of "IdleCorp HQ"(The Discord Server of IdleCorp). +2.You can modify it but not included of the "Copyright_Notice". +3.You also can refer the "Profit.txt" but it just used to REFER. +4.You can ask or tell the author of it about it, and you can share you question(s) in "IdleCorp HQ". +5.You can tell some suggestions to the author, and fix it. +6.Pleace don't suspect author's gramma, if there have any gramma mistakes, you can tell the author. +7.These are all copyright notice of it, I maybe will add more/change notice(s) on here. +------------------ \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3.1/Produce speed.txt b/icpfiles/Ori-files/IdleCorp_v1.3.1/Produce speed.txt new file mode 100644 index 0000000..974b1fe --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3.1/Produce speed.txt @@ -0,0 +1,282 @@ +speed pre second +tree farm +$100.00 +Produces +| 0.4x wood +Every 00:05 + +oil well +$300.00 +Produces +| 1x crude oil +Every 00:10 + +coal mine +$400.00 +Produces +| 0.8x coal +Every 00:10 + +iron mine +$550.00 +Produces +| 0.05x iron +Every 00:20 + +oil refinery +$1,050.00 +Consumes +| 0.1666x crude oil +Produces +| 0.0333x gasoline +Every 00:30 + +steel mill +$1,200.00 +Consumes +| 0.02857x iron +| 0.11428x coal +Produces +| 0.02857x steel +Every 00:35 + +bauxite mine +$1,300.00 +Produces +| 1.6x bauxite +Every 00:25 + +rubber factory +$1,500.00 +Consumes +| 0.2x crude oil +Produces +| 0.025x rubber +Every 00:40 + +gas station +$1,800.00 +Consumes +| 0.13333x gasoline +Produces +| $1.00 +Every 00:15 + +furniture factory +$2,000.00 +Consumes +| 0.04166x wood +Produces +| 0.004166x furniture +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +| 0.4x bauxite +Produces +| 0.12x aluminum +Every 00:25 + +led factory +$5,000.00 +Consumes +| 0.04x silicon +Produces +| 0.8x led +Every 00:50 + +polyester factory +$6,000.00 +Consumes +| 4.4x crude oil +Produces +| 0.56x polyester +Every 00:25 + +silicon mine +$9,000.00 +Produces +| 0.02x silicon +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +| 0.13333x steel +| 0.088888x rubber +Produces +| 0.011111x bicycle +Every 01:30 + +gold mine +$20,000.00 +Produces +| 0.01333x gold +Every 05:00 + +lamp factory +$28,000.00 +Consumes +| 0.4x plastic +| 0.8x led +Produces +| 0.13333x lamp +Every 00:15 + +cotton farm +$30,000.00 +Produces +| 0.2x cotton +Every 00:20 + +plastic factory +$50,000.00 +Consumes +| 0.8x crude oil +Produces +| 8x plastic +Every 00:25 + +ccd factory +$69,000.00 +Consumes +| 0.0923x silicon +Produces +| 0.01538x ccd +Every 01:05 + +glass factory +$80,000.00 +Consumes +| 0.05714x silicon +Produces +| 0.228x glass +Every 00:35 + +cpu factory +$100,000.00 +Consumes +| 0.00833x gold +| 0.0666x silicon +Produces +| 0.04166x cpu +Every 02:00 + +clothing factory +$160,000.00 +Consumes +| 0.5x polyester +| 0.25x cotton +Produces +| 0.25x clothing +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +| 0.1111x plastic +| 0.1111x glass +| 0.1111x cpu +Produces +| 0.1111x cell phone +Every 00:45 + +coal power plant +$500,000.00 +Consumes +| 1.6666x coal +Produces +| 1.1666x energy +Every 00:30 + +laptop factory +$800,000.00 +Consumes +| 0.0888x plastic +| 0.0222x glass +| 0.0111x cpu +Produces +| 0.0111x laptop +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +| 0.3333x crude oil +Produces +| 0.1333x research chemical +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +| 0.6666x energy +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +| 0.0111x energy +Produces +| 0.0011x rocket fuel +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +| 0.0125x ccd +| 1.25x plastic +Produces +| 0.0125x digital camera +Every 01:20 + +television factory +$1,500,000.00 +Consumes +| 0.2x plastic +| 0.0666x glass +| 0.0055x cpu +Produces +| 0.0055x television +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +| 0.05769x steel +| 0.02307x rubber +Produces +| 0.0038x gasoline engine +Every 04:20 + +car factory +$10,000,000.00 +Consumes +| 0.00166x gasoline engine +| 1.6666x plastic +| 0.0466x glass +| 0.0666x steel +| 0.00166x cpu +| 0.05x rubber +Produces +| 0.00166x car +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +| 0.02x research chemical +Produces +| 0.04x prescription drug +Every 00:50 + +airport +$20,000,000.00 +Consumes +| 0.1666-0.3333x jet fuel +| 0.4166-0.8333x energy +Produces +| $16.6666-33.3333 +Every 01:00 to 00:30 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3.1/Profit.txt b/icpfiles/Ori-files/IdleCorp_v1.3.1/Profit.txt new file mode 100644 index 0000000..44a5ac3 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3.1/Profit.txt @@ -0,0 +1,732 @@ +money IO (pre second) +tree farm +$100.00 +Produces +$0.06/fac +Profit +$0.06/fac +$0.06/land +Every 00:05 + +oil well +$300.00 +Produces +$0.1/fac +Profit +$0.1/fac +$0.1/land +Every 00:10 + +coal mine +$400.00 +Produces +$0.16/fac +Profit +$0.16/fac +$0.16/land +Every 00:10 + +iron mine +$550.00 +Produces +$0.1/fac +Profit +$0.1/fac +$0.1/land +Every 00:20 + +oil refinery +$1,050.00 +Consumes +$0.0166/fac +Produces +$0.1666/fac +Profit +$0.15/fac +1:6 +First Fac +oil well*1 +land 2 +$0.075/land +-- +oil-0.8333 +-- +$0.0833 +-- +Every 00:30 + +steel mill +$1,200.00 +Consumes +$0.057/fac +$0.0228/fac +Produces +$0.2285/fac +Profit +$0.148/fac +1:1:1((4:7, 1:1.75), (1:7)) +First Fac +iron mine*1 +coal mine*1 +land 3 +$0.0495/land +-- +iron-0.0214 +coal-0.6857 +-- +$0.0428 +$0.137 +-- +Every 00:35 + +bauxite mine +$1,300.00 +Produces +$0.16/fac +Profit +$0.16/fac +$0.16/land +Every 00:25 + +rubber factory +$1,500.00 +Consumes +$0.02/fac +Produces +$0.175/fac +Profit +$0.155/fac +1:1(31:200, 1:6.4516) +First Fac +oil well*1 +land 2 +$0.0775/land +-- +oil-0.8 +-- +$0.08 +-- +Every 00:40 + +gas station +$1,800.00 +Consumes +$0.666/fac +Produces +$1/fac +Profit +$0.333/fac +4:1(4:1) +First Fac +oil well*1 +oil refinery*4 +land 6 +$0.0555/land +-- +oil-0.333 +-- +$0.0333 +-- +Every 00:15 + +furniture factory +$2,000.00 +Consumes +$0.00625/fac +Produces +$0.25/fac +Profit +$0.2437/fac +1:1(5:48, 1:9.6) +First Fac +tree farm*1 +land 2 +$0.1218/fac +-- +wood-0.35833 +-- +$0.0537 +-- +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +$0.04/fac +Produces +$0.48/fac +Profit +$0.44/fac +1:4 +First Fac +bauxite mine*1 +land 2 +$0.22/land +-- +bauxite-1.2 +-- +$0.12 +-- +Every 00:25 + +led factory +$5,000.00 +Consumes +$1/fac +Produces +$1.6/fac +Profit +$0.6/fac +1:1 +First Fac +silicon mine*2 +land 3 +$0.2/land +Every 00:50 + +polyester factory +$6,000.00 +Consumes +$0.44/fac +Produces +$1.12/fac +Profit +$0.68/fac +4.4:1(22:5, 4.4:1) +First Fac +oil well*5 +land 6 +$0.1133/land +-- +oil-0.6 +-- +$0.06 +-- +Every 00:25 + +silicon mine +$9,000.00 +Produces +$0.5/fac +Profit +$0.5/fac +$0.5/land +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +$1.0666/fac +$0.622/fac +Produces +$2.6666/fac +Profit +$0.9777/fac +4.6666:3.5555:1((14:3, 4.6666:1), (32:9, 3.5555:1)) +First Fac +steel mill*5 +rubber fac*4 +land 10 +$0.0977/land +-- +steel-0.00952 +rubber-0.0111 +-- +$0.07619 +$0.0777 +-- +Every 01:30 + +gold mine +$20,000.00 +Produces +$0.8/fac +Profit +$0.8/fac +$0.8/land +Every 05:00 + +lamp factory +$28,000.00 +Consumes +$0.2/fac +$1.6/fac +Produces +$3.3333/fac +Profit +$ 1.5333/fac +1:1:1((1:20), (1:1)) +First Fac +plastic fac*1 +led fac*1 +land 3 +$0.5111/land +-- +plastic-7.6 +-- +$3.8 +-- +Every 00:15 + +cotton farm +$30,000.00 +Produces +$1/fac +Profit +$1/fac +$1/land +Every 00:20 + +plastic factory +$50,000.00 +Consumes +$0.08/fac +Produces +$4/fac +Profit +$3.92/fac +1:1(4:5, 1:1.25) +First Fac +oil well*1 +land 2 +$1.96/land +-- +oil-0.2 +-- +$0.02 +-- +Every 00:25 + +ccd factory +$69,000.00 +Consumes +$2.307/fac +Produces +$7.6923/fac +Profit +$5.3846/fac +4.615:1(60:13, 4.615:1) +First Fac +silicon mine*5 +land 6 +$0.8974/land +-- +silicon-0.00769 +-- +$0.1923 +-- +Every 01:05 + +glass factory +$80,000.00 +Consumes +$1.4285/fac +Produces +$6.8571/fac +Profit +$5.4285/fac +2.857:1(20:7, 2.857:1) +First Fac +silicon mine*3 +land 4 +$1.3571/land +-- +silicon-0.00285 +-- +$0.0714 +-- +Every 00:35 + +cpu factory +$100,000.00 +Consumes +$0.5/fac +$1.6666/fac +Produces +$8.3333/fac +Profit +$6.1666/fac +1:3.333:1((5:8, 1:1.6), (10:3, 3.333:1)) +First Fac +gold mine*1 +silicon mine*4 +land 6 +$1.0277/land +-- +gold-0.005 +silicon-0.0133 +-- +$0.3 +$0.3333 +-- +Every 02:00 + +clothing factory +$160,000.00 +Consumes +$1/fac +$1.25/fac +Produces +$7.5/fac +Profit +$5.25/fac +1:1.25:1((25:28, 1:1.12), (5:4, 1.25:1)) +First Fac +oil well*5 +polyester fac*1 +cotton farm*2 +land 4 +$1.3125/land +-- +oil-0.6 +polyester-0.06 +cotton-0.15 +-- +$0.06 +$0.12 +$0.75 +-- +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +$0.0555/fac +$0.6666/fac +$4.4444/fac +Produces +$17.7777/fac +Profit +$12.6111/fac +1:1:1:1((1:72), (7:72, 1:10.2857), (8:15, 1:1.875)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$0.9700/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.8888 +glass-0.2063 +cpu-0.01944 +-- +$0.02 +$0.4047 +$0.3 +$3.9444 +$6.1904 +$3.8888 +-- +Every 00:45 + +coal power plant +$500,000.00 +Consumes +$0.3333/fac +Produces +$11.6666/fac +Profit +$11.3333/fac +2.0833:1(25:12, 2.0833:1) +First Fac +coal mine*3 +land 4 +$2.8333/land +-- +coal-0.7333 +-- +$0.1466 +-- +Every 00:30 + +laptop factory +$800,000.00 +Consumes +$0.0444/fac +$0.6666/fac +$2.2222/fac +Produces +$22.2222/fac +Profit +$19.2888/fac +1:1:1:1((1:90), (7:72, 1:10.2857), (4:15, 1:3.75)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$1.4837/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.9111 +glass-0.2063 +cpu-0.03055 +-- +$0.02 +$0.4047 +$0.3 +$3.9555 +$6.1904 +$6.1111 +-- +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +$0.0333/fac +Produces +$13.3333/fac +Profit +$13.3/fac +1:3 +First Fac +oil well*1 +land*2 +$6.65/land +-- +oil-0.6666 +-- +$0.0666 +-- +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +$6.6666/fac +Profit +$6.6666/fac +$6.6666/land +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +$0.1111/fac +Produces +$0.1111/fac +Profit +$0/fac +1:60 +First Fac +solar power plant*1 +land 2 +$0/land +-- +energy-0.6555 +-- +$6.5555 +-- +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +$6.25/fac +$0.625/fac +Produces +$25/fac +Profit +$18.125/fac +1:1:1((13:16, 1:1.2307), (5:32, 1:6.4)) +First Fac +silicon mine*5 +oil well*1 +ccd fac*1 +plastic fac*1 +land 9 +$2.01388/land +-- +silicon-0.00769 +oil-0.2 +-- +$0.1923 +$0.02 +-- +Every 01:20 + +television factory +$1,500,000.00 +Consumes +$0.1/fac +$2/fac +$1.1111/fac +Produces +$22.2222/fac +Profit +$19.0111/fac +1:1:1:1((1:40), (7:24, 1:3.4285), (2:15, 1:7.5)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$1.4623/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.8 +glass-0.1619 +cpu-0.03611 +-- +$0.02 +$0.4047 +$0.3 +$3.9 +$4.8571 +$7.2222 +-- +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +$0.4615/fac +$0.1615/fac +Produces +$19.2307/fac +Profit +$18.6076/fac +2.0192:1:1((105:52, 2.0192:1), (12:13, 1:1.0833)) +First Fac +iron mine*2 +coal mine*1 +oil well*1 +steel mill*3 +rubber fac*1 +land 9 +$2.0675/land +-- +coal-0.4571 +oil-0.8 +steel-0.0280 +rubber-0.0019 +-- +$0.0914 +$0.08 +$0.2241 +$0.0134 +-- +Every 04:20 + +car factory +$10,000,000.00 +Consumes +$8.3333/fac +$0.8333/fac +$1.4/fac +$0.5333/fac +$0.3333/fac +$0.35/fac +Produces +$33.3333/fac +Profit +$21.55/fac +1:1:1:2.3333:1:2:1((13:30, 1:2.3076), (5:24, 1:4.8), (49:240, 1:4.8979), (7:3, 2.3333:1), (1:25), (2:1)) +First Fac +iron mine*4 +coal mine*1 +oil well*2 +steel mill*3 +rubber fac*1 +silicon mine*7 +gold mine*1 +gasengine fac*1 +plastic fac*1 +glass fac*1 +steel mill*3 +cpu fac*1 +rubber fac*2 +land 28 +$0.7696/land +-- +coal-0.1142 +steel-0.0280 +rubber-0.0019 +silicon-0.0161 +gold-0.005 +oil-0.6 +gasengine-0.0021 +plastic-6.3333 +glass-0.1819 +steel-0.0190 +cpu-0.04 +-- +$0.0228 +$0.2241 +$0.0134 +$0.4047 +$0.3 +$0.06 +$10.8974 +$0.3166 +$5.4571 +$0.1523 +$8 +-- +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +$2/fac +Produces +$20/fac +Profit +$18/fac +1:1(3:20, 1:6.666) +First Fac +oil well*1 +res chem fac*1 +land 3 +$6/land +-- +oil-0.6666 +res chem-0.1133 +-- +$0.0666 +$11.33 +-- +Every 00:50 + +airport +$20,000,000.00 +Consumes +$0.8333-1.6666/fac +$4.1666-3.3333/fac +Produces +$16.666-33.333/fac +Profit +$11.666-23.333/fac(Avar. $15.555/fac) +1:1((N/A, jet fuel from market), (5:8-5:4, 1:1.6-1.25:1)(Avar. 5:6, 1:1.2)) +First Fac(logistics center always just need 1) +(logistics ctr*1) +solar power plant*1 +land 3/2 +$3.888-7.777/land(Avar. $5.185185/land)/ +$5.833-11.666/land(Avar. $7.777/land) +-- +jet fuel-N/A(Can't calculate) +energy-0.25--0.1666(This is negative)(Avar. 0.111) +-- +jet fuel-N/A(Can't calculate) +energy-2.5--1.6666(This is negative)(Avar. 1.111) +-- +Every 01:00 to 00:30(Avar. 00:45) \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3.1/Readme.md b/icpfiles/Ori-files/IdleCorp_v1.3.1/Readme.md new file mode 100644 index 0000000..cf7876e --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3.1/Readme.md @@ -0,0 +1,37 @@ +Because my English not too well, there will have some gramma mistakes or any word mistake is normal. +All calculate were after recalculated because to prevent some calculate errors(rounded decimal) but if it less than three decimal, it will use it, and won't recalculate. +Decimal, if it is repeatly decimal, it will round down at least two(e.g. 2.2222 >> 2.22 / 2.312222 >> 2.3122), if it is long decimal, it will at least show 3, not below 2, if I haven't mistakes. +All rank is follow by the origanal faclist, if I haven't any mistakes. +The faclist format is follow by that list too. +I am not sure it won't have any error and mistakes but the profit is used to referring, all profit and prices is change by region, techs and policies. +All assets prices is follow to IdleCorp Wiki(I have checked, that all are sell prices so if you want to know the buy prices, just 2 times of the sell price, and I won't change any prices in Profit.txt to buy price(include of jet fuel price)). +In Profit.txt, the consumes haven't sum together, if you want to know te total consumes, you sum it together by yourself. +Maybe will have some miss so don't need to supprise. +All numbers won't show as fractions. +You still need to follow to the actual region production modifiers to change. +Hope You will understand how to look Profit.txt + +Profit.txt Format +follow to origanal faclist, with the following format: +``` +Profit +(Produces-Consumes)(pre second) +(used to refer)(the ratio of orginal ratio is 1:1 and not really is 1:1 now will show all fac ratio like 1:1:1 or 1:4:1, the ratio of the left of the rightest number is arrange of faclist(mean the consumes list))(the number of ratio is follow the consumes list, and with the "1", the"1" is the fac, the numbers is follow the following First Fac's facs, the least number of the facs is in ratio) +First Fac(just the first builded factory) +(when in 100% speed) + +(pre land) +-- +(pre second)(if it have by-product(s)) +-- +(pre second)(if it have by-product(s)) +-- +(Haven't the total profit and total by-products' profit, if you want it, calculate it by yourself) +``` + + + +ReadmeV1.2 +ProfitV1.1.1 +Copyright_NoticeV1.0 +IdleCorpV1.3.1 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3.1/UpdateNote.txt b/icpfiles/Ori-files/IdleCorp_v1.3.1/UpdateNote.txt new file mode 100644 index 0000000..d5e1b0e --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3.1/UpdateNote.txt @@ -0,0 +1,2 @@ +Added Copyright_Notice.txt +Details pleace look at Readme.txt \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3.1/factorlist.txt b/icpfiles/Ori-files/IdleCorp_v1.3.1/factorlist.txt new file mode 100644 index 0000000..145a1b0 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3.1/factorlist.txt @@ -0,0 +1,281 @@ +tree farm +$100.00 +Produces +| 2x wood +Every 00:05 + +oil well +$300.00 +Produces +| 10x crude oil +Every 00:10 + +coal mine +$400.00 +Produces +| 8x coal +Every 00:10 + +iron mine +$550.00 +Produces +| 1x iron +Every 00:20 + +oil refinery +$1,050.00 +Consumes +| 5x crude oil +Produces +| 1x gasoline +Every 00:30 + +steel mill +$1,200.00 +Consumes +| 1x iron +| 4x coal +Produces +| 1x steel +Every 00:35 + +bauxite mine +$1,300.00 +Produces +| 40x bauxite +Every 00:25 + +rubber factory +$1,500.00 +Consumes +| 8x crude oil +Produces +| 1x rubber +Every 00:40 + +gas station +$1,800.00 +Consumes +| 2x gasoline +Produces +| $15.00 +Every 00:15 + +furniture factory +$2,000.00 +Consumes +| 10x wood +Produces +| 1x furniture +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +| 10x bauxite +Produces +| 3x aluminum +Every 00:25 + +led factory +$5,000.00 +Consumes +| 2x silicon +Produces +| 40x led +Every 00:50 + +polyester factory +$6,000.00 +Consumes +| 110x crude oil +Produces +| 14x polyester +Every 00:25 + +silicon mine +$9,000.00 +Produces +| 4x silicon +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +| 12x steel +| 8x rubber +Produces +| 1x bicycle +Every 01:30 + +gold mine +$20,000.00 +Produces +| 4x gold +Every 05:00 + +lamp factory +$28,000.00 +Consumes +| 6x plastic +| 12x led +Produces +| 2x lamp +Every 00:15 + +cotton farm +$30,000.00 +Produces +| 4x cotton +Every 00:20 + +plastic factory +$50,000.00 +Consumes +| 20x crude oil +Produces +| 200x plastic +Every 00:25 + +ccd factory +$69,000.00 +Consumes +| 6x silicon +Produces +| 1x ccd +Every 01:05 + +glass factory +$80,000.00 +Consumes +| 2x silicon +Produces +| 8x glass +Every 00:35 + +cpu factory +$100,000.00 +Consumes +| 1x gold +| 8x silicon +Produces +| 5x cpu +Every 02:00 + +clothing factory +$160,000.00 +Consumes +| 20x polyester +| 10x cotton +Produces +| 10x clothing +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +| 5x plastic +| 1x glass +| 1x cpu +Produces +| 1x cell phone +Every 00:45 + +coal power plant +$500,000.00 +Consumes +| 50x coal +Produces +| 35x energy +Every 00:30 + +laptop factory +$800,000.00 +Consumes +| 8x plastic +| 2x glass +| 1x cpu +Produces +| 1x laptop +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +| 10x crude oil +Produces +| 4x research chemical +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +| 60x energy +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +| 10x energy +Produces +| 1x rocket fuel +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +| 1x ccd +| 100x plastic +Produces +| 1x digital camera +Every 01:20 + +television factory +$1,500,000.00 +Consumes +| 36x plastic +| 12x glass +| 1x cpu +Produces +| 1x television +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +| 15x steel +| 6x rubber +Produces +| 1x gasoline engine +Every 04:20 + +car factory +$10,000,000.00 +Consumes +| 1x gasoline engine +| 1,000x plastic +| 28x glass +| 40x steel +| 1x cpu +| 30x rubber +Produces +| 1x car +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +| 1x research chemical +Produces +| 2x prescription drug +Every 00:50 + +airport +$20,000,000.00 +Consumes +| 10x jet fuel +| 25x energy +Produces +| $1,000.00 +Every 01:00 to 00:30 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3.2/Copyright_Notice.txt b/icpfiles/Ori-files/IdleCorp_v1.3.2/Copyright_Notice.txt new file mode 100644 index 0000000..d235113 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3.2/Copyright_Notice.txt @@ -0,0 +1,11 @@ +Copyright Notice + +------------------ +1.You can post it on anywhere, include of "IdleCorp HQ"(The Discord Server of IdleCorp). +2.You can modify it but not included of the "Copyright_Notice". +3.You also can refer the "Profit.txt" but it just used to REFER. +4.You can ask or tell the author of it about it, and you can share you question(s) in "IdleCorp HQ". +5.You can tell some suggestions to the author, and fix it. +6.Pleace don't suspect author's gramma, if there have any gramma mistakes, you can tell the author. +7.These are all copyright notice of it, I maybe will add more/change notice(s) on here. +------------------ \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3.2/Produce speed.txt b/icpfiles/Ori-files/IdleCorp_v1.3.2/Produce speed.txt new file mode 100644 index 0000000..974b1fe --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3.2/Produce speed.txt @@ -0,0 +1,282 @@ +speed pre second +tree farm +$100.00 +Produces +| 0.4x wood +Every 00:05 + +oil well +$300.00 +Produces +| 1x crude oil +Every 00:10 + +coal mine +$400.00 +Produces +| 0.8x coal +Every 00:10 + +iron mine +$550.00 +Produces +| 0.05x iron +Every 00:20 + +oil refinery +$1,050.00 +Consumes +| 0.1666x crude oil +Produces +| 0.0333x gasoline +Every 00:30 + +steel mill +$1,200.00 +Consumes +| 0.02857x iron +| 0.11428x coal +Produces +| 0.02857x steel +Every 00:35 + +bauxite mine +$1,300.00 +Produces +| 1.6x bauxite +Every 00:25 + +rubber factory +$1,500.00 +Consumes +| 0.2x crude oil +Produces +| 0.025x rubber +Every 00:40 + +gas station +$1,800.00 +Consumes +| 0.13333x gasoline +Produces +| $1.00 +Every 00:15 + +furniture factory +$2,000.00 +Consumes +| 0.04166x wood +Produces +| 0.004166x furniture +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +| 0.4x bauxite +Produces +| 0.12x aluminum +Every 00:25 + +led factory +$5,000.00 +Consumes +| 0.04x silicon +Produces +| 0.8x led +Every 00:50 + +polyester factory +$6,000.00 +Consumes +| 4.4x crude oil +Produces +| 0.56x polyester +Every 00:25 + +silicon mine +$9,000.00 +Produces +| 0.02x silicon +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +| 0.13333x steel +| 0.088888x rubber +Produces +| 0.011111x bicycle +Every 01:30 + +gold mine +$20,000.00 +Produces +| 0.01333x gold +Every 05:00 + +lamp factory +$28,000.00 +Consumes +| 0.4x plastic +| 0.8x led +Produces +| 0.13333x lamp +Every 00:15 + +cotton farm +$30,000.00 +Produces +| 0.2x cotton +Every 00:20 + +plastic factory +$50,000.00 +Consumes +| 0.8x crude oil +Produces +| 8x plastic +Every 00:25 + +ccd factory +$69,000.00 +Consumes +| 0.0923x silicon +Produces +| 0.01538x ccd +Every 01:05 + +glass factory +$80,000.00 +Consumes +| 0.05714x silicon +Produces +| 0.228x glass +Every 00:35 + +cpu factory +$100,000.00 +Consumes +| 0.00833x gold +| 0.0666x silicon +Produces +| 0.04166x cpu +Every 02:00 + +clothing factory +$160,000.00 +Consumes +| 0.5x polyester +| 0.25x cotton +Produces +| 0.25x clothing +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +| 0.1111x plastic +| 0.1111x glass +| 0.1111x cpu +Produces +| 0.1111x cell phone +Every 00:45 + +coal power plant +$500,000.00 +Consumes +| 1.6666x coal +Produces +| 1.1666x energy +Every 00:30 + +laptop factory +$800,000.00 +Consumes +| 0.0888x plastic +| 0.0222x glass +| 0.0111x cpu +Produces +| 0.0111x laptop +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +| 0.3333x crude oil +Produces +| 0.1333x research chemical +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +| 0.6666x energy +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +| 0.0111x energy +Produces +| 0.0011x rocket fuel +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +| 0.0125x ccd +| 1.25x plastic +Produces +| 0.0125x digital camera +Every 01:20 + +television factory +$1,500,000.00 +Consumes +| 0.2x plastic +| 0.0666x glass +| 0.0055x cpu +Produces +| 0.0055x television +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +| 0.05769x steel +| 0.02307x rubber +Produces +| 0.0038x gasoline engine +Every 04:20 + +car factory +$10,000,000.00 +Consumes +| 0.00166x gasoline engine +| 1.6666x plastic +| 0.0466x glass +| 0.0666x steel +| 0.00166x cpu +| 0.05x rubber +Produces +| 0.00166x car +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +| 0.02x research chemical +Produces +| 0.04x prescription drug +Every 00:50 + +airport +$20,000,000.00 +Consumes +| 0.1666-0.3333x jet fuel +| 0.4166-0.8333x energy +Produces +| $16.6666-33.3333 +Every 01:00 to 00:30 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3.2/Profit.txt b/icpfiles/Ori-files/IdleCorp_v1.3.2/Profit.txt new file mode 100644 index 0000000..44a5ac3 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3.2/Profit.txt @@ -0,0 +1,732 @@ +money IO (pre second) +tree farm +$100.00 +Produces +$0.06/fac +Profit +$0.06/fac +$0.06/land +Every 00:05 + +oil well +$300.00 +Produces +$0.1/fac +Profit +$0.1/fac +$0.1/land +Every 00:10 + +coal mine +$400.00 +Produces +$0.16/fac +Profit +$0.16/fac +$0.16/land +Every 00:10 + +iron mine +$550.00 +Produces +$0.1/fac +Profit +$0.1/fac +$0.1/land +Every 00:20 + +oil refinery +$1,050.00 +Consumes +$0.0166/fac +Produces +$0.1666/fac +Profit +$0.15/fac +1:6 +First Fac +oil well*1 +land 2 +$0.075/land +-- +oil-0.8333 +-- +$0.0833 +-- +Every 00:30 + +steel mill +$1,200.00 +Consumes +$0.057/fac +$0.0228/fac +Produces +$0.2285/fac +Profit +$0.148/fac +1:1:1((4:7, 1:1.75), (1:7)) +First Fac +iron mine*1 +coal mine*1 +land 3 +$0.0495/land +-- +iron-0.0214 +coal-0.6857 +-- +$0.0428 +$0.137 +-- +Every 00:35 + +bauxite mine +$1,300.00 +Produces +$0.16/fac +Profit +$0.16/fac +$0.16/land +Every 00:25 + +rubber factory +$1,500.00 +Consumes +$0.02/fac +Produces +$0.175/fac +Profit +$0.155/fac +1:1(31:200, 1:6.4516) +First Fac +oil well*1 +land 2 +$0.0775/land +-- +oil-0.8 +-- +$0.08 +-- +Every 00:40 + +gas station +$1,800.00 +Consumes +$0.666/fac +Produces +$1/fac +Profit +$0.333/fac +4:1(4:1) +First Fac +oil well*1 +oil refinery*4 +land 6 +$0.0555/land +-- +oil-0.333 +-- +$0.0333 +-- +Every 00:15 + +furniture factory +$2,000.00 +Consumes +$0.00625/fac +Produces +$0.25/fac +Profit +$0.2437/fac +1:1(5:48, 1:9.6) +First Fac +tree farm*1 +land 2 +$0.1218/fac +-- +wood-0.35833 +-- +$0.0537 +-- +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +$0.04/fac +Produces +$0.48/fac +Profit +$0.44/fac +1:4 +First Fac +bauxite mine*1 +land 2 +$0.22/land +-- +bauxite-1.2 +-- +$0.12 +-- +Every 00:25 + +led factory +$5,000.00 +Consumes +$1/fac +Produces +$1.6/fac +Profit +$0.6/fac +1:1 +First Fac +silicon mine*2 +land 3 +$0.2/land +Every 00:50 + +polyester factory +$6,000.00 +Consumes +$0.44/fac +Produces +$1.12/fac +Profit +$0.68/fac +4.4:1(22:5, 4.4:1) +First Fac +oil well*5 +land 6 +$0.1133/land +-- +oil-0.6 +-- +$0.06 +-- +Every 00:25 + +silicon mine +$9,000.00 +Produces +$0.5/fac +Profit +$0.5/fac +$0.5/land +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +$1.0666/fac +$0.622/fac +Produces +$2.6666/fac +Profit +$0.9777/fac +4.6666:3.5555:1((14:3, 4.6666:1), (32:9, 3.5555:1)) +First Fac +steel mill*5 +rubber fac*4 +land 10 +$0.0977/land +-- +steel-0.00952 +rubber-0.0111 +-- +$0.07619 +$0.0777 +-- +Every 01:30 + +gold mine +$20,000.00 +Produces +$0.8/fac +Profit +$0.8/fac +$0.8/land +Every 05:00 + +lamp factory +$28,000.00 +Consumes +$0.2/fac +$1.6/fac +Produces +$3.3333/fac +Profit +$ 1.5333/fac +1:1:1((1:20), (1:1)) +First Fac +plastic fac*1 +led fac*1 +land 3 +$0.5111/land +-- +plastic-7.6 +-- +$3.8 +-- +Every 00:15 + +cotton farm +$30,000.00 +Produces +$1/fac +Profit +$1/fac +$1/land +Every 00:20 + +plastic factory +$50,000.00 +Consumes +$0.08/fac +Produces +$4/fac +Profit +$3.92/fac +1:1(4:5, 1:1.25) +First Fac +oil well*1 +land 2 +$1.96/land +-- +oil-0.2 +-- +$0.02 +-- +Every 00:25 + +ccd factory +$69,000.00 +Consumes +$2.307/fac +Produces +$7.6923/fac +Profit +$5.3846/fac +4.615:1(60:13, 4.615:1) +First Fac +silicon mine*5 +land 6 +$0.8974/land +-- +silicon-0.00769 +-- +$0.1923 +-- +Every 01:05 + +glass factory +$80,000.00 +Consumes +$1.4285/fac +Produces +$6.8571/fac +Profit +$5.4285/fac +2.857:1(20:7, 2.857:1) +First Fac +silicon mine*3 +land 4 +$1.3571/land +-- +silicon-0.00285 +-- +$0.0714 +-- +Every 00:35 + +cpu factory +$100,000.00 +Consumes +$0.5/fac +$1.6666/fac +Produces +$8.3333/fac +Profit +$6.1666/fac +1:3.333:1((5:8, 1:1.6), (10:3, 3.333:1)) +First Fac +gold mine*1 +silicon mine*4 +land 6 +$1.0277/land +-- +gold-0.005 +silicon-0.0133 +-- +$0.3 +$0.3333 +-- +Every 02:00 + +clothing factory +$160,000.00 +Consumes +$1/fac +$1.25/fac +Produces +$7.5/fac +Profit +$5.25/fac +1:1.25:1((25:28, 1:1.12), (5:4, 1.25:1)) +First Fac +oil well*5 +polyester fac*1 +cotton farm*2 +land 4 +$1.3125/land +-- +oil-0.6 +polyester-0.06 +cotton-0.15 +-- +$0.06 +$0.12 +$0.75 +-- +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +$0.0555/fac +$0.6666/fac +$4.4444/fac +Produces +$17.7777/fac +Profit +$12.6111/fac +1:1:1:1((1:72), (7:72, 1:10.2857), (8:15, 1:1.875)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$0.9700/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.8888 +glass-0.2063 +cpu-0.01944 +-- +$0.02 +$0.4047 +$0.3 +$3.9444 +$6.1904 +$3.8888 +-- +Every 00:45 + +coal power plant +$500,000.00 +Consumes +$0.3333/fac +Produces +$11.6666/fac +Profit +$11.3333/fac +2.0833:1(25:12, 2.0833:1) +First Fac +coal mine*3 +land 4 +$2.8333/land +-- +coal-0.7333 +-- +$0.1466 +-- +Every 00:30 + +laptop factory +$800,000.00 +Consumes +$0.0444/fac +$0.6666/fac +$2.2222/fac +Produces +$22.2222/fac +Profit +$19.2888/fac +1:1:1:1((1:90), (7:72, 1:10.2857), (4:15, 1:3.75)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$1.4837/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.9111 +glass-0.2063 +cpu-0.03055 +-- +$0.02 +$0.4047 +$0.3 +$3.9555 +$6.1904 +$6.1111 +-- +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +$0.0333/fac +Produces +$13.3333/fac +Profit +$13.3/fac +1:3 +First Fac +oil well*1 +land*2 +$6.65/land +-- +oil-0.6666 +-- +$0.0666 +-- +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +$6.6666/fac +Profit +$6.6666/fac +$6.6666/land +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +$0.1111/fac +Produces +$0.1111/fac +Profit +$0/fac +1:60 +First Fac +solar power plant*1 +land 2 +$0/land +-- +energy-0.6555 +-- +$6.5555 +-- +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +$6.25/fac +$0.625/fac +Produces +$25/fac +Profit +$18.125/fac +1:1:1((13:16, 1:1.2307), (5:32, 1:6.4)) +First Fac +silicon mine*5 +oil well*1 +ccd fac*1 +plastic fac*1 +land 9 +$2.01388/land +-- +silicon-0.00769 +oil-0.2 +-- +$0.1923 +$0.02 +-- +Every 01:20 + +television factory +$1,500,000.00 +Consumes +$0.1/fac +$2/fac +$1.1111/fac +Produces +$22.2222/fac +Profit +$19.0111/fac +1:1:1:1((1:40), (7:24, 1:3.4285), (2:15, 1:7.5)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$1.4623/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.8 +glass-0.1619 +cpu-0.03611 +-- +$0.02 +$0.4047 +$0.3 +$3.9 +$4.8571 +$7.2222 +-- +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +$0.4615/fac +$0.1615/fac +Produces +$19.2307/fac +Profit +$18.6076/fac +2.0192:1:1((105:52, 2.0192:1), (12:13, 1:1.0833)) +First Fac +iron mine*2 +coal mine*1 +oil well*1 +steel mill*3 +rubber fac*1 +land 9 +$2.0675/land +-- +coal-0.4571 +oil-0.8 +steel-0.0280 +rubber-0.0019 +-- +$0.0914 +$0.08 +$0.2241 +$0.0134 +-- +Every 04:20 + +car factory +$10,000,000.00 +Consumes +$8.3333/fac +$0.8333/fac +$1.4/fac +$0.5333/fac +$0.3333/fac +$0.35/fac +Produces +$33.3333/fac +Profit +$21.55/fac +1:1:1:2.3333:1:2:1((13:30, 1:2.3076), (5:24, 1:4.8), (49:240, 1:4.8979), (7:3, 2.3333:1), (1:25), (2:1)) +First Fac +iron mine*4 +coal mine*1 +oil well*2 +steel mill*3 +rubber fac*1 +silicon mine*7 +gold mine*1 +gasengine fac*1 +plastic fac*1 +glass fac*1 +steel mill*3 +cpu fac*1 +rubber fac*2 +land 28 +$0.7696/land +-- +coal-0.1142 +steel-0.0280 +rubber-0.0019 +silicon-0.0161 +gold-0.005 +oil-0.6 +gasengine-0.0021 +plastic-6.3333 +glass-0.1819 +steel-0.0190 +cpu-0.04 +-- +$0.0228 +$0.2241 +$0.0134 +$0.4047 +$0.3 +$0.06 +$10.8974 +$0.3166 +$5.4571 +$0.1523 +$8 +-- +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +$2/fac +Produces +$20/fac +Profit +$18/fac +1:1(3:20, 1:6.666) +First Fac +oil well*1 +res chem fac*1 +land 3 +$6/land +-- +oil-0.6666 +res chem-0.1133 +-- +$0.0666 +$11.33 +-- +Every 00:50 + +airport +$20,000,000.00 +Consumes +$0.8333-1.6666/fac +$4.1666-3.3333/fac +Produces +$16.666-33.333/fac +Profit +$11.666-23.333/fac(Avar. $15.555/fac) +1:1((N/A, jet fuel from market), (5:8-5:4, 1:1.6-1.25:1)(Avar. 5:6, 1:1.2)) +First Fac(logistics center always just need 1) +(logistics ctr*1) +solar power plant*1 +land 3/2 +$3.888-7.777/land(Avar. $5.185185/land)/ +$5.833-11.666/land(Avar. $7.777/land) +-- +jet fuel-N/A(Can't calculate) +energy-0.25--0.1666(This is negative)(Avar. 0.111) +-- +jet fuel-N/A(Can't calculate) +energy-2.5--1.6666(This is negative)(Avar. 1.111) +-- +Every 01:00 to 00:30(Avar. 00:45) \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3.2/Readme.md b/icpfiles/Ori-files/IdleCorp_v1.3.2/Readme.md new file mode 100644 index 0000000..1d51f5e --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3.2/Readme.md @@ -0,0 +1,38 @@ +Because my English not too well, there will have some gramma mistakes or any word mistake is normal. +All calculate were after recalculated because to prevent some calculate errors(rounded decimal) but if it less than three decimal, it will use it, and won't recalculate. +Decimal, if it is repeatly decimal, it will round down at least two(e.g. 2.2222 >> 2.22 / 2.312222 >> 2.3122), if it is long decimal, it will at least show 3, not below 2, if I haven't mistakes. +All rank is follow by the origanal faclist, if I haven't any mistakes. +The faclist format is follow by that list too. +I am not sure it won't have any error and mistakes but the profit is used to referring, all profit and prices is change by region, techs and policies. +All assets prices is follow to IdleCorp Wiki(I have checked, that all are sell prices so if you want to know the buy prices, just 2 times of the sell price, and I won't change any prices in Profit.txt to buy price(include of jet fuel price)). +In Profit.txt, the consumes haven't sum together, if you want to know te total consumes, you sum it together by yourself. +Maybe will have some miss so don't need to supprise. +All numbers won't show as fractions. +You still need to follow to the actual region production modifiers to change. +Hope You will understand how to look Profit.txt +And pay attention, the ratio is "the consumes factorys to the produce factory", please remember. + +Profit.txt Format +follow to origanal faclist, with the following format: +``` +Profit +(Produces-Consumes)(pre second) +(used to refer)(the ratio of orginal ratio is 1:1 and not really is 1:1 now will show all fac ratio like 1:1:1 or 1:4:1, the ratio of the left of the rightest number is arrange of faclist(mean the consumes list))(the number of ratio is follow the consumes list, and with the "1", the"1" is the fac, the numbers is follow the following First Fac's facs, the least number of the facs is in ratio) +First Fac(just the first builded factory) +(when in 100% speed) + +(pre land) +-- +(pre second)(if it have by-product(s)) +-- +(pre second)(if it have by-product(s)) +-- +(Haven't the total profit and total by-products' profit, if you want it, calculate it by yourself) +``` + + + +ReadmeV1.2.1 +ProfitV1.1.1 +Copyright_NoticeV1.0 +IdleCorpV1.3.2 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3.2/UpdateNote.txt b/icpfiles/Ori-files/IdleCorp_v1.3.2/UpdateNote.txt new file mode 100644 index 0000000..d5e1b0e --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3.2/UpdateNote.txt @@ -0,0 +1,2 @@ +Added Copyright_Notice.txt +Details pleace look at Readme.txt \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3.2/factorlist.txt b/icpfiles/Ori-files/IdleCorp_v1.3.2/factorlist.txt new file mode 100644 index 0000000..145a1b0 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3.2/factorlist.txt @@ -0,0 +1,281 @@ +tree farm +$100.00 +Produces +| 2x wood +Every 00:05 + +oil well +$300.00 +Produces +| 10x crude oil +Every 00:10 + +coal mine +$400.00 +Produces +| 8x coal +Every 00:10 + +iron mine +$550.00 +Produces +| 1x iron +Every 00:20 + +oil refinery +$1,050.00 +Consumes +| 5x crude oil +Produces +| 1x gasoline +Every 00:30 + +steel mill +$1,200.00 +Consumes +| 1x iron +| 4x coal +Produces +| 1x steel +Every 00:35 + +bauxite mine +$1,300.00 +Produces +| 40x bauxite +Every 00:25 + +rubber factory +$1,500.00 +Consumes +| 8x crude oil +Produces +| 1x rubber +Every 00:40 + +gas station +$1,800.00 +Consumes +| 2x gasoline +Produces +| $15.00 +Every 00:15 + +furniture factory +$2,000.00 +Consumes +| 10x wood +Produces +| 1x furniture +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +| 10x bauxite +Produces +| 3x aluminum +Every 00:25 + +led factory +$5,000.00 +Consumes +| 2x silicon +Produces +| 40x led +Every 00:50 + +polyester factory +$6,000.00 +Consumes +| 110x crude oil +Produces +| 14x polyester +Every 00:25 + +silicon mine +$9,000.00 +Produces +| 4x silicon +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +| 12x steel +| 8x rubber +Produces +| 1x bicycle +Every 01:30 + +gold mine +$20,000.00 +Produces +| 4x gold +Every 05:00 + +lamp factory +$28,000.00 +Consumes +| 6x plastic +| 12x led +Produces +| 2x lamp +Every 00:15 + +cotton farm +$30,000.00 +Produces +| 4x cotton +Every 00:20 + +plastic factory +$50,000.00 +Consumes +| 20x crude oil +Produces +| 200x plastic +Every 00:25 + +ccd factory +$69,000.00 +Consumes +| 6x silicon +Produces +| 1x ccd +Every 01:05 + +glass factory +$80,000.00 +Consumes +| 2x silicon +Produces +| 8x glass +Every 00:35 + +cpu factory +$100,000.00 +Consumes +| 1x gold +| 8x silicon +Produces +| 5x cpu +Every 02:00 + +clothing factory +$160,000.00 +Consumes +| 20x polyester +| 10x cotton +Produces +| 10x clothing +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +| 5x plastic +| 1x glass +| 1x cpu +Produces +| 1x cell phone +Every 00:45 + +coal power plant +$500,000.00 +Consumes +| 50x coal +Produces +| 35x energy +Every 00:30 + +laptop factory +$800,000.00 +Consumes +| 8x plastic +| 2x glass +| 1x cpu +Produces +| 1x laptop +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +| 10x crude oil +Produces +| 4x research chemical +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +| 60x energy +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +| 10x energy +Produces +| 1x rocket fuel +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +| 1x ccd +| 100x plastic +Produces +| 1x digital camera +Every 01:20 + +television factory +$1,500,000.00 +Consumes +| 36x plastic +| 12x glass +| 1x cpu +Produces +| 1x television +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +| 15x steel +| 6x rubber +Produces +| 1x gasoline engine +Every 04:20 + +car factory +$10,000,000.00 +Consumes +| 1x gasoline engine +| 1,000x plastic +| 28x glass +| 40x steel +| 1x cpu +| 30x rubber +Produces +| 1x car +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +| 1x research chemical +Produces +| 2x prescription drug +Every 00:50 + +airport +$20,000,000.00 +Consumes +| 10x jet fuel +| 25x energy +Produces +| $1,000.00 +Every 01:00 to 00:30 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3/Produce speed.txt b/icpfiles/Ori-files/IdleCorp_v1.3/Produce speed.txt new file mode 100644 index 0000000..974b1fe --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3/Produce speed.txt @@ -0,0 +1,282 @@ +speed pre second +tree farm +$100.00 +Produces +| 0.4x wood +Every 00:05 + +oil well +$300.00 +Produces +| 1x crude oil +Every 00:10 + +coal mine +$400.00 +Produces +| 0.8x coal +Every 00:10 + +iron mine +$550.00 +Produces +| 0.05x iron +Every 00:20 + +oil refinery +$1,050.00 +Consumes +| 0.1666x crude oil +Produces +| 0.0333x gasoline +Every 00:30 + +steel mill +$1,200.00 +Consumes +| 0.02857x iron +| 0.11428x coal +Produces +| 0.02857x steel +Every 00:35 + +bauxite mine +$1,300.00 +Produces +| 1.6x bauxite +Every 00:25 + +rubber factory +$1,500.00 +Consumes +| 0.2x crude oil +Produces +| 0.025x rubber +Every 00:40 + +gas station +$1,800.00 +Consumes +| 0.13333x gasoline +Produces +| $1.00 +Every 00:15 + +furniture factory +$2,000.00 +Consumes +| 0.04166x wood +Produces +| 0.004166x furniture +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +| 0.4x bauxite +Produces +| 0.12x aluminum +Every 00:25 + +led factory +$5,000.00 +Consumes +| 0.04x silicon +Produces +| 0.8x led +Every 00:50 + +polyester factory +$6,000.00 +Consumes +| 4.4x crude oil +Produces +| 0.56x polyester +Every 00:25 + +silicon mine +$9,000.00 +Produces +| 0.02x silicon +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +| 0.13333x steel +| 0.088888x rubber +Produces +| 0.011111x bicycle +Every 01:30 + +gold mine +$20,000.00 +Produces +| 0.01333x gold +Every 05:00 + +lamp factory +$28,000.00 +Consumes +| 0.4x plastic +| 0.8x led +Produces +| 0.13333x lamp +Every 00:15 + +cotton farm +$30,000.00 +Produces +| 0.2x cotton +Every 00:20 + +plastic factory +$50,000.00 +Consumes +| 0.8x crude oil +Produces +| 8x plastic +Every 00:25 + +ccd factory +$69,000.00 +Consumes +| 0.0923x silicon +Produces +| 0.01538x ccd +Every 01:05 + +glass factory +$80,000.00 +Consumes +| 0.05714x silicon +Produces +| 0.228x glass +Every 00:35 + +cpu factory +$100,000.00 +Consumes +| 0.00833x gold +| 0.0666x silicon +Produces +| 0.04166x cpu +Every 02:00 + +clothing factory +$160,000.00 +Consumes +| 0.5x polyester +| 0.25x cotton +Produces +| 0.25x clothing +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +| 0.1111x plastic +| 0.1111x glass +| 0.1111x cpu +Produces +| 0.1111x cell phone +Every 00:45 + +coal power plant +$500,000.00 +Consumes +| 1.6666x coal +Produces +| 1.1666x energy +Every 00:30 + +laptop factory +$800,000.00 +Consumes +| 0.0888x plastic +| 0.0222x glass +| 0.0111x cpu +Produces +| 0.0111x laptop +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +| 0.3333x crude oil +Produces +| 0.1333x research chemical +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +| 0.6666x energy +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +| 0.0111x energy +Produces +| 0.0011x rocket fuel +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +| 0.0125x ccd +| 1.25x plastic +Produces +| 0.0125x digital camera +Every 01:20 + +television factory +$1,500,000.00 +Consumes +| 0.2x plastic +| 0.0666x glass +| 0.0055x cpu +Produces +| 0.0055x television +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +| 0.05769x steel +| 0.02307x rubber +Produces +| 0.0038x gasoline engine +Every 04:20 + +car factory +$10,000,000.00 +Consumes +| 0.00166x gasoline engine +| 1.6666x plastic +| 0.0466x glass +| 0.0666x steel +| 0.00166x cpu +| 0.05x rubber +Produces +| 0.00166x car +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +| 0.02x research chemical +Produces +| 0.04x prescription drug +Every 00:50 + +airport +$20,000,000.00 +Consumes +| 0.1666-0.3333x jet fuel +| 0.4166-0.8333x energy +Produces +| $16.6666-33.3333 +Every 01:00 to 00:30 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3/Profit.txt b/icpfiles/Ori-files/IdleCorp_v1.3/Profit.txt new file mode 100644 index 0000000..44a5ac3 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3/Profit.txt @@ -0,0 +1,732 @@ +money IO (pre second) +tree farm +$100.00 +Produces +$0.06/fac +Profit +$0.06/fac +$0.06/land +Every 00:05 + +oil well +$300.00 +Produces +$0.1/fac +Profit +$0.1/fac +$0.1/land +Every 00:10 + +coal mine +$400.00 +Produces +$0.16/fac +Profit +$0.16/fac +$0.16/land +Every 00:10 + +iron mine +$550.00 +Produces +$0.1/fac +Profit +$0.1/fac +$0.1/land +Every 00:20 + +oil refinery +$1,050.00 +Consumes +$0.0166/fac +Produces +$0.1666/fac +Profit +$0.15/fac +1:6 +First Fac +oil well*1 +land 2 +$0.075/land +-- +oil-0.8333 +-- +$0.0833 +-- +Every 00:30 + +steel mill +$1,200.00 +Consumes +$0.057/fac +$0.0228/fac +Produces +$0.2285/fac +Profit +$0.148/fac +1:1:1((4:7, 1:1.75), (1:7)) +First Fac +iron mine*1 +coal mine*1 +land 3 +$0.0495/land +-- +iron-0.0214 +coal-0.6857 +-- +$0.0428 +$0.137 +-- +Every 00:35 + +bauxite mine +$1,300.00 +Produces +$0.16/fac +Profit +$0.16/fac +$0.16/land +Every 00:25 + +rubber factory +$1,500.00 +Consumes +$0.02/fac +Produces +$0.175/fac +Profit +$0.155/fac +1:1(31:200, 1:6.4516) +First Fac +oil well*1 +land 2 +$0.0775/land +-- +oil-0.8 +-- +$0.08 +-- +Every 00:40 + +gas station +$1,800.00 +Consumes +$0.666/fac +Produces +$1/fac +Profit +$0.333/fac +4:1(4:1) +First Fac +oil well*1 +oil refinery*4 +land 6 +$0.0555/land +-- +oil-0.333 +-- +$0.0333 +-- +Every 00:15 + +furniture factory +$2,000.00 +Consumes +$0.00625/fac +Produces +$0.25/fac +Profit +$0.2437/fac +1:1(5:48, 1:9.6) +First Fac +tree farm*1 +land 2 +$0.1218/fac +-- +wood-0.35833 +-- +$0.0537 +-- +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +$0.04/fac +Produces +$0.48/fac +Profit +$0.44/fac +1:4 +First Fac +bauxite mine*1 +land 2 +$0.22/land +-- +bauxite-1.2 +-- +$0.12 +-- +Every 00:25 + +led factory +$5,000.00 +Consumes +$1/fac +Produces +$1.6/fac +Profit +$0.6/fac +1:1 +First Fac +silicon mine*2 +land 3 +$0.2/land +Every 00:50 + +polyester factory +$6,000.00 +Consumes +$0.44/fac +Produces +$1.12/fac +Profit +$0.68/fac +4.4:1(22:5, 4.4:1) +First Fac +oil well*5 +land 6 +$0.1133/land +-- +oil-0.6 +-- +$0.06 +-- +Every 00:25 + +silicon mine +$9,000.00 +Produces +$0.5/fac +Profit +$0.5/fac +$0.5/land +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +$1.0666/fac +$0.622/fac +Produces +$2.6666/fac +Profit +$0.9777/fac +4.6666:3.5555:1((14:3, 4.6666:1), (32:9, 3.5555:1)) +First Fac +steel mill*5 +rubber fac*4 +land 10 +$0.0977/land +-- +steel-0.00952 +rubber-0.0111 +-- +$0.07619 +$0.0777 +-- +Every 01:30 + +gold mine +$20,000.00 +Produces +$0.8/fac +Profit +$0.8/fac +$0.8/land +Every 05:00 + +lamp factory +$28,000.00 +Consumes +$0.2/fac +$1.6/fac +Produces +$3.3333/fac +Profit +$ 1.5333/fac +1:1:1((1:20), (1:1)) +First Fac +plastic fac*1 +led fac*1 +land 3 +$0.5111/land +-- +plastic-7.6 +-- +$3.8 +-- +Every 00:15 + +cotton farm +$30,000.00 +Produces +$1/fac +Profit +$1/fac +$1/land +Every 00:20 + +plastic factory +$50,000.00 +Consumes +$0.08/fac +Produces +$4/fac +Profit +$3.92/fac +1:1(4:5, 1:1.25) +First Fac +oil well*1 +land 2 +$1.96/land +-- +oil-0.2 +-- +$0.02 +-- +Every 00:25 + +ccd factory +$69,000.00 +Consumes +$2.307/fac +Produces +$7.6923/fac +Profit +$5.3846/fac +4.615:1(60:13, 4.615:1) +First Fac +silicon mine*5 +land 6 +$0.8974/land +-- +silicon-0.00769 +-- +$0.1923 +-- +Every 01:05 + +glass factory +$80,000.00 +Consumes +$1.4285/fac +Produces +$6.8571/fac +Profit +$5.4285/fac +2.857:1(20:7, 2.857:1) +First Fac +silicon mine*3 +land 4 +$1.3571/land +-- +silicon-0.00285 +-- +$0.0714 +-- +Every 00:35 + +cpu factory +$100,000.00 +Consumes +$0.5/fac +$1.6666/fac +Produces +$8.3333/fac +Profit +$6.1666/fac +1:3.333:1((5:8, 1:1.6), (10:3, 3.333:1)) +First Fac +gold mine*1 +silicon mine*4 +land 6 +$1.0277/land +-- +gold-0.005 +silicon-0.0133 +-- +$0.3 +$0.3333 +-- +Every 02:00 + +clothing factory +$160,000.00 +Consumes +$1/fac +$1.25/fac +Produces +$7.5/fac +Profit +$5.25/fac +1:1.25:1((25:28, 1:1.12), (5:4, 1.25:1)) +First Fac +oil well*5 +polyester fac*1 +cotton farm*2 +land 4 +$1.3125/land +-- +oil-0.6 +polyester-0.06 +cotton-0.15 +-- +$0.06 +$0.12 +$0.75 +-- +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +$0.0555/fac +$0.6666/fac +$4.4444/fac +Produces +$17.7777/fac +Profit +$12.6111/fac +1:1:1:1((1:72), (7:72, 1:10.2857), (8:15, 1:1.875)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$0.9700/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.8888 +glass-0.2063 +cpu-0.01944 +-- +$0.02 +$0.4047 +$0.3 +$3.9444 +$6.1904 +$3.8888 +-- +Every 00:45 + +coal power plant +$500,000.00 +Consumes +$0.3333/fac +Produces +$11.6666/fac +Profit +$11.3333/fac +2.0833:1(25:12, 2.0833:1) +First Fac +coal mine*3 +land 4 +$2.8333/land +-- +coal-0.7333 +-- +$0.1466 +-- +Every 00:30 + +laptop factory +$800,000.00 +Consumes +$0.0444/fac +$0.6666/fac +$2.2222/fac +Produces +$22.2222/fac +Profit +$19.2888/fac +1:1:1:1((1:90), (7:72, 1:10.2857), (4:15, 1:3.75)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$1.4837/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.9111 +glass-0.2063 +cpu-0.03055 +-- +$0.02 +$0.4047 +$0.3 +$3.9555 +$6.1904 +$6.1111 +-- +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +$0.0333/fac +Produces +$13.3333/fac +Profit +$13.3/fac +1:3 +First Fac +oil well*1 +land*2 +$6.65/land +-- +oil-0.6666 +-- +$0.0666 +-- +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +$6.6666/fac +Profit +$6.6666/fac +$6.6666/land +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +$0.1111/fac +Produces +$0.1111/fac +Profit +$0/fac +1:60 +First Fac +solar power plant*1 +land 2 +$0/land +-- +energy-0.6555 +-- +$6.5555 +-- +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +$6.25/fac +$0.625/fac +Produces +$25/fac +Profit +$18.125/fac +1:1:1((13:16, 1:1.2307), (5:32, 1:6.4)) +First Fac +silicon mine*5 +oil well*1 +ccd fac*1 +plastic fac*1 +land 9 +$2.01388/land +-- +silicon-0.00769 +oil-0.2 +-- +$0.1923 +$0.02 +-- +Every 01:20 + +television factory +$1,500,000.00 +Consumes +$0.1/fac +$2/fac +$1.1111/fac +Produces +$22.2222/fac +Profit +$19.0111/fac +1:1:1:1((1:40), (7:24, 1:3.4285), (2:15, 1:7.5)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$1.4623/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.8 +glass-0.1619 +cpu-0.03611 +-- +$0.02 +$0.4047 +$0.3 +$3.9 +$4.8571 +$7.2222 +-- +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +$0.4615/fac +$0.1615/fac +Produces +$19.2307/fac +Profit +$18.6076/fac +2.0192:1:1((105:52, 2.0192:1), (12:13, 1:1.0833)) +First Fac +iron mine*2 +coal mine*1 +oil well*1 +steel mill*3 +rubber fac*1 +land 9 +$2.0675/land +-- +coal-0.4571 +oil-0.8 +steel-0.0280 +rubber-0.0019 +-- +$0.0914 +$0.08 +$0.2241 +$0.0134 +-- +Every 04:20 + +car factory +$10,000,000.00 +Consumes +$8.3333/fac +$0.8333/fac +$1.4/fac +$0.5333/fac +$0.3333/fac +$0.35/fac +Produces +$33.3333/fac +Profit +$21.55/fac +1:1:1:2.3333:1:2:1((13:30, 1:2.3076), (5:24, 1:4.8), (49:240, 1:4.8979), (7:3, 2.3333:1), (1:25), (2:1)) +First Fac +iron mine*4 +coal mine*1 +oil well*2 +steel mill*3 +rubber fac*1 +silicon mine*7 +gold mine*1 +gasengine fac*1 +plastic fac*1 +glass fac*1 +steel mill*3 +cpu fac*1 +rubber fac*2 +land 28 +$0.7696/land +-- +coal-0.1142 +steel-0.0280 +rubber-0.0019 +silicon-0.0161 +gold-0.005 +oil-0.6 +gasengine-0.0021 +plastic-6.3333 +glass-0.1819 +steel-0.0190 +cpu-0.04 +-- +$0.0228 +$0.2241 +$0.0134 +$0.4047 +$0.3 +$0.06 +$10.8974 +$0.3166 +$5.4571 +$0.1523 +$8 +-- +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +$2/fac +Produces +$20/fac +Profit +$18/fac +1:1(3:20, 1:6.666) +First Fac +oil well*1 +res chem fac*1 +land 3 +$6/land +-- +oil-0.6666 +res chem-0.1133 +-- +$0.0666 +$11.33 +-- +Every 00:50 + +airport +$20,000,000.00 +Consumes +$0.8333-1.6666/fac +$4.1666-3.3333/fac +Produces +$16.666-33.333/fac +Profit +$11.666-23.333/fac(Avar. $15.555/fac) +1:1((N/A, jet fuel from market), (5:8-5:4, 1:1.6-1.25:1)(Avar. 5:6, 1:1.2)) +First Fac(logistics center always just need 1) +(logistics ctr*1) +solar power plant*1 +land 3/2 +$3.888-7.777/land(Avar. $5.185185/land)/ +$5.833-11.666/land(Avar. $7.777/land) +-- +jet fuel-N/A(Can't calculate) +energy-0.25--0.1666(This is negative)(Avar. 0.111) +-- +jet fuel-N/A(Can't calculate) +energy-2.5--1.6666(This is negative)(Avar. 1.111) +-- +Every 01:00 to 00:30(Avar. 00:45) \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3/Readme.md b/icpfiles/Ori-files/IdleCorp_v1.3/Readme.md new file mode 100644 index 0000000..8a023ff --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3/Readme.md @@ -0,0 +1,36 @@ +Because my English not too well, there will have some gramma mistakes or any word mistake is normal. +All calculate were after recalculated because to prevent some calculate errors(rounded decimal) but if it less than three decimal, it will use it, and won't recalculate. +Decimal, if it is repeatly decimal, it will round down at least two(e.g. 2.2222 >> 2.22 / 2.312222 >> 2.3122), if it is long decimal, it will at least show 3, not below 2, if I haven't mistakes. +All rank is follow by the origanal faclist, if I haven't any mistakes. +The faclist format is follow by that list too. +I am not sure it won't have any error and mistakes but the profit is used to referring, all profit and prices is change by region, techs and policies. +All assets prices is follow to IdleCorp Wiki(I have checked, that all are sell prices so if you want to know the buy prices, just 2 times of the sell price, and I won't change any prices in Profit.txt to buy price(include of jet fuel price)). +In Profit.txt, the consumes haven't sum together, if you want to know te total consumes, you sum it together by yourself. +Maybe will have some miss so don't need to supprise. +All numbers won't show as fractions. +You still need to follow to the actual region production modifiers to change. +Hope You will understand how to look Profit.txt + +Profit.txt Format +follow to origanal faclist, with the following format: +``` +Profit +(Produces-Consumes)(pre second) +(used to refer)(the ratio of orginal ratio is 1:1 and not really is 1:1 now will show all fac ratio like 1:1:1 or 1:4:1, the ratio of the left of the rightest number is arrange of faclist(mean the consumes list))(the number of ratio is follow the consumes list, and with the "1", the"1" is the fac, the numbers is follow the following First Fac's facs, the least number of the facs is in ratio) +First Fac(just the first builded factory) +(when in 100% speed) + +(pre land) +-- +(pre second)(if it have by-product(s)) +-- +(pre second)(if it have by-product(s)) +-- +(Haven't the total profit and total by-products' profit, if you want it, calculate it by yourself) +``` + + + +ReadmeV1.2 +ProfitV1.1.1 +IdleCorpV1.3 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3/UpdateNote.txt b/icpfiles/Ori-files/IdleCorp_v1.3/UpdateNote.txt new file mode 100644 index 0000000..779dc41 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3/UpdateNote.txt @@ -0,0 +1,2 @@ +Checked all ratio and fixed +Details pleace look at Readme.txt \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.3/factorlist.txt b/icpfiles/Ori-files/IdleCorp_v1.3/factorlist.txt new file mode 100644 index 0000000..145a1b0 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.3/factorlist.txt @@ -0,0 +1,281 @@ +tree farm +$100.00 +Produces +| 2x wood +Every 00:05 + +oil well +$300.00 +Produces +| 10x crude oil +Every 00:10 + +coal mine +$400.00 +Produces +| 8x coal +Every 00:10 + +iron mine +$550.00 +Produces +| 1x iron +Every 00:20 + +oil refinery +$1,050.00 +Consumes +| 5x crude oil +Produces +| 1x gasoline +Every 00:30 + +steel mill +$1,200.00 +Consumes +| 1x iron +| 4x coal +Produces +| 1x steel +Every 00:35 + +bauxite mine +$1,300.00 +Produces +| 40x bauxite +Every 00:25 + +rubber factory +$1,500.00 +Consumes +| 8x crude oil +Produces +| 1x rubber +Every 00:40 + +gas station +$1,800.00 +Consumes +| 2x gasoline +Produces +| $15.00 +Every 00:15 + +furniture factory +$2,000.00 +Consumes +| 10x wood +Produces +| 1x furniture +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +| 10x bauxite +Produces +| 3x aluminum +Every 00:25 + +led factory +$5,000.00 +Consumes +| 2x silicon +Produces +| 40x led +Every 00:50 + +polyester factory +$6,000.00 +Consumes +| 110x crude oil +Produces +| 14x polyester +Every 00:25 + +silicon mine +$9,000.00 +Produces +| 4x silicon +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +| 12x steel +| 8x rubber +Produces +| 1x bicycle +Every 01:30 + +gold mine +$20,000.00 +Produces +| 4x gold +Every 05:00 + +lamp factory +$28,000.00 +Consumes +| 6x plastic +| 12x led +Produces +| 2x lamp +Every 00:15 + +cotton farm +$30,000.00 +Produces +| 4x cotton +Every 00:20 + +plastic factory +$50,000.00 +Consumes +| 20x crude oil +Produces +| 200x plastic +Every 00:25 + +ccd factory +$69,000.00 +Consumes +| 6x silicon +Produces +| 1x ccd +Every 01:05 + +glass factory +$80,000.00 +Consumes +| 2x silicon +Produces +| 8x glass +Every 00:35 + +cpu factory +$100,000.00 +Consumes +| 1x gold +| 8x silicon +Produces +| 5x cpu +Every 02:00 + +clothing factory +$160,000.00 +Consumes +| 20x polyester +| 10x cotton +Produces +| 10x clothing +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +| 5x plastic +| 1x glass +| 1x cpu +Produces +| 1x cell phone +Every 00:45 + +coal power plant +$500,000.00 +Consumes +| 50x coal +Produces +| 35x energy +Every 00:30 + +laptop factory +$800,000.00 +Consumes +| 8x plastic +| 2x glass +| 1x cpu +Produces +| 1x laptop +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +| 10x crude oil +Produces +| 4x research chemical +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +| 60x energy +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +| 10x energy +Produces +| 1x rocket fuel +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +| 1x ccd +| 100x plastic +Produces +| 1x digital camera +Every 01:20 + +television factory +$1,500,000.00 +Consumes +| 36x plastic +| 12x glass +| 1x cpu +Produces +| 1x television +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +| 15x steel +| 6x rubber +Produces +| 1x gasoline engine +Every 04:20 + +car factory +$10,000,000.00 +Consumes +| 1x gasoline engine +| 1,000x plastic +| 28x glass +| 40x steel +| 1x cpu +| 30x rubber +Produces +| 1x car +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +| 1x research chemical +Produces +| 2x prescription drug +Every 00:50 + +airport +$20,000,000.00 +Consumes +| 10x jet fuel +| 25x energy +Produces +| $1,000.00 +Every 01:00 to 00:30 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.4.0/Copyright_Notice.txt b/icpfiles/Ori-files/IdleCorp_v1.4.0/Copyright_Notice.txt new file mode 100644 index 0000000..3a028af --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.4.0/Copyright_Notice.txt @@ -0,0 +1,8 @@ +Copyright Notice + +------------------ +1.You may post this page anywhere you would like, including "IdleCorp HQ"(The Discord Server of IdleCorp). +2.You may modify the page but not the "Copyright_Notice". (** NOTE: This page has no true copyright law or reference number, the author of the page has no ability to take any user to court nor stop any user from editing the page.) +3.You may also refer to "Profit.txt" but should just be used as a reference. +4.You are more then welcome to notify the author of any inconsistencies in the information and for any questions please contact me in "IdleCorp HQ". +------------------ \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.4.0/Produce speed.txt b/icpfiles/Ori-files/IdleCorp_v1.4.0/Produce speed.txt new file mode 100644 index 0000000..974b1fe --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.4.0/Produce speed.txt @@ -0,0 +1,282 @@ +speed pre second +tree farm +$100.00 +Produces +| 0.4x wood +Every 00:05 + +oil well +$300.00 +Produces +| 1x crude oil +Every 00:10 + +coal mine +$400.00 +Produces +| 0.8x coal +Every 00:10 + +iron mine +$550.00 +Produces +| 0.05x iron +Every 00:20 + +oil refinery +$1,050.00 +Consumes +| 0.1666x crude oil +Produces +| 0.0333x gasoline +Every 00:30 + +steel mill +$1,200.00 +Consumes +| 0.02857x iron +| 0.11428x coal +Produces +| 0.02857x steel +Every 00:35 + +bauxite mine +$1,300.00 +Produces +| 1.6x bauxite +Every 00:25 + +rubber factory +$1,500.00 +Consumes +| 0.2x crude oil +Produces +| 0.025x rubber +Every 00:40 + +gas station +$1,800.00 +Consumes +| 0.13333x gasoline +Produces +| $1.00 +Every 00:15 + +furniture factory +$2,000.00 +Consumes +| 0.04166x wood +Produces +| 0.004166x furniture +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +| 0.4x bauxite +Produces +| 0.12x aluminum +Every 00:25 + +led factory +$5,000.00 +Consumes +| 0.04x silicon +Produces +| 0.8x led +Every 00:50 + +polyester factory +$6,000.00 +Consumes +| 4.4x crude oil +Produces +| 0.56x polyester +Every 00:25 + +silicon mine +$9,000.00 +Produces +| 0.02x silicon +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +| 0.13333x steel +| 0.088888x rubber +Produces +| 0.011111x bicycle +Every 01:30 + +gold mine +$20,000.00 +Produces +| 0.01333x gold +Every 05:00 + +lamp factory +$28,000.00 +Consumes +| 0.4x plastic +| 0.8x led +Produces +| 0.13333x lamp +Every 00:15 + +cotton farm +$30,000.00 +Produces +| 0.2x cotton +Every 00:20 + +plastic factory +$50,000.00 +Consumes +| 0.8x crude oil +Produces +| 8x plastic +Every 00:25 + +ccd factory +$69,000.00 +Consumes +| 0.0923x silicon +Produces +| 0.01538x ccd +Every 01:05 + +glass factory +$80,000.00 +Consumes +| 0.05714x silicon +Produces +| 0.228x glass +Every 00:35 + +cpu factory +$100,000.00 +Consumes +| 0.00833x gold +| 0.0666x silicon +Produces +| 0.04166x cpu +Every 02:00 + +clothing factory +$160,000.00 +Consumes +| 0.5x polyester +| 0.25x cotton +Produces +| 0.25x clothing +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +| 0.1111x plastic +| 0.1111x glass +| 0.1111x cpu +Produces +| 0.1111x cell phone +Every 00:45 + +coal power plant +$500,000.00 +Consumes +| 1.6666x coal +Produces +| 1.1666x energy +Every 00:30 + +laptop factory +$800,000.00 +Consumes +| 0.0888x plastic +| 0.0222x glass +| 0.0111x cpu +Produces +| 0.0111x laptop +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +| 0.3333x crude oil +Produces +| 0.1333x research chemical +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +| 0.6666x energy +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +| 0.0111x energy +Produces +| 0.0011x rocket fuel +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +| 0.0125x ccd +| 1.25x plastic +Produces +| 0.0125x digital camera +Every 01:20 + +television factory +$1,500,000.00 +Consumes +| 0.2x plastic +| 0.0666x glass +| 0.0055x cpu +Produces +| 0.0055x television +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +| 0.05769x steel +| 0.02307x rubber +Produces +| 0.0038x gasoline engine +Every 04:20 + +car factory +$10,000,000.00 +Consumes +| 0.00166x gasoline engine +| 1.6666x plastic +| 0.0466x glass +| 0.0666x steel +| 0.00166x cpu +| 0.05x rubber +Produces +| 0.00166x car +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +| 0.02x research chemical +Produces +| 0.04x prescription drug +Every 00:50 + +airport +$20,000,000.00 +Consumes +| 0.1666-0.3333x jet fuel +| 0.4166-0.8333x energy +Produces +| $16.6666-33.3333 +Every 01:00 to 00:30 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.4.0/Profit.txt b/icpfiles/Ori-files/IdleCorp_v1.4.0/Profit.txt new file mode 100644 index 0000000..a72df96 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.4.0/Profit.txt @@ -0,0 +1,731 @@ +money IO (pre second) +tree farm +$100.00 +Produces +$0.06/fac +Profit +$0.06/fac +$0.06/land +Every 00:05 + +oil well +$300.00 +Produces +$0.1/fac +Profit +$0.1/fac +$0.1/land +Every 00:10 + +coal mine +$400.00 +Produces +$0.16/fac +Profit +$0.16/fac +$0.16/land +Every 00:10 + +iron mine +$550.00 +Produces +$0.1/fac +Profit +$0.1/fac +$0.1/land +Every 00:20 + +oil refinery +$1,050.00 +Consumes +$0.0166/fac +Produces +$0.1666/fac +Profit +$0.15/fac +1:6 +First Fac +oil well*1 +land 2 +$0.075/land +-- +oil-0.8333 +-- +$0.0833 +-- +Every 00:30 + +steel mill +$1,200.00 +Consumes +$0.057/fac +$0.0228/fac +Produces +$0.2285/fac +Profit +$0.148/fac +1:1:1((4:7, 1:1.75), (1:7)) +First Fac +iron mine*1 +coal mine*1 +land 3 +$0.0495/land +-- +iron-0.0214 +coal-0.6857 +-- +$0.0428 +$0.137 +-- +Every 00:35 + +bauxite mine +$1,300.00 +Produces +$0.16/fac +Profit +$0.16/fac +$0.16/land +Every 00:25 + +rubber factory +$1,500.00 +Consumes +$0.02/fac +Produces +$0.175/fac +Profit +$0.155/fac +1:1(31:200, 1:6.4516) +First Fac +oil well*1 +land 2 +$0.0775/land +-- +oil-0.8 +-- +$0.08 +-- +Every 00:40 + +gas station +$1,800.00 +Consumes +$0.666/fac +Produces +$1/fac +Profit +$0.333/fac +4:1(4:1) +First Fac +oil well*1 +oil refinery*4 +land 6 +$0.0555/land +-- +oil-0.333 +-- +$0.0333 +-- +Every 00:15 + +furniture factory +$2,000.00 +Consumes +$0.00625/fac +Produces +$0.25/fac +Profit +$0.2437/fac +1:1(5:48, 1:9.6) +First Fac +tree farm*1 +land 2 +$0.1218/fac +-- +wood-0.35833 +-- +$0.0537 +-- +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +$0.04/fac +Produces +$0.48/fac +Profit +$0.44/fac +1:4 +First Fac +bauxite mine*1 +land 2 +$0.22/land +-- +bauxite-1.2 +-- +$0.12 +-- +Every 00:25 + +led factory +$5,000.00 +Consumes +$1/fac +Produces +$1.6/fac +Profit +$0.6/fac +1:1 +First Fac +silicon mine*2 +land 3 +$0.2/land +Every 00:50 + +polyester factory +$6,000.00 +Consumes +$0.44/fac +Produces +$1.12/fac +Profit +$0.68/fac +4.4:1(22:5, 4.4:1) +First Fac +oil well*5 +land 6 +$0.1133/land +-- +oil-0.6 +-- +$0.06 +-- +Every 00:25 + +silicon mine +$9,000.00 +Produces +$0.5/fac +Profit +$0.5/fac +$0.5/land +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +$1.0666/fac +$0.622/fac +Produces +$2.6666/fac +Profit +$0.9777/fac +4.6666:3.5555:1((14:3, 4.6666:1), (32:9, 3.5555:1)) +First Fac +steel mill*5 +rubber fac*4 +land 10 +$0.0977/land +-- +steel-0.00952 +rubber-0.0111 +-- +$0.07619 +$0.0777 +-- +Every 01:30 + +gold mine +$20,000.00 +Produces +$0.8/fac +Profit +$0.8/fac +$0.8/land +Every 05:00 + +lamp factory +$28,000.00 +Consumes +$0.2/fac +$1.6/fac +Produces +$3.3333/fac +Profit +$ 1.5333/fac +1:1:1((1:20), (1:1)) +First Fac +plastic fac*1 +led fac*1 +land 3 +$0.5111/land +-- +plastic-7.6 +-- +$3.8 +-- +Every 00:15 + +cotton farm +$30,000.00 +Produces +$1/fac +Profit +$1/fac +$1/land +Every 00:20 + +plastic factory +$50,000.00 +Consumes +$0.08/fac +Produces +$4/fac +Profit +$3.92/fac +1:1(4:5, 1:1.25) +First Fac +oil well*1 +land 2 +$1.96/land +-- +oil-0.2 +-- +$0.02 +-- +Every 00:25 + +ccd factory +$69,000.00 +Consumes +$2.307/fac +Produces +$7.6923/fac +Profit +$5.3846/fac +4.615:1(60:13, 4.615:1) +First Fac +silicon mine*5 +land 6 +$0.8974/land +-- +silicon-0.00769 +-- +$0.1923 +-- +Every 01:05 + +glass factory +$80,000.00 +Consumes +$1.4285/fac +Produces +$6.8571/fac +Profit +$5.4285/fac +2.857:1(20:7, 2.857:1) +First Fac +silicon mine*3 +land 4 +$1.3571/land +-- +silicon-0.00285 +-- +$0.0714 +-- +Every 00:35 + +cpu factory +$100,000.00 +Consumes +$0.5/fac +$1.6666/fac +Produces +$8.3333/fac +Profit +$6.1666/fac +1:3.333:1((5:8, 1:1.6), (10:3, 3.333:1)) +First Fac +gold mine*1 +silicon mine*4 +land 6 +$1.0277/land +-- +gold-0.005 +silicon-0.0133 +-- +$0.3 +$0.3333 +-- +Every 02:00 + +clothing factory +$160,000.00 +Consumes +$1/fac +$1.25/fac +Produces +$7.5/fac +Profit +$5.25/fac +1:1.25:1((25:28, 1:1.12), (5:4, 1.25:1)) +First Fac +oil well*5 +polyester fac*1 +cotton farm*2 +land 4 +$1.3125/land +-- +oil-0.6 +polyester-0.06 +cotton-0.15 +-- +$0.06 +$0.12 +$0.75 +-- +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +$0.0555/fac +$0.6666/fac +$4.4444/fac +Produces +$17.7777/fac +Profit +$12.6111/fac +1:1:1:1((1:72), (7:72, 1:10.2857), (8:15, 1:1.875)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$0.9700/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.8888 +glass-0.2063 +cpu-0.01944 +-- +$0.02 +$0.4047 +$0.3 +$3.9444 +$6.1904 +$3.8888 +-- +Every 00:45 + +coal power plant +$500,000.00 +Consumes +$0.3333/fac +Produces +$11.6666/fac +Profit +$11.3333/fac +2.0833:1(25:12, 2.0833:1) +First Fac +coal mine*3 +land 4 +$2.8333/land +-- +coal-0.7333 +-- +$0.1466 +-- +Every 00:30 + +laptop factory +$800,000.00 +Consumes +$0.0444/fac +$0.6666/fac +$2.2222/fac +Produces +$22.2222/fac +Profit +$19.2888/fac +1:1:1:1((1:90), (7:72, 1:10.2857), (4:15, 1:3.75)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$1.4837/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.9111 +glass-0.2063 +cpu-0.03055 +-- +$0.02 +$0.4047 +$0.3 +$3.9555 +$6.1904 +$6.1111 +-- +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +$0.0333/fac +Produces +$13.3333/fac +Profit +$13.3/fac +1:3 +First Fac +oil well*1 +land*2 +$6.65/land +-- +oil-0.6666 +-- +$0.0666 +-- +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +$6.6666/fac +Profit +$6.6666/fac +$6.6666/land +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +$0.1111/fac +Produces +$0.1111/fac +Profit +$0/fac +1:60 +First Fac +solar power plant*1 +land 2 +$0/land +-- +energy-0.6555 +-- +$6.5555 +-- +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +$6.25/fac +$0.625/fac +Produces +$25/fac +Profit +$18.125/fac +1:1:1((13:16, 1:1.2307), (5:32, 1:6.4)) +First Fac +silicon mine*5 +oil well*1 +ccd fac*1 +plastic fac*1 +land 9 +$2.01388/land +-- +silicon-0.00769 +oil-0.2 +-- +$0.1923 +$0.02 +-- +Every 01:20 + +television factory +$1,500,000.00 +Consumes +$0.1/fac +$2/fac +$1.1111/fac +Produces +$22.2222/fac +Profit +$19.0111/fac +1:1:1:1((1:40), (7:24, 1:3.4285), (2:15, 1:7.5)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$1.4623/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.8 +glass-0.1619 +cpu-0.03611 +-- +$0.02 +$0.4047 +$0.3 +$3.9 +$4.8571 +$7.2222 +-- +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +$0.4615/fac +$0.1615/fac +Produces +$19.2307/fac +Profit +$18.6076/fac +2.0192:1:1((105:52, 2.0192:1), (12:13, 1:1.0833)) +First Fac +iron mine*2 +coal mine*1 +oil well*1 +steel mill*3 +rubber fac*1 +land 9 +$2.0675/land +-- +coal-0.4571 +oil-0.8 +steel-0.0280 +rubber-0.0019 +-- +$0.0914 +$0.08 +$0.2241 +$0.0134 +-- +Every 04:20 + +car factory +$10,000,000.00 +Consumes +$8.3333/fac +$0.8333/fac +$1.4/fac +$0.5333/fac +$0.3333/fac +$0.35/fac +Produces +$33.3333/fac +Profit +$21.55/fac +1:1:1:2.3333:1:2:1((13:30, 1:2.3076), (5:24, 1:4.8), (49:240, 1:4.8979), (7:3, 2.3333:1), (1:25), (2:1)) +First Fac +iron mine*4 +coal mine*1 +oil well*2 +steel mill*3 +rubber fac*1 +silicon mine*7 +gold mine*1 +gasengine fac*1 +plastic fac*1 +glass fac*1 +steel mill*3 +cpu fac*1 +rubber fac*2 +land 28 +$0.7696/land +-- +coal-0.1142 +steel-0.0280 +rubber-0.0019 +silicon-0.0161 +gold-0.005 +oil-0.6 +gasengine-0.0021 +plastic-6.3333 +glass-0.1819 +steel-0.0190 +cpu-0.04 +-- +$0.0228 +$0.2241 +$0.0134 +$0.4047 +$0.3 +$0.06 +$10.8974 +$0.3166 +$5.4571 +$0.1523 +$8 +-- +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +$2/fac +Produces +$20/fac +Profit +$18/fac +1:1(3:20, 1:6.666) +First Fac +oil well*1 +res chem fac*1 +land 3 +$6/land +-- +oil-0.6666 +res chem-0.1133 +-- +$0.0666 +$11.33 +-- +Every 00:50 + +airport +$20,000,000.00 +Consumes +$0.8333-1.6666/fac +$4.1666-3.3333/fac +Produces +$16.666-33.333/fac +Profit +$11.666-23.333/fac(Avar. $15.555/fac) +1:1((N/A, jet fuel from market), (5:8-5:4, 1:1.6-1.25:1)(Avar. 5:6, 1:1.2)) +First Fac[logistics center(can more than one), air traffic control(just one)] +solar power plant*1 +land 3/2 +$3.888-7.777/land(Avar. $5.185185/land)/ +$5.833-11.666/land(Avar. $7.777/land) +-- +jet fuel-N/A(Can't calculate) +energy-0.25--0.1666(This is negative)(Avar. 0.111) +-- +jet fuel-N/A(Can't calculate) +energy-2.5--1.6666(This is negative)(Avar. 1.111) +-- +Every 01:00 to 00:30(Avar. 00:45) \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.4.0/Readme.md b/icpfiles/Ori-files/IdleCorp_v1.4.0/Readme.md new file mode 100644 index 0000000..d171cb6 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.4.0/Readme.md @@ -0,0 +1,38 @@ +Because my English not too well, there will have some gramma mistakes or any word mistake is normal. +All calculate were after recalculated because to prevent some calculate errors(rounded decimal) but if it less than three decimal, it will use it, and won't recalculate. +Decimal, if it is repeatly decimal, it will round down at least two(e.g. 2.2222 >> 2.22 / 2.312222 >> 2.3122), if it is long decimal, it will at least show 3, not below 2, if I haven't mistakes. +All rank is follow by the origanal faclist, if I haven't any mistakes. +The faclist format is follow by that list too. +I am not sure it won't have any error and mistakes but the profit is used to referring, all profit and prices is change by region, techs and policies. +All assets prices is follow to IdleCorp Wiki(I have checked, that all are sell prices so if you want to know the buy prices, just 2 times of the sell price, and I won't change any prices in Profit.txt to buy price(include of jet fuel price)). +In Profit.txt, the consumes haven't sum together, if you want to know te total consumes, you sum it together by yourself. +Maybe will have some miss so don't need to supprise. +All numbers won't show as fractions. +You still need to follow to the actual region production modifiers to change. +Hope You will understand how to look Profit.txt +And pay attention, the ratio is "the consumes factorys to the produce factory", please remember. + +Profit.txt Format +follow to origanal faclist, with the following format: +``` +Profit +(Produces-Consumes)(pre second) +(used to refer)(the ratio of orginal ratio is 1:1 and not really is 1:1 now will show all fac ratio like 1:1:1 or 1:4:1, the ratio of the left of the rightest number is arrange of faclist(mean the consumes list))(the number of ratio is follow the consumes list, and with the "1", the"1" is the fac, the numbers is follow the following First Fac's facs, the least number of the facs is in ratio) +First Fac(just the first builded factory)[The one you need to build but just need one, don't need more than one when build more fac(jusu one/can more than one)] +(when in 100% speed) + +(pre land) +-- +(pre second)(if it have by-product(s)) +-- +(pre second)(if it have by-product(s)) +-- +(Haven't the total profit and total by-products' profit, if you want it, calculate it by yourself) +``` + + + +ReadmeV1.2.2 +ProfitV1.1.2 +Copyright_NoticeV1.1 +IdleCorpV1.4.0 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.4.0/UpdateNote.txt b/icpfiles/Ori-files/IdleCorp_v1.4.0/UpdateNote.txt new file mode 100644 index 0000000..acdfa5c --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.4.0/UpdateNote.txt @@ -0,0 +1,3 @@ +Change Readme.md +Change Copyright_Notice.txt with wiki's +Update Profit.txt \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.4.0/factorlist.txt b/icpfiles/Ori-files/IdleCorp_v1.4.0/factorlist.txt new file mode 100644 index 0000000..145a1b0 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.4.0/factorlist.txt @@ -0,0 +1,281 @@ +tree farm +$100.00 +Produces +| 2x wood +Every 00:05 + +oil well +$300.00 +Produces +| 10x crude oil +Every 00:10 + +coal mine +$400.00 +Produces +| 8x coal +Every 00:10 + +iron mine +$550.00 +Produces +| 1x iron +Every 00:20 + +oil refinery +$1,050.00 +Consumes +| 5x crude oil +Produces +| 1x gasoline +Every 00:30 + +steel mill +$1,200.00 +Consumes +| 1x iron +| 4x coal +Produces +| 1x steel +Every 00:35 + +bauxite mine +$1,300.00 +Produces +| 40x bauxite +Every 00:25 + +rubber factory +$1,500.00 +Consumes +| 8x crude oil +Produces +| 1x rubber +Every 00:40 + +gas station +$1,800.00 +Consumes +| 2x gasoline +Produces +| $15.00 +Every 00:15 + +furniture factory +$2,000.00 +Consumes +| 10x wood +Produces +| 1x furniture +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +| 10x bauxite +Produces +| 3x aluminum +Every 00:25 + +led factory +$5,000.00 +Consumes +| 2x silicon +Produces +| 40x led +Every 00:50 + +polyester factory +$6,000.00 +Consumes +| 110x crude oil +Produces +| 14x polyester +Every 00:25 + +silicon mine +$9,000.00 +Produces +| 4x silicon +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +| 12x steel +| 8x rubber +Produces +| 1x bicycle +Every 01:30 + +gold mine +$20,000.00 +Produces +| 4x gold +Every 05:00 + +lamp factory +$28,000.00 +Consumes +| 6x plastic +| 12x led +Produces +| 2x lamp +Every 00:15 + +cotton farm +$30,000.00 +Produces +| 4x cotton +Every 00:20 + +plastic factory +$50,000.00 +Consumes +| 20x crude oil +Produces +| 200x plastic +Every 00:25 + +ccd factory +$69,000.00 +Consumes +| 6x silicon +Produces +| 1x ccd +Every 01:05 + +glass factory +$80,000.00 +Consumes +| 2x silicon +Produces +| 8x glass +Every 00:35 + +cpu factory +$100,000.00 +Consumes +| 1x gold +| 8x silicon +Produces +| 5x cpu +Every 02:00 + +clothing factory +$160,000.00 +Consumes +| 20x polyester +| 10x cotton +Produces +| 10x clothing +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +| 5x plastic +| 1x glass +| 1x cpu +Produces +| 1x cell phone +Every 00:45 + +coal power plant +$500,000.00 +Consumes +| 50x coal +Produces +| 35x energy +Every 00:30 + +laptop factory +$800,000.00 +Consumes +| 8x plastic +| 2x glass +| 1x cpu +Produces +| 1x laptop +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +| 10x crude oil +Produces +| 4x research chemical +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +| 60x energy +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +| 10x energy +Produces +| 1x rocket fuel +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +| 1x ccd +| 100x plastic +Produces +| 1x digital camera +Every 01:20 + +television factory +$1,500,000.00 +Consumes +| 36x plastic +| 12x glass +| 1x cpu +Produces +| 1x television +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +| 15x steel +| 6x rubber +Produces +| 1x gasoline engine +Every 04:20 + +car factory +$10,000,000.00 +Consumes +| 1x gasoline engine +| 1,000x plastic +| 28x glass +| 40x steel +| 1x cpu +| 30x rubber +Produces +| 1x car +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +| 1x research chemical +Produces +| 2x prescription drug +Every 00:50 + +airport +$20,000,000.00 +Consumes +| 10x jet fuel +| 25x energy +Produces +| $1,000.00 +Every 01:00 to 00:30 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.5.0/Copyright_Notice.txt b/icpfiles/Ori-files/IdleCorp_v1.5.0/Copyright_Notice.txt new file mode 100644 index 0000000..3a028af --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.5.0/Copyright_Notice.txt @@ -0,0 +1,8 @@ +Copyright Notice + +------------------ +1.You may post this page anywhere you would like, including "IdleCorp HQ"(The Discord Server of IdleCorp). +2.You may modify the page but not the "Copyright_Notice". (** NOTE: This page has no true copyright law or reference number, the author of the page has no ability to take any user to court nor stop any user from editing the page.) +3.You may also refer to "Profit.txt" but should just be used as a reference. +4.You are more then welcome to notify the author of any inconsistencies in the information and for any questions please contact me in "IdleCorp HQ". +------------------ \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.5.0/Produce speed.txt b/icpfiles/Ori-files/IdleCorp_v1.5.0/Produce speed.txt new file mode 100644 index 0000000..974b1fe --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.5.0/Produce speed.txt @@ -0,0 +1,282 @@ +speed pre second +tree farm +$100.00 +Produces +| 0.4x wood +Every 00:05 + +oil well +$300.00 +Produces +| 1x crude oil +Every 00:10 + +coal mine +$400.00 +Produces +| 0.8x coal +Every 00:10 + +iron mine +$550.00 +Produces +| 0.05x iron +Every 00:20 + +oil refinery +$1,050.00 +Consumes +| 0.1666x crude oil +Produces +| 0.0333x gasoline +Every 00:30 + +steel mill +$1,200.00 +Consumes +| 0.02857x iron +| 0.11428x coal +Produces +| 0.02857x steel +Every 00:35 + +bauxite mine +$1,300.00 +Produces +| 1.6x bauxite +Every 00:25 + +rubber factory +$1,500.00 +Consumes +| 0.2x crude oil +Produces +| 0.025x rubber +Every 00:40 + +gas station +$1,800.00 +Consumes +| 0.13333x gasoline +Produces +| $1.00 +Every 00:15 + +furniture factory +$2,000.00 +Consumes +| 0.04166x wood +Produces +| 0.004166x furniture +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +| 0.4x bauxite +Produces +| 0.12x aluminum +Every 00:25 + +led factory +$5,000.00 +Consumes +| 0.04x silicon +Produces +| 0.8x led +Every 00:50 + +polyester factory +$6,000.00 +Consumes +| 4.4x crude oil +Produces +| 0.56x polyester +Every 00:25 + +silicon mine +$9,000.00 +Produces +| 0.02x silicon +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +| 0.13333x steel +| 0.088888x rubber +Produces +| 0.011111x bicycle +Every 01:30 + +gold mine +$20,000.00 +Produces +| 0.01333x gold +Every 05:00 + +lamp factory +$28,000.00 +Consumes +| 0.4x plastic +| 0.8x led +Produces +| 0.13333x lamp +Every 00:15 + +cotton farm +$30,000.00 +Produces +| 0.2x cotton +Every 00:20 + +plastic factory +$50,000.00 +Consumes +| 0.8x crude oil +Produces +| 8x plastic +Every 00:25 + +ccd factory +$69,000.00 +Consumes +| 0.0923x silicon +Produces +| 0.01538x ccd +Every 01:05 + +glass factory +$80,000.00 +Consumes +| 0.05714x silicon +Produces +| 0.228x glass +Every 00:35 + +cpu factory +$100,000.00 +Consumes +| 0.00833x gold +| 0.0666x silicon +Produces +| 0.04166x cpu +Every 02:00 + +clothing factory +$160,000.00 +Consumes +| 0.5x polyester +| 0.25x cotton +Produces +| 0.25x clothing +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +| 0.1111x plastic +| 0.1111x glass +| 0.1111x cpu +Produces +| 0.1111x cell phone +Every 00:45 + +coal power plant +$500,000.00 +Consumes +| 1.6666x coal +Produces +| 1.1666x energy +Every 00:30 + +laptop factory +$800,000.00 +Consumes +| 0.0888x plastic +| 0.0222x glass +| 0.0111x cpu +Produces +| 0.0111x laptop +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +| 0.3333x crude oil +Produces +| 0.1333x research chemical +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +| 0.6666x energy +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +| 0.0111x energy +Produces +| 0.0011x rocket fuel +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +| 0.0125x ccd +| 1.25x plastic +Produces +| 0.0125x digital camera +Every 01:20 + +television factory +$1,500,000.00 +Consumes +| 0.2x plastic +| 0.0666x glass +| 0.0055x cpu +Produces +| 0.0055x television +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +| 0.05769x steel +| 0.02307x rubber +Produces +| 0.0038x gasoline engine +Every 04:20 + +car factory +$10,000,000.00 +Consumes +| 0.00166x gasoline engine +| 1.6666x plastic +| 0.0466x glass +| 0.0666x steel +| 0.00166x cpu +| 0.05x rubber +Produces +| 0.00166x car +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +| 0.02x research chemical +Produces +| 0.04x prescription drug +Every 00:50 + +airport +$20,000,000.00 +Consumes +| 0.1666-0.3333x jet fuel +| 0.4166-0.8333x energy +Produces +| $16.6666-33.3333 +Every 01:00 to 00:30 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.5.0/Profit.txt b/icpfiles/Ori-files/IdleCorp_v1.5.0/Profit.txt new file mode 100644 index 0000000..81d57c5 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.5.0/Profit.txt @@ -0,0 +1,824 @@ +money IO (pre second) +tree farm +$100.00 +Produces +$0.06/fac +Profit +$0.06/fac +$0.06/land +Asset+ ++$0.0006/level +Every 00:05 + +oil well +$300.00 +Produces +$0.1/fac +Profit +$0.1/fac +$0.1/land +Asset+ ++$0.001/level +Every 00:10 + +coal mine +$400.00 +Produces +$0.16/fac +Profit +$0.16/fac +$0.16/land +Asset+ ++0.0016/level +Every 00:10 + +iron mine +$550.00 +Produces +$0.1/fac +Profit +$0.1/fac +$0.1/land +Asset+ ++$0.001/level +Every 00:20 + +oil refinery +$1,050.00 +Consumes +$0.0166/fac +Produces +$0.1666/fac +Profit +$0.15/fac +1:6 +First Fac +oil well*1 +land 2 +$0.075/land +-- +oil-0.8333 +-- +$0.0833 +-- +Asset+ ++$0.0015833/fac ++$0.00079166/land +Every 00:30 + +steel mill +$1,200.00 +Consumes +$0.057/fac +$0.0228/fac +Produces +$0.2285/fac +Profit +$0.148/fac +1:1:1((4:7, 1:1.75), (1:7)) +First Fac +iron mine*1 +coal mine*1 +land 3 +$0.0495/land +-- +iron-0.0214 +coal-0.6857 +-- +$0.0428 +$0.137 +-- +Asset+ ++$0.001885/fac ++$0.000628/land +Every 00:35 + +bauxite mine +$1,300.00 +Produces +$0.16/fac +Profit +$0.16/fac +$0.16/land +Asset+ ++$0.0008/level +Every 00:25 + +rubber factory +$1,500.00 +Consumes +$0.02/fac +Produces +$0.175/fac +Profit +$0.155/fac +1:1(31:200, 1:6.4516) +First Fac +oil well*1 +land 2 +$0.0775/land +-- +oil-0.8 +-- +$0.08 +-- +Asset+ ++$0.33/fac ++$0.165/land +Every 00:40 + +gas station +$1,800.00 +Consumes +$0.666/fac +Produces +$1/fac +Profit +$0.333/fac +4:1(4:1) +First Fac +oil well*1 +oil refinery*4 +land 6 +$0.0555/land +-- +oil-0.333 +-- +$0.0333 +-- +Asset+ +N/A(Product not Asset) +Every 00:15 + +furniture factory +$2,000.00 +Consumes +$0.00625/fac +Produces +$0.25/fac +Profit +$0.2437/fac +1:1(5:48, 1:9.6) +First Fac +tree farm*1 +land 2 +$0.1218/fac +-- +wood-0.35833 +-- +$0.0537 +-- +Asset+ ++$0.002468/fac ++$0.00123/land +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +$0.04/fac +Produces +$0.48/fac +Profit +$0.44/fac +1:4 +First Fac +bauxite mine*1 +land 2 +$0.22/land +-- +bauxite-1.2 +-- +$0.12 +-- +Asset+ ++$0.0046/fac ++$0.0023/land +Every 00:25 + +led factory +$5,000.00 +Consumes +$1/fac +Produces +$1.6/fac +Profit +$0.6/fac +1:1 +First Fac +silicon mine*2 +land 3 +$0.2/land +Asset+ ++$0.011/fac ++$0.00366/land +Every 00:50 + +polyester factory +$6,000.00 +Consumes +$0.44/fac +Produces +$1.12/fac +Profit +$0.68/fac +4.4:1(22:5, 4.4:1) +First Fac +oil well*5 +land 6 +$0.1133/land +-- +oil-0.6 +-- +$0.06 +-- +Asset+ ++$0.009/fac ++$0.0015/land +Every 00:25 + +silicon mine +$9,000.00 +Produces +$0.5/fac +Profit +$0.5/fac +$0.5/land +Asset+ ++$0.005/level +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +$1.0666/fac +$0.622/fac +Produces +$2.6666/fac +Profit +$0.9777/fac +4.6666:3.5555:1((14:3, 4.6666:1), (32:9, 3.5555:1)) +First Fac +steel mill*5 +rubber fac*4 +land 10 +$0.0977/land +-- +steel-0.00952 +rubber-0.0111 +-- +$0.07619 +$0.0777 +-- +Asset+ ++$0.01822/fac ++$0.001822/land +Every 01:30 + +gold mine +$20,000.00 +Produces +$0.8/fac +Profit +$0.8/fac +$0.8/land +Asset+ ++$0.0008/level +Every 05:00 + +lamp factory +$28,000.00 +Consumes +$0.2/fac +$1.6/fac +Produces +$3.3333/fac +Profit +$ 1.5333/fac +1:1:1((1:20), (1:1)) +First Fac +plastic fac*1 +led fac*1 +land 3 +$0.5111/land +-- +plastic-7.6 +-- +$3.8 +-- +Asset+ ++$0.02433/fac ++$0.00811/land +Every 00:15 + +cotton farm +$30,000.00 +Produces +$1/fac +Profit +$1/fac +$1/land +Asset+ ++$0.005/level +Every 00:20 + +plastic factory +$50,000.00 +Consumes +$0.08/fac +Produces +$4/fac +Profit +$3.92/fac +1:1(4:5, 1:1.25) +First Fac +oil well*1 +land 2 +$1.96/land +-- +oil-0.2 +-- +$0.02 +-- +Asset+ ++$0.0396/fac ++$0.0198/land +Every 00:25 + +ccd factory +$69,000.00 +Consumes +$2.307/fac +Produces +$7.6923/fac +Profit +$5.3846/fac +4.615:1(60:13, 4.615:1) +First Fac +silicon mine*5 +land 6 +$0.8974/land +-- +silicon-0.00769 +-- +$0.1923 +-- +Asset+ ++$0.06538/fac ++$0.01089/land +Every 01:05 + +glass factory +$80,000.00 +Consumes +$1.4285/fac +Produces +$6.8571/fac +Profit +$5.4285/fac +2.857:1(20:7, 2.857:1) +First Fac +silicon mine*3 +land 4 +$1.3571/land +-- +silicon-0.00285 +-- +$0.0714 +-- +Asset+ ++$0.06142/fac ++$0.01535/land +Every 00:35 + +cpu factory +$100,000.00 +Consumes +$0.5/fac +$1.6666/fac +Produces +$8.3333/fac +Profit +$6.1666/fac +1:3.333:1((5:8, 1:1.6), (10:3, 3.333:1)) +First Fac +gold mine*1 +silicon mine*4 +land 6 +$1.0277/land +-- +gold-0.005 +silicon-0.0133 +-- +$0.3 +$0.3333 +-- +Asset+ ++$0.0725/fac ++$0.01208/land +Every 02:00 + +clothing factory +$160,000.00 +Consumes +$1/fac +$1.25/fac +Produces +$7.5/fac +Profit +$5.25/fac +1:1.25:1((25:28, 1:1.12), (5:4, 1.25:1)) +First Fac +oil well*5 +polyester fac*1 +cotton farm*2 +land 4 +$1.3125/land +-- +oil-0.6 +polyester-0.06 +cotton-0.15 +-- +$0.06 +$0.12 +$0.75 +-- +Asset+ ++$0.06375/fac ++$0.01593/land +Every 00:40 + + +cell phone factory +$400,000.00 +Consumes +$0.0555/fac +$0.6666/fac +$4.4444/fac +Produces +$17.7777/fac +Profit +$12.6111/fac +1:1:1:1((1:72), (7:72, 1:10.2857), (8:15, 1:1.875)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$0.9700/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.8888 +glass-0.2063 +cpu-0.01944 +-- +$0.02 +$0.4047 +$0.3 +$3.9444 +$6.1904 +$3.8888 +-- +Asset+ ++$0.151944/fac ++$0.01168/land +Every 00:45 + +coal power plant +$500,000.00 +Consumes +$0.3333/fac +Produces +$11.6666/fac +Profit +$11.3333/fac +2.0833:1(25:12, 2.0833:1) +First Fac +coal mine*3 +land 4 +$2.8333/land +-- +coal-0.7333 +-- +$0.1466 +-- +Asset+ ++$0.115/fac ++$0.02875/land +Every 00:30 + +laptop factory +$800,000.00 +Consumes +$0.0444/fac +$0.6666/fac +$2.2222/fac +Produces +$22.2222/fac +Profit +$19.2888/fac +1:1:1:1((1:90), (7:72, 1:10.2857), (4:15, 1:3.75)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$1.4837/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.9111 +glass-0.2063 +cpu-0.03055 +-- +$0.02 +$0.4047 +$0.3 +$3.9555 +$6.1904 +$6.1111 +-- +Asset+ ++$0.20755/fac ++$0.0159/land +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +$0.0333/fac +Produces +$13.3333/fac +Profit +$13.3/fac +1:3 +First Fac +oil well*1 +land*2 +$6.65/land +-- +oil-0.6666 +-- +$0.0666 +-- +Asset+ ++$0.133166/fac ++$0.0665833/land +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +$6.6666/fac +Profit +$6.6666/fac +$6.6666/land +Asset+ ++$0.0666/level +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +$0.1111/fac +Produces +$0.1111/fac +Profit +$0/fac +1:60 +First Fac +solar power plant*1 +land 2 +$0/land +-- +energy-0.6555 +-- +$6.5555 +-- +Asset+ +N/A(It haven't asset+) +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +$6.25/fac +$0.625/fac +Produces +$25/fac +Profit +$18.125/fac +1:1:1((13:16, 1:1.2307), (5:32, 1:6.4)) +First Fac +silicon mine*5 +oil well*1 +ccd fac*1 +plastic fac*1 +land 9 +$2.01388/land +-- +silicon-0.00769 +oil-0.2 +-- +$0.1923 +$0.02 +-- +Asset+ ++$0.2156/fac ++$0.02395833/land +Every 01:20 + +television factory +$1,500,000.00 +Consumes +$0.1/fac +$2/fac +$1.1111/fac +Produces +$22.2222/fac +Profit +$19.0111/fac +1:1:1:1((1:40), (7:24, 1:3.4285), (2:15, 1:7.5)) +First Fac +oil well*1 +silicon mine*7 +gold mine*1 +plastic fac*1 +glass fac*1 +cpu fac*1 +land 13 +$1.4623/land +-- +oil-0.2 +silicon-0.0161 +gold-0.005 +plastic-7.8 +glass-0.1619 +cpu-0.03611 +-- +$0.02 +$0.4047 +$0.3 +$3.9 +$4.8571 +$7.2222 +-- +Asset+ ++$0.206166/fac ++$0.01585/land +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +$0.4615/fac +$0.1615/fac +Produces +$19.2307/fac +Profit +$18.6076/fac +2.0192:1:1((105:52, 2.0192:1), (12:13, 1:1.0833)) +First Fac +iron mine*2 +coal mine*1 +oil well*1 +steel mill*3 +rubber fac*1 +land 9 +$2.0675/land +-- +coal-0.4571 +oil-0.8 +steel-0.0280 +rubber-0.0019 +-- +$0.0914 +$0.08 +$0.2241 +$0.0134 +-- +Asset+ ++$0.18919/fac ++$0.02102/land +Every 04:20 + +car factory +$10,000,000.00 +Consumes +$8.3333/fac +$0.8333/fac +$1.4/fac +$0.5333/fac +$0.3333/fac +$0.35/fac +Produces +$33.3333/fac +Profit +$21.55/fac +1:1:1:2.3333:1:2:1((13:30, 1:2.3076), (5:24, 1:4.8), (49:240, 1:4.8979), (7:3, 2.3333:1), (1:25), (2:1)) +First Fac +iron mine*4 +coal mine*1 +oil well*2 +steel mill*3 +rubber fac*1 +silicon mine*7 +gold mine*1 +gasengine fac*1 +plastic fac*1 +glass fac*1 +steel mill*3 +cpu fac*1 +rubber fac*2 +land 28 +$0.7696/land +-- +coal-0.1142 +steel-0.0280 +rubber-0.0019 +silicon-0.0161 +gold-0.005 +oil-0.6 +gasengine-0.0021 +plastic-6.3333 +glass-0.1819 +steel-0.0190 +cpu-0.04 +-- +$0.0228 +$0.2241 +$0.0134 +$0.4047 +$0.3 +$0.06 +$10.8974 +$0.3166 +$5.4571 +$0.1523 +$8 +-- +Asset+ ++$0.27441/fac ++$0.00980/land +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +$2/fac +Produces +$20/fac +Profit +$18/fac +1:1(3:20, 1:6.666) +First Fac +oil well*1 +res chem fac*1 +land 3 +$6/land +-- +oil-0.6666 +res chem-0.1133 +-- +$0.0666 +$11.33 +-- +Asset+ ++$0.19/fac ++$0.0633/land +Every 00:50 + +airport +$20,000,000.00 +Consumes +$0.8333-1.6666/fac +$4.1666-3.3333/fac +Produces +$16.666-33.333/fac +Profit +$11.666-23.333/fac(Avar. $15.555/fac) +1:1((N/A, jet fuel from market), (5:8-5:4, 1:1.6-1.25:1)(Avar. 5:6, 1:1.2)) +First Fac[logistics center(can more than one), air traffic control(just one)] +solar power plant*1 +land 3/2 +$3.888-7.777/land(Avar. $5.185185/land)/ +$5.833-11.666/land(Avar. $7.777/land) +-- +jet fuel-N/A(Can't calculate) +energy-0.25--0.1666(This is negative)(Avar. 0.111) +-- +jet fuel-N/A(Can't calculate) +energy-2.5--1.6666(This is negative)(Avar. 1.111) +-- +Asset+ +N/A(It haven't asset+) +Every 01:00 to 00:30(Avar. 00:45) \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.5.0/Readme.md b/icpfiles/Ori-files/IdleCorp_v1.5.0/Readme.md new file mode 100644 index 0000000..392e18c --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.5.0/Readme.md @@ -0,0 +1,42 @@ +Because my English not too well, there will have some gramma mistakes or any word mistake is normal. +All calculate were after recalculated because to prevent some calculate errors(rounded decimal) but if it less than three decimal, it will use it, and won't recalculate. +Decimal, if it is repeatly decimal, it will round down at least two(e.g. 2.2222 >> 2.22 / 2.312222 >> 2.3122), if it is long decimal, it will at least show 3, not below 2, if I haven't mistakes. +All rank is follow by the origanal faclist, if I haven't any mistakes. +The faclist format is follow by that list too. +I am not sure it won't have any error and mistakes but the profit is used to referring, all profit and prices is change by region, techs and policies. +All assets prices is follow to IdleCorp Wiki(I have checked, that all are sell prices so if you want to know the buy prices, just 2 times of the sell price, and I won't change any prices in Profit.txt to buy price(include of jet fuel price)). +In Profit.txt, the consumes haven't sum together, if you want to know te total consumes, you sum it together by yourself. +Maybe will have some miss so don't need to supprise. +All numbers won't show as fractions. +You still need to follow to the actual region production modifiers to change. +Hope You will understand how to look Profit.txt +And pay attention, the ratio is "the consumes factorys to the produce factory", please remember. + +Profit.txt Format +follow to origanal faclist, with the following format: +``` +Profit +(Produces-Consumes)(pre second) +(used to refer)(the ratio of orginal ratio is 1:1 and not really is 1:1 now will show all fac ratio like 1:1:1 or 1:4:1, the ratio of the left of the rightest number is arrange of faclist(mean the consumes list))(the number of ratio is follow the consumes list, and with the "1", the"1" is the fac, the numbers is follow the following First Fac's facs, the least number of the facs is in ratio) +First Fac(just the first builded factory)[The one you need to build but just need one, don't need more than one when build more fac(jusu one/can more than one)] +(when in 100% speed) + +(pre land) +-- +(pre second)(if it have by-product(s)) +-- +(pre second)(if it have by-product(s)) +-- +(Haven't the total profit and total by-products' profit, if you want it, calculate it by yourself) +Asset+(In First Fac(each level of factory(0.5%/level))) +((per fac))(If more than one fac) +(pre land)(more) +(Follow the chance b, it will show the profit haven't minus the asset profit) +``` + + + +ReadmeV1.3.0 +ProfitV1.2.0 +Copyright_NoticeV1.1 +IdleCorpV1.5.0 \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.5.0/UpdateNote.txt b/icpfiles/Ori-files/IdleCorp_v1.5.0/UpdateNote.txt new file mode 100644 index 0000000..e405e98 --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.5.0/UpdateNote.txt @@ -0,0 +1,2 @@ +Change Readme.md +Update Profit.txt -- with asset+ product chance \ No newline at end of file diff --git a/icpfiles/Ori-files/IdleCorp_v1.5.0/factorlist.txt b/icpfiles/Ori-files/IdleCorp_v1.5.0/factorlist.txt new file mode 100644 index 0000000..0c21cea --- /dev/null +++ b/icpfiles/Ori-files/IdleCorp_v1.5.0/factorlist.txt @@ -0,0 +1,280 @@ +tree farm +$100.00 +Produces +| 2x wood +Every 00:05 + +oil well +$300.00 +Produces +| 10x crude oil +Every 00:10 + +coal mine +$400.00 +Produces +| 8x coal +Every 00:10 + +iron mine +$550.00 +Produces +| 1x iron +Every 00:20 + +oil refinery +$1,050.00 +Consumes +| 5x crude oil +Produces +| 1x gasoline +Every 00:30 + +steel mill +$1,200.00 +Consumes +| 1x iron +| 4x coal +Produces +| 1x steel +Every 00:35 + +bauxite mine +$1,300.00 +Produces +| 40x bauxite +Every 00:25 + +rubber factory +$1,500.00 +Consumes +| 8x crude oil +Produces +| 1x rubber +Every 00:40 + +gas station +$1,800.00 +Consumes +| 2x gasoline +Produces +| $15.00 +Every 00:15 + +furniture factory +$2,000.00 +Consumes +| 10x wood +Produces +| 1x furniture +Every 04:00 + +aluminum factory +$3,750.00 +Consumes +| 10x bauxite +Produces +| 3x aluminum +Every 00:25 + +led factory +$5,000.00 +Consumes +| 2x silicon +Produces +| 40x led +Every 00:50 + +polyester factory +$6,000.00 +Consumes +| 110x crude oil +Produces +| 14x polyester +Every 00:25 + +silicon mine +$9,000.00 +Produces +| 4x silicon +Every 03:20 + +bicycle factory +$10,000.00 +Consumes +| 12x steel +| 8x rubber +Produces +| 1x bicycle +Every 01:30 + +gold mine +$20,000.00 +Produces +| 4x gold +Every 05:00 + +lamp factory +$28,000.00 +Consumes +| 6x plastic +| 12x led +Produces +| 2x lamp +Every 00:15 + +cotton farm +$30,000.00 +Produces +| 4x cotton +Every 00:20 + +plastic factory +$50,000.00 +Consumes +| 20x crude oil +Produces +| 200x plastic +Every 00:25 + +ccd factory +$69,000.00 +Consumes +| 6x silicon +Produces +| 1x ccd +Every 01:05 + +glass factory +$80,000.00 +Consumes +| 2x silicon +Produces +| 8x glass +Every 00:35 + +cpu factory +$100,000.00 +Consumes +| 1x gold +| 8x silicon +Produces +| 5x cpu +Every 02:00 + +clothing factory +$160,000.00 +Consumes +| 20x polyester +| 10x cotton +Produces +| 10x clothing +Every 00:40 + +cell phone factory +$400,000.00 +Consumes +| 5x plastic +| 1x glass +| 1x cpu +Produces +| 1x cell phone +Every 00:45 + +coal power plant +$500,000.00 +Consumes +| 50x coal +Produces +| 35x energy +Every 00:30 + +laptop factory +$800,000.00 +Consumes +| 8x plastic +| 2x glass +| 1x cpu +Produces +| 1x laptop +Every 01:30 + +research chemical factory +$800,000.00 +Consumes +| 10x crude oil +Produces +| 4x research chemical +Every 00:30 + +solar power plant +$1,000,000.00 +Produces +| 60x energy +Every 01:30 + +rocket fuel factory +$1,000,000.00 +Consumes +| 10x energy +Produces +| 1x rocket fuel +Every 15:00 + +digital camera factory +$1,400,000.00 +Consumes +| 1x ccd +| 100x plastic +Produces +| 1x digital camera +Every 01:20 + +television factory +$1,500,000.00 +Consumes +| 36x plastic +| 12x glass +| 1x cpu +Produces +| 1x television +Every 03:00 + +gasoline engine factory +$2,000,000.00 +Consumes +| 15x steel +| 6x rubber +Produces +| 1x gasoline engine +Every 04:20 + +car factory +$10,000,000.00 +Consumes +| 1x gasoline engine +| 1,000x plastic +| 28x glass +| 40x steel +| 1x cpu +| 30x rubber +Produces +| 1x car +Every 10:00 + +prescription drug factory +$15,000,000.00 +Consumes +| 1x research chemical +Produces +| 2x prescription drug +Every 00:50 + +airport +$20,000,000.00 +Consumes +| 10x jet fuel +| 25x energy +Produces +| $1,000.00 +Every 01:00 to 00:30 \ No newline at end of file diff --git a/icpfiles/RARs/Idle Corp.rar b/icpfiles/RARs/Idle Corp.rar new file mode 100644 index 0000000..78d3d90 Binary files /dev/null and b/icpfiles/RARs/Idle Corp.rar differ diff --git a/icpfiles/RARs/IdleCorp_v1.2.rar b/icpfiles/RARs/IdleCorp_v1.2.rar new file mode 100644 index 0000000..41084ed Binary files /dev/null and b/icpfiles/RARs/IdleCorp_v1.2.rar differ diff --git a/icpfiles/RARs/IdleCorp_v1.3.1.rar b/icpfiles/RARs/IdleCorp_v1.3.1.rar new file mode 100644 index 0000000..c1878f7 Binary files /dev/null and b/icpfiles/RARs/IdleCorp_v1.3.1.rar differ diff --git a/icpfiles/RARs/IdleCorp_v1.3.2.rar b/icpfiles/RARs/IdleCorp_v1.3.2.rar new file mode 100644 index 0000000..aea18b4 Binary files /dev/null and b/icpfiles/RARs/IdleCorp_v1.3.2.rar differ diff --git a/icpfiles/RARs/IdleCorp_v1.3.rar b/icpfiles/RARs/IdleCorp_v1.3.rar new file mode 100644 index 0000000..026d07d Binary files /dev/null and b/icpfiles/RARs/IdleCorp_v1.3.rar differ diff --git a/icpfiles/RARs/IdleCorp_v1.4.0.rar b/icpfiles/RARs/IdleCorp_v1.4.0.rar new file mode 100644 index 0000000..4365124 Binary files /dev/null and b/icpfiles/RARs/IdleCorp_v1.4.0.rar differ diff --git a/icpfiles/RARs/IdleCorp_v1.5.0.rar b/icpfiles/RARs/IdleCorp_v1.5.0.rar new file mode 100644 index 0000000..a3d833a Binary files /dev/null and b/icpfiles/RARs/IdleCorp_v1.5.0.rar differ diff --git a/images/info/airport.png b/images/info/airport.png new file mode 100644 index 0000000..c8bd525 Binary files /dev/null and b/images/info/airport.png differ diff --git a/images/info/aluminum.png b/images/info/aluminum.png new file mode 100644 index 0000000..48cb65f Binary files /dev/null and b/images/info/aluminum.png differ diff --git a/images/info/bauxite.png b/images/info/bauxite.png new file mode 100644 index 0000000..a0d0d49 Binary files /dev/null and b/images/info/bauxite.png differ diff --git a/images/info/blueprint.png b/images/info/blueprint.png new file mode 100644 index 0000000..44f673a Binary files /dev/null and b/images/info/blueprint.png differ diff --git a/images/info/box.png b/images/info/box.png new file mode 100644 index 0000000..001fc6c Binary files /dev/null and b/images/info/box.png differ diff --git a/images/info/bronze.png b/images/info/bronze.png new file mode 100644 index 0000000..c3431fc Binary files /dev/null and b/images/info/bronze.png differ diff --git a/images/info/capital.png b/images/info/capital.png new file mode 100644 index 0000000..5dfb476 Binary files /dev/null and b/images/info/capital.png differ diff --git a/images/info/car.png b/images/info/car.png new file mode 100644 index 0000000..5fe80e5 Binary files /dev/null and b/images/info/car.png differ diff --git a/images/info/ccd.png b/images/info/ccd.png new file mode 100644 index 0000000..da9fcb7 Binary files /dev/null and b/images/info/ccd.png differ diff --git a/images/info/cell_phone.png b/images/info/cell_phone.png new file mode 100644 index 0000000..403719d Binary files /dev/null and b/images/info/cell_phone.png differ diff --git a/images/info/check.png b/images/info/check.png new file mode 100644 index 0000000..b3a0ec5 Binary files /dev/null and b/images/info/check.png differ diff --git a/images/info/chemical_plant.png b/images/info/chemical_plant.png new file mode 100644 index 0000000..5be9c72 Binary files /dev/null and b/images/info/chemical_plant.png differ diff --git a/images/info/clothing.png b/images/info/clothing.png new file mode 100644 index 0000000..b0c19e9 Binary files /dev/null and b/images/info/clothing.png differ diff --git a/images/info/coal.png b/images/info/coal.png new file mode 100644 index 0000000..2a32ba1 Binary files /dev/null and b/images/info/coal.png differ diff --git a/images/info/coal_power_plant.png b/images/info/coal_power_plant.png new file mode 100644 index 0000000..114d494 Binary files /dev/null and b/images/info/coal_power_plant.png differ diff --git a/images/info/cotton.png b/images/info/cotton.png new file mode 100644 index 0000000..b9e7a83 Binary files /dev/null and b/images/info/cotton.png differ diff --git a/images/info/cotton_farm.png b/images/info/cotton_farm.png new file mode 100644 index 0000000..6f51405 Binary files /dev/null and b/images/info/cotton_farm.png differ diff --git a/images/info/cpu.png b/images/info/cpu.png new file mode 100644 index 0000000..fac6c72 Binary files /dev/null and b/images/info/cpu.png differ diff --git a/images/info/crane.png b/images/info/crane.png new file mode 100644 index 0000000..0fe36b4 Binary files /dev/null and b/images/info/crane.png differ diff --git a/images/info/cross.png b/images/info/cross.png new file mode 100644 index 0000000..1d68b13 Binary files /dev/null and b/images/info/cross.png differ diff --git a/images/info/crude_oil.png b/images/info/crude_oil.png new file mode 100644 index 0000000..0c123f4 Binary files /dev/null and b/images/info/crude_oil.png differ diff --git a/images/info/digital_camera.png b/images/info/digital_camera.png new file mode 100644 index 0000000..d115e0b Binary files /dev/null and b/images/info/digital_camera.png differ diff --git a/images/info/energy.png b/images/info/energy.png new file mode 100644 index 0000000..cc4e49f Binary files /dev/null and b/images/info/energy.png differ diff --git a/images/info/facility.png b/images/info/facility.png new file mode 100644 index 0000000..cb6101d Binary files /dev/null and b/images/info/facility.png differ diff --git a/images/info/furniture.png b/images/info/furniture.png new file mode 100644 index 0000000..de339d5 Binary files /dev/null and b/images/info/furniture.png differ diff --git a/images/info/gas_station.png b/images/info/gas_station.png new file mode 100644 index 0000000..987b973 Binary files /dev/null and b/images/info/gas_station.png differ diff --git a/images/info/gasoline.png b/images/info/gasoline.png new file mode 100644 index 0000000..606f88f Binary files /dev/null and b/images/info/gasoline.png differ diff --git a/images/info/gasoline_engine.png b/images/info/gasoline_engine.png new file mode 100644 index 0000000..9ee7cb6 Binary files /dev/null and b/images/info/gasoline_engine.png differ diff --git a/images/info/glass.png b/images/info/glass.png new file mode 100644 index 0000000..52851e6 Binary files /dev/null and b/images/info/glass.png differ diff --git a/images/info/gold.png b/images/info/gold.png new file mode 100644 index 0000000..a020af3 Binary files /dev/null and b/images/info/gold.png differ diff --git a/images/info/idlecorp_wiki.png b/images/info/idlecorp_wiki.png new file mode 100644 index 0000000..ccf7a30 Binary files /dev/null and b/images/info/idlecorp_wiki.png differ diff --git a/images/info/iron.png b/images/info/iron.png new file mode 100644 index 0000000..1837c2c Binary files /dev/null and b/images/info/iron.png differ diff --git a/images/info/jet_fuel.png b/images/info/jet_fuel.png new file mode 100644 index 0000000..fe63f23 Binary files /dev/null and b/images/info/jet_fuel.png differ diff --git a/images/info/lamp.png b/images/info/lamp.png new file mode 100644 index 0000000..302dfe5 Binary files /dev/null and b/images/info/lamp.png differ diff --git a/images/info/land.png b/images/info/land.png new file mode 100644 index 0000000..97e471e Binary files /dev/null and b/images/info/land.png differ diff --git a/images/info/laptop.png b/images/info/laptop.png new file mode 100644 index 0000000..7c049e4 Binary files /dev/null and b/images/info/laptop.png differ diff --git a/images/info/led.png b/images/info/led.png new file mode 100644 index 0000000..5680281 Binary files /dev/null and b/images/info/led.png differ diff --git a/images/info/left.png b/images/info/left.png new file mode 100644 index 0000000..dd24955 Binary files /dev/null and b/images/info/left.png differ diff --git a/images/info/logistics_center.png b/images/info/logistics_center.png new file mode 100644 index 0000000..8eb5e3e Binary files /dev/null and b/images/info/logistics_center.png differ diff --git a/images/info/mine.png b/images/info/mine.png new file mode 100644 index 0000000..18759b4 Binary files /dev/null and b/images/info/mine.png differ diff --git a/images/info/office_building.png b/images/info/office_building.png new file mode 100644 index 0000000..645c70c Binary files /dev/null and b/images/info/office_building.png differ diff --git a/images/info/oil_refinery.png b/images/info/oil_refinery.png new file mode 100644 index 0000000..45493b4 Binary files /dev/null and b/images/info/oil_refinery.png differ diff --git a/images/info/oil_well.png b/images/info/oil_well.png new file mode 100644 index 0000000..d398e51 Binary files /dev/null and b/images/info/oil_well.png differ diff --git a/images/info/plastic.png b/images/info/plastic.png new file mode 100644 index 0000000..c3f9e7b Binary files /dev/null and b/images/info/plastic.png differ diff --git a/images/info/polyester.png b/images/info/polyester.png new file mode 100644 index 0000000..7512088 Binary files /dev/null and b/images/info/polyester.png differ diff --git a/images/info/prescription_drug.png b/images/info/prescription_drug.png new file mode 100644 index 0000000..25d1910 Binary files /dev/null and b/images/info/prescription_drug.png differ diff --git a/images/info/research_chemical.png b/images/info/research_chemical.png new file mode 100644 index 0000000..0686f7f Binary files /dev/null and b/images/info/research_chemical.png differ diff --git a/images/info/right.png b/images/info/right.png new file mode 100644 index 0000000..58a7310 Binary files /dev/null and b/images/info/right.png differ diff --git a/images/info/rubber.png b/images/info/rubber.png new file mode 100644 index 0000000..7e89bec Binary files /dev/null and b/images/info/rubber.png differ diff --git a/images/info/scrap.png b/images/info/scrap.png new file mode 100644 index 0000000..d9df061 Binary files /dev/null and b/images/info/scrap.png differ diff --git a/images/info/silicon.png b/images/info/silicon.png new file mode 100644 index 0000000..945b6e8 Binary files /dev/null and b/images/info/silicon.png differ diff --git a/images/info/silver.png b/images/info/silver.png new file mode 100644 index 0000000..c0b4a8c Binary files /dev/null and b/images/info/silver.png differ diff --git a/images/info/solar_power_plant.png b/images/info/solar_power_plant.png new file mode 100644 index 0000000..e6a98ed Binary files /dev/null and b/images/info/solar_power_plant.png differ diff --git a/images/info/steel.png b/images/info/steel.png new file mode 100644 index 0000000..56834fa Binary files /dev/null and b/images/info/steel.png differ diff --git a/images/info/tech_facility.png b/images/info/tech_facility.png new file mode 100644 index 0000000..01ec01c Binary files /dev/null and b/images/info/tech_facility.png differ diff --git a/images/info/technology.png b/images/info/technology.png new file mode 100644 index 0000000..67816ae Binary files /dev/null and b/images/info/technology.png differ diff --git a/images/info/television.png b/images/info/television.png new file mode 100644 index 0000000..1c38602 Binary files /dev/null and b/images/info/television.png differ diff --git a/images/info/trade_scale.png b/images/info/trade_scale.png new file mode 100644 index 0000000..923f1ed Binary files /dev/null and b/images/info/trade_scale.png differ diff --git a/images/info/tree_farm.png b/images/info/tree_farm.png new file mode 100644 index 0000000..a3cfe1c Binary files /dev/null and b/images/info/tree_farm.png differ diff --git a/images/info/truck.png b/images/info/truck.png new file mode 100644 index 0000000..38c494a Binary files /dev/null and b/images/info/truck.png differ diff --git a/images/info/wood.png b/images/info/wood.png new file mode 100644 index 0000000..d63f8ec Binary files /dev/null and b/images/info/wood.png differ diff --git a/images/info/yes.png b/images/info/yes.png new file mode 100644 index 0000000..1dde0ac Binary files /dev/null and b/images/info/yes.png differ diff --git a/newcomerguide.json b/newcomerguide.json new file mode 100644 index 0000000..c700b9a --- /dev/null +++ b/newcomerguide.json @@ -0,0 +1,135 @@ +{ + "guide": [ + { + "structure_version": "1.0", + "version": "2021-05-22", + "pages": [ + { + "name": "intro", + "content": [ + "Hello, Newcomer! Welcome to IdleCorp Discord server, run by professional IdleCorp players and the bot developer. This text intends to shed some light on features and mechanics you might find confusing, and get your factories running as soon as possible without overwhelming you on Day 1. This text __**is not going to have a list of IdleCorp setups as I'd like for you to discover and learn about the bot first.**__", + "", + "```Last Updated: 22/05/2021", + "```", + "", + " - Run the `$$tutorial` command to learn about some of the commands you will be frequently using during your first playthrough, and set your first facilities up. This command is going to introduce you to the game's mechanics and help you get a general sense of how things work.", + " - Table of Contents:", + " • Assets", + " • Facilities & Production", + " • Trading & Market", + " • Research & Technology", + " • Region & Logistics", + " • Modifiers & Services", + " • Reincorporation & Miscellaneous", + "", + "__**DISCLAIMER:**__", + " - This message may see changes over time, depending on changes made to IdleCorp. The date of the last update will be shown.", + " - This guide does not cover all of IdleCorp's features. Extensive guide can be accessed by running $$help or by visiting the Wiki that's run, edited and updated by both the bot developer and IdleCorp players.", + "Link to IdleCorp Wiki: https://wiki.idlecorp.xyz/index.php/Main_Page", + " - Try to use `$$examine ` command to get concise information on a specific matter that you need help about.", + " - If this text lacks the information you need, feel free to ask a question in #help (You are here!)."] + }, + { + "name": "assets", + "content": [ + "__**ASSETS**__", + " - Assets from facilities are generated within a time frame. Those assets can then be sold to get capital. Certain assets are considered prerequisites, meaning they are required to either build facilities or be consumed to make another asset. The best example to this is the steel mill, which you may build early on, which consumes 4 coal and 1 iron to produce 1 steel.", + " - A lot of the assets can be purchased with `$$buy`. This command, like many commands, has certain specifiers. This command is commonly used by players who are focusing on producing a certain asset that requires more than 2 prerequisites. It is a key command you will be frequently using early-mid stages. ", + " - A lot of the assets can also be scrapped with `$$scrap`. This command does not give you an asset that you can sell. You can use scraps to give your factories experience and level them up with `$$addxp `.", + " - Facilities with experience can produce the Plus variant of an asset, given that the produced asset's Plus variant exists. Plus variants cost more than the normal asset. When your factories have more experience, the chances of an asset being a Plus variant increases. Another method to increase the chance is using plus variants of prerequisites or using technology. Consumption of Plus assets are turned OFF by default. You need to use the command `$$scp ` to have them consume said assets. This can be turned off by `$$ucp `.", + " - Lands are the only exception to most of these rules. They cannot be sold or transported." + ] + }, + { + "name": "facilities and production", + "content": [ + "__**FACILITIES & PRODUCTION**__", + " - Almost every facility in game produces assets which you can sell for capital.", + " - Facility amount depends on how much land you have. You cannot build 2 facilities on a single land.", + " - Production times can be shortened or extended. These mostly depend on the tech you have in the region and the regional production modifiers.", + " - Passive Efficiency is determined by the amount of prerequisite assets you're producing to continually supply a factory that needs one. If you are __**producing**__ enough prerequisites, your factory's passive efficiency is going to be at 100% and will not need extra purchases to keep it running. ", + " - There are LOTS of facilities in the game, don't be afraid to experiment with them! Try out different facilities and play-styles to see what suits you best. See `$$faclist` for a complete list of facilities you can build on IdleCorp." + ] + }, + { + "name": "trading and market", + "content": [ + "__**TRADING & MARKET**__", + " - Trading with other players is a crucial part of IdleCorp. All sorts of assets can be traded on IdleCorp, ranging from wood to trucks.", + " - `$$price` command shows you the existing assets, how much they cost, if they're tradable, if they can be scrapped and if they can be sold on retail stores. The scale icon indicates that it's tradable. Shopping bags indicate that the asset can be sold on retail stores and is scrappable.", + " - Two types of markets exist. One of them is the NPC market, the other is the global player market.", + " - NPC market has unlimited assets. The only restriction to your purchases from the NPC market is your **hourly buy limit which can be viewed with $$cap**. The hourly buy limit can be increased by building more Logistics Centers.", + " - Global market access always requires at least one Logistics Center to be built. Global market is where players sell to and buy from other players. However, assets on global market are limited, and asset prices may vary depending on who sells the asset. Hourly buy limit is not affected when you buy assets from the global market." + ] + }, + { + "name": "research and technology", + "content": [ + "__**RESEARCH & TECHNOLOGY**__", + " - Researching is another crucial part of IdleCorp. Researching yields blueprints, which you need to develop it into a technology with `$$dev `. You need at least one research facility, 1 million energy and capital to start a research.", + " - Researching requires energy, an asset that can be generated using solar power plants or coal power plants. Energy can be purchased on global market as well as the NPC market. Coal power plant, as the name suggests, requires a steady supply of coal to continually produce energy. Solar power plants do not need to be supplied.", + " - You can build a maximum of 8 research facilities in one region. Each research facility brings up the chances of you getting a rarer blueprint. After 6 research facilities, the research cost also goes up by 500k energy+, which cannot be purchased from NPC market. 8 research facilities need 1 million energy, 1 million energy+ and 1 million capital to start a research.", + " - A research can take up to 3 hours to finish, but can be completed instantly with 4 gratitude points, which are earned by voting.", + " - Technologies can be traded. Fun fact, technology used to be the only asset which could be traded. Blueprints cannot be traded on the market, but can be sold to NPC market for 4 million capital.", + " - Some of the technologies can be combined to create an \"u\"pgraded version. You need three of the same technology to combine them. You can also combine the upgraded versions to create an UU version of the tech.", + " - Some technologies can be stacked to multiply their effects.", + " - Up to 6 technology slots can be unlocked by using reincorporation tokens." + ] + }, + { + "name": "region and logistics", + "content": [ + "__**REGION & LOGISTICS**__", + " - Regions are individual servers with their own unique statistics. They are where your assets are stored, and where your facilities are located.", + " - Every region is assigned a region code that can be viewed with `$$rc`.", + " - Assets can be transported between regions with `$$export(all) `. Exporting requires trucks, an asset which can be produced, or be bought from other players. Trucks need gasoline, which can be purchased from NPC market. Exports normally take 30 minutes, this time can be decreased with truck+ by 15 minutes. You can export a maximum of three times from a region. Technologies and blueprints can also be transported. Lands or facilities cannot be exported to another region. Capital is shared across regions.", + " - Do `$$logistics` to view the amount of trucks and gasoline you have, and your inboxes.", + " - There are two types of inboxes, one of them is regional and one of them is global. Inboxes are where your trucks, assets and capital come to before you claim them with `$$claim `.", + " - Each Logistics Center increases your hourly buy limit by 2 million dollars." + ] + }, + { + "name": "modifiers and services", + "content": [ + "__**MODIFIERS & SERVICES**__", + " - Regions have production modifiers that change every week. These modifiers affect the time it takes for a facility to produce an asset.", + " - Happiness is another production modifier that decreases production time if it is increased.", + " - Services are bonuses which modify various stats of your region. These range from happiness to a bonus on your factories' levels. These require a significant amount of money to unlock. Unlike assets, services are donated money to with `$$ds `. This means that you get to pay as small as you want, and unlock it over time.", + " - Policies can be enacted to make significant boosts to your region. These can be viewed with `$$policies`.", + " - Policies can only be enacted by the Regional Legislator. Enacting policies require Funding Points (FP).", + " - Regional policies require Region Office service to be unlocked. This allows your players to participate in elections, any player who has the Voter's Boon and 10 million capital can become a candidate for the Regional Legislator spot by typing `$$joinballot`. Players then have to vote for the candidate they see fit with `$$voteballot `. Voters also need Voter's Boon to vote for a candidate." + ] + }, + { + "name": "reincorporation and miscellaneous", + "content": [ + "__**REINCORPORATION & MISCELLANEOUS**__", + " - As with all Idle Tycoon games, restarting your company is a really important part of IdleCorp. It unlocks significant bonuses, reincorporation points, reincorporation tokens and gives you 1,000 Pass XP for each billion of your net worth.", + " - It is recommended to reincorporate at 10 billion net worth, as no more reincorporation token can be earned afterwards, unless you purchase any of the premium ranks. Reincorporation score is a value that can go up as high as your net worth, so is Pass XP.", + " - Reincorporation tokens can be used with `$$usetoken `. Using the command without specifying a bonus shows you a window displaying the bonuses you can use your tokens on.", + " - Your free starting land is going to be given to you in the region you reincorporate.", + " - If you've progressed a bit in a region different than the one you intended to, you can $$liquidate to sell and demolish everything (including land) to move to a different region.", + " - Before reincorporating or liquidating, make sure to remove installed technology and check player market to see if you can sell your assets to other people.", + " - Land prices are exponential. The more you buy land, the more its price increases.", + "", + "", + "This concludes this guide for now! It has been wonderful to closely interact with the members of this community to make this guide. Any feedback on it is highly appreciated!" + ] + }, + { + "name": "thanks", + "content": [ + "Special thanks to:", + "Teemaw for making this possible,", + "Punisher", + "XPARAD0X", + "avalidname", + "BossMan", + "Moykhaile", + "Drathmar for their valuable feedback and perfecting this guide!" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/profitfiledata.json b/profitfiledata.json new file mode 100644 index 0000000..ab654a0 --- /dev/null +++ b/profitfiledata.json @@ -0,0 +1,53 @@ +{ + "1.0": { + "Copyright_Notice.txt": ["Copyright Notice", + "------------------", + "1.You may post this page anywhere you would like, including \"IdleCorp HQ\"(The Discord Server of IdleCorp).", + "2.You may modify the page but not the \"Copyright_Notice\". (** NOTE: This page has no true copyright law or reference number, the author of the page has no ability to take any user to court nor stop any user from editing the page.)", + "3.You may also refer to \"Profit.txt\" but should just be used as a reference.", + "4.You are more then welcome to notify the author of any inconsistencies in the information and for any questions please contact me in \"IdleCorp HQ\".", + "------------------"], + "Readme.md": ["Because my English not too well, there will have some gramma mistakes or any word mistake is normal.", + "All calculate were after recalculated because to prevent some calculate errors(rounded decimal) but if it less than three decimal, it will use it, and won't recalculate.", + "Decimal, if it is repeatly decimal, it will round down at least two(e.g. 2.2222 >> 2.22 / 2.312222 >> 2.3122), if it is long decimal, it will at least show 3, not below 2, if I haven't mistakes.", + "All rank is follow by the origanal faclist, if I haven't any mistakes.", + "The faclist format is follow by that list too.", + "I am not sure it won't have any error and mistakes but the profit is used to referring, all profit and prices is change by region, techs and policies.", + "All assets prices is follow to IdleCorp Wiki(I have checked, that all are sell prices so if you want to know the buy prices, just 2 times of the sell price, and I won't change any prices in Profit.txt to buy price(include of jet fuel price)).", + "In Profit.txt, the consumes haven't sum together, if you want to know te total consumes, you sum it together by yourself.", + "Maybe will have some miss so don't need to supprise.", + "All numbers won't show as fractions.", + "You still need to follow to the actual region production modifiers to change.", + "Hope You will understand how to look Profit.txt", + "And pay attention, the ratio is \"the consumes factorys to the produce factory\", please remember.", + "", + "Profit.txt Format", + "follow to origanal faclist, with the following format:", + "```", + "Profit", + "(Produces-Consumes)(pre second)", + "(used to refer)(the ratio of orginal ratio is 1:1 and not really is 1:1 now will show all fac ratio like 1:1:1 or 1:4:1, the ratio of the left of the rightest number is arrange of faclist(mean the consumes list))(the number of ratio is follow the consumes list, and with the \"1\", the\"1\" is the fac, the numbers is follow the following First Fac's facs, the least number of the facs is in ratio)", + "First Fac(just the first builded factory)[The one you need to build but just need one, don't need more than one when build more fac(jusu one/can more than one)]", + "(when in 100% speed)", + "", + "(pre land)", + "--", + "(pre second)(if it have by-product(s))", + "--", + "(pre second)(if it have by-product(s))", + "--", + "(Haven't the total profit and total by-products' profit, if you want it, calculate it by yourself)", + "Asset+(In First Fac(each level of factory(0.5%/level)))", + "((per fac))(If more than one fac)", + "(pre land)(more)", + "(Follow the chance b, it will show the profit haven't minus the asset profit)", + "```", + "", + "", + "", + "Readme v.1.0", + "Profit v.1.0", + "Copyright_Notice v.1.0", + "IdleCorp Profit v.1.0"] + } +} \ No newline at end of file diff --git a/rules.json b/rules.json new file mode 100644 index 0000000..efdbff7 --- /dev/null +++ b/rules.json @@ -0,0 +1,45 @@ +{ + "1.0": { + "head": "**----------RULES----------**", + "head_notes": ["Rules also as same as other servers'", "In here, IdleCorp Profit will also call as \"ICP\", IdleCorp HQ will also call as \"The HQ\", IdleCorp Profit Bot will also call as \"the Bot\", Moderator will also call as \"the Mod\"", "And also, some calls(likes: the Owner, the Developer, the Admin) are meaning Ben Cheung, who is the Owner, the Main Admin of this server, the Developer of ICP Bot"], + "rules": ["Friendly to each others, don't have NSFW things, and following the Discord ToS.", + "Rules also following the HQ's rules but in point 7 in that rules, you can't ping everyone or here, if you have any questions, don't ping the Admin, or the Developer, if you get some problems because pings others, the Admin also **won't** help you.", + "This server's appear due to IdleCorp, and ICP is because can let people more easy to play the Bot.", + "ICP Bot can't invite to other, unless the Owner allow you to invite the Bot but also won't because it also is the Mod of this server.", + "You can't destory or damage the Bot and this server, also you can't go to change the Bot's codes, the securities, or anythings.", + "You also can suggest some suggestions about the Bot or this server, if you want to suggest about the HQ or IdleCorp Bot.", + "If you have questions about the rules, you can suggestions to tell the Admin.", + "The Admin will warn you or kick you if you don't follow the server rules.", + "Please react if you already read this Rules."], + "end": [] + }, + "1.0.1": { + "head": "**----------RULES----------**", + "head_notes": ["Rules also as same as other servers'", "In here, IdleCorp Profit will also call as \"ICP\", IdleCorp HQ will also call as \"The HQ\", IdleCorp Profit Bot will also call as \"the Bot\", Moderator will also call as \"the Mod\"", "And also, some calls(likes: the Owner, the Developer, the Admin) are meaning Ben Cheung, who is the Owner, the Main Admin of this server, the Developer of ICP Bot"], + "rules": ["Mainly follow to the Discord ToS (Terms of Service).", + "Friendly to each others, don't have NSFW things, and following the Discord ToS.", + "Rules also following the HQ's rules but in point 7 in that rules, you can't ping everyone or here, if you have any questions, don't ping the Admin, or the Developer, if you get some problems because pings others, the Admin also **won't** help you.", + "This server's appear due to IdleCorp, and ICP is because can let people more easy to play the Bot.", + "ICP Bot can't invite to other, unless the Owner allow you to invite the Bot but also won't because it also is the Mod of this server.", + "You can't destory or damage the Bot and this server, also you can't go to change the Bot's codes, the securities, or anythings.", + "You also can suggest some suggestions about the Bot or this server, if you want to suggest about the HQ or IdleCorp Bot.", + "If you have questions about the rules, you can suggestions to tell the Admin.", + "The Admin will warn you or kick you if you don't follow the server rules."], + "end": ["All rules maybe will change in anytime.", + "Please react if you already read this Rules."] + }, + "1.1.0": { + "head": "**----------RULES----------**", + "head_notes": ["Rules also as same as other servers'", "In here, IdleCorp Profit will also call as \"ICP\", IdleCorp HQ will also call as \"The HQ\", IdleCorp Profit Bot will also call as \"the Bot\", Moderator will also call as \"the Mod\"", "And also, some calls(likes: the Owner, the Developer, the Admin) are meaning Ben Cheung, who is the Owner, the Main Admin of this server, the Developer of ICP Bot"], + "rules": ["Friendly to each others, don't have NSFW things, and mainly following the Discord ToS (Terms of Service).", + "Dont use everyone and here ping. Unless there's something like Armageddon or WWIII. Using ping will be warned and if you do that again, oh god please don't or you'll be kicked. And if you do that again (c'mon, its already third time you do that), You'll be banned, and your name will not be forgotten.", + "This server is dedicated to IdleCorp, ICP was made to help people play IdleCorp easier.", + "You cant invite ICP to your server. The one and only ICP is only here.", + "You can't destory or damage the Bot and this server, also you can't go to change the Bot's codes, the securities, or anythings.", + "You also can suggest some suggestions about the Bot or this server, if you want to suggest about the HQ or IdleCorp Bot.", + "If you have questions about the rules, you can suggestions to tell the Admin.", + "The Admin will warn you or kick you if you don't follow the server rules."], + "end": ["All rules maybe will change in anytime.", + "Please react if you already read this Rules."] + } +} \ No newline at end of file diff --git a/setting.json b/setting.json new file mode 100644 index 0000000..8a68337 --- /dev/null +++ b/setting.json @@ -0,0 +1,7 @@ +{ + "Token": "ODAxMDE5NTA4Mzg3MDg2MzQ2.YAaljQ.3PC58C897P0Bgfe5Ra7ze53bsGs", + "version": "1.0.2.dev", + "load_blacklist": "", + "guild_id": 801019800682758145, + "VSCode": "Yes" +} \ No newline at end of file diff --git a/updates.json b/updates.json new file mode 100644 index 0000000..1b332f3 --- /dev/null +++ b/updates.json @@ -0,0 +1,417 @@ +{ + "Alpha.0.2": { + "head": "Update {}:", + "commands": { + "adds": { + "speed": "Calculate facilities speeds(include of consumes and produces)", + "history": "Can show up all past version commands(usable) and others(will add in future)" + }, + "changes": { + "profit": "From calculate facilities speeds change to calculate facilities money speeds and the Profit of facility" + }, + "deletes": {} + }, + "others": ["Better UI in `speed` and `profit` commands"], + "plans to update": { + "commands": { + "facilities info": "undecided", + "help": "Alpha.0.4" + }, + "systems": { + "aliases system": "Alpha.0.3", + "did you know": "undecided" + }, + "others": {} + }, + "note": ["In `speed` command, \"airport\" argument not work for it, will fix in future version.", + "`speed` and `profit` commands can't calculate more than one facilities in one action, plans it'll works in future version.", + "All calculate commands in the bot can't get region info, like assets' price and facilities produces' speed, so if you want to calculate it, I can't help you."], + "end": "Bot version: **{}**" + }, + "Alpha.0.2.1": { + "head": "Update *{}*:", + "commands": { + "adds": {}, + "changes": { + "speed": "Now can put \"airport\" argument in it and will works as normal", + "history": "Command symbol from `history ` become `history `" + }, + "deletes": {} + }, + "other": { + "Stats system": "Now will show the task stats (wait a second, isn't it status?) non-inline, anyway, that's will make it looks better." + }, + "plans to update": { + "commands": { + "facilities info": "undecided", + "help": "Alpha.0.4", + "updates": "Alpha version", + "rules": "undecided", + "'Stats' to 'Status'": "next version" + }, + "systems": { + "aliases system": "Alpha.0.3", + "did you know": "undecided" + }, + "others": {} + }, + "note": ["\"airport\" argument in all calculate command will works as normal, same, `speed` and `profit` commands can't calculate more than one facilities in one action, plans it'll works in future version."], + "end": "Bot version: **{}**" + }, + "Alpha.0.3.0": { + "head": "Update *{}*:", + "commands": { + "adds": {}, + "changes": { + "Developer": "`Up-12D2111`" + }, + "deletes": {} + }, + "other": ["Changed \"Stats\" to \"Status\" (It will has \"Stats system\" in future)", + "\"Aliases system\", help command will show about that in future version but without facilities'"], + "plans to update": { + "commands": { + "facilities info": "undecided", + "help": "Alpha.0.4", + "updates": "Alpha version", + "rules": "undecided", + "codes": "undecided" + }, + "systems": { + "did you know": "undecided", + "aliases system\" \"facilities part": "undecided" + }, + "others": {} + }, + "note": ["\"Aliases system\" facilities part will update in future"], + "end": "Bot version: **{}**" + }, + "Beta.0.1.0": { + "head": "Update *{}*:", + "commands": { + "adds": { + "rules": "Can show the server rules, also can show the older version", + "updates": "Can show the bot updates, also can show the older version", + "codes": "Base part, will show the information by codes", + "help": "Base part, will show the description and the syntax of commands" + }, + "changes": { + "speed": "All strings will start with a upper letter", + "profit": "All strings will start with a upper letter" + }, + "deletes": {} + }, + "other": ["Hope embed colors are good"], + "plans to update": { + "commands": { + "facilities info": "undecided", + "help complete": "undecided", + "codes complete": "undecided" + }, + "systems": { + "did you know": "undecided", + "aliases system\" \"facilities part": "undecided" + }, + "others": {} + }, + "note": ["Now the base part of `codes` and `help`can use but not some haven't add in, they will completed in future version"], + "end": "Bot version: **{}**" + }, + "Beta.0.2.0": { + "head": "Update *{}*:", + "commands": { + "adds": { + "search": "Can show the server rules, also can show the older version" + }, + "changes": { + "history": "Added Beta.0.1.0 -- `ping` and `version`", + "ping": "Something", + "version": "Something" + }, + "deletes": {} + }, + "other": [], + "plans to update": { + "commands": { + "facilities info": "undecided", + "help complete": "undecided", + "codes complete": "undecided" + }, + "systems": { + "did you know": "undecided", + "aliases system\" \"facilities part": "undecided" + }, + "others": {} + }, + "note": ["Hope you all happy"], + "end": "Bot version: **{}**" + }, + "Beta.0.3.0":{ + "head": "Update *{}*:", + "commands": { + "adds": { + "info": "Can show the info of the asset or the facility" + }, + "changes": { + "profit": "The facility can input as upper case, and the facility error message had changed, makes numbers can show with a \",\" separator, the number can type in with \",\" separator and end with \"k\", \"m\" or \"b\"", + "speed": "As same as above", + "history": "Added Beta.0.2.0 -- `profit`, `speed` and `search`, fixed some are not work normally", + "search": "Now the embed(not exist) canshow normally" + }, + "deletes": {} + }, + "other": ["\"Aliases system\" -- The complete Aliases system had done, will add the aliases in help command", + "Added Beta.0.2.0 bot update into `updates` command"], + "plans to update": { + "commands": { + "help complete": "next version", + "codes complete": "next version" + }, + "systems": { + "did you know": "undecided" + }, + "others": {} + }, + "note": ["The April Fools Day update is just one day, and it passed, so I think I can add that in history?", + "Will add \"technologies\", \"blueprints\" and \"services\" in `info` in future", + "It shouldn't called \"facilities part\", should be \"IdleCorp part\" but never mind"], + "end": "Bot version: **{}**" + }, + "Beta.0.4.0":{ + "head": "Update *{}*:", + "commands": { + "adds": {}, + "changes": { + "codes": "Completed and added new codes include of Error Codes", + "history": "Added `server_icon` into it, can show up the old server icon, added Beta.0.3.0 -- `help`, `info`, `profit`, `rules`, `search`, `speed`", + "search": "Can support in future version, old one added in `history`" + }, + "deletes": {} + }, + "fixed": ["`updates` -- 1. Fixed when send a invalid string in command, won't send in each messages", + "2. Fixed embed won't show when the update too long", + "`history` -- Some message not shown the correct one, won't add into `history`"], + "other": ["All commands will suit Error Codes, then the version haven't added Error Codes will add into `history`", + "New Codes version 1.0 -- `UA37101`", + "Developer -- `UD08101`"], + "plans to update": { + "commands": { + "`profit` and `speed` units": "undecided", + "botinfo": "next version" + }, + "systems": { + "did you know": "undecided" + }, + "others": {} + }, + "note": ["Some method error cannot add into `history`, if any error miss add error code, please report", + "Any bugs please report in <#828810972902457415> or DM/PM <@484883489846591491> or <@683694351855255590>", + "Will add \"technologies\", \"blueprints\" and \"services\" into `info` in next version"], + "end": "Bot version: **{}**" + }, + "Beta.0.5.0":{ + "head": "Update *{}*:", + "commands": { + "adds": { + "botinfo": "Can show the information of the bot" + }, + "changes": { + "info": "Add facilities consumes, produces and speed info to facilities, added assets prices, and added \"technologies\", \"blueprints\" and \"services\"", + "profit": "In consumes part, the price from the npc sell prices changed to the npc buy prices, and the profit part changed by that change. The Note had changed.", + "search": "Can support in future version, and changed when not key words entered", + "help": "Added `botinfo`, changed `search` syntax, from `search ` changed into `search [--] [thing]`, and won't write into `history`" + }, + "deletes": {} + }, + "fixed": ["`info` -- 1. Facilities Construct part, assets number now will show with "," separator", + "2. In facilities part, if the wikipedia part is \"None\", now won't show the invalid Wikipedia link", + "3. Fixed a typo make the info not find, \"presciption drug\" in data, fixed to \"prescription drug\", and won't write into `history`", + "`help` -- 1. Fixed when the command argument just can work with aliases", + "2. Fixed the aliases when show the details is a wrong aliases", + "3. Fixed a typo of without argument, in `updates` syntax, \"splilt\" fixed to \"split\", and won't write into `history`", + "4. Fixed a typo of aliases -- assets, a aliases list name, \"lamd\" fixed to \"land\", and won't write into `history`", + "`codes` -- Fixed a mistake of extra \"> \" in Beta.0.4.0 -- Fixed"], + "other": ["New Codes version 1.1 -- `UA37102`"], + "plans to update": { + "commands": { + "`profit` and `speed` units": "next version", + "info images": "next version" + }, + "systems": { + "did you know": "next version" + }, + "others": {} + }, + "note": ["Any bugs or typos please report in #bug-report or DM/PM the developer or the owner", + "There had some typo since all the names and aliases are manual enter"], + "end": "Bot version: **{}**" + }, + "Beta.0.6.0":{ + "head": "Update *{}*:", + "commands": { + "adds": { + "profitcomplete": "Added more \"First Fac\", \"Per land\", \"Produces Remains(by-produce in profit.txt)\" than `profit`" + }, + "changes": { + "profit": "Can add unit flag and will show the unit", + "speed": "Same as `profit` update", + "history": "Added Beta.0.5.0 -- `profit`, `info`, `speed`, added `history` -- `server`, `idlecorpprofit`, suggest for more", + "rules": "Added rules version v.1.1.0", + "info": "Added images on the top-right", + "help": "Changed the description of `ping`, from \"Can show the latency of the bot\", changed into \"Can show the gateway latency of the bot\", and won't write into `history`, added `profitcomplete` and changed the syntax of `profit`, from `profit [number]`changed into `profit [--] [number]`, and won't write into `history`" + }, + "deletes": {} + }, + "fixed": ["`info` -- 1. Fixed the unsupported code", + "2. Fixed a typo of alias -- facilities -- plastic factory, a alias, \"plastci fac\" fixed to \"plastic fac\", and won't write into `history`", + "3. Fixed Production show with underscores", + "Now won't send two message simular at once", + "`history` -- 1. Fixed a typo of the description of `history` -- `server_icon` -- `1`, from \"You can see what's the different of that.\", fixed into \"You can see what's the difference of them.\"", + "2. Updated the `history` commands list"], + "other": ["\"Did you know\" -- Added on `profit`, `speed`, `profitcomplete`"], + "plans to update": { + "commands": { + "profit embed and text file export": "v.1.0" + }, + "systems": { + "complete tasks-stats": "v.1.0", + "suggestions status": "v.1.0" + }, + "others": {} + }, + "note": ["Miss notify the update in Beta.0.5.0: Commands -- Changes -- `history` -- Added Beta.0.4.0 -- `info`, `help`, `profit`, `search`, `updates`", + "This update version will be the last Beta version/big Beta version update if no mistakes"], + "end": "Bot version: **{}**" + }, + "Beta.0.6.1":{ + "head": "Update *{}*:", + "commands": { + "adds": {}, + "changes": { + "history": "Added Beta.0.6.0 -- `updates`, `profit`, `speed`, `profitcomplete`", + "help": "Changed the syntax of `speed`, from `speed [number]` changed into `speed [--] [number]`, and won't write into `history`", + "updates": "Added alias \"changelog\" as the one of the aliases, and won't write into `history`" + }, + "deletes": {} + }, + "fixed": ["`updates` -- Fixed when use full names as parameters will appear an error called \"Command has error, local variable 'f' referenced before assignment\"", + "`help` -- Fixed `profitcomplete` in `help` not work normally"], + "other": ["\"Did you know\" -- Change the appear time from 1.2 seconds changed to 3 seconds"], + "plans to update": { + "commands": { + "profit embed and text file export": "v.1.0" + }, + "systems": { + "complete tasks-stats": "v.1.0", + "suggestions status": "v.1.0" + }, + "others": {} + }, + "note": ["The bot version now normally, not \"Beta.0.5.0\"", + "Hope more people use this bot"], + "end": "Bot version: **{}**" + }, + "1.0":{ + "head": "Update *{}*:", + "commands": { + "adds": { + "profitfileexport": "Calculate and generate the profit.txt or a zip file or a embed in DM, send the Beta version of Profit", + "calculate": "Do some quick calculations", + "ncguide": "The newcomer guide combined into the command" + }, + "changes": { + "history": "Added Beta.0.6.1 -- `search`, `profitcomplete`, `updates`" + }, + "deletes": {} + }, + "fixed": ["Fixed a bug that will send twice instead of once", + "`search` -- Fixed some features not work normally", + "`profitcomplete` -- 1. Fixed when the facility input is \"airport\" raises some problem, just fixed a few", + "2. Fixed an error \"both arguments should be Rational instances\" when the parameter contains number", + "3. Fixed a visual bug on profit per land didn't shown \"/land\" when the parameter of the facility is \"airport\"", + "`updates` -- Fixed a visual bug some capitalization mistakes, details -- `UN12101`"], + "other": ["`updates` -- Fixed a visual bug some capitalization mistakes, details -- `UN12101`", + "New Codes version 1.2 -- `UA37103`", + "Task-status can shown in #tasks-status and it's name became \"tasks-status\", details Developer -- `UD02201`, `UN22201`", + "\"Did you know\" -- Added more, details Developer -- `UD29201`"], + "plans to update": { + "commands": {}, + "systems": {}, + "others": {} + }, + "note": ["Since the program language not support the RAR file creations, then the compression file type is ZIP instead of RAR, but Beta version still be RAR", + "Don't expect v.1.1 release fast", + "I don't know what other commands can put \"Did you know\" embed", + "Some aliases and `help` improvements will be done in 1.1", + "\"Airport\" really hard to process"], + "end": "Bot version: **{}**" + }, + "1.0.1":{ + "head": "Update *{}*:", + "commands": { + "adds": {}, + "changes": { + "history": "Added 1.0 -- `info`, `help`" + }, + "deletes": {} + }, + "fixed": ["Fixed a bug that the Developer and the Owner cannot use administrator commands, and won't write into `history`, details Developer -- `UD02102`", + "`info` -- 1. Fixed a typo of the name of \"fiber infrastructure\", from \"fiber infrestructure\" fixed into \"fiber infrastructure\", and won't write into `history`", + "2. Fixed a bug when the facilities not are factories or mines, it didn't work normally", + "`help` -- Fixed a bug when the commands have necessary parameters, the command cannot be found"], + "other": ["New Codes version 1.2.1 -- `UA37104`"], + "plans to update": { + "commands": {}, + "systems": {}, + "others": {} + }, + "note": ["\"Airport\" really hard to process in commands..."], + "end": "Bot version: **{}**" + }, + "1.0.2":{ + "head": "Update *{}*:", + "commands": { + "adds": {}, + "changes": { + "suggest": "In `info`, added \"UTC\" mark in the time, \"Created at\"", + "history": "Added 1.0.1 -- `suggest`, `speed`, `profit`, `profitcomplete`, `updates`", + "speed": "In \"Note\", it had changed", + "profit": "In \"Note\", it had changed", + "profitcomplete": "In \"Note\", it had changed" + }, + "deletes": {} + }, + "fixed": ["`profitcomplete` -- Fixed a bug when the parameters contain correct flags, it cannot work normally", + "`updates` -- Fixed a bug when the parameters contain correct version flags, it cannot work normally"], + "other": ["New Codes version 1.2.2 -- `UA37105`", + "\"Did you know\" -- Added more, details Developer -- `UD29202`"], + "plans to update": { + "commands": {}, + "systems": {}, + "others": {} + }, + "note": ["Thanks XPARAD0X helped improve the \"Note\" in these commands", + "3 updates in 1 day..."], + "end": "Bot version: **{}**" + }, + "1.0.3":{ + "head": "Update *{}*:", + "commands": { + "adds": {}, + "changes": { + "history": "Added 1.0.2 -- `updates`" + }, + "deletes": {} + }, + "fixed": ["`updates` -- Fixed a bug when the updates contain no \"Commands\" -- \"Adds\", the whole \"Commands\" disappear"], + "other": [], + "plans to update": { + "commands": {}, + "systems": {}, + "others": {} + }, + "note": ["More improvement will be done in v.1.1.0", + "Hope there are fewer bugs"], + "end": "Bot version: **{}**" + } +} \ No newline at end of file diff --git a/you_know.json b/you_know.json new file mode 100644 index 0000000..625d8fb --- /dev/null +++ b/you_know.json @@ -0,0 +1,24 @@ +{ + "list": [ + "Everytime move some old commands into history, will increase more few KBs", + "Error reference codes have 4.738 Quintillion!!", + "IdleCorp has few years", + "IdleCorp Profit build on IdleCorp and informations from IdleCorp", + "IdleCorp Profit project has started since 2020-12!", + "IdleCorp is more complex than other general idle games", + "You can do more--|times for| |\"if\"|", + "IdleCorp Profit has started as a text file at the beginning", + "Find more easter eggs!", + "Well this \"Did you know\" not really a easter egg", + "You can find more thing (or info) in the IdleCorp wiki!", + "IdleCorp Profit just has profit.txt when the first version has been released", + "Discord and the bot", + "Idle Corporations!", + "History will be more history!", + "Version 1!", + "Stable version!", + "History's codes has more than thousand lines!", + "IdleCorp Helper (or calculator) bot right here!", + "Newcomer guide is here!" + ] +} \ No newline at end of file