Openkore.com

OpenKore Forums
It is currently 24 Oct 2017, 07:02

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Heal/Support Others Macro
PostPosted: 20 Apr 2017, 03:20 
Offline
Human
Human

Joined: 28 Mar 2017, 03:08
Posts: 39
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
}
}


Top
 Profile  
 
 Post subject: Re: Heal/Support Others Macro
PostPosted: 20 Apr 2017, 06:07 
Offline
Developers
Developers

Joined: 01 Nov 2008, 15:31
Posts: 333
Ok let us do this line by line:

Code:
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:
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:
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:
status Increase AGI

look into your statusnametable.txt:
Code:
status Increase Agility


WAAAT?
Code:
status Heal

this status not existing at all
Code:


Useless... we are using pubm with provided distance:
Code:
$dist = $.lastMatch1
if ($dist > 8) stop
$name = $.lastMatch2
$PlayerID = $.lastMatch3

Code:


Use some random pauses m8:
Code:
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!


Top
 Profile  
 
 Post subject: Re: Heal/Support Others Macro
PostPosted: 20 Apr 2017, 07:55 
Offline
Human
Human

Joined: 28 Mar 2017, 03:08
Posts: 39
Mortimal wrote:
Ok let us do this line by line:

Code:
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:
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:
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:
status Increase AGI

look into your statusnametable.txt:
Code:
status Increase Agility


WAAAT?
Code:
status Heal

this status not existing at all
Code:


Useless... we are using pubm with provided distance:
Code:
$dist = $.lastMatch1
if ($dist > 8) stop
$name = $.lastMatch2
$PlayerID = $.lastMatch3

Code:


Use some random pauses m8:
Code:
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
}


Top
 Profile  
 
 Post subject: Re: Heal/Support Others Macro
PostPosted: 20 Apr 2017, 08:37 
Offline
Developers
Developers

Joined: 01 Nov 2008, 15:31
Posts: 333
delete:
Code:
status Heal

Code:
timeout 1

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

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


no such thing:
Quote:
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!


Top
 Profile  
 
 Post subject: Re: Heal/Support Others Macro
PostPosted: 20 Apr 2017, 08:57 
Offline
Human
Human

Joined: 28 Mar 2017, 03:08
Posts: 39
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 ;)


Top
 Profile  
 
 Post subject: Re: Heal/Support Others Macro
PostPosted: 21 Apr 2017, 03:11 
Offline
Human
Human

Joined: 28 Mar 2017, 03:08
Posts: 39
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 :/


Top
 Profile  
 
 Post subject: Re: Heal/Support Others Macro
PostPosted: 21 Apr 2017, 07:24 
Offline
Developers
Developers

Joined: 01 Nov 2008, 15:31
Posts: 333
Openkore does not know how many hp other players have...
This is right it heals 1 time:
Code:
automacro autoheal2{
pubm /h(eal|il)/i
call heal
}

macro heal{
do sp 28 $.lastpub
}


use dis regex in second:
Code:
pubm /h(eal|il).*(\d+)/i

_________________
Please use pin function for uploading your file contents!


Top
 Profile  
 
 Post subject: Re: Heal/Support Others Macro
PostPosted: 21 Apr 2017, 10:51 
Offline
Human
Human

Joined: 28 Mar 2017, 03:08
Posts: 39
Mortimal wrote:
Openkore does not know how many hp other players have...
This is right it heals 1 time:
Code:
automacro autoheal2{
pubm /h(eal|il)/i
call heal
}

macro heal{
do sp 28 $.lastpub
}


use dis regex in second:
Code:
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group