For everything NOT server specific support. Do NOT ask for connectivity help here! .
Moderator: Moderators
nyak00
Noob
Posts: 13 Joined: 15 Apr 2012, 02:35
Noob?: No
#1
Post
by nyak00 » 02 Jun 2012, 00:28
hello there, im making a macro that uses mconf commands but the kore doesn't detect the macro.. I cant find whats wrong.. Can you help me with this?
Code: Select all
macro mymacro {
$hp = $.hp
$mp = $.mp
$lowhp = @eval($hp*0.25)
$highhp = @eval($hp*0.55)
$lowmp = @eval($mp*0.25)
$highmp = @eval($mp*0.45)
if ($hp >= $highhp && $mp >= $highmp) goto one
if ($hp <= $lowhp && $mp <= $lowmp) goto two
if ($hp >= $highhp && $mp <= $lowmp) goto two
if ($hp <= $lowhp && $mp >= $highmp) goto two
:one
do mconf Magmaring 2
do reload mon_control
do stand
:two
do mconf Magmaring 0
do reload mon_control
do sit
}
Kaspy
Halfway to Eternity
Posts: 398 Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil
#2
Post
by Kaspy » 09 Jun 2012, 19:14
[EN] This is all your macro? It would not be because they lack a automacro to call it?
[PT-BR] Essa é toda a sua macro? Não seria porque falta uma automacro para chama-la?
nyak00
Noob
Posts: 13 Joined: 15 Apr 2012, 02:35
Noob?: No
#3
Post
by nyak00 » 12 Jun 2012, 11:21
KeplerBR wrote: [EN] This is all your macro? It would not be because they lack a automacro to call it?
Hey there KeplerBR, yeah silly me.. but on my macros.txt its an automacro.. still, kore doesn't detect this macro and I keep getting this "munch munch" message..
SkylorD
Moderators
Posts: 1166 Joined: 16 Dec 2011, 02:53
Noob?: No
Location: Brazil
Contact:
#4
Post
by SkylorD » 12 Jun 2012, 19:35
Post your other macro here.
"Munch munch strange?" You don't said this.
Learn rules
Kaspy
Halfway to Eternity
Posts: 398 Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil
#5
Post
by Kaspy » 14 Jun 2012, 12:42
nyak00 wrote: KeplerBR wrote: [EN] This is all your macro? It would not be because they lack a automacro to call it?
Hey there KeplerBR, yeah silly me.. but on my macros.txt its an automacro.. still, kore doesn't detect this macro and I keep getting this "munch munch" message..
[EN] Do not quite understand what you mean...
Try calling your macro this with a simple automacro
[PT-BR]
Não entendi muito bem o que quis dizer...
Tente chamar essa sua macro com um automacro simples
nyak00
Noob
Posts: 13 Joined: 15 Apr 2012, 02:35
Noob?: No
#6
Post
by nyak00 » 23 Jun 2012, 15:52
Hey there, I've edited a few on my macro, now the message is
mymacro.call error: error in 6: syntax error in if statement.
I wonder what's wrong here, can u help me?
Code: Select all
automacro mymacro {
location ve_fild03
timeout 30
call {
$hp = $.hp
$mp = $.mp
$lowhp = @eval ($hp*0.25)
$highhp = @eval ($hp*0.55)
$lowmp = @eval ($mp*0.25)
$highmp = @eval ($mp*0.45)
if ($hp >= $highhp && $mp >= $highmp) goto one
if (($hp <= $lowhp && $mp <= $lowmp) || ($hp >= $highhp && $mp <= $lowmp) || ($hp <= $lowhp && $mp >= $highmp)) goto two
:one
do mconf Magmaring 2 0 1 1
do reload mon_control
do stand
release mymacro
:two
do mconf Magmaring 1 0 1 1
do reload mon_control
do sit
release mymacro
}
}
SkylorD
Moderators
Posts: 1166 Joined: 16 Dec 2011, 02:53
Noob?: No
Location: Brazil
Contact:
#7
Post
by SkylorD » 24 Jun 2012, 23:43
http://openkore.com/index.php/Macro#IF_statement
Note² : If statements are unlimited, you can use as many statements as you want.
if (arg1 <Conditions> arg2 || arg3 <Conditions> arg4 || ... || argN <Conditions> argN+1) (goto <label> | call <macro> <n> | stop)
Learn rules
nyak00
Noob
Posts: 13 Joined: 15 Apr 2012, 02:35
Noob?: No
#9
Post
by nyak00 » 26 Jun 2012, 11:47
EternalHarvest wrote: Print your whole condition with "log" and check if it looks right.
How do i print my condition? Sorry if i ask too much, I'm new w/ macros.. I'm having a hard time with if statements..