• 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

Request - Need some Macro help

Joined
Mar 20, 2015
RedCents
25¢
Looking for some help identifying my issue with a macro I am working on. I am using MQ2Cast and MQ2DanNet for additional info. The issue I am having is with notifications of what the character is doing. I am using /dgtell all to put it in the MQ2 window. Problem is : with fast cast spells sometimes (most times) it doesn't post any notification. For longer cast spells sometimes it posts the message twice. And sometimes it just does one or the other of the behaviors for no discernable reason. I have tried adding some checks and delays and such and tried various methods to combat this but nothing seems to work 100%. Thanks to CTaylor for the suggestions on DanNet delays and checks, they made my queries rock solid.

Code in question :

Code:
---------------Example sub where spell is cast and notification generated----------------
Sub doncbuffs
    /for gmember 0 to ${Group}
       
        /if (${hpbuff.NotEqual[NULL]}) {
            /varset hpbuffcheck QUERY
            /varset stackcheck QUERY
            /dquery ${Group.Member[${gmember}]} -q "Me.Buff[${hpbufftocheck}].ID" -o hpbuffcheck
            /dquery ${Group.Member[${gmember}]} -q "Spell[${hpbuff}].Stacks" -o stackcheck
            /delay 20 ${hpbuffcheck.NotEqual[QUERY]}&&${stackcheck.NotEqual[QUERY]}
                /if (!${hpbuffcheck} && !${Me.Casting.ID} && ${stackcheck} && ${Group.Member[${gmember}].Present}) {
                    /call castspell "${hpbuff}" ${Group.Member[${gmember}].ID} ${gmember} "${Group.Member[${gmember}]}"
                        /if (${Macro.Return.Equal[CAST_SUCCESS]}) {
                            /dgtell all ==> ${hpbuff} on ${Group.Member[${gmember}]}
                        }
                }
        }
       
        /next gmember
        /return
------------------Castspell routine for reference ------------------------------------------------

Sub castspell(string castspell,int castid,int gmember,string name)
    /if (${Me.CurrentMana}<${Spell[${castspell}].Mana}) /return
    /if (${Window[SpellBookWnd]}) /book
    /if (${Group.Member[${gmember}].FeetWet}!=${Me.FeetWet}) /return
    /if (!${Me.Moving} && ${Spawn[${castid}].Distance}<=${Spell[${castspell}].MyRange} && ${Group.Member[${gmember}].Present} && ${Spawn[${castid}].LineOfSight} && !${Me.Invis}) {
        /casting "${castspell}" ${miscgem} -targetid|${castid}
    }
        /delay 20 ${Cast.Ready[${castspell}]}
        /delay 20 ${Window[CastingWindow].Open}
        /delay ${Math.Calc[(${Spell[${castspell}].MyCastTime}*10)+20]} !${Me.Casting.ID}

        /if (${Cast.Result.NotEqual[CAST_CANCELLED]}) {
            /varset castresult ${Cast.Result}
        } else {
            /varset castresult CAST_CANCELLED
        }
/return ${castresult}
 
Code:
Sub castspell(string castspell,int castid,int gmember,string name)
    /if (${Me.CurrentMana}<${Spell[${castspell}].Mana}) /return
    /if (${Window[SpellBookWnd]}) /book
    /if (${Group.Member[${gmember}].FeetWet}!=${Me.FeetWet}) /return
    /if (!${Me.Moving} && ${Spawn[${castid}].Distance}<=${Spell[${castspell}].MyRange} && ${Group.Member[${gmember}].Present} && ${Spawn[${castid}].LineOfSight} && !${Me.Invis}) {
        /casting "${castspell}" ${miscgem} -targetid|${castid}
        /delay 5
    }
     /if (${Spell[${castspell}].CastTime}) {
         /while (${Window[CastingWindow].Open}) {
              /delay 2
         }
     } else {
         /delay 2
     }
        /if (${Cast.Result.NotEqual[CAST_CANCELLED]}) {
            /varset castresult ${Cast.Result}
        } else {
            /varset castresult CAST_CANCELLED
        }
/return ${castresult}

That's not perfect, but the direction I would be going. If you having issues with instant cast spells, you need to take that into account and have a slight delay so the plugin can have a chance to update Cast.Result. I don't like using MQ2Cast, because it is not stable 100% of the time. It likes to flake out sometimes.
 
Thanks again for the advice. Haven't had a chance to try this out yet but I get the concept. I was certainly having issues with it running over my delays that I had. Been having fun learning MQ2 and working on this and really appreciate the help of the community.
 
Request - Need some Macro help

Users who are viewing this thread

Back
Top
Cart