This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python 2.7 | |
any(__import__('time').sleep(__import__('sys').stdout.write(chr(n)) or .01) for n in __import__('itertools').cycle([80,101,110,117,115,32])) if raw_input('Gob\'s Program: Y/N?\n? ')[0].lower() == 'y' else '' | |
# Python 3.x | |
any(__import__('time').sleep(print(chr(n),end='',flush=True) or .01) for n in __import__('itertools').cycle([80,101,110,117,115,32])) if input('Gob\'s Program: Y/N?\n? ')[0].lower() == 'y' else '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def split_fields(text, delimiters = " \t\n\r", quotes = "\"'`"): | |
""" | |
Field parsing generator; default parameters will function similar | |
to command line argument parsing. | |
Ex. >>> [f for f in split_fields("this is\t`a te's't` ")] | |
['this', 'is', "a te's't"] | |
""" | |
index = -1 | |
start = -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tarrasque | |
# Mapping of hero dt_key values to their keys in the CombatLogNames string table | |
hero_clnames = { | |
# This list is incomplete! I add to it whenever I hit a new hero parsing | |
"DT_DOTA_Unit_Hero_Abaddon": "npc_dota_hero_abaddon", | |
"DT_DOTA_Unit_Hero_Alchemist": "npc_dota_hero_alchemist", | |
"DT_DOTA_Unit_Hero_AncientApparition": "npc_dota_hero_ancient_apparition", | |
"DT_DOTA_Unit_Hero_Axe": "npc_dota_hero_axe", | |
"DT_DOTA_Unit_Hero_Bane": "npc_dota_hero_bane", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GLOBALS | |
life // bot's current life (out of 1000?) | |
x // bot's current x coordinate | |
y // bot's current y coordinate | |
arenaWidth | |
arenaHeight | |
sharedA | |
sharedB | |
sharedC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
init = function () { | |
started = false; | |
count = 0; | |
} | |
update = function () { | |
if (!started && (x != 0 || y != 0)) | |
moveTo(0,0); | |
else | |
started = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/atria/core/server.py b/atria/core/server.py | |
index f85c091..0c180b2 100644 | |
--- a/atria/core/server.py | |
+++ b/atria/core/server.py | |
@@ -23,6 +23,7 @@ from .storage import STORES | |
from .timing import TIMERS | |
from .utils.exceptions import ServerReboot, ServerReload, ServerShutdown | |
from .utils.funcs import joins | |
+from .world import MapShell | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
"""A test game for prototyping.""" | |
# Part of Atria MUD Server (https://github.com/whutch/atria) | |
# :copyright: (c) 2008 - 2016 Will Hutcheson | |
# :license: MIT (https://github.com/whutch/atria/blob/master/LICENSE.txt) | |
import re | |
from .. import settings | |
from ..core.accounts import Account, AccountMenu, AccountName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import partial | |
from cwmud.contrib.crafting import Material | |
from cwmud.contrib.gathering import GatheringNode | |
from cwmud.core.characters import CharacterShell | |
from cwmud.core.commands import COMMANDS | |
from cwmud.core.items import Item, ITEMS, Trash | |
from cwmud.core.skills import AbilityCommand, Skill, SKILLS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import sleep, time | |
from subprocess import call | |
from atria.contrib.weather.patterns import WeatherPattern | |
from atria.contrib.worldgen.maps import (_render_map_data, | |
render_map_from_layers) | |
from atria.contrib.worldgen.terrain import _parse_terrain_grid | |
from atria.libs.miniboa import colorize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
"""Weather monitor; example of client terminal manipulation.""" | |
# Part of Clockwork MUD Server (https://github.com/whutch/cwmud) | |
# :copyright: (c) 2008 - 2016 Will Hutcheson | |
# :license: MIT (https://github.com/whutch/cwmud/blob/master/LICENSE.txt) | |
from ... import settings | |
from ...contrib.weather.patterns import WeatherPattern | |
from ...contrib.worldgen.maps import _render_map_data, render_map_from_layers | |
from ...core.events import EVENTS |
OlderNewer