Well, got something working here. Isn't perfect because, if the first hit triggers a Stance, it takes about 1.5 seconds to start working. Otherwise, it's flaweless:
config.txt (mode Automatic - autoAttack 0)
Code:
attackComboSlot 413 {
afterSkill Tornado Stance
waitBeforeUse 0.18
sp > 14
}
attackComboSlot 415 {
afterSkill Heel Drop Stance
waitBeforeUse 0.18
sp > 14
}
attackComboSlot 417 {
afterSkill Roundhouse Stance
waitBeforeUse 0.18
sp > 14
}
attackComboSlot 419 {
afterSkill Counterkick Stance
waitBeforeUse 0.18
sp > 14
}
macro.txt (I wish this guy was faster... this is the cause of the 1.5sec delay, even with "macro_delay 0")
Code:
automacro Attack {
console /[a-zA-Z]* You attacked [a-zA-Z]*/
call {
$x = monsterIndex("$.lastLogMsg")
do a $x
}
}
sub monsterIndex {
my ($phrase) = @_;
my @words = split /\(/, $phrase;
my @words2 = split /\)/, @words[1];
return @words2[0];
}
automacro kick_Turn {
console "You used Roundhouse Stance on yourself (Level: 1)"
call {
do ss 417
}
}
automacro kick_Down {
console "You used Heel Drop Stance on yourself (Level: 1)"
call {
do ss 415
}
}
automacro kick_Storm {
console "You used Tornado Stance on yourself (Level: 1)"
call {
do ss 413
}
}
automacro kick_Counter {
console "You used Counterkick Stance on yourself (Level: 1)"
call {
do ss 419
}
}
eventMacro.txt
Code:
automacro AttackTarget {
SimpleHookEvent target_attack
call {
$x = monsterIndex("$.SimpleHookEventLastID")
do a $x
}
}
sub monsterIndex {
my ($phrase) = @_;
my @words = split /\(/, $phrase;
my @words2 = split /\)/, @words[1];
return @words2[0];
}
automacro Prepare_Whirlwind_Kick {
SimpleHookEvent Prepare_Whirlwind_Kick
CurrentSP >= 2
call {
do ss 413
}
}
automacro Prepare_Axe_Kick {
SimpleHookEvent Prepare_Axe_Kick
CurrentSP >= 2
call {
do ss 415
}
}
automacro Prepare_Round_Kick {
SimpleHookEvent Prepare_Round_Kick
CurrentSP >= 2
call {
do ss 417
}
}
automacro Prepare_Counter_Kick {
SimpleHookEvent Prepare_Counter_Kick
CurrentSP >= 2
call {
do ss 419
}
}
Main.pm (only if you use the eventMacros.txt)
Code:
#Search for this method
sub attack_string {
my ($source, $target, $damage, $delay) = @_;
assert(UNIVERSAL::isa($source, 'Actor')) if DEBUG;
assert(UNIVERSAL::isa($target, 'Actor')) if DEBUG;
#Add this block of code
if($source->nameString eq "You")
{
Plugins::callHook("target_attack", {ID => $target});
}
#End of add
return TF("%s %s %s (Dmg: %s) (Delay: %sms)\n",
$source->nameString,
$source->verb(T('attack'), T('attacks')),
$target->nameString($source),
$damage, $delay);
}