'Set how often the given hook key should
be "ticked".
Args:
interval (int): The number of seconds
between ticks
hook_key (str): The name of the method
(on this mob) to call every interval
seconds.
stop (bool, optional): Just stop the
last ticker without starting a new one.
With this set, the interval and hook_key
arguments are unused.
In order to only have one ticker
running at a time, we make sure to store the
previous ticker subscription so that we can
easily find and stop it before setting a
new one. The tickerhandler is persistent so
we need to remember this across reloads.'

def _set_ticker(self, interval, hook_key, stop=False):

    idstring = 'tutorial_mob'
    last_interval = self.db.last_ticker_interval
    last_hook_key = self.db.last_hook_key
    if (last_interval and last_hook_key):
        TICKER_HANDLER.remove(interval=last_interval, callback=getattr(self, last_hook_key), idstring=idstring)
    self.db.last_ticker_interval = interval
    self.db.last_hook_key = hook_key
    if (not stop):
        TICKER_HANDLER.add(interval=interval, callback=getattr(self, hook_key), idstring=idstring)
