• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Macro - Macro Gods, help me? Simple "Summon Food/Drink" macro

magna

Spellless in Seattle
Joined
Jul 20, 2025
RedCents
547¢
hello to you macro gods, I ask for your help.
I try to submit simple macro that summon food/drink for group. Sic give me tips to fix it but I am not understanding what to do.
macro works perfekt for me. I was only want to share it. But his tips are smart and sound like it could be better, is just that I dont know how to do what he tells me.

there is only 1 problem still not fix that is "verify group member is with you". because macro summon food/drink on mage and then use /nav to deliver food/drink to group member.
but its smart thinking, that if group member somehow can not be reached to trade with then macro fail.
I have not seen this happen to me, but also always use macro when loging my characters.

this is code block, where I must "verify group member is with me".
any good person with macro know what kind of "if" block I can add here?

[CODE title="DeliverItem"]Sub DeliverItem(int groupMember)
| Navigate to my group member and delay further action until the Navigation stops
/echo Moving closer to :: ${Target.Name}
/nav id ${Group.Member[${groupMember}].ID} |log=off dist=5
/delay 10s ${Navigation.Active}
/delay 2s ${Cast.Ready}

| Deliver item in trade window
/echo Delivering to :: ${Target.Name}
/click left target
/delay 4s !${Cursor.ID}
/notify GiveWnd GVW_Give_Button leftmouseup
|Delay until trade says yes
/delay 6s !${Window[TradeWnd].Open}
/delay 2s ${Cast.Ready}
/return[/CODE]

very big thank you for all help!
 
if nav.patlength[id ${Group.Member[${groupMember}].ID}] > 0

something like that would return a positive number if there is a path to the id given, if not its 0
 
hello to you macro gods, I ask for your help.
I try to submit simple macro that summon food/drink for group. Sic give me tips to fix it but I am not understanding what to do.
macro works perfekt for me. I was only want to share it. But his tips are smart and sound like it could be better, is just that I dont know how to do what he tells me.

there is only 1 problem still not fix that is "verify group member is with you". because macro summon food/drink on mage and then use /nav to deliver food/drink to group member.
but its smart thinking, that if group member somehow can not be reached to trade with then macro fail.
I have not seen this happen to me, but also always use macro when loging my characters.

this is code block, where I must "verify group member is with me".
any good person with macro know what kind of "if" block I can add here?

[CODE title="DeliverItem"]Sub DeliverItem(int groupMember)
| Navigate to my group member and delay further action until the Navigation stops
/echo Moving closer to :: ${Target.Name}
/nav id ${Group.Member[${groupMember}].ID} |log=off dist=5
/delay 10s ${Navigation.Active}
/delay 2s ${Cast.Ready}

| Deliver item in trade window
/echo Delivering to :: ${Target.Name}
/click left target
/delay 4s !${Cursor.ID}
/notify GiveWnd GVW_Give_Button leftmouseup
|Delay until trade says yes
/delay 6s !${Window[TradeWnd].Open}
/delay 2s ${Cast.Ready}
/return[/CODE]

very big thank you for all help!
i mean i did explain it and told you to ask if you had further questions.

after you stop navigating to them - check their distance is within the distance to trade. if they are not within the distance don't try and trade.

1756136382955.png
1756136357560.png
you can use Spawn['whatever'].Distance < 15 or something

because as i mention in our discussion, there are many reasons why you may not end up at a person you tried to navigate to, even if you put a |dist=5 or whatever.
rooted
stunned
lag
fell off mesh
mesh rerouted you a longer distance
stuck on player
stuck on box
stuck on geometry
nav failed for an unspecified reason
navigation issue - like levitation - which took you "the long way"
someone summoned you while you were moving
your toon hit a door/switch/level (kronk) on the way past it and zoned out


macro works perfekt for me.
but you're not sending it out for you - you want to have a resource for other people

if nav.patlength[id ${Group.Member[${groupMember}].ID}] > 0

something like that would return a positive number if there is a path to the id given, if not its 0
he just needs to check they are within trade distance after he is done navigating to them.
 
if nav.patlength[id ${Group.Member[${groupMember}].ID}] > 0

something like that would return a positive number if there is a path to the id given, if not its 0
ty! is there typo with "pathlength"? you type "patlength".

i mean i did explain it and told you to ask if you had further questions.
yes I know ty! I not want to bother you with many questions :}

after you stop navigating to them - check their distance is within the distance to trade. if they are not within the distance don't try and trade.

you can use Spawn['whatever'].Distance < 15 or something
ok nicce!

but you're not sending it out for you - you want to have a resource for other people
yes my goal just to share with all. I look for macro to make food/drink and find old one but it is not working so make my own and just want to share it.
is "resource" not best way to share stuff?

he just needs to check they are within trade distance after he is done navigating to them.

so some thing like this work?
I will test when EQ back up.
will also try your tip with "Spawn.Distance".

Code:
Sub DeliverItem(int groupMember)
  | Navigate to my group member and delay further action until the Navigation stops
  /echo Moving closer to :: ${Target.Name}
  /nav id ${Group.Member[${groupMember}].ID} |log=off dist=5
  /delay 10s ${Navigation.Active}
  /delay 2s ${Cast.Ready}

  | Check distance to group member
  /if !(nav.pathlength[id ${Group.Member[${groupMember}].ID}] > 0 && nav.pathlength[id ${Group.Member[${groupMember}].ID}] < 20) {
    /echo Error :: ${Target.Name} is un-reachable, skipping..
  } else {
  | Deliver item in trade window
  /echo Delivering to :: ${Target.Name}
  /click left target
  /delay 4s !${Cursor.ID}
  /notify GiveWnd GVW_Give_Button leftmouseup
  |Delay until trade says yes
  /delay 6s !${Window[TradeWnd].Open}
  /delay 2s ${Cast.Ready}
  }
/return

tyvm!
 
yes my goal just to share with all. I look for macro to make food/drink and find old one but it is not working so make my own and just want to share it.
is "resource" not best way to share stuff?
my point is a "works perfect for me" is not a good way to receive feedback about a resource that you don't intend to be just "for you"

Code:
Sub DeliverItem(int groupMember)
  | Navigate to my group member and delay further action until the Navigation stops
  /echo Moving closer to :: ${Target.Name}
  /nav id ${Group.Member[${groupMember}].ID} |log=off dist=5
  /delay 10s ${Navigation.Active}
  /delay 2s ${Cast.Ready}

  | Check distance to group member
  /if !(nav.pathlength[id ${Group.Member[${groupMember}].ID}] > 0 && nav.pathlength[id ${Group.Member[${groupMember}].ID}] < 20) {
    /echo Error :: ${Target.Name} is un-reachable, skipping..
  } else {
  | Deliver item in trade window
  /echo Delivering to :: ${Target.Name}
  /click left target
  /delay 4s !${Cursor.ID}
  /notify GiveWnd GVW_Give_Button leftmouseup
  |Delay until trade says yes
  /delay 6s !${Window[TradeWnd].Open}
  /delay 2s ${Cast.Ready}
  }
/return

tyvm!
Unreachable is a fine check to do before you nav - but it isn't the same as checking that they are specifically within trade distance.

you actually might be in a weird spot where you can trade, but nav path thinks it needs to take "the long route".

you should definitely just do the basic check of how far away they are
 
my point is a "works perfect for me" is not a good way to receive feedback about a resource that you don't intend to be just "for you"
yes you were right! this is why I now try to make it perfekt for all. good tips tyvm!
I learning so much just from simple things. thanks!

Unreachable is a fine check to do before you nav - but it isn't the same as checking that they are specifically within trade distance.
you actually might be in a weird spot where you can trade, but nav path thinks it needs to take "the long route".
you should definitely just do the basic check of how far away they are
this here is really nice tips. now I understand what you was saying before.

so like this?

Code:
Sub DeliverItem(int groupMember)
  | Navigate to my group member and delay further action until the Navigation stops
  /echo Moving closer to :: ${Target.Name}
  /nav id ${Group.Member[${groupMember}].ID} |log=off dist=5
  /delay 10s ${Navigation.Active}
  /delay 2s ${Cast.Ready}

  | Check distance to group member
    /if !(${Spawn[id ${Group.Member[${groupMember}].ID}].Distance} < 20) {
    /echo Error :: ${Target.Name} is un-reachable, skipping..   
  } else {
    | Deliver item in trade window
    /echo Delivering to :: ${Target.Name}
    /click left target
    /delay 4s !${Cursor.ID}
    /notify GiveWnd GVW_Give_Button leftmouseup
    |Delay until trade says yes
    /delay 6s !${Window[TradeWnd].Open}
    /delay 2s ${Cast.Ready}
  }
/return
 
While solving this issue might be fun if you want - a better long run solution might be buying or farming summon items for each dude. For example, the Vex Thal food/drink items.

This way they'll have their stuff even if you change your group and the mage is no longer around.
 
ty! is there typo with "pathlength"? you type "patlength".
More than a single typo because Kaen sends things without using proper syntax.

You "liked" my conditions guide. It's worth mentioning that TLOs (Top Level Objects) such as ${Navigation} is case sensitive. If you use ${navigation} it wouldn't work.

if nav.patlength[id ${Group.Member[${groupMember}].ID}] > 0

Here he uses a bunch of incorrect stuff as it relates to macros.

/if, not just if

There is no opening or closing () brackets.

I'm unsure if "Nav" is a valid alternative, but either way he doesn't use ${} brackets at all.

What he types and what he means are not always (usually not) one in the same.

/if (${Navigation.PathLength[id ${Group.Member[${groupMember}].ID}]} > 0)

This would be what he was suggesting (assuming I got my brackets correct for the entire line of code freehand right there.

However, regarding efficiency I would say that you need a base case. This line makes the assumption that the group member is valid in the zone.

Without me looking more into the code I am unsure what the integer for ${groupMember} is:
Is it the index?
it is the ID?

as a variable, this isn't entirely clear. While it shouldn't affect the macro, groupMemberIndex, or groupMemberID or something to indicate what it is.

Code:
  /declare i int local 1
  /for i 1 to ${Group.Members}
    |-/echo Test loop = ${Group.Member[${i}].Name}
    /target id ${Group.Member[${i}].ID}

    | Summon food
    /delay 2s ${Cast.Ready}
    /call SummonFood
    /delay 1s
    /call DeliverItem ${i}

Looking into this, it looks like you're using the index for the group member. But at this point you've already tried to target something that may or may not be nearby, may or may not have a valid ID (NULL) and continue without doing any due diligence to validate any of the information the macro makes assumptions about.

So now your base case can be moved backwards to this for loop.

[CODE highlight="4-6"] | Summon food & drink for group members
/declare i int local 1
/for i 1 to ${Group.Members}
/if (!${Group.Member[${i}].ID}) {
/continue
}[/CODE]

So at a minimum you'd want to add something like this. Just to verify they exist in the first place, if they don't skip to the next group member by index (/continue will skip the rest of the code in the current loop).
You could take this one step further and verify you can navigate to them here as well.

Macros process an entire line of code at a time. It (unless it's changed and I'm not aware of it) can have multiple conditions checked on a single line, but when checking things beyond the first check that are not valid because the first one failed means when writing macros it's reasonable to not conduct the checks on the same line. As it was explained to me Checking for a path length requires the same thought required to nav to something more or less. Checking for a path to something that doesn't exist makes even less sense. So you may do the checks separately, only checking for a path length if the spawn exists in the first place.

[CODE highlight="8-11"]/declare i int local 1
/for i 1 to ${Group.Members}
/if (!${Group.Member[${i}].ID}) {
|There is no valid Spawn ID for this group member
/continue
}

|This is checking for a valid path -1 for invalid. You could however use this as an opportunity to determine if you need to nav at all (they are within range to click on and hand an item) Such as < 15 to say if you're within 15 then you don't need to nav. But you'd need to adjust the way other things are done based on this check.
/if (${Navigation.PathLength[${Group.Member[${i}].ID}]} < 0) {
|There is no valid path
/continue
}[/CODE]

Separately checking these two things, it would first skip this PC if they are not in the zone (No valid Spawn ID), and then if they are, it would go on to check they have a valid path.

Next, I note that you /target without verifying you are within a reasonable range of the intended target or within line of sight. Generally speaking this is frowned upon when doing it as you're potentially doing something you can't do without 3rd party software. As it happens in this situation they are group members, and you can in fact target them without being a reasonable distance to them or having line of sight. Just a note to be mindful of this and check their distance and line of sight are within reason. Regardless, there's no harm done in navigating to them, and then targeting them. You don't need them as a target to nav to them. You summon functions uses your current target, could just as easily use a Spawn ID to avoid the need to target them at all with the exception of handing it to them.

I don't like MQ2Cast - I don't think it's needed. But that's my opinion.

You summon food/drink for yourself after you summon it for your group members. Mages won't benefit from the regen provided by food and water without them, so I suggest doing yourself first before the group.
 
Hello again macro gods and tyvm for helping & tips on this thread!
I have learned so much here! Even small things.
I try many method to fix my script with checks. Trying to make it break putting char on 2nd floor of building with elevator and stuff. All working fine. If it fail deliver food to group member, it skip the group member and continue.
So now I think it is better code and maybe "safe" for all type of group.

But some check I cannot get work for example:
(${Navigation.PathLength[${Group.Member[${i}].ID}]} < 0)
this line always return "-1". even if try it in single macro with only this line.
so anyway, I think of just post my macro here and if is OK to post in resource macros let me know.
if not, then ppl can just use it from here if they like it.
for my goal, just wanting to share macro I make, but then I am spend like 3-4 more hours try to fix things that never be a problem for myself and not sure if it working for all other ppl. can not test every thing. :}

here is finish macro!
for newbs like me who still summoning food :}
 

Attachments

But some check I cannot get work for example:
(${Navigation.PathLength[${Group.Member[${i}].ID}]} < 0)
this line always return "-1". even if try it in single macro with only this line.
Thinking about it (and it's been a minute) the Pathlength essentially expects the same thing you would use in /nav command.
/nav id ${Group.Member[${groupMember}].ID}
Since this is your command. put an echo in to see what it returns with "id" in there to specify you're searching for an ID. Otherwise it may not have the needed context to do the lookup correctly.
/echo ${Navigation.PathLength[id ${Group.Member[${i}].ID}]}

You can even target a specific PC and do an /echo ${Target.ID} to get their ID. and replace the code portions so you're typing things in directly. Or just replace Group.Member with ${Target.ID}

/echo ${Navigation.PathLength[id ${Target.ID}]}
 
Macro - Macro Gods, help me? Simple "Summon Food/Drink" macro

Users who are viewing this thread

Back
Top
Cart