• 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

Help with buff array

groovalistic

New member
Well, I've got a sloppy buff routine for a mac I've been working and I've been trying to figure out how to simplify the sub.
Here's what I got at the moment:
Rich (BB code):
sub buffs
/call checkanchor
/delay !${Me.Moving}
/if (${Me.Buff["Sylvan Call"].Duration}<100 || !${Me.Buff["Sylvan Call"].ID}) {
/casting 4898 -maxtries|3
/delay 1m !${Window.Bookwnd.open} && !${Me.Casting.ID}
}
/if (${Me.Buff["Aura of Pure Arcanum"].Duration}<100 || !${Me.Buff["Aura of Pure Arcanum"].ID}) {
/equipset face
/nomodkey /itemnotify 3 rightmouseup
/delay 1s
/equipset norm
/delay 1s
}
/if (${Me.Buff["Vengeful Guard"].Duration}<100 || !${Me.Buff["Vengeful Guard"].ID}) {
/casting 15842 item
/delay 5s
}
/if (${Me.Buff["Form of Endurance III"].Duration}<100 || !${Me.Buff["Form of Endurance III"].ID}) {
/casting 47292 item
/delay 5s
}
/if (${Me.Buff["Primal Guard"].Duration}<100 || !${Me.Buff["Primal Guard"].ID}) {
/equipset ear
/delay 1s
/nomodkey /itemnotify 4 rightmouseup
/delay 5s
/equipset normear
}
/if (${Me.Buff["Eyes of the Owl"].Duration}<100 || !${Me.Buff["Eyes of the Owl"].ID}) {
/casting 10140 -maxtries|3
/delay 5s
/delay 1m !${Window.Bookwnd.open} && !${Me.Casting.ID}
}
/if (${Me.Buff["Briarcoat"].Duration}<100 || !${Me.Buff["Briarcoat"].ID}) {
/casting 5307 -maxtries|3
/delay 5s
/delay 1m !${Window.Bookwnd.open} && !${Me.Casting.ID}
}
/if (${Me.Buff["Protection of the Minohten"].Duration}<100 || !${Me.Buff["Protection of the Minohten"].ID}) {
/casting 10131 -maxtries|3
/delay 5s
/delay 1m !${Window.Bookwnd.open} && !${Me.Casting.ID}
}
/if (${Me.Buff[Consumed by the Hunt RK. II].Duration}<100 || !${Me.Buff["Consumed by the Hunt RK. II"].ID}) {
/casting 100147 -maxtries|3
/delay 5s
/delay 1m !${Window.Bookwnd.open} && !${Me.Casting.ID}
}
/if (${Me.Buff["Spirit of Eagle"].Duration}<100 || !${Me.Buff["Spirit of Eagle"].ID}) {
/target myself
/casting 2517 -maxtries|3
/delay 5s
/delay 1m !${Window.Bookwnd.open} && !${Me.Casting.ID}
}
/if (${Me.Buff["Hunter's Vigor"].Duration}<100 || !${Me.Buff["Hunter's Vigor"].ID}) {
/target myself
/casting 5310 -maxtries|3
/delay 5s
/delay 1m !${Window.Bookwnd.open} && !${Me.Casting.ID}
}
/if (${Me.Buff["Nature's Precision"].Duration}<100 || !${Me.Buff["Nature's Precision"].ID}) {
/casting 2594 -maxtries|3
/delay 5s
/delay 1m !${Window.Bookwnd.open} && !${Me.Casting.ID}
}
/if (${Target.ID}==${Me.ID}) /target clear
/return

I have managed to make an ini for bufflist (goes by zone or default if nothing zone-specific is listed)

So here's those bits...
Rich (BB code):
/call ReadINI HunterBuff.ini "${Zone.Name}" Buff 
/if (!${Defined[RV_BuffArray]}) {
/call ReadINI HunterBuff.ini "Default" Buff 
}

Now what I need help with is getting together a small sub that could go through that list and act appropriately.

I'll freely admit I suck with Var + For, etc usage.
Tx for any help ya can give :)
 
Help with buff array

Users who are viewing this thread

Back
Top
Cart