if(PF_DIFF(me->x_tile_pos, bot_map.map[bot_map.cur_map].x) >= 3 && PF_DIFF(me->y_tile_pos, bot_map.map[bot_map.cur_map].y) >= 3) if(!pseudo_pf_find_path(bot_map.map[bot_map.cur_map].x, bot_map.map[bot_map.cur_map].y)) log_error("Cannot find valid path!\n"); }
if((PF_DIFF(me->x_tile_pos, bot_map.map[bot_map.cur_map].x) >= 3 || PF_DIFF(me->y_tile_pos, bot_map.map[bot_map.cur_map].y) >= 3) && pf_follow_path == 0) { if(pseudo_pf_find_path(bot_map.map[bot_map.cur_map].x, bot_map.map[bot_map.cur_map].y) == 0) log_error("Cannot find valid path!\n"); } }
int guildmap_timer(Uint32 time){     actor *me = NULL;     int i;                  if(insult_enemy == 1 && bot_map.map[bot_map.cur_map].id == CONFIG_NULL)     {         if((me = pf_get_our_actor()) == NULL || me->fighting == 1) return 1; // Can't do anything without it         // Are we near a bag ?          for(i = 0; i < no_bags; i++) {              if(PF_DIFF(me->x_tile_pos, bags_list[i].x) < 2 && PF_DIFF(me->y_tile_pos, bags_list[i].y) < 2)              {                   open_bag(i);                   return 1;              }         }         if(first_node != NULL)         {                      if((first_node->time - 2000) <= time && !(first_node->k->fighting))              {                                pseudo_pf_find_path(first_node->k->x_tile_pos,                                        first_node->k->y_tile_pos);                                                    if((first_node->time) <= time) attack(first_node->k->actor_id);              }         } else {              // Time to return to base...              if(PF_DIFF(me->x_tile_pos, bot_map.map[bot_map.cur_map].x) >= 3 && PF_DIFF(me->y_tile_pos, bot_map.map[bot_map.cur_map].y) >= 3)                   if(!pseudo_pf_find_path(bot_map.map[bot_map.cur_map].x, bot_map.map[bot_map.cur_map].y)) log_error("Cannot find valid path!\n");         }                            }     return 1;}