MakeDinner.mac (Ver 1.0 Updated 6-6-2005)

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

jaq
a ghoul
a ghoul
Posts: 148
Joined: Fri Mar 12, 2004 8:29 am

MakeDinner.mac (Ver 1.0 Updated 6-6-2005)

Post by jaq » Wed Jun 08, 2005 3:24 pm

Simple mac I put together to automate the summoning of food and drinks with my cleric. See the macro comments for help and usage.

Comments and suggestions welcome.

enjoy

--jaq

Code: Select all


|--------------------------------------------------------------------------------------------------------------------------|
| MakeDinner.mac -- Ver 1.0 -- Written by Jaq -- 06/01/2005                                                                |
| This is a simple macro that will summon food and drink.  It will also remem your original spell when done.               |
| Usage: /mac MakeDinner <NumFood> <NumDrink>  -- If no params are given it will default to 20 of each.                    |
| Requires: spell_rouitines.inc                                                                                            |
| You may customize this macro for your needs.  It is currently set up for a cleric with abundant food and drink.          |
| You can change the default declares as follows:                                                                          |
|   FoodAmt: Default number of foods to summon if no params given.                                                         |
|   DrinkAmt:  Default number of drinks to summon if no params given.                                                      |
|   Foodspell: What spell to use to summon foods.                                                                          |
|   DrinkSpell:  What spell to use to summon drinks.                                                                       |
|   FoodCastAmt:  How many foods does the specified food spell summon.                                                     |
|   DrinkCastAmt:  How Many drinks does teh specified drink spell summon.                                                  |
|   GemSlot:  What gem slot should be used to to mem the spells.                                                           |
|                                                                                                                          |
| Note: I do not play a mage, but am aware they may have 1 spell that summons both.  I would like to add code for that     |
| if someone can provide some simple info on how the spell works for mages, or if this would even be useful.               |
|                                                                                                                          |
| Macro inspired by MQ2FeedMe ~ cuz now I have a good reason to have some free food on me ~ thanks for that plug.          |
|                                                                                                                          |
| -- Jaq                                                                                                                   |
|--------------------------------------------------------------------------------------------------------------------------|

#include spell_routines.inc

Sub Main

|--------------- Customizable Declares ----------------------|
   /declare  FoodAmt        int outer 20
   /declare  DrinkAmt       int outer 20
   /declare  FoodSpell      string outer "Abundant Food"
   /declare  DrinkSpell     string outer "Abundant Drink"
   /declare  FoodCastAmt    int outer 4
   /declare  DrinkCastAmt   int outer 4
   /declare  GemSlot        int outer 9
|---------- End of Customizable Declares --------------------|

   /declare  FoodCnt        int outer 0
   /declare  DrinkCnt       int outer 0
   /declare  OldSpell       string outer

   /if (${Defined[Param0]}) {
      /varset FoodAmt ${Param0}
   }
   /if (${Defined[Param1]}) {
      /varset DrinkAmt ${Param1}
   }
   /varset OldSpell ${Me.Gem[${GemSlot}]}
   /call SummonFood
   /call SummonDrink
   /memspell ${GemSlot} ${OldSpell}
/endmacro

Sub SummonFood
   /call PutInBag
   /if (${FoodCnt}<${FoodAmt}) {
      /memspell ${GemSlot} ${FoodSpell}
      /delay 5s ${Me.SpellReady[${FoodSpell}]} 
      /goto :foodloop
   } else {
      /return
   }

:foodloop
   /call cast ${FoodSpell}
   /call PutInBag
   /varcalc FoodCnt ${FoodCnt}+${FoodCastAmt}
   /delay 5s ${Me.SpellReady[${FoodSpell}]}
   /if (${FoodCnt}<${FoodAmt}) {
      /goto :foodloop
   } else {
     /return
   }
/return

Sub SummonDrink
   /call PutInBag
   /if (${DrinkCnt}<${DrinkAmt}) {
      /memspell ${GemSlot} ${DrinkSpell}
      /delay 5s ${Me.SpellReady[${DrinkSpell}]}
      /goto :drinkloop
   } else {
      /return
   }

:drinkloop
   /call cast ${DrinkSpell}
   /call PutInBag
   /varcalc DrinkCnt ${DrinkCnt}+${DrinkCastAmt}
   /delay 5s ${Me.SpellReady[${DrinkSpell}]}    
   /if (${DrinkCnt}<${DrinkAmt}) {
      /goto :drinkloop
   } else {  
      /return
   }
/return

Sub PutInBag
   /if (${Cursor.ID}) /autoinv
   /delay 2s !${Cursor.ID}
/return
--jaq

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Wed Jun 08, 2005 3:46 pm

Code: Select all

Note: I do not play a mage, but am aware they may have 1 spell that summons both.  I would like to add code for that     |
| if someone can provide some simple info on how the spell works for mages, or if this would even be useful.
The spell is Bristlebane's Bundle. It summons a stack of food / water, a firework and a cake I think. Personally I prefer to summon the food / water alone so you don't have to deal with the firework and other garbage.

Here's the simple one I use:

Code: Select all

| Summon Food and Water Mac

#include spellcast.inc 

Sub Main

  /loadspells "FOOD"
  /delay 30s !${Window[SpellBookWnd].Open}
  /call cast "Cornucopia"
  /call cast "Cornucopia"
  /call cast "Everfount"
  /call cast "Everfount"

/endmacro
That get's me two stacks food / water on my cursor so I can distribute to the group as needed. Nothing fancy, but it works.
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Wed Jun 08, 2005 3:53 pm

Also, you would want to modify your PutInBag sub to something like

Code: Select all

Sub PutInBag
  :Loop
   /if (${Cursor.ID}) {
     /autoinv
     /delay 2s !${Cursor.ID}
     /goto :Loop
  }
/return 
to handle multiple things on cursor.
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

yesman
a lesser mummy
a lesser mummy
Posts: 64
Joined: Tue Apr 27, 2004 9:06 pm

Post by yesman » Thu Jun 09, 2005 7:10 pm

The mage spell is acutally Gift of Xev, 20 food/drink/bandages 10 slot bag

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Thu Jun 09, 2005 10:49 pm

yesman wrote:The mage spell is acutally Gift of Xev, 20 food/drink/bandages 10 slot bag
damnit.
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

Bigguy70
a ghoul
a ghoul
Posts: 85
Joined: Tue Sep 27, 2005 9:08 am

Post by Bigguy70 » Sun Oct 02, 2005 11:28 pm

Well this is my first time moding a macro but here it is. I changed it so that the amount varibles are checked against what is in your inventory, the orig script just cast amount + what you had ie if you used the default of 20 and had 10 in your inventory you ended up with 30, now you'll have 20 total.

Code: Select all

|--------------------------------------------------------------------------------------------------------------------------|
| MakeDinner.mac -- Ver 1.0 -- Written by Jaq -- 06/01/2005 
| Posted by Jaq @ http://www.macroquest2.com/phpBB2/viewtopic.php?t=11535&highlight=makedinner
| Ver 1.1 Updated by Bigguy70 10-2-2005
|                                                               |
| This is a simple macro that will summon food and drink.  It will also remem your original spell when done.               |
| Usage: /mac MakeDinner <NumFood> <NumDrink>  -- If no params are given it will default to 20 of each.                    |
| Requires: spell_rouitines.inc                                                                                            |
| You may customize this macro for your needs.  It is currently set up for a cleric with abundant food and drink.          |
| You can change the default declares as follows:                                                                          |
|   FoodAmt: Default number of foods to summon if no params given.                                                         |
|   DrinkAmt:  Default number of drinks to summon if no params given.                                                      |
|   Foodspell: What spell to use to summon foods.                                                                          |
|   DrinkSpell:  What spell to use to summon drinks.                                                                       |
|   FoodCastAmt:  How many foods does the specified food spell summon.                                                     |
|   DrinkCastAmt:  How Many drinks does teh specified drink spell summon.                                                  |
|   GemSlot:  What gem slot should be used to to mem the spells.                                                           |
|   FoodCastType: Type of food item summoned by spell, used to check what you have on hand
|   DrinkCastType: Type of drink summoned                                                                                                                       |
| Note: I do not play a mage, but am aware they may have 1 spell that summons both.  I would like to add code for that     |
| if someone can provide some simple info on how the spell works for mages, or if this would even be useful.               |
|                                                                                                                          |
| Macro inspired by MQ2FeedMe ~ cuz now I have a good reason to have some free food on me ~ thanks for that plug.          |
|                                                                                                                          |
| -- Jaq                                                                                                                   |
|--------------------------------------------------------------------------------------------------------------------------|

#include spell_routines.inc

Sub Main

|--------------- Customizable Declares ----------------------|
   /declare  FoodAmt        int outer 20
   /declare  DrinkAmt       int outer 20
   /declare  FoodSpell      string outer "Summon Food"
   /declare  DrinkSpell     string outer "Summon Drink"
   /declare  FoodCastAmt    int outer 1
   /declare  DrinkCastAmt   int outer 1
   /declare  GemSlot        int outer 4
   /declare  FoodCastType   string outer "Bread"
   /declare  DrinkCastType  string outer "Water"
|---------- End of Customizable Declares --------------------|

   /declare  FoodCnt        int outer 0
   /declare  DrinkCnt       int outer 0
   /declare  OldSpell       string outer

   /if (${Defined[Param0]}) {
      /varset FoodAmt ${Param0}
   }
   /if (${Defined[Param1]}) {
      /varset DrinkAmt ${Param1}
   }
   /varset OldSpell ${Me.Gem[${GemSlot}]}
   /call SummonFood
   /call SummonDrink
   /memspell ${GemSlot} ${OldSpell}
/endmacro

Sub SummonFood
   /call PutInBag
   /if (${FindItemCount[${FoodCastType}]}<${FoodAmt}) {
      /memspell ${GemSlot} ${FoodSpell}
      /delay 5s ${Me.SpellReady[${FoodSpell}]}
      /goto :foodloop
   } 
/return

:foodloop
   /call cast ${FoodSpell}
   /call PutInBag
   /varcalc FoodCnt ${FindItemCount[${FoodCastType}]}+${FoodCastAmt}
   /delay 5s ${Me.SpellReady[${FoodSpell}]}
   /if (${FoodCnt}<=${FoodAmt}) {
      /goto :foodloop
   } 
/return

Sub SummonDrink
   /call PutInBag
   /if (${FindItemCount[${DrinkCastType}]}<${DrinkAmt}) {
      /memspell ${GemSlot} ${DrinkSpell}
      /delay 5s ${Me.SpellReady[${DrinkSpell}]}
      /goto :drinkloop
   }  
/return
   

:drinkloop
   /call cast ${DrinkSpell}
   /call PutInBag
   /varcalc DrinkCnt ${FindItemCount[${DrinkCastType}]}+${DrinkCastAmt}
   /delay 5s ${Me.SpellReady[${DrinkSpell}]}   
   /if (${DrinkCnt}<=${DrinkAmt}) {
      /goto :drinkloop
   } 
/return

Sub PutInBag
  :Loop
   /if (${Cursor.ID}) {
     /autoinv
     /delay 2s !${Cursor.ID}
     /goto :Loop
  }
/return

|** 1.1 made the Varibles = total on hand after script is ran.
	cleaned up a few lines.  **|
If there is anything anyone can see to improve please post as this script will be part of a script I'm working on to summon all my mages items.

Code: Select all

!${Cursor.ID}
what does this part of the script do?

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Mon Oct 03, 2005 9:36 am

It delays 2 seconds or delays until there is nothing on your cursor, whichever comes first.

It's to help with EQ latency, as the time it takes to /autoinv can differ from time to time.

jaq
a ghoul
a ghoul
Posts: 148
Joined: Fri Mar 12, 2004 8:29 am

Post by jaq » Mon Oct 03, 2005 1:06 pm

Nice mod, I wrote it the way I did originally because I use my cleric to make food for all my toons so I didnt care what she already had.
--jaq

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: MakeDinner.mac (Ver 1.0 Updated 6-6-2005)

Post by xyilla » Sat May 24, 2025 11:59 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: MakeDinner.mac (Ver 1.0 Updated 6-6-2005)

Post by xyilla » Sat May 24, 2025 12:00 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: MakeDinner.mac (Ver 1.0 Updated 6-6-2005)

Post by xyilla » Sat May 24, 2025 12:01 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: MakeDinner.mac (Ver 1.0 Updated 6-6-2005)

Post by xyilla » Sat May 24, 2025 12:02 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: MakeDinner.mac (Ver 1.0 Updated 6-6-2005)

Post by xyilla » Sat May 24, 2025 12:04 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: MakeDinner.mac (Ver 1.0 Updated 6-6-2005)

Post by xyilla » Sat May 24, 2025 12:05 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: MakeDinner.mac (Ver 1.0 Updated 6-6-2005)

Post by xyilla » Sat May 24, 2025 12:06 pm