def follow_alife(life): if _find_alife(life, jobs.get_job_detail(life['job'], 'target'), distance=7): lfe.stop(life) return True return False
def guard_camp(life): _delay = random.randint(25, jobs.get_job_detail(life['job'], 'pause')) if not life['path'] and not lfe.find_action(life, matches=[{'action': 'move'}]): _chunk = WORLD_INFO['chunk_map'][references.find_least_populated_key_in_reference(life, CAMPS[life['camp']]['reference'])] lfe.add_action(life,{'action': 'move', 'to': random.choice(_chunk['ground'])}, 200, delay=_delay) return False
def guard_camp(life): _delay = random.randint(25, jobs.get_job_detail(life['job'], 'pause')) if not life['path'] and not lfe.find_action(life, matches=[{ 'action': 'move' }]): _chunk = WORLD_INFO['chunk_map'][ references.find_least_populated_key_in_reference( life, CAMPS[life['camp']]['reference'])] lfe.add_action(life, { 'action': 'move', 'to': random.choice(_chunk['ground']) }, 200, delay=_delay) return False
def find_alife_and_say(life): return _find_alife_and_say(life, jobs.get_job_detail(life['job'], 'target'), jobs.get_job_detail(life['job'], 'target'))
def find_alife_and_say(life): return _find_alife_and_say( life, jobs.get_job_detail(life["job"], "target"), jobs.get_job_detail(life["job"], "target") )
def follow_alife(life): if _find_alife(life, jobs.get_job_detail(life["job"], "target"), distance=7): lfe.stop(life) return True return False