WARNING: Do not use this in zones where mobs which you will pass are kos to you and can kill you.
farm.mac:
Code: Select all
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| Farming
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#event Farm_looting "You have slain#*#"
#event Farm_talk "#*#tells you#*#"
Sub Main(mob,loot)
:startpoint
/doevents
/if (${Target.Name.Equal[${Me.Name}]}) {
/delay 100
/goto :startpoint
}
/squelch /target npc ${mob}
/if (!${Target.ID}) /delay 10s
/if (${Target.ID}) /call Combat
/squelch /target clear
/doevents Farm_looting
/if (!${Me.FreeInventory}) {
/beep
/endmac
}
/if (${Me.PctHPs}<80) /call MedBreak
/goto :startpoint
/return
Sub Combat
:combatloop
/if (${Target.ID}) /face fast nolook
/if (${Target.Distance}>7) {
/face fast nolook
/keypress forward hold
:moveloop
/if (${Target.ID}) /face fast nolook
/if (${Me.PctHPs}<80) /call MedBreak
/if (${Target.Distance}>7) /goto :moveloop
/keypress forward
}
/if (${Me.AbilityReady[Bash]} && !${Me.Casting.ID}) /nomodkey /keypress 1
/doevents
/if (${Target.Distance}<15 && !${Me.Combat}) /keypress q
/if (${Target.ID}) /goto :combatloop
/return
Sub Event_Farm_looting
/declare x int local
/target corpse radius 50
/delay 5
/face fast
/delay 5
/loot
/delay 2s
/for x 1 to 5
/if (${Corpse.Item[${x}].Name.Find[${loot}]} || ${Corpse.Item[${x}].Name.Find[all]}) {
/itemnotify loot${x} rightmouseup
/delay 1s
}
/next x
/delay 5
/notify LootWnd DoneButton leftmouseup
/delay 5
/target clear
/look
/if (${Me.PctHPs}<80) /call MedBreak
/return
Sub Event_Farm_talk
/beep
/beep
/if (${afkset}) {
/camp
/unload
}
/return
Sub MedBreak
/beep
/beep
/beep
/target clear
/keypress 9
/if (!${Me.Sitting}) /sit
:medloop
/if (!${Me.Sitting}) /call Combat
/delay 10
/if (!${Me.Sitting}) /sit
/delay 5s
/if (${Me.PctHPs}<95 || ${Me.PctMana}<95) /goto :medloop
/return


