Feedme.mac v1.4
Posted: Tue Aug 31, 2004 1:24 pm
The text at the top of the macro says it all. All you have to do is change the /declare myfood and mydrink lines to reflect the food you want to eat, and the drink you want to drink. Really simple and efficient.
If you don't have your food/drink in pack1 like I do, this macro won't automagically close the bag for you. If its in pack1 though, it'll open the bag, snag the food, and then put the food in your pack1 slot, closing the bag as a result. The whole thing happens so fast, about the only thing that lets you know its working is the sound of the packs opening/closing
Fixes:
11/4 Final update for now. I may revisit this and add ini support, but nowhere in the near future. All I did this time around was define separate Subs for the eating and drinking thresholds.
11/2 Cleaned up some things based on Cr4zyb4rd's suggestions.
11/1 Did away with the /delay before looping and now it just checks Me.Hunger and Thirst and attempts to eat/drink if it goes below 5000 on either. I should probably rewrite it to eat or drink based on which is below 5000, but what can I say? I'm lazy
9/3 Fixed bug that was causing 'mouseup' errors due to attempting to open bags while casting. Also added an extra /autoinventory and dropped the delay to 90 seconds at the end to bag any forages picked up since the last time the macro fired; mainly due to using Cr4zyb4rd's autoskills plugin along with this one; leaving me with a massive amount of foraged goodies on my cursor.
Known issues:
None, feel free to add suggestions on how to clean it up though
If you don't have your food/drink in pack1 like I do, this macro won't automagically close the bag for you. If its in pack1 though, it'll open the bag, snag the food, and then put the food in your pack1 slot, closing the bag as a result. The whole thing happens so fast, about the only thing that lets you know its working is the sound of the packs opening/closing
Fixes:
11/4 Final update for now. I may revisit this and add ini support, but nowhere in the near future. All I did this time around was define separate Subs for the eating and drinking thresholds.
11/2 Cleaned up some things based on Cr4zyb4rd's suggestions.
11/1 Did away with the /delay before looping and now it just checks Me.Hunger and Thirst and attempts to eat/drink if it goes below 5000 on either. I should probably rewrite it to eat or drink based on which is below 5000, but what can I say? I'm lazy
9/3 Fixed bug that was causing 'mouseup' errors due to attempting to open bags while casting. Also added an extra /autoinventory and dropped the delay to 90 seconds at the end to bag any forages picked up since the last time the macro fired; mainly due to using Cr4zyb4rd's autoskills plugin along with this one; leaving me with a massive amount of foraged goodies on my cursor.
Known issues:
None, feel free to add suggestions on how to clean it up though
Code: Select all
Sub Main
:mainloop
/if (${Me.Casting.ID}) /goto :mainloop
/if (${Me.Hunger}<=5000) /call EatMe
/if (${Me.Thirst}<=5000) /call DrinkMe
/goto :mainloop
/return
Sub EatMe
/declare myfood string local Rye of Eternity
/declare mypack string local
/declare myslot string local
/varset mypack ${FindItem[=${myfood}].InvSlot.Pack}
/varset myslot ${FindItem[=${myfood}].InvSlot}
:clearcursor
/autoinventory
/if (${Cursor.ID}) /goto :clearcursor
/if (${mypack}) {
/if (!${Window[${InvSlot[${mypack}].Name}].Open}) /nomodkey /itemnotify ${mypack} rightmouseup
}
:WaitForBagOpen
/nomodkey /ctrl /itemnotify ${myslot} leftmouseup
/if (!${Cursor.ID}) /goto :WaitForBagOpen
/nomodkey /itemnotify pack1 leftmouseup
/nomodkey /itemnotify pack1 rightmouseup
/nomodkey /itemnotify pack1 leftmouseup
/return
Sub DrinkMe
/declare mydrink string local Water of Eternity
/declare mypack string local
/declare myslot string local
/varset mypack ${FindItem[=${mydrink}].InvSlot.Pack}
/varset myslot ${FindItem[=${mydrink}].InvSlot}
:clearcursor
/autoinventory
/if (${Cursor.ID}) /goto :clearcursor
/if (${mypack}) {
/if (!${Window[${InvSlot[${mypack}].Name}].Open}) /nomodkey /itemnotify ${mypack} rightmouseup
}
:WaitForBagOpen
/nomodkey /ctrl /itemnotify ${myslot} leftmouseup
/if (!${Cursor.ID}) /goto :WaitForBagOpen
/nomodkey /itemnotify pack1 leftmouseup
/nomodkey /itemnotify pack1 rightmouseup
/nomodkey /itemnotify pack1 leftmouseup
/return