• 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

Question - Trying to formulate a conditional to check for average level of xtargets

Joined
Aug 29, 2019
RedCents
1,371¢
So this I am trying to look at a few ways to do this, either in KA or in reacts and trying to formulate the best way to do it. Basic idea is that I want my monk to fire off his disciplines (Stonestance Discipline, Thunderkick Discipline, Whirlwind Discipline, etc) when the average level of my extended targets is greater than my own level or possibly a set level later on. And this is just rough spitballing here but something along the lines of ((${Spawn[${Me.XTarget[1]}].Level}+${Spawn[${Me.XTarget[2]}].Level}+${Spawn[${Me.XTarget[3]}].Level}+${Spawn[${Me.XTarget[4]}].Level}+${Spawn[${Me.XTarget[5]}].Level}+${Spawn[${Me.XTarget[6]}].Level}) / ${Me.XTarget} >= ${Me.Level})
I got the echo to go off on the first part and it does show the correct levels and the / and then the number of targets but doesn't actually calculate out so not sure if I am doing something wrong. It did have Null's for the remaining xtargets if they were empty (not sure if that threw a wrench into the equation)
Can anyone point me in the right direction here?
 
so something like ${Math.Calc[(${Spawn[${Me.XTarget[1]}].Level}+${Spawn[${Me.XTarget[2]}].Level}+${Spawn[${Me.XTarget[3]}].Level}+${Spawn[${Me.XTarget[4]}].Level}+${Spawn[${Me.XTarget[5]}].Level}+${Spawn[${Me.XTarget[6]}].Level}) / ${Me.XTarget}]} >= ${Math.Calc[${Me.Level} - 2]} for the conditional then? Level there at the end of course to be adjusted for what level mobs I want to kick off the defensive abilities.
 
Last edited:
Continuing on with the conditional I had an idea instead of a fixed my level - 2 (or whatever number is deemed appropriate) that it do it based off the group level average, similar to the xtarget average. I was looking into it and hit a few snags.
/echo ${Math.Calc[${Group.Member[1].Level}+${Group.Member[2].Level}+${Group.Member[3].Level}+${Group.Member[4].Level}+${Group.Member[5].Level}+${Group.Member[6].Level} returns null if I am solo (which I usually am) so I'm not sure how to average out the level, as well I'm not sure the method to determine how many group members exist in your group as the number to divide by.
 
For those that might be interested I finally got it. :
Here's my conditional that fires in KA : Cond4=${Math.Calc[(${Spawn[${Me.XTarget[1]}].Level}+${Spawn[${Me.XTarget[2]}].Level}+${Spawn[${Me.XTarget[3]}].Level}+${Spawn[${Me.XTarget[4]}].Level}+${Spawn[${Me.XTarget[5]}].Level}+${Spawn[${Me.XTarget[6]}].Level}) / ${Me.XTarget}]} >= (${Math.Calc[(${Me.Level}+${Group.Member[1].Level}+${Group.Member[2].Level}+${Group.Member[3].Level}+${Group.Member[4].Level}+${Group.Member[5].Level}) / (${Group.Members}+1)]})

That will return true if the average level of the current extended target group is higher than or equal to the average level of your group. In my case this works excellent for firing off monk disciplines for those mobs that are harder or when your group gets a little over their heads. Hopefully this helps a few others like it does me. Thanks to all those who helped!
 
Question - Trying to formulate a conditional to check for average level of xtargets

Users who are viewing this thread

Back
Top
Cart