• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

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

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