• 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

Optimizing Hud code

thez

Well-known member
Posted this on the MQ2 site as well, but figured I'd ask here as well...

I use a portion of my hud to tell me which buffs my necro needs refreshed. The only problem is, with all of the new buffs and Rk. II buffs, it's become really large, and I was wondering if there was a better way of having the code do the same thing.

Hud segment:
Rich (BB code):
[buffs]
Title=3,152,106,0,255,255,Missing Buffs

Nec=3,153,116,255,0,0,${If[!${Me.Buff[Otherside].Duration},Lich,]}

AoE=3,152,126,255,0,0,${If[!${Me.Buff[Aura of Eternity].Duration},Aura,]}

FoE=3,152,136,255,0,0,${If[!${Me.Buff[Form of Endurance II].Duration},Veil,]}

Regen=3,152,146,255,0,0,${If[!${Me.Buff[Frostreaver's Blessing].Duration},Ring,]}

Mana=3,150,156,255,0,0,${If[!${Me.Buff[Reyfin's Racing Thoughts].Duration},Mana,]}

Lev=3,150,166,255,0,0,${If[!${Me.Levitating},Levi,]}

Dru1=3,152,176,255,0,0,${If[!${Me.Buff[Hand of Conviction].Duration},${If[!${Me.Buff[Conviction].Duration},${If[!${Me.Buff[Blessing of Steeloak].Duration},${If[!${Me.Buff[Direwild Skin].Duration},${If[!${Me.Buff[Steeloak Skin].Duration},Skin,]},]},]},]},]}

Dru2=3,152,176,255,0,0,${If[${Me.Buff[Conviction].Duration},Skin(Conv),]}

Dru4=3,152,176,255,0,0,${If[${Me.Buff[Tenacity].Duration},Skin(Tenacity),]}

Dru3=3,152,176,255,0,0,${If[${Me.Buff[Hand of Tenacity].Duration},Skin(Tenacity),]}

Dru5=3,152,176,255,0,0,${If[${Me.Buff[Hand of Conviction].Duration},Skin(Conv),]}

Clr1=3,152,186,255,0,0,${If[!${Me.Buff[Balikor's Mark].Duration},${If[!${Me.Buff[Elushar's Mark].Duration},${If[!${Me.Buff[Elushar's Mark Rk. II].Duration},${If[!${Me.Buff[Symbol of Balikor].Duration},${If[!${Me.Buff[Symbol of Elushar].Duration},${If[!${Me.Buff[Symbol of Elushar Rk. II].Duration},${If[${Me.Buff[Blessing of Steeloak].Duration},Symbol,]},]},]},]},]},]},]}

Clr2=3,152,186,255,0,0,${If[!${Me.Buff[Balikor's Mark].Duration},${If[!${Me.Buff[Elushar's Mark].Duration},${If[!${Me.Buff[Elushar's Mark Rk. II].Duration},${If[!${Me.Buff[Symbol of Balikor].Duration},${If[!${Me.Buff[Symbol of Elushar].Duration},${If[!${Me.Buff[Symbol of Elushar Rk. II].Duration},${If[${Me.Buff[Steeloak Skin].Duration},Symbol,]},]},]},]},]},]},]}

Clr4=3,152,186,255,0,0,${If[!${Me.Buff[Balikor's Mark].Duration},${If[!${Me.Buff[Elushar's Mark].Duration},${If[!${Me.Buff[Elushar's Mark Rk. II].Duration},${If[!${Me.Buff[Symbol of Balikor].Duration},${If[!${Me.Buff[Symbol of Elushar].Duration},${If[!${Me.Buff[Symbol of Elushar Rk. II].Duration},${If[${Me.Buff[Direwild Skin].Duration},Symbol,]},]},]},]},]},]},]}

Clr5=3,152,186,255,0,0,${If[!${Me.Buff[Balikor's Mark].Duration},${If[!${Me.Buff[Elushar's Mark].Duration},${If[!${Me.Buff[Elushar's Mark Rk. II].Duration},${If[!${Me.Buff[Symbol of Balikor].Duration},${If[!${Me.Buff[Symbol of Elushar].Duration},${If[!${Me.Buff[Symbol of Elushar Rk. II].Duration},${If[${Me.Buff[Blessing of Direwild].Duration},Symbol,]},]},]},]},]},]},]}

Clr3=3,152,186,255,0,0,${If[!${Me.Buff[Conviction].Duration},${If[!${Me.Buff[Tenacity].Duration},${If[!${Me.Buff[Hand of Conviction].Duration},${If[!${Me.Buff[Hand of Tenacity].Duration},${If[!${Me.Buff[Balikor's Mark].Duration},${If[!${Me.Buff[Elushar's Mark].Duration},${If[!${Me.Buff[Elushar's Mark Rk. II].Duration},${If[!${Me.Buff[Symbol of Balikor].Duration},${If[!${Me.Buff[Symbol of Elushar].Duration},${If[!${Me.Buff[Symbol of Elushar Rk. II].Duration},${If[!${Me.Buff[Blessing of Direwild].Duration},${If[!${Me.Buff[Blessing of Steeloak].Duration},${If[!${Me.Buff[Direwild Skin].Duration},${If[!${Me.Buff[Steeloak Skin].Duration},Tenacity/Symbol,]},]},]},]},]},]},]},]},]},]},]},]},]},]}

Pal=3,152,196,255,0,0,${If[!${Me.Buff[Brell's Brawny Bulwark].Duration},${If[!${Me.Buff[Brell's Stony Guard].Duration},Brells,]},]}

Shm=3,152,206,255,0,0,${If[!${Me.Buff[Dire Focusing].Duration},${If[!${Me.Buff[Wunshi's Focusing].Duration},${If[!${Me.Buff[Talisman of the Dire].Duration},${If[!${Me.Buff[Talisman of Wunshi].Duration},Focus,]},]},]},]}

Bst=3,152,216,255,0,0,${If[!${Me.Buff[Spiritual Enlightenment].Duration},${If[!${Me.Buff[Spiritual Ascendance].Duration},Bst crack,]},]}

Enc=3,152,226,255,0,0,${If[!${Me.Buff[Gift of Brilliance].Duration},GoB,]}
 
Neat idea.. I don't have any suggestions on how to optimize it, but I have some ideas on how I would make it for myself :p

I'd colorcode it. Let them always show. If I have them and duration over X% then they're green. Fade to yellow at Y%, and red when not on me anymore :p
 
Yeah, but look at what you'd have to do with that. It'd be three lines of text for every line that I have there now.

I use the MQ2Buffutils XML window to keep track of what buffs are almost gone...this is my meter of what is gone, or what I'm lacking, or what I'll need to click off to get stuff to stack.
 
Optimizing Hud code

Users who are viewing this thread

Back
Top
Cart