def get_monster(name):
    "Returns a dictionary with a monster's info, if no exact match was found, it returns a list of suggestions.\n\n    The dictionary has the following keys: name, id, hp, exp, maxdmg, elem_physical, elem_holy,\n    elem_death, elem_fire, elem_energy, elem_ice, elem_earth, elem_drown, elem_lifedrain, senseinvis,\n    arm, image."
    c = tibiaDatabase.cursor()
    c.execute('SELECT * FROM Creatures WHERE title LIKE ? ORDER BY LENGTH(title) ASC LIMIT 15', ((('%' + name) + '%'),))
    result = c.fetchall()
    if (len(result) == 0):
        return None
    elif ((result[0]['title'].lower() == name.lower()) or (len(result) == 1)):
        monster = result[0]
    else:
        return [x['title'] for x in result]
    try:
        if ((monster['health'] is None) or (monster['health'] < 1)):
            monster['health'] = None
        c.execute('SELECT Items.title as name, percentage, min, max FROM CreatureDrops, Items WHERE Items.id = CreatureDrops.itemid AND creatureid = ? ORDER BY percentage DESC', (monster['id'],))
        monster['loot'] = c.fetchall()
        return monster
    finally:
        c.close()
Returns a dictionary with a monster's info, if no exact match was found, it returns a list of suggestions.

The dictionary has the following keys: name, id, hp, exp, maxdmg, elem_physical, elem_holy,
elem_death, elem_fire, elem_energy, elem_ice, elem_earth, elem_drown, elem_lifedrain, senseinvis,
arm, image.
def get_monster(name):
    "Returns a dictionary with a monster's info, if no exact match was found, it returns a list of suggestions.\n\n    The dictionary has the following keys: name, id, hp, exp, maxdmg, elem_physical, elem_holy,\n    elem_death, elem_fire, elem_energy, elem_ice, elem_earth, elem_drown, elem_lifedrain, senseinvis,\n    arm, image."
    c = tibiaDatabase.cursor()
    c.execute('SELECT * FROM Creatures WHERE title LIKE ? ORDER BY LENGTH(title) ASC LIMIT 15', ((('%' + name) + '%'),))
    result = c.fetchall()
    if (len(result) == 0):
        return None
    elif ((result[0]['title'].lower() == name.lower()) or (len(result) == 1)):
        monster = result[0]
    else:
        return [x['title'] for x in result]
    try:
        if ((monster['health'] is None) or (monster['health'] < 1)):
            monster['health'] = None
        c.execute('SELECT Items.title as name, percentage, min, max FROM CreatureDrops, Items WHERE Items.id = CreatureDrops.itemid AND creatureid = ? ORDER BY percentage DESC', (monster['id'],))
        monster['loot'] = c.fetchall()
        return monster
    finally:
        c.close()