Openkore.com

OpenKore Forums
It is currently 24 Feb 2020, 22:36

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Public Heal slave Macro
PostPosted: 07 Apr 2011, 03:39 
Offline
Noob
Noob

Joined: 02 Apr 2011, 07:22
Posts: 18
author: KM

Quote:
so i wanted to make a free-for-all healer slave
################################KM autohealer########################
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 = 20000
$healStrength = 1300

if ($.lastMatch2 <= $maxHeal && $.lastMatch2 >= 1) goto amount1
if ($.lastMatch2 <= $maxHealAmount && $.lastMatch2 >= $healStrength) goto amount2
stop

:amount1
$amount = @eval ($.lastMatch2)
$amountHeal = @arg ("$amount", 1)
call heal $amountHeal
stop

:amount2
$amount = @eval ($.lastMatch2/$healStrength)
$amountHeal = @arg ("$amount", 1)
call heal $amountHeal
stop

}
}

#######################################################################
#p.s can anyone make this simpler?

Edit: Fixed somthing


Top
 Profile  
 
 Post subject: Re: Public Heal slave Macro
PostPosted: 22 Apr 2011, 14:51 
Offline
Noob
Noob

Joined: 02 Apr 2011, 07:22
Posts: 18
when ppl say:
heal= 1 heal
*help*= 1 heal
heal 9 = 9 heals
heal 19000 = heals about 19k worth

$maxHeal = max number of heals
$maxHealAmount = max heal amout someone cud ask for
$healStrength = the strength of 1 heal, << you should change this

-i also have a public buff macro but im to lazy to post it.
-any questions?


Top
 Profile  
 
 Post subject: Re: Public Heal slave Macro
PostPosted: 26 May 2011, 08:39 
Offline
Noob
Noob

Joined: 26 May 2011, 04:43
Posts: 1
Pornograffitti wrote:
when ppl say:
heal= 1 heal
*help*= 1 heal
heal 9 = 9 heals
heal 19000 = heals about 19k worth

$maxHeal = max number of heals
$maxHealAmount = max heal amout someone cud ask for
$healStrength = the strength of 1 heal, << you should change this

-i also have a public buff macro but im to lazy to post it.
-any questions?



sir, do u have warp macro?


Top
 Profile  
 
 Post subject: Re: Public Heal slave Macro
PostPosted: 18 Oct 2013, 20:10 
Offline
Noob
Noob

Joined: 04 Jun 2013, 02:17
Posts: 8
Is it possible to have heal three times per each call.
For example, when I say heal, then my priest will heal me three times.


Top
 Profile  
 
 Post subject: Re: Public Heal slave Macro
PostPosted: 15 Dec 2013, 12:55 
Offline
OpenKore Monk
OpenKore Monk

Joined: 08 Jun 2012, 15:42
Posts: 401
Location: Brazil
Replace the goto/label the if/elsif

Code:
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 = 20000
      $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
      }
   }
}

_________________
Image


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

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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