On my Mellee accounts I am currently using a modified version of fight.mac. I have been trying to write a simple macro that would respond to a specific tell and assist the tell sender and initiate fight.mac, (much like Fippy did for that casterbot).
currently this is what I have been trying, dont laugh im a newb.
[/code]
#include core.mac
#include fight.mac
#chat tell
sub main
:holdingpat
/if chat=="kill this" {
/assist slaren
/call fight.mac
/tell $p0 killing %t}
/goto :holdingpat
/return
[/code]
As im sure you will see, this barely works for 1 mob. And ends macro at mobs death. Is there a way to set this macro so it will loop back to a holding pattern awaiting a new command?
Here is the fight.mac I use.
[/code]
| fight.mac
| Syntax: /macro fight.mac <ASSIST (0=none), range (1-3), tank=1 dmg=0, tracking 0=off 1=on, autoattack 0=off 1=on>
| example: /macro fight.mac larry 2 0 1 0
| Range is a multiplier of 5.
| Autoattack is mainly used for jousting in pvp (turns off attack if range >15)
#include core.mac
#turbo
#Event Enrage "has become ENRAGED."
#Event UnEnrage "is no longer enraged."
#Event Stunned "You are stunned!"
#Event Unstunned "You are unstunned."
#Event Loading "LOADING, PLEASE WAIT..."
Sub main
/if $gm==TRUE /echo GM IN ZONE!!!!
/if $p0!=0 {
/assist $p0
/delay 5
}
/varset v0 $target(name)
/varset v1 $target(id)
/varset v2 0 | enrage
/varset v3 0 | stun
/if $v0=="NULL" /goto :EndAF
/if n $p0!=0 /echo Assisting $p0 at range $p1 on $target(name) level $target(level).
/if n $p0==0 /echo Engaging at range $p1 on $target(name) level $target(level).
/attack on
:CloserAF
/if "$target(id)"!="$v1" /goto :EndAF
/doevents
/if $p4!=0 /call AutoAttack
/if $p3!=0 /call Tracking$p1
/if $p2!=0 /call AggroFunctions
/if $v3==0 /call DmgFunctions
/goto :CloserAF
:EndAF
| /echo $v0 is dead
/sendkey up Num_8
/sendkey up Num_2
/attack off
/varset v0 0
/varset v2 0
/varset v3 0
| /exp
| /mqlog EXP is $char(exp) %
/return
Sub Tracking1
/face nopredict fast
/if n $target(distance)>5 /sendkey down Num_8
/if n $target(distance)<6 /sendkey up Num_8
/return
Sub Tracking2
/face nopredict fast
/if n $target(distance)>14 /sendkey down Num_8
/if n $target(distance)<6 /sendkey down Num_2
/if n $target(distance)<15 /sendkey up Num_8
/if n $target(distance)>5 /sendkey up Num_2
/return
Sub Tracking3
/face nopredict fast
/if n $target(distance)>30 /sendkey down Num_8
/if n $target(distance)<16 /sendkey down Num_2
/if n $target(distance)<31 /sendkey up Num_8
/if n $target(distance)>15 /sendkey up Num_2
/return
Sub AggroFunctions
/if n $v3==1 /return
/if n $target(distance)>15 /return
/if n $char(ability,taunt)>0 /doability taunt
/if n $char(ability,disarm)>0 /doability disarm
/if n $char(ability,begging)>0 {
/attack off
/doability begging
/attack on
}
/return
Sub DmgFunctions
/if $v2==1 /return
/if n $char(ability,slam)>0 /doability slam
/if n $char(ability,kick)>0 /doability kick
/if n $char(ability,"flying kick")>0 /doability "flying kick"
/return
Sub AutoAttack
/if n $target(distance)>15 /attack off
/if $v2!=0 /return
/if n $target(distance)<15 /attack on
/return
Sub Event_Enrage
/if n $target(hp,pct)<25 {
/attack off
/varset v2 1
}
/return
Sub Event_UnEnrage
/attack on
/varset v2 0
/return
Sub Event_Stunned
/varset v3 1
/return
Sub Event_Unstunned
/varset v3 0
/return
Sub Event_Loading
/goto :EndAF
[/code]

