How I use this script:
I simply /alias /fight /mac fight.mac
then create a hotbutton that I press every time I fight a creature ( I placed this hotkey where I usually put the special button)
an example being:
[Assist main tank hotkey]
/assist <Main Tank Name>
/fight
Code: Select all
|#- Monk Quick Fighter ver 2.1 -
|#---------------------------------------
|# Last Revision: Sept 5th 2003
|#Feature List:
|*Loops pressing a given button set below
|*Tracks your exp gain per kill
|*Attempt to position you near the target (commented out by default, remove comments if you want it)
|#*****MAJOR NOTICE: THIS MACRO WILL REQUIRE THE FILE npc.ini IN THE SAME DIRECTORY AS THE MACRO FILE!*****
sub Main
|#Purpose:Set current target to a(8,*) array
/varset a(8,0) "$target(name,clean)"
/varset a(8,1) $target(level)
/varset a(8,2) $target(name)
/varset a(8,3) $target(id)
|#Purpose:Set current EXP to v56 (used for EXP comparison sub)
/varset v56 $char(exp)
:CloserAF
/if "$target(id)"!="$a(8,3)" /goto :EndAF
|#Purpose:used for positioning, uncomment below this out if you want to auto-move
| /if n $target(distance)>10 /sendkey down up
| /if n $target(distance)<6 /sendkey down down
| /if n $target(distance)<11 /sendkey up up
| /if n $target(distance)>5 /sendkey up down
| /if n $target(distance)<11 /attack on
| /if n $target(distance)>15 /attack off
| /face fast nopredict
|#End of positioning code chunk
|#Purpose:use specials (change "Round Kick" to whichever specials you like to use, remove mend\FD if you aren't monk)
/if n $char(ability,"Round Kick")>0 /doability "Round Kick"
/if n $char(ability,"Disarm")>0 /doability "Disarm"
/if n $char(ability,"Sense Heading")>0 /doability "Sense Heading"
/if n $char(ability,"Mend")>0 {
|if below 70%hp, do mend
/if n $char(hp,pct)<70 /doability "Mend"
}
|if below 20%hp, turn off attack and FD
/if n $char(hp,pct)<20 {
/attack off
/doability "Feign Death"
/end
}
|Loop until you lose your target
/goto :CloserAF
:EndAF
|#Purpose:Target vanished, check if it dies and announce this\call exp comparison
/if $spawn($a(8,3),state)==DEAD /echo The level $a(8,1) $a(8,0) is dead...
|#Purpose: Used with positioning, Removes Sticky-Keys after mob dies
| /sendkey up up
| /sendkey up down
|#End of Sticky-Key removal
|#Purpose: Turn off attack and clear current target
/call event_exp
/attack off
/varset a(8,3) 0
/return
|#Exp Comparison Sub Event
sub event_exp
/delay 1s
/varset v57 $char(exp)
/varcalc v58 $v57-$v56
/varcalc v60 100-$char(exp)
/varcalc v59 $v60/$v58
/if n $v58>0 {
/echo and you've gained $v58% exp, bringing your total exp to $char(exp)%!!
|#Read npc.ini for any entries of last target. (comment from here to next !! area to stop INI saving)
/if n $ini(npc.ini,"$zone","$a(8,0)")=="notfound" {
/varset v74 0
} else {
/varset v74 $ini(npc.ini,"$zone","$a(8,0)")
}
/varcalc v74 $v74+1
|#Save the data in npc.ini
/ini npc.ini "$zone" "$a(8,0)" $v74
|!!
/echo Don't forget, $v60% left till level, with only $v59 of these mobs to kill.
|#display npc.ini data. (comment from here to next !! area to stop INI saving)
/if n $v74==1.00 {
/echo This is your first kill of $a(8,0) in $zone.
} else {
/echo You've have killed $a(8,0) a total of $int($v74) times in $zone.
}
|!!
/varset v73 0
} else {
|# Below handles when you don't get exp or just dinged
|# Comment it out if you don't want to hear when you didn't get exp!
/echo Exp remains at $char(exp)% after kill.
}
/return
|# Notes: Thanks to Leezard for the Fighting portion, the exp portion was really done by loadingpleasewait.
|# ap50 did a quick add of mend\FD, then lastly Valerian explained ini file manipulation.


donations for this month's patches.


