• 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

Necro macro

jaybird

New member
tryin to get this macro to work any help?

#event exp "#*#experience!#*#"
Sub Main
/declare M_Assist string outer ${Target.CleanName}
/declare M_Assist_ID int outer ${Target.ID}
/declare Done int outer 0
:Start
/doevents
/target ${M_Assist}
/assist ${M_Assist}
/if (${Target.Type.Equal[PC]}) /return
/if (${Target.Distance}>=200) /return
/if (${Target.PctHPs}>=91) /return
/if (${Done} == 1) /return
/if (!${Target.ID}) /return
/if (${Target.Type.Equal[Corpse]}) /return
/if (!${Target.LineOfSight} || ${Target.Type.Equal[PC]}) /return
/pet attack
/cast "Dread Pyre"
/cast "Dark Nightmare"
/cast "Mind Wrack"
/aa act Death Peace
/varset done 1
/goto :Start
}

sub event_exp
/stand
/varset Done 0
/return
}
 
First thing I noticed immediately. You don't end a sub with "}". You end it with "/return". So the immediate changes to make would put the macro at:

Rich (BB code):
#event exp "#*#experience!#*#"
Sub Main
/declare M_Assist string outer ${Target.CleanName}
/declare M_Assist_ID int outer ${Target.ID}
/declare Done int outer 0
:Start
/doevents
/target ${M_Assist}
/assist ${M_Assist}
/if (${Target.Type.Equal[PC]}) /return
/if (${Target.Distance}>=200) /return
/if (${Target.PctHPs}>=91) /return
/if (${Done} == 1) /return
/if (!${Target.ID}) /return
/if (${Target.Type.Equal[Corpse]}) /return
/if (!${Target.LineOfSight} || ${Target.Type.Equal[PC]}) /return
/pet attack
/cast "Dread Pyre"
/cast "Dark Nightmare"
/cast "Mind Wrack"
/aa act Death Peace
/varset done 1
/goto :Start
/return

sub event_exp
/stand
/varset Done 0
/return

Next major thing is that the way your macro is set up, it'll end if your MA assists anything that isn't an NPC. From the looks of it, you're trying to set yourself up an AFK macro...or something for a bot...so that isn't acceptable.

Rich (BB code):
#event exp "#*#experience!#*#"
Sub Main
/declare M_Assist string outer ${Target.CleanName}
/declare M_Assist_ID int outer ${Target.ID}
/declare Done int outer 0
:Start
/doevents
/target ${M_Assist}
/assist ${M_Assist}
/if (${Target.ID}) /call targeting
/goto :start
/return

sub event_exp
/stand
/varset Done 0
/return

Sub targeting
/if (${Target.Type.Equal[PC]} || ${Target.Distance}>=200 || ${Target.PctHPs}>=91 || !${Target.ID} || ${Target.Type.Equal[Corpse]} || !${Target.LineOfSight} || ${Target.Type.Equal[PC]}) /return
/call attack
/return

Sub Attack
/pet attack
/cast "Dread Pyre"
/delay 5m ${Me.SpellReady[Dark Nightmare]}
/cast "Dark Nightmare"
/delay 5m ${Me.SpellReady[Mind Wrack]}
/cast "Mind Wrack"
:fd
/if (${Me.Casting}) {
/delay 1s
/goto :fd
}
/aa act Death Peace
/varset done 1
/goto :Start
/return

Truth be told, that's pretty ugly as well. Your best bet is to go to the MQ2 boards and get AFKNecro.mac, then customize it for what you need.
 
Not vary well with macros is all. Its for a necro bot not completly afk. any other suggestions before i try this again? :) Lookin for somethin simple, 3 dots then FD. MQ2 site looks complicated with 6 dots lots of crap i dont understand and a hud i dont want.
 
There is an include that handles casting called spell_routines.inc. It will handle fizzles and interupts. Another thing is what is ${Done} for? You do not have a conditional statement that checks for its value, you are only giving it a value. Whit the spell_routines, you won't need the Spell casting check.

Do you want the necro to cast the spells one right after the other or are you trying to spread them out? If you want them one right after another simply do this:
Rich (BB code):
     /call cast "Dread Pyre"
     /call cast "Dark Nightmare"
     /call cast "Mind Wrack"
     /call cast "Death Peace" alt

The cast function in spell_routines will wait until the spell is ready.

Here's some edits ... left in the ${Done} ant the 5 min timers.
Rich (BB code):
#include spell_routines.inc

#event exp "#*#experience!#*#"

Sub Main
/declare M_Assist string outer ${Target.CleanName}
/declare M_Assist_ID int outer ${Target.ID}
/declare Done int outer 0

:Start
/doevents
/target ${M_Assist}
/assist ${M_Assist}
/if (${Target.ID}) /call targeting
/goto :start
/return

sub event_exp
     /stand
     /varset Done 0
/return

Sub targeting
     /if (${Target.Type.Equal[PC]} || ${Target.Distance}>=200 || ${Target.PctHPs}>=91 || !${Target.ID} || ${Target.Type.Equal[Corpse]} || !${Target.LineOfSight}) /return
     /call attack
/return

Sub Attack
     /pet attack
     /call cast "Dread Pyre"
     /delay 5m ${Me.SpellReady[Dark Nightmare]}
     /call cast "Dark Nightmare"
     /delay 5m ${Me.SpellReady[Mind Wrack]}
     /call cast "Mind Wrack"
     /call cast "Death Peace" alt
     /varset done 1
     /goto :Start
/return
 
nfsb61.jpg




any ideas?
P.S. Guy who made the frist code has no experience with macros/Nor do i.
 
Try

Rich (BB code):
#include spell_routines.inc

#event exp "#*#experience!#*#"


Sub Main

/if (!${Defined[M_Assist]} || !${Defined[M_Assist_ID]} || !${Defined[Done]}) {
/declare M_Assist string outer ${Target.CleanName}
/declare M_Assist_ID int outer ${Target.ID}
/declare Done int outer 0
}

:Start
/doevents
/target ${M_Assist}
/assist ${M_Assist}
/if (${Target.ID}) /call targeting
/goto :Start
/return

sub event_exp
     /stand
     /varset Done 0
/return

Sub targeting
     /if (${Target.Type.Equal[PC]} || ${Target.Distance}>=200 || ${Target.PctHPs}>=91 || !${Target.ID} || ${Target.Type.Equal[Corpse]} || !${Target.LineOfSight}) /return
     /call Attack
/return

Sub Attack
     :Start2
     /if (${Done}!=1) {
     /pet attack
     /call cast "Dread Pyre"
     /delay 5m ${Me.SpellReady[Dark Nightmare]}
     /call cast "Dark Nightmare"
     /delay 5m ${Me.SpellReady[Mind Wrack]}
     /call cast "Mind Wrack"
     /call cast "Death Peace" alt
     /varset Done 1
     }
     /if (${Target.ID}) /goto :Start2
/return
 
Last edited:
Rich (BB code):
#event exp "#*#experience!#*#"
Sub Main
/declare M_Assist string outer ${Target.CleanName}
/declare M_Assist_ID int outer ${Target.ID}
/declare Done int outer 0

:Start
/doevents
/target ${M_Assist}
/assist ${M_Assist}
/if (${Target.Type.Equal[PC]}) /return
/if (${Target.Distance}>=200) /return
/if (${Target.PctHPs}>=91 || (${Target.PctHPs}<=20) /return
/if (${Done} == 1) /return
/if (!${Target.ID}) /return
/if (${Target.Type.Equal[Corpse]}) /return
/if (!${Target.LineOfSight} || ${Target.Type.Equal[PC]}) /return
/pet attack
/cast "Dread Pyre"
/cast "Dark Nightmare"
/cast "Mind Wrack"
/aa act Death Peace
/varset Done 1
/goto :Start


sub event_exp
/stand
/varset Done 0
/target ${M_Assist}
/return

I put a test to make sure he has a target, and to make sure you have the MA targetted before you /return.

If this doesn't work, are you the puller? What stage does this get stuck on? Does it even start? If it works replace the /cast with /call cast and include the spell_routine.inc, so it works better.
 
Last edited:
really, look at my necro macro. just add some assist code in there and it would work perfect. it already checks for fizzles, resists and all that. plus it ensures that the dots go off so they dont grab agro.
 
Necro macro

Users who are viewing this thread

Back
Top
Cart