Heal/Support Others Macro

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

Moderator: Moderators

Post Reply
Message
Author
palancho
Human
Human
Posts: 39
Joined: 28 Mar 2017, 03:08
Noob?: Yes

Heal/Support Others Macro

#1 Post by palancho »

Hello guys!! I need a big help. I am trying to avoid my priest being recognized as a bot, so I would like him (being my slave) to also buff and heal others in 8 radius.
I am trying to use this macro but it does not work. Anyone good in making macros could check this out?

automacro SupportOthers {
console /\[dist=(.*)\] (.*) \((\d+)\): \*baps|buffs|buf|buff|buff me|buff pls|buff me pls|blessing|heal|heal pls|heal me|heal me pls|hela|bap|bup|hel\*$/
status Blessing
status Increase AGI
sp > 30%
run-once 1
timeout 30
exclusive 1

status Heal
sp > 80%
timeout 1


call {
$dist = $.lastMatch1
if ($dist > 8) stop

$name = $.lastMatch2
$PlayerID = $.lastMatch3

do sp 28 $PlayerID 10

do sp 34 $PlayerID 10
do sp 29 $PlayerID 10

do sp 361 $PlayerID 10
log Finish macro: SupportOthers at $.datetime

release SupportOthers
}
}

automacro SupportDead {
console /\[dist=(.*)\] (.*) \((\d+)\): \*resu|ress\*$/
status Blessing
status Increase AGI
sp > 30%
run-once 1
timeout 30
exclusive 1

call {
if (@invamount(Blue Gemstone) == 0) goto nogem

$dist = $.lastMatch1
if ($dist > 8) stop

$name = $.lastMatch2
$PlayerID = $.lastMatch3

do sp 54 $PlayerID 10
log Finish macro: SupportDead at $.datetime

:nogem
do c no gem

release SupportDead
}
}

Mortimal
Developers
Developers
Posts: 389
Joined: 01 Nov 2008, 15:31
Noob?: No

Re: Heal/Support Others Macro

#2 Post by Mortimal »

Ok let us do this line by line:

Code: Select all

automacro SupportOthers {
    console /\[dist=(.*)\] (.*) \((\d+)\): \*baps|buffs|buf|buff|buff me|buff pls|buff me pls|blessing|heal|heal pls|heal me|heal me pls|hela|bap|bup|hel\*$/
    status Blessing
    status Increase AGI
    sp > 30%
    run-once 1
    timeout 30
    exclusive 1
    status Heal
    sp > 80%
    timeout 1
    call {
        $dist = $.lastMatch1
        if ($dist > 8) stop
        $name = $.lastMatch2
        $PlayerID = $.lastMatch3
        do sp 28 $PlayerID 10
        do sp 34 $PlayerID 10
        do sp 29 $PlayerID 10
        do sp 361 $PlayerID 10
        log Finish macro: SupportOthers at $.datetime
        release SupportOthers
}
}
Why???

Code: Select all

console /\[dist=(.*)\] (.*) \((\d+)\): \*baps|buffs|buf|buff|buff me|buff pls|buff me pls|blessing|heal|heal pls|heal me|heal me pls|hela|bap|bup|hel\*$/
if u can:

Code: Select all

pubm /baps|buffs|buf|buff|buff me|buff pls|buff me pls|blessing|heal|heal pls|heal me|heal me pls|hela|bap|bup|hel/i, 8
Bullshit no such status:

Code: Select all

status Increase AGI
look into your statusnametable.txt:

Code: Select all

status Increase Agility
WAAAT?

Code: Select all

status Heal
this status not existing at all

Code: Select all

 
Useless... we are using pubm with provided distance:

Code: Select all

$dist = $.lastMatch1
if ($dist > 8) stop
$name = $.lastMatch2
$PlayerID = $.lastMatch3

Code: Select all

 
Use some random pauses m8:

Code: Select all

do sp 28 $.lastpub 10
pause @rand(1,2)
do sp 34 $.lastpub 10
pause @rand(1,2)
do sp 29 $.lastpub 10
pause @rand(1,2)
do sp 361 $.lastpub 10
pause @rand(1,2)
log Finish macro: SupportOthers at $.datetime
release SupportOthers

Edit second by yourself...
Please use pin function for uploading your file contents!

palancho
Human
Human
Posts: 39
Joined: 28 Mar 2017, 03:08
Noob?: Yes

Re: Heal/Support Others Macro

#3 Post by palancho »

Mortimal wrote:Ok let us do this line by line:

Code: Select all

automacro SupportOthers {
    console /\[dist=(.*)\] (.*) \((\d+)\): \*baps|buffs|buf|buff|buff me|buff pls|buff me pls|blessing|heal|heal pls|heal me|heal me pls|hela|bap|bup|hel\*$/
    status Blessing
    status Increase AGI
    sp > 30%
    run-once 1
    timeout 30
    exclusive 1
    status Heal
    sp > 80%
    timeout 1
    call {
        $dist = $.lastMatch1
        if ($dist > 8) stop
        $name = $.lastMatch2
        $PlayerID = $.lastMatch3
        do sp 28 $PlayerID 10
        do sp 34 $PlayerID 10
        do sp 29 $PlayerID 10
        do sp 361 $PlayerID 10
        log Finish macro: SupportOthers at $.datetime
        release SupportOthers
}
}
Why???

Code: Select all

console /\[dist=(.*)\] (.*) \((\d+)\): \*baps|buffs|buf|buff|buff me|buff pls|buff me pls|blessing|heal|heal pls|heal me|heal me pls|hela|bap|bup|hel\*$/
if u can:

Code: Select all

pubm /baps|buffs|buf|buff|buff me|buff pls|buff me pls|blessing|heal|heal pls|heal me|heal me pls|hela|bap|bup|hel/i, 8
Bullshit no such status:

Code: Select all

status Increase AGI
look into your statusnametable.txt:

Code: Select all

status Increase Agility
WAAAT?

Code: Select all

status Heal
this status not existing at all

Code: Select all

 
Useless... we are using pubm with provided distance:

Code: Select all

$dist = $.lastMatch1
if ($dist > 8) stop
$name = $.lastMatch2
$PlayerID = $.lastMatch3

Code: Select all

 
Use some random pauses m8:

Code: Select all

do sp 28 $.lastpub 10
pause @rand(1,2)
do sp 34 $.lastpub 10
pause @rand(1,2)
do sp 29 $.lastpub 10
pause @rand(1,2)
do sp 361 $.lastpub 10
pause @rand(1,2)
log Finish macro: SupportOthers at $.datetime
release SupportOthers

Edit second by yourself...
Mortimal, You seem MACROGOD ;) I am just a beginner :) Thanks a lot!!!
I got some questions according to some lines of this script you remade:


automacro SupportOthers {
pubm /baps|buffs|buf|buff|buff me|buff pls|buff me pls|blessing|heal|heal pls|heal me|heal me pls|hela|bap|bup|hel/i, 8
status Blessing
status Increase Agility
sp > 30%
run-once 1
timeout 30
exclusive 1


status Heal
sp > 80%
timeout 1
<--- I don't know which status should I use to make bot to heal someone when his/her hp is not full and my sp is higher than proper amount


call {
$dist = $.lastMatch1
if ($dist > 8) stop

$name = $.lastMatch2
$PlayerID = $.lastMatch3
<----- so this lines are totally useless or I need to write it using pubm? Seems you have already provided distance in first line of script in pubm, but I am just asking, couse I am not sure :)

do sp 28 $.lastpub 10
pause @rand(1,2)
do sp 34 $.lastpub 10
pause @rand(1,2)
do sp 29 $.lastpub 10
pause @rand(1,2)
do sp 361 $.lastpub 10
pause @rand(1,2)
log Finish macro: SupportOthers at $.datetime
release SupportOthers
}

Mortimal
Developers
Developers
Posts: 389
Joined: 01 Nov 2008, 15:31
Noob?: No

Re: Heal/Support Others Macro

#4 Post by Mortimal »

delete:

Code: Select all

 status Heal

Code: Select all

timeout 1

Code: Select all

$dist = $.lastMatch1
if ($dist > 8) stop

$name = $.lastMatch2
$PlayerID = $.lastMatch3
no such thing:
I don't know which status should I use to make bot to heal someone when his/her hp is not full and my sp is higher than proper amount
macro will only run when player pub message
Please use pin function for uploading your file contents!

palancho
Human
Human
Posts: 39
Joined: 28 Mar 2017, 03:08
Noob?: Yes

Re: Heal/Support Others Macro

#5 Post by palancho »

Thank You Mortimal!!!
So after edit it looks like that:


automacro SupportOthers {
pubm /baps|buffs|buf|buff|buff me|buff pls|buff me pls|blessing|heal|heal pls|heal me|heal me pls|hela|bap|bup|hel/i, 8
status Blessing
status Increase Agility
sp > 30%
run-once 1
timeout 30
exclusive 1

call {
do sp 28 $.lastpub 10
pause @rand(1,2)
do sp 34 $.lastpub 10
pause @rand(1,2)
do sp 29 $.lastpub 10
pause @rand(1,2)
do sp 361 $.lastpub 10
pause @rand(1,2)
log Finish macro: SupportOthers at $.datetime
release SupportOthers
}
}


This macro also heal? If not is there possible to merge it with this macro, or use them both in same time?, of course would be gr8 if You check it for errors:

automacro autoheal2 {
pubm /h(eal|il)/i, 8
call heal
}

macro heal {
do sp 28 $.lastpub
}

automacro autoheal {
pubm /h(eal|il) (\d+)/i, 8
call {
$maxHeal = 6
$maxHealAmount = 10000
$healStrength = 1400

if ($.lastMatch2 <= $maxHeal && $.lastMatch2 >= 1) {
$amount = @eval ($.lastMatch2)
$amountHeal = @arg ("$amount", 1)
call heal $amountHeal
} elsif ($.lastMatch2 <= $maxHealAmount && $.lastMatch2 >= $healStrength) {
$amount = @eval ($.lastMatch2/$healStrength)
$amountHeal = @arg ("$amount", 1)
call heal $amountHeal
}
}
}

This is my second macro editing/making attempt after making a macro for quivers crafting :) Quivers crafting was easy in comparison to this one :) Thx Mortimal for help, Boss.

Edit 2: Ok, I figured out this first macro also heal, but one time?:
do sp 28 $.lastpub 10 (by adding more same lines I can force bot to heal multiple times?).
Would be gr8 to have this second macro (heal) to work, couse it got much bigger potential I think.
Gonna check all the macros tomorrow, couse now is server down time ;)

palancho
Human
Human
Posts: 39
Joined: 28 Mar 2017, 03:08
Noob?: Yes

Re: Heal/Support Others Macro

#6 Post by palancho »

None of this macros after editing by me work:/
I am beginner; anyone could help me to make them work please?

Other healing macro, it only heal once, and it should heal for max amount, or to full hp I think:

automacro autoheal2{
pubm /h(eal|il)/i
call heal
}

macro heal{
do sp 28 $.lastpub
}

automacro autoheal{
pubm /h(eal|il) (\d+)/i
call {
$maxHeal = 10
$maxHealAmount = 10000
$healStrength = 1300

if ($.lastMatch2 <= $maxHeal && $.lastMatch2 >= 1) {
$amount = @eval ($.lastMatch2)
$amountHeal = @arg ("$amount", 1)
call heal $amountHeal
} elsif ($.lastMatch2 <= $maxHealAmount && $.lastMatch2 >= $healStrength) {
$amount = @eval ($.lastMatch2/$healStrength)
$amountHeal = @arg ("$amount", 1)
call heal $amountHeal
}
}
}


And this macro for buffing and 1 time heal does not work too :/ I don't know how to edit them :/

Mortimal
Developers
Developers
Posts: 389
Joined: 01 Nov 2008, 15:31
Noob?: No

Re: Heal/Support Others Macro

#7 Post by Mortimal »

Openkore does not know how many hp other players have...
This is right it heals 1 time:

Code: Select all

automacro autoheal2{
pubm /h(eal|il)/i
call heal
}

macro heal{
do sp 28 $.lastpub
}
use dis regex in second:

Code: Select all

pubm /h(eal|il).*(\d+)/i
Please use pin function for uploading your file contents!

palancho
Human
Human
Posts: 39
Joined: 28 Mar 2017, 03:08
Noob?: Yes

Re: Heal/Support Others Macro

#8 Post by palancho »

Mortimal wrote:Openkore does not know how many hp other players have...
This is right it heals 1 time:

Code: Select all

automacro autoheal2{
pubm /h(eal|il)/i
call heal
}

macro heal{
do sp 28 $.lastpub
}
use dis regex in second:

Code: Select all

pubm /h(eal|il).*(\d+)/i
Hello!! I manage to make two simple macros one for buff and one for heal :) I also made macro for no mana respond when on low mana and one macro for pub respond when someone says I am botting :P
But, I am in the beginning of macro learning process, so...:

what is the difference between:
pubm /h(eal|il)/i and pubm /h(eal|il).*(\d+)/i ?
Big thx Mortimal once again!!! :)

OMG:( when I was trying this heal and buff macro in town it was working, now I got this errors, please help :(

Errors:

Syntax error in function 'sp' (Use Skill on Player)
Usage: sp <skill #> <player #> [level]
Syntax error in function 'sp' (Use Skill on Player)
Usage: sp <skill #> <player #> [level]
Syntax error in function 'sp' (Use Skill on Player)
Usage: sp <skill #> <player #> [level]
Syntax error in function 'sp' (Use Skill on Player)
Usage: sp <skill #> <player #> [level]

Macro:

automacro autoheal{
pubm /h(eal|il)/i
sp > 50%
timeout 30
call heal
}

macro heal{
pause @rand(1,2)
do sp 28 $.lastpub
pause @rand(1,2)
do sp 28 $.lastpub
pause @rand(1,2)
do sp 28 $.lastpub
pause @rand(1,2)
do sp 28 $.lastpub
pause @rand(1,2)
}


and now I also got this error:

error loading control\macros.txt.

:(

EDIT: FIXED!!! had to use: "$.lastpub" instead of $.lastpub

Post Reply