• 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 - PreConditions

kraszus

Member
Would this work as a precondition for casting Tash only on mobs a couple of levels higher than me?
Code:
 PreCondition= /if ${Me.SpellReady[Tashina]} &&  (${Target.Named} || ${Target.Level}>${Me.Level[+2]}) /return TRUE
 
Code:
${Target.Named} || ${Spawn[id ${MATarget}].Level}>=${Math.Calc[${Me.Level}+4]}) || ${Me.XTarget}>2

is what I use in my macro (different macro, same concept)

You can test it out ingame. Just target something and "/echo ${Target.Level}>${Math.Calc[${Me.Level}+2]}" and you ought to see something like "MQ 112>112.00" if the TLO will work.

MQ will see it as true or not true. But if you want to test it even farther, you can use the ${Bool[]} TLO... as in

${Bool[${Target.Level}>${Math.Calc[${Me.Level}+2]}]}

which will give you a true or false return.

(sorry, I do a lot of training at work... and I tend to over explain things...)
 
I've tried this ingame and it always reports TRUE even when I target high level guards and pcs.
Code:
/echo ${Bool[${Target.Level}>${Math.Calc[${Me.Level}+2]}]}

and..

Code:
/echo ${Target.Level}>${Math.Calc[${Me.Level}+2]}
returns
Code:
 [MQ2] 28>37

Equally
Code:
/echo ${Bool[${Math.Calc[${Me.Level}-${Target.Level}]}>0]}
reports TRUE despite the fact that the result is -15 (negative 15).
 
Last edited:
Hm... seems there may be an issue with that TLO.

Life would just not be interesting enough with out these incidents I suppose...

Anyone else having an issue with bool?
 
I avoid ${Bool[....]} if at all possible, most of the time I see it people are adding an additional evaluation for MQ2 to perform creating unnecessary cpu load on your computer. But, this time the issue is (quoted directly from the mq2:

Creates a bool object using text. Value is set to TRUE unless text is "NULL" "FALSE" or "0" (capitalization does not count).


The issue with the first line was that:

PreCondition= /if ${Me.SpellReady[Tashina]} && (${Target.Named} || ${Target.Level}>${Me.Level[+2]}) /return TRUE

should be changed to:

PreCondition= /if (${Target.Named} || ${Target.Level}>${Math.Calc[${Me.Level}+2]}) /return TRUE

There was no need to check if the spell was ready, kissassist/modbot already checks for that. The ( ) wasn't including the whole statement which can cause issues. There may be other issues, I just took a quick look at it.

PS. I would also check that you have a target first before attempting to check the rest, but that is just me since I can't guarantee that you will have a target when the precheck is ran.
 
Question - PreConditions

Users who are viewing this thread

Back
Top
Cart