Help returning char level ! Depending macro

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

MiDaM
Human
Human
Posts: 35
Joined: 20 Jan 2010, 09:07
Noob?: Yes

Help returning char level ! Depending macro

#1 Post by MiDaM »

hello, I try to make a macro that can trigger a macro depending on the character level
automacro quest {
run-once 1
exclusive 1
console You have died
call quest
}

macro quest {
base <= 20
call BountyOfPayon1
base = 21
call BountyOfPayon2
base = 41
call BountyOfPayon3
}
can you help me please ?
Image
SkylorD
Moderators
Moderators
Posts: 1202
Joined: 16 Dec 2011, 02:53
Noob?: Yes

Re: Help

#2 Post by SkylorD »

MiDaM wrote:hello, I try to make a macro that can trigger a macro depending on the character level
automacro quest {
run-once 1
exclusive 1
console You have died
call quest
}

macro quest {
base <= 20
call BountyOfPayon1
base = 21
call BountyOfPayon2
base = 41
call BountyOfPayon3
}
can you help me please ?
*Note : console ("<text>" | /<regexp>/) ! console You have died is wrong. Try with quotes or using slash to work with regexp.

Solution :

You could use @eval condition. Using char variable : $char->{lv} (Base) and $char->{lv_job} (Job level (Class) and not Class such as "Thief").

If you don't know how...
Check this :

http://forums.openkore.com/viewtopic.php?f=32&t=142127

Look at the macro "unstuck" and see how it returns your position. Now do this with your level.

Now do something like :

$base = @eval command to return (study)

if (arg1 <Conditions> arg2) (goto <label> | call <macro> [<n>] | stop | { )

if ($base == X) call macro

You can search for more examples.

#Note 2 : run-once 1 will run once. :O to unlock :

http://wiki.openkore.com/index.php/Macro_plugin

run-once (0 | 1)
When set to 1 the automacro will be locked after being triggered.
Use the macro command release to unlock this automacro.
May be used only once per automacro block
DEACTIVATED 8-)
MiDaM
Human
Human
Posts: 35
Joined: 20 Jan 2010, 09:07
Noob?: Yes

Re: Help returning char level ! Depending macro

#3 Post by MiDaM »

thank you a lot
Image