i'm a noob in macro want to ask. i tried first aid using macro for my novice
{
:chhp
do ss 142
if (@eval(return $::char->{hpPercent}) < 70 && @eval(return $::char->{spPercent}) > 2) goto chhp
}
i want to stop it if get attacked. help me and thx.
stop loop when attack
Moderator: Moderators
-
- The Way Of Human
- Posts: 150
- Joined: 24 Mar 2012, 04:13
- Noob?: Yes
-
- Human
- Posts: 25
- Joined: 03 Dec 2009, 12:30
- Noob?: No
Re: stop loop when attack
How are you triggering your macro?
or When do you want your character to use first aid?
From your conditions in your macro I can see that you want to trigger first aid when:
hp < 70%
sp > 2%
no monsters are attacking you
You could try something like this:
Note: This is the first time I tried using a timeout less than 1. Tell me if it works
Otherwise set it to 1?
automacro useFirstAid {
timeout 0.5
hp < 70%
sp > 2%
aggressives == 0
call {
do ss 142
}
}
For more information on conditions and automacros try checking out the Macro manual
wiki.openkore.com/index.php/Macro_plugin
/no1
or When do you want your character to use first aid?
From your conditions in your macro I can see that you want to trigger first aid when:
hp < 70%
sp > 2%
no monsters are attacking you
You could try something like this:
Note: This is the first time I tried using a timeout less than 1. Tell me if it works

automacro useFirstAid {
timeout 0.5
hp < 70%
sp > 2%
aggressives == 0
call {
do ss 142
}
}
For more information on conditions and automacros try checking out the Macro manual
wiki.openkore.com/index.php/Macro_plugin
/no1
-
- The Way Of Human
- Posts: 150
- Joined: 24 Mar 2012, 04:13
- Noob?: Yes
Re: stop loop when attack
automacro aidfirst {
priority 5
aggressives == 0
hp < 42%
sp > 10%
macro_delay 0.01
exclusive 1
call {
:chhp
do ss 142
if (@eval(return $::char->{hpPercent}) < 70 && @eval(return $::char->{spPercent}) > 2) goto chhp
}
}
that's mine.
the problem is how to stop it when get attack after trigerred???
i've tried using config useSelf_skill, it's funny to see bot sit then firstaid then sit then firstaid...because run out sp, so i try using macro. ( yeah i'm noob )
priority 5
aggressives == 0
hp < 42%
sp > 10%
macro_delay 0.01
exclusive 1
call {
:chhp
do ss 142
if (@eval(return $::char->{hpPercent}) < 70 && @eval(return $::char->{spPercent}) > 2) goto chhp
}
}
that's mine.
the problem is how to stop it when get attack after trigerred???
i've tried using config useSelf_skill, it's funny to see bot sit then firstaid then sit then firstaid...because run out sp, so i try using macro. ( yeah i'm noob )
-
- Moderators
- Posts: 1202
- Joined: 16 Dec 2011, 02:53
- Noob?: No
- Location: Brazil
Re: stop loop when attack
Don't know if this are correct, i don't have time to read Commands.pm or Misc.pm in search for the correct variable, but i remember only this :
2º :
Misc.pm
3º :
Or simply, you can configure monster not acordding monster name with commas :
Code: Select all
automacro aidfirst {
priority 5
aggressives == 0
hp < 42%
sp > 10%
macro_delay 0.01
exclusive 1
call {
$hPercent = @eval (return $::char->{hpPercent})
$sPercent = @eval (return $::char->{spPercent})
if (@eval(return $::dmgFrom) == 0) goto chhp
:chhp
while ($hPercent < 70 && $sPercent > 2) as loop
do ss 142
end loop
}
}
Misc.pm
According with this tip :# If monster attacked/missed you
return 1 if ($monster->{'dmgToYou'} || $monster->{'missedYou'});
Code: Select all
automacro aidfirst {
priority 5
aggressives == 0
hp < 42%
sp > 10%
macro_delay 0.01
exclusive 1
call {
$hPercent = @eval (return $::char->{hpPercent})
$sPercent = @eval (return $::char->{spPercent})
$damage = @eval (return $::dmgToYou)
if ($damage == 0) goto chhp
:chhp
while ($hPercent < 70 && $sPercent > 2) as loop
do ss 142
end loop
}
}
Or simply, you can configure monster not acordding monster name with commas :
4º :monster not Monster that appears in your route or walk
As condition, of course.eval $dmgToYou == 0
Learn rules
-
- The Way Of Human
- Posts: 150
- Joined: 24 Mar 2012, 04:13
- Noob?: Yes
Re: stop loop when attack
thanks.
trying
