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 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}

