# Based off of warrior1, either attack or replicate each round, alternatively. # If we can't replicate, set up a 5 round timer. ;predecl my $state = 0; my $counter = 5; ;main if ($state == 0) { if (!defined &JProcRoutines::Replicate) { $counter = 5; $state = 1; } } else { # Check other warriors my $warriors = JProcRoutines::FindEnemyWarriors; if (keys %$warriors > 0) { my $rand_enemy = (keys %$warriors)[rand(keys %$warriors)]; &JProcRoutines::Hit($rand_enemy); } } $counter--; if ($counter < 1) { if ($state) { $state = 0 } else { $state = 1; } }