'Call the connected callbacks.
Args:
obj (Object): the Evennia typeclassed object.
callback_name (str): the callback name to call.
*args: additional variables for this callback.
Kwargs:
number (int, optional): call just a specific callback.
parameters (str, optional): call a callback with parameters.
locals (dict, optional): a locals replacement.
Returns:
True to report the callback was called without interruption,
False otherwise.'

def call(self, obj, callback_name, *args, **kwargs):

    number = kwargs.get('number')
    parameters = kwargs.get('parameters')
    locals = kwargs.get('locals')
    allowed = ('number', 'parameters', 'locals')
    if any((k for k in kwargs if (k not in allowed))):
        raise TypeError('Unknown    keyword    arguments    were    specified    to    call    callbacks:    {}'.format(kwargs))
    event = self.get_events(obj).get(callback_name)
    if ((locals is None) and (not event)):
        logger.log_err("The    callback    {}    for    the    object    {}    (typeclass    {})    can't    be    found".format(callback_name, obj, type(obj)))
        return False
    if (locals is None):
        locals = self.ndb.fresh_locals.copy()
        for (i, variable) in enumerate(event[0]):
            try:
                locals[variable] = args[i]
            except IndexError:
                logger.log_trace('callback    {}    of    {}    ({}):    need    variable    {}    in    position    {}'.format(callback_name, obj, type(obj), variable, i))
                return False
    else:
        locals = {key: value for (key, value) in locals.items()}
    callbacks = self.get_callbacks(obj).get(callback_name, [])
    if event:
        custom_call = event[2]
        if custom_call:
            callbacks = custom_call(callbacks, parameters)
    self.ndb.current_locals = locals
    for (i, callback) in enumerate(callbacks):
        if (not callback['valid']):
            continue
        if ((number is not None) and (callback['number'] != number)):
            continue
        try:
            exec callback['code'] in locals, locals
        except InterruptEvent:
            return False
        except Exception:
            (etype, evalue, tb) = sys.exc_info()
            trace = traceback.format_exception(etype, evalue, tb)
            self.handle_error(callback, trace)
    return True
