OK mate I'll post something asap. In fact heres a start.
Code: Select all
#define NoLOS v38
#define TooFarAway v39
#define TargetDead v40
#event CannotSee "You cannot see your target"
#event TooFar "Your target is too far away"
sub main
/assist $p0
/mqlog Started melee on $target(name,clean)
/varset TargetDead 0
/stand
/attack on
:Combat
| Check events
/doevents flush
| Make sure were staring the critter out
/face nopredict
/if $char(ability,"Sense Heading")>0 /doability "Sense Heading"
| If we are too far away close in
/if n $target(distance)>15 {
/face nopredict
/delay 2
/call autorun2 1
/mqlog $target(distance,nopredict) from $target(name)
}
| If we are in melee range stop running
/if n $target(distance)<15 {
/call autorun2 0
/delay 2
/face fast nopredict
/mqlog In melee with $target(name) at $target(hp,pct) I am at $char(hp,pct)
}
/doevents
| If we cannot see the target backup and face it again.
/if n $NoLOS==1 {
/mqlog Cannot see
/face nopredict
/sendkey down down
/delay 4
/sendkey up down
/varset NoLOS 0
/delay 3
}
| If we are too far away close in
/if n $TooFarAway==1 {
/face nopredict
/delay 2
/call autorun2 1
/varset TooFarAway 0
}
/if $char(ability,"Kick")>0 /doability "Kick"
/if $char(ability,"Slam")>0 /doability "Slam"
/if $char(ability,"Taunt")>0 /doability "Taunt"
/if $char(ability,"Begging")>0 {
/attack off
/doability "Begging"
/attack on
}
/if $char(ability,"Disarm")>0 /doability "Disarm"
| Check if target is dead or we have lost it
/if n $target(id)==0 /varset TargetDead 1
/if "$target(name)"~~"corpse" /varset TargetDead 1
| If target is still alive keep at it
/if n $TargetDead!=1 /goto :Combat
| Target is dead so stop attacking
/attack off
/return
Sub AutoRun2
/if $p0==1 /sendkey down up
/if $p0==0 /sendkey up up
/return
sub Event_TooFar
/varset TooFarAway 1
/return
sub Event_CannotSee
/varset NoLOS 1
/return
Dump this in your macros directory. Set up a macro button or alias with /macro kill <name of master>
Then when your master character has a mob targeted hit the macro button on your warrior pet and hell assist the master then melee the target until dead. It will also do Sense Heading, Kick, Slam, Taunt, Begging and Disarm during the fight. Begging and Disarm are great taunts btw.
Ill try and add some chat events to respond to tells later on today.