Macro system failure [All servers]

Private server support - Only post connectivity issues in the subforum!

Moderator: Moderators

Message
Author
WTFwithMacro
Noob
Noob
Posts: 2
Joined: 26 Feb 2012, 10:51
Noob?: No

Macro system failure [All servers]

#1 Post by WTFwithMacro »

So, there's problem
Regardless of which server i am playing, openkore is configured and working, but i have to use macro for using healing item

here's macro

Code: Select all

macro bla {
   hp > 50 %
   log over50
   timeout 1
}
i always get error [macro] bla error: error in 0: syntax error

and this error always occur when i wanna compare anything in macros
tried:

Code: Select all

macro bla2 {
   $var1 = $.hp
   $var2 = 1000
   $var1 > $var2
   log over50
   timeout 1
}
error: unrecognized assignment

i tried almost all combinations using $hp, hp and $.hp , none works @_@
Also tried few google'd macros, description on site says : working, openkore says "naaah"
Could you help me and make simple [ working ] macro

Code: Select all

macro whatever{
#if hp < 50 call secondmacro
}
and that's it ;F
btw, also tried on both macro plugin versions available on openkore wiki

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Macro system failure [All servers]

#2 Post by EternalHarvest »

Automacro conditions don't work in macro blocks.

There are explanations and examples in the macro plugin manual.

WTFwithMacro
Noob
Noob
Posts: 2
Joined: 26 Feb 2012, 10:51
Noob?: No

Re: Macro system failure [All servers]

#3 Post by WTFwithMacro »

I have already overrided this problem by writting plugin ;D

Code: Select all

package snk;

use strict;
use Plugins;
use Globals;
use Utils;
use Misc;
use Settings;
use Log qw(message);
use Commands;

Plugins::register("snk", "SNK Plugin", \&on_unload, \&on_reload);
my $aiHook = Plugins::addHook("AI_pre", \&on_AI);

sub on_unload {
	Plugins::delHook("AI_pre", $aiHook);
}

sub on_reload {
	&on_unload;
}

sub on_AI {
	my $hp = $char->hp_percent();
	my $cmd1 = "is 2";
	my $cmd2 = "tele";

if($hp < 85) {
Commands::run($cmd1);
}

if($hp < 70) {
Commands::run($cmd2);
sleep 1;
}

}
1;
If anyone have same problem ;D

Post Reply