Exemplo n.º 1
0
def room():
    from autospawner.spawner import Spawner
    spawner = Spawner()
    shard = spawner.getShard()
    room = spawner.getRoom(shard)
    position = spawner.getPosition(room, shard)
    click.echo("%s %s %s,%s" % (shard, room, position['x'], position['y']))
Exemplo n.º 2
0
def shouldspawn():
    from autospawner.spawner import Spawner
    spawner = Spawner()
    doit = spawner.shouldSpawn()
    click.echo("%s" % (doit, ))
    if not doit:
        sys.exit(-1)
Exemplo n.º 3
0
def room():
    from autospawner.spawner import Spawner
    spawner = Spawner()
    shard = spawner.getShard()
    room = spawner.getRoom(shard)
    if not room:
        click.echo('No suitable room')
        sys.exit(-1)
    position = spawner.getPosition(room, shard)
    click.echo("%s %s %s,%s" % (shard, room, position['x'], position['y']))
Exemplo n.º 4
0
def dt(room, shard):
    from autospawner.spawner import Spawner
    spawner = Spawner()
    dt = spawner.roominfo.getDistaceTranceform(room, shard)
    for y in range(0, 50):
        row = ''
        for x in range(0, 50):
            row = '%s%s' % (row, dt[x][y])
        click.echo(row)
Exemplo n.º 5
0
def terrain(room, shard):
    from autospawner.spawner import Spawner
    spawner = Spawner()
    terrain = spawner.roominfo.getRoomTerrain(room, shard)
    for y in range(0, 50):
        row = ''
        for x in range(0, 50):
            if terrain[x][y] == 'wall':
                score = 0
            elif terrain[x][y] == 'plain':
                score = 1
            elif terrain[x][y] == 'swamp':
                score = 2
            row = '%s%s' % (row, score)
        click.echo(row)
Exemplo n.º 6
0
def respawn():
    from autospawner.spawner import Spawner
    spawner = Spawner()
    if not spawner.shouldSpawn():
        click.echo('Not appropriate to spawn at this time')
        sys.exit(-1)
    shard = spawner.getShard()
    room = spawner.getRoom(shard)
    position = spawner.getPosition(room, shard)
    click.echo("%s %s %s,%s" % (shard, room, position['x'], position['y']))
Exemplo n.º 7
0
def shard():
    from autospawner.spawner import Spawner
    spawner = Spawner()
    shard = spawner.getShard()
    click.echo(shard)
Exemplo n.º 8
0
def resetmemory():
    from autospawner.spawner import Spawner
    spawner = Spawner()
    spawner.resetMemory()
    click.echo('Memory reset')
Exemplo n.º 9
0
def validate(room, shard):
    from autospawner.spawner import Spawner
    spawner = Spawner()
    click.echo(spawner.filterRoom(room, shard))