generateRandStr(6); // --- 1. Normalizare trupe t1..t11 (păstrăm exact logica originală) --- $t = []; for ($i = 1; $i <= 11; $i++) { $key = 't' . $i; $t[$i] = (isset($process[$key]) && $process[$key] !== '') ? $process[$key] : 0; } // --- 2. Detectare scout / hero (exact ca originalul) --- $scout = 0; if (!empty($t[3]) && $session->tribe == 3) { $scout = 1; } if (!empty($t[4]) && in_array($session->tribe, [1,2,4,5])) { $scout = 1; } $showhero = !empty($t[11]) ? 1 : 0; // --- 3. Total unități fără cercetași (pentru forțarea tipului de atac) --- $totalunits = 0; for ($i = 1; $i <= 11; $i++) { $isScout = ($session->tribe == 3 && $i == 3) || ($session->tribe != 3 && $i == 4); if (!$isScout) { $totalunits += (!empty($process['t'.$i]) ? (int)$process['t'.$i] : 0); } } // Dacă sunt doar cercetași și nu e întărire, forțează c=1 (Scout) if ($scout == 1 && $totalunits == 0 && $process['c'] != 2) { $process['c'] = 1; } // --- 4. Salvare în a2b (aceeași ordine de parametri) --- $id = $database->addA2b( $ckey, time(), $process['0'], $t[1], $t[2], $t[3], $t[4], $t[5], $t[6], $t[7], $t[8], $t[9], $t[10], $t[11], $process['c'] ); $actionTypes = [1 => 'Scout', 2 => 'Reinforcement', 3 => 'Normal attack', 4 => 'Raid']; $actionType = $actionTypes[(int)$process['c']] ?? 'Normal attack'; $uid = $session->uid; $tribe = $session->tribe; $start = ($tribe - 1) * 10 + 1; $end = $tribe * 10; $hasHero = !empty($process['t11']); $colspan = $hasHero ? 11 : 10; $kata = !empty($process['t8']); ?>

Destination: (|)
Owner: getUserField($process['2'], 'username', 0); ?>
' . $technology->getUnitName($i) . ''; } if ($hasHero) { echo ''; } ?> ' . $process['t11'] . ''; } ?> getWalkingTroopsTime($village->wid, $process[0], $session->uid, $session->tribe, $process, 1, 't'); $time = $database->getArtifactsValueInfluence($session->uid, $village->wid, 2, $troopsTime); ?>
Hero
Troops 0'; } else { echo '>' . $process['t'.$i]; } ?>
Options Scout resources and troops
Scout defences and troops
Destination: getTypeLevel(16) == 20 && $process['t8'] >= 20): ?> (will be attacked by catapult(s))
Destination: Warning: Catapult will ONLY shoot with a normal attack (they dont shoot with raids!)
Arrived:
in getTimeFormat($time); ?>
at procMtime(date('U') + $time, 9) ?> hours
hasBeginnerProtection($village->wid) == 1 && $database->hasBeginnerProtection($process['0']) == 0) { echo 'Caution: Attacking a player will lose the protection!'; } if ($database->hasBeginnerProtection($process['0']) == 1) { echo 'User presently has beginners protection'; } else { ?>