Summon Food & Drink macro request

Blitzkrieg

Time Traveling Troll
Joined
Sep 6, 2009
Messages
2,077
Reaction score
5
Points
36
Location
Red Telephone Booth, formerly a Cardboard Box
Website
www.mulletjunky.com
Looking for a macro that will use food and drink summoning items until I've summoned x amount.

For example, I could do

Code:
/mac smnprv
and it would run and summon the set amount (edited in the .mac) then end.

My goal with this .mac is to avoid having to click these items all of the time on various characters for 1 food or drink each.

iu


THANK XENIAZ FOR THE MACRO BELOW. YOU CAN USE EITHER SPELL OR ITEM, SPELLS MUST BE DECLARED AS "gem#" AND ITEM AS "item" THEN JUST ENTER THE NAMES AND AWAY YOU GO! YOU CAN ALSO PASS A PARAMETER ON MACRO START FOR HOW MANY STACKS YOU WANT MADE.
Code:
Sub Main(szStacks)
 /declare DrinkSpell string outer Warm Milk Dispenser
 /declare DrinkType  string outer item
 /declare FoodSpell string outer Fresh Cookie Dispenser
 /declare FoodType  string outer item
 /declare DrinkItem string outer Warm Milk
 /declare FoodItem string outer Fresh Cookie
 /declare nStacks int outer 0
 /declare Once int outer 0
    /if (${Defined[szStacks]}) /varset nStacks ${szStacks}
    /if (${nStacks}<1) /varset Once 1
    /if (${nStacks}<1 || ${nStacks}>20) /varset nStacks 1
    /if (${Once}) /echo Summoning up to 1 stack of food and drink, then ending macro.
    /if (!${Once}) /echo Summoning ${nStacks} stack(s) of food and drink per cycle.
 /call SummonDrinkFood
 /echo Done summoning stuff!
 /return

Sub SummonDrinkFood
 /declare mycount int local
 /declare count int local

 /if (${FindItemCount[=${DrinkItem}]} < ${Math.Calc[20*${nStacks}]} || ${FindItemCount[=${FoodItem}]} < ${Math.Calc[20*${nStacks}]}) {
   /if (!${Me.Gem[${DrinkSpell}]} && ${DrinkType.Find[gem]}) /memspell 1 "${DrinkSpell}"
   /if (!${Me.Gem[${FoodSpell}]} && ${FoodType.Find[gem]}) /memspell 2 "${FoodSpell}"

   :BigLoop
   /if (${Me.SpellReady[${DrinkSpell}]} || !${FindItem[${DrinkSpell}].TimerReady} ) {
       :DrinkLoop
    /if (${Me.CombatState.Equal[COMBAT]} || ${Me.Moving} || !${Me.State.Equal[STAND]} || ${Cursor.ID} || ${Me.Casting.ID}) {
      /delay 2s
      /autoinv
      /goto :DrinkLoop
    }
    /call Summon "${DrinkSpell}" ${DrinkType}
    /autoinv
   }

   /if (${Me.SpellReady[${FoodSpell}]} || !${FindItem[${FoodSpell}].TimerReady}) {
       :FoodLoop
    /if (${Me.CombatState.Equal[COMBAT]} || ${Me.Moving} || !${Me.State.Equal[STAND]} || ${Cursor.ID} || ${Me.Casting.ID}) {
      /autoinv
      /delay 2s
      /goto :FoodLoop
    }
    /call Summon "${FoodSpell}" ${FoodType}
    /autoinv
   }

   /if (${Math.Calc[20*${nStacks}]}>=${Math.Calc[${FindItemCount[=${DrinkItem}]}+1]}) /goto :BigLoop
   /if (${Math.Calc[20*${nStacks}]}>=${Math.Calc[${FindItemCount[=${FoodItem}]}+1]}) /goto :BigLoop

 }
 /return

Sub Summon(string what, string castType)
  /if ( ${castType.Equal[item]} ) {
    /useitem ${FindItem[=${what}].ItemSlot} ${FindItem[=${what}].ItemSlot2}
  }
  /if ( ${castType.Find[gem]} ) {
    /casting "${what}" ${castType}
  }
  :castwait
  /delay 2
  /if ( ${Me.Casting.ID} ) /goto :castwait
  /delay 5
  /autoinv
  /delay 5
/return
 

Attachments

  • summonfd.mac
    2.4 KB · Views: 7
Last edited by a moderator:
Link the item / spells you want to use. It should be fairly trivial to use MQ2Melee downshits to summon a few items every now and then.
 
I went ahead and attached it to your post also, so people can just download it. Thanks Xeniaz/Blitzkrieg.

htw
 
Here's the one I updated and am using, should be good to go.


htw
 

Attachments

  • summonfd.mac
    8 KB · Views: 6
So getting the same result as the earlier macro ... thinking now it's me. It wouldn't interact with the items. The macro starts and just hangs.

Code:
[Settings]
Quiet=FALSE
[Food]
Name=Fresh Cookie Dispenser
Type=item
Item=Fresh Cookie
Gem=
[Drink]
Name=Warm Milk Dispenser
Type=item
Item=Warm Milk
Gem=
 

Attachments

  • 2019-01-02_16-08-29.png
    2019-01-02_16-08-29.png
    16.7 KB · Views: 5
Stand check needs to be removed, or as Renji suggested.

(!${Me.State.Equal[STAND]} && !${Me.Mount.ID})
 
I went with (${Me.State.NotEqual[STAND]} && ${Me.State.NotEqual[MOUNT]})


Updated on git and attached. I did log in and grab those items as well as got on a mount, so you will be fine now (I c/p your ini entries, so that's what I tested with).


htw
 

Attachments

  • summonfd.mac
    8 KB · Views: 7