• 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

Problem - MQ2Melee bracketing issue. Found it.....now someone C++ to fix it?

ChatWithThisName

⚔️🛡️🗡️
Moderator
Commits
191
Rich (BB code):
DECLARE_ABILITY_OPTION(pBLUST, "bloodlust", "[#] Endu% Above? 0=Off", "${If[${Me.CombatAbility[Shared Bloodlust]} || ${Me.CombatAbility[Shared Bloodlust Rk. II]} || ${Me.CombatAbility[Shared Bloodlust Rk. III]} || ${Me.CombatAbility[Shared Brutality]} || ${Me.CombatAbility[Shared Brutality Rk. II]} || ${Me.CombatAbility[Shared Brutality Rk. III]} || ${Me.CombatAbility[Shared Savagery]} || ${Me.CombatAbility[Shared Savagery Rk. II]} || ${Me.CombatAbility[Shared Savagery Rk. III]} || ${Me.CombatAbility[Shared Viciousness]} || ${Me.CombatAbility[Shared Viciousness Rk. II]} || ${Me.CombatAbility[Shared Viciousness Rk. III]} || ${Me.CombatAbility[Shared Cruelty]} || ${Me.CombatAbility[Shared Cruelty Rk. II]} || ${Me.CombatAbility[Shared Cruelty Rk. III]} || ${Me.CombatAbility[Shared Ruthlessness]} || ${Me.CombatAbility[Shared Ruthlessness Rk. II]} || ${Me.CombatAbility[Shared Ruthlessness Rk. III]},20,0]}", "${If[${meleemvi[plugin]} && (${Me.CombatAbility[Shared Bloodlust]} || ${Me.CombatAbility[Shared Bloodlust Rk. II]} || ${Me.CombatAbility[Shared Bloodlust Rk. III]} || ${Me.CombatAbility[Shared Brutality]} || ${Me.CombatAbility[Shared Brutality Rk. II]} || ${Me.CombatAbility[Shared Brutality Rk. III]} || ${Me.CombatAbility[Shared Savagery]} || ${Me.CombatAbility[Shared Savagery Rk. II]} || ${Me.CombatAbility[Shared Savagery Rk. III]} || ${Me.CombatAbility[Shared Viciousness]} || ${Me.CombatAbility[Shared Viciousness Rk. II]} || ${Me.CombatAbility[Shared Viciousness Rk. III]} || ${Me.CombatAbility[Shared Cruelty]} || ${Me.CombatAbility[Shared Cruelty Rk. II]} || ${Me.CombatAbility[Shared Cruelty Rk. III]}} || ${Me.CombatAbility[Shared Ruthlessness]} || ${Me.CombatAbility[Shared Ruthlessness Rk. II]} || ${Me.CombatAbility[Shared Ruthlessness Rk. III]}),1,0]}");

This is your busted line of code. Bad bracket is shown at the very very end. ,1,0]} with the } being bad bracket.

Your bracing error was found on ${Me.CombatAbility[Shared Cruelty Rk. III]}} where it was double }

Fix it to change it to ${Me.CombatAbility[Shared Cruelty Rk. III]}

Also found a bracing issue in slams I believe
Rich (BB code):
DECLARE_ABILITY_OPTION(pSLAMS, "slam", "[ON/OFF]?", "${If[${Select[${Me.Race.ID},2,9,10]},1,0]}", "${If[${meleemvi[plugin]} && ${${Select[${Me.Race.ID},2,9,10]}},1,0]}"); // 2=barbarian 9=troll 10=ogre

Is what it should be. The culprit being ${${Select[${Me.Race.ID},2,9,10]} missing a final }

Though I don't understand surrounding a variable with ${} tbh. ${Select[${Me.Race.ID},2,9,10]} should have been sufficient unless I'm missing something where the numbers are variables, which I don't think you can do. So perhaps instead of it having a bracket added here it should have the leading ${ removed.
 
Last edited:
its not having an extra bracket on the race tester, its missing an if and having some bracket issues.
Faulty line
Rich (BB code):
DECLARE_ABILITY_OPTION(pSLAMS, "slam", "[ON/OFF]?", "${If[${Select[${Me.Race.ID},2,9,10]},1,0]}", "${If[${meleemvi[plugin]} && ${${Select[${Me.Race.ID},2,9,10]}},1,0]}"); // 2=barbarian 9=troll 10=ogre
FIXED LINE
Rich (BB code):
DECLARE_ABILITY_OPTION(pSLAMS, "slam", "[ON/OFF]?", "${If[${Select[${Me.Race.ID},2,9,10]},1,0]}", "${If[${meleemvi[plugin]} && ${if[${Select[${Me.Race.ID},2,9,10]},1,0]}"); // 2=barbarian 9=troll 10=ogre
 
Last edited:
and as far as ${if[${Select[${Me.Race.ID},2,9,10]},1,0]} the i needs to be capitol.

${If[ if you're going to use an If statement. and in macro code, which is what that is, when using a ${Select[Condition to check to match other things, otherthingA, otherthingB, otherthingC]} it returns an int value which if it isn't NULL/0 then it's TRUE according to MQ2. So if your race ID is 2 it would return 1. If the race ID is 9 it returns 2, if the race ID is 10 it returns 3.


 
I havent had any issues with slam not working.... as for the double bracket was my error most likely, updating the plugin to the latest abilities from the TDS era to current was a big task.
 
and as far as ${if[${Select[${Me.Race.ID},2,9,10]},1,0]} the i needs to be capitol.

${If[ if you're going to use an If statement. and in macro code, which is what that is, when using a ${Select[Condition to check to match other things, otherthingA, otherthingB, otherthingC]} it returns an int value which if it isn't NULL/0 then it's TRUE according to MQ2. So if your race ID is 2 it would return 1. If the race ID is 9 it returns 2, if the race ID is 10 it returns 3.

which would make it true.

${If[STuffnotNullorZero],True,False}
 
${If[${StuffNotNullOrZero},TRUE,FALSE]} the square bracket goes on the outside of the TRUE,FALSE responses on an ${If[,,,]} statement. Again, parsing macro data. ${Select[${Zone.ID},202,13]} would return a non null response if your Zone.ID is 202 or 13. Which means true in a macro. If you're parsing macro data then it would also return true in this case. ${If[${Select[${Zone.ID},202,13]},TRUE,FALSE]} just seems a bit over redundant is all I'm saying.

With that said, would it work? Yup. But why? It'll work with one less wrapper for the plugin to parse. Sure it doesn't speed it up that much for a single extra wrapper....but when repeated throughout an entire plugin/macro.....it starts adding un-needed milliseconds, which all add up eventually.
 
Worked out great. No more bracketing issue reported on Zerker. Did /melee with #warning in a macro running and didn't get an undeclared variable error pausing the macro.

Made an Ogre, verified slam appeared correctly and worked.

Based on my testing this is good to go.
 

Attachments

  • bloodlustNoBracketError.png
    bloodlustNoBracketError.png
    1.4 MB · Views: 13
  • SlamConfirmation.png
    SlamConfirmation.png
    3.1 MB · Views: 8
Typing /melee bloodlust 20 comes back with Unsupported Argument <20>
Typing /melee bloodlust #20 comes back with Unsupported Argument <#20>
Typing /melee bloodlust 20% comes back with Unsupported Argument <20%>

How do I use this via command line switch?
 
i believe if the rg is similar to the mq2 core version then you should be able to run about 60 or so, cna remember ifits 0to63 or 0to60
 
Problem - MQ2Melee bracketing issue. Found it.....now someone C++ to fix it?

Users who are viewing this thread

Back
Top
Cart