• 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

Problem - Target.Slowed.SlowPct returns null rather than 0

AmericanNero

Seasoned veteran member
Joined
Oct 13, 2020
RedCents
4,709¢
If you attempt ${Target.Slowed.SlowPct}, and the mob has not yet been successfully slowed, it returns null. Shouldn't it return 0? If you try ${Target.Slowed.SlowPct}<70.... you can't do it because null is not an int so it craps out.

Workarounds to be able to compare int...

/declare SlowPct int local 0
/varcalc SlowPct ${Target.Slowed.SlowPct}+0

One can also do (${Target.Slowed.SlowPct}+0) as part of a condition within an ini.

Anyhoo...
 
Last edited:
Target.Slowed will be null if there is no slow, so anything that flows from it will also be null. It's best to test for null as well as 0.
 
How would I detect null? Target.Slowed.SlowPct returns type int when it has a numeric value, otherwise null. I tried a variety of ways. The only way that captured the state in adequate fashion was adding 0. Are you suggesting ${Target.Slowed.Equal[null]}? It still does not address that a type int returns null instead of 0, and one cannot compare null to int.
 
Make it a multi variable condition
Code:
!${Target.Slowed} || (${Target.Slowed} && ${Target.Slowed.SlowPct}<70)
 
I got this crazy idea that its fixed in mq2 so we don't have to have excessive conds!~
 
NULL and 0 are both false. You don't have to specifically test for it unless you specifically want to know if it's null, but automatically converting it to int would lose the capability to test for when it is null.
 
Last edited:
None of the solution provided worked, but the one from @ChatWithThisName : ${Int[${Target.Slowed.SlowPct}]}<70
Works wether or not target is slowed for me
 
Better yet, dont worry about it. The percentage slow is mitigated in the calculations anyway, so you aren’t getting the headline number. Have a race to see who gets a slow on the mob, and be done with it. (Belt, chanter, counterbias, turgurs, beastlord).

Shaman AA slow is great, because while it is cast, there is no GCD, so your spells are instantly available for the next cast. Greatly improves Shaman efficiency
 
Shaman AA slow provides an additional casted cripple as well.

@Hylander : not shure if I understood your first sentence. ${Int[${Target.Slowed.SlowPct}]} shows the numbers of the spell, not the real effect on mobs. So this should do, whats supposed to do.
If ther's a slow applied as good or better than mine, skip my slow.
 
Last edited:
After reading the replies and going through the code, I believe I see how it works now. MQ2 itself is only concerned with exposing the gamestate, not crunching it further. Got it! Now that is settled, I think I will go through the KA12 doc and add some suggested conditional tests so I don't forget any details.
 
Problem - Target.Slowed.SlowPct returns null rather than 0

Users who are viewing this thread

Back
Top
Cart