• 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

Macro Help

Rellik

New member
Hi,

I am fairly new to writing macros. I wrote this macro as a sample/test to see what I could do but I know there is a much easier way to do this.

I was wondering if someone could help me optimize this macro and show me easier ways to do it, basically. It seems like a very roundabout way to do what I want accomplished (setting Timers to avoid recasting, I think there's some way to avoid that with loops but I don't quite understand them fully yet, and currently if I fizzle a buff it won't recast)

Here's what I want it to do:

/target the person defined as BuffReceiver
mem Focus, Stamina, Sense, and Haste if not already memmed.
Cast them on BuffReceiver, unless lom then cannibalize and make sure to heal myself if I get too low on HP from canni'ing.

Here's the macro:
Rich (BB code):
#turbo
#include Spell_Routines.inc
#define BuffReceiver NAME_REMOVED
Sub Main
/declare SpellHaste outer "Talisman of Celerity" 
/declare SpellFocus outer "Wunshi's Focusing" 
/declare SpellStamina outer "Spirit of Fortitude" 
/declare SpellSense outer "Spirit of Sense" 
/declare SpellCanny outer "Ancient: Ancestral Calling"
/declare SpellHeal outer "Ancient: Wilslik's Mending"
/declare SpellHoT outer "Spiritual Serenity"
/declare FocusTimer timer outer
/declare HasteTimer timer outer
/declare StaminaTimer timer outer
/declare SenseTimer timer outer



  /if ( !${Me.Gem[${SpellFocus}]} ) { 
      /tell BuffReceiver Hang on. Memming Focus.
      /memspell 6 ${SpellFocus} 
      /delay 20 
   } 
  /if ( !${Me.Gem[${SpellCanny}]} ) { 
      /tell BuffReceiver Hang on. Memming Canni.
      /memspell 7 ${SpellCanny} 
      /delay 20 
   } 
  /if ( !${Me.Gem[${SpellSense}]} ) { 
/tell BuffReceiver Hang on. Memming Sense.
      /memspell 9 ${SpellSense} 
      /delay 20 
   } 
  /if ( !${Me.Gem[${SpellStamina}]} ) { 
/tell BuffReceiver Hang on. Memming Stamina.
      /memspell 3 ${SpellStamina} 
      /delay 20 
   } 
  /if ( !${Me.Gem[${SpellHaste}]} ) { 
/tell BuffReceiver Hang on. Memming Haste.
      /memspell 8 ${SpellHaste} 
      /delay 20 
   } 

/target BuffReceiver
:MainLoop
/doevents
/if (${Me.AltAbilityReady[47]} && ${Me.CurrentMana} < ${Math.Calc[${Me.MaxMana}-1200]} && ${Me.MaxHPs} > 5000) /call Cannibalization
/if (${Me.SpellReady[${SpellCanny}]}) /call Canny
/if (${Me.SpellReady[${SpellFocus}]} && ${FocusTimer}==0) {
/tell BuffReceiver Focus incoming.
/call cast ${SpellFocus}
/varset FocusTimer 900000m
}
/if (${Me.SpellReady[${SpellHaste}]} && ${HasteTimer}==0) {
/tell BuffReceiver Haste incoming.
/call cast ${SpellHaste}
/varset HasteTimer 900000m
}
/if (${Me.SpellReady[${SpellSense}]} && ${SenseTimer}==0) {
/tell BuffReceiver Sense incoming.
/call cast ${SpellSense}
/varset SenseTimer 900000m
}
/if (${Me.SpellReady[${SpellStamina}]} && ${StaminaTimer}==0) {
/tell BuffReceiver Stamina incoming.
/call cast ${SpellStamina}
/varset StaminaTimer 900000m
}
/if (!${FocusTimer}==0 && !${HasteTimer}==0 && !${StaminaTimer}==0 && !${SenseTimer}==0) /endm
/goto :MainLoop
   
/return


Sub Cannibalization
/tell BuffReceiver Hold on, activating alternate ability "Cannibalization".
/aa act Cannibalization
/delay 3s 
/if (${Me.PctHPs}<70) /call HealSelf
/return

Sub Canny
/if (${Me.PctMana}>35) /return
/if (${Me.PctHPs}<70) /call HealSelf
/tell BuffReceiver Hold on, cannibalizing.
/call cast ${SpellCanny} gem1 3s
/return


Sub HealSelf
/if (${Me.PctHPs}>40 && ${Me.PctHPs}<70) /if (!${Me.Buff[${SpellHoT}].ID}) {
        /tell BuffReceiver Hold on, I need to heal myself.
	/target id ${Me.ID}
	/delay 2
	/call cast ${SpellHoT} gem4 3s
}
/if (${Me.PctHPs}<40) {
	/tell BuffReceiver Hold on, I need to heal myself.
	/target id ${Me.ID}
	/delay 2 
	/call cast ${SpellHeal} gem5 4s
}
/return



/return
 
Macro Help

Users who are viewing this thread

Back
Top
Cart