• 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!!

Jumjum5

New member
I tried this but took some stuff out so only the chat stuff would be there. I am new to this still and dont know how to fix it.This is what I got....

roleplay.mac

#chat group
#chat tell
#chat say
#chat shout
#chat ooc


Sub Main
:Loop

Sub Event_Chat(string ChatType,string ChatSender,string ChatText)
/if (${ChatText.Equal[?]}) && (${ChatText.NotEqual[${Charactername}]}) && (${ChatSender.NotEqual[${Charactername}]}) {
/if (${ChatType.Equal[TELL]}) /tell ${ChatSender} Dude?
/if (${ChatType.Equal[GROUP]}) /gsay Dude?
/if (${ChatType.Equal[OOC]}) /ooc Dude?
/if (${ChatType.Equal[SHOUT]}) /shout Dude?
/if (${ChatType.Equal[SAY]}) /say Dude?
}
/if (${ChatText.Equal[.]}) && (${ChatText.NotEqual[${Charactername}]}) && (${ChatSender.NotEqual[${Charactername}]}) {
/varset statementvar ${Math.Rand[2]}
/if (${ChatType.Equal[TELL]}) {
/if (${statementvar}==0) /tell ${ChatSender} Okie.
/if (${statementvar}==1) /tell ${ChatSender} Sure.
/if (${statementvar}==2) /tell ${ChatSender} Right on.
}
/if (${ChatType.Equal[GROUP]})
/if (${statementvar}==0) /gsay Okie.
/if (${statementvar}==1) /gsay Sure.
/if (${statementvar}==2) /gsay Right on.
}
/if (${ChatType.Equal[OOC]})
/if (${statementvar}==0) /ooc Okie.
/if (${statementvar}==1) /ooc Sure.
/if (${statementvar}==2) /ooc Right on.
}
/if (${ChatType.Equal[SHOUT]})
/if (${statementvar}==0) /shout Okie.
/if (${statementvar}==1) /shout Sure.
/if (${statementvar}==2) /shout Right on.
}
/if (${ChatType.Equal[SAY]})
/if (${statementvar}==0) /say Okie.
/if (${statementvar}==1) /say Sure.
/if (${statementvar}==2) /say Right on.
}
}

/if (${ChatText.Equal[${Charactername}]}) && (${ChatSender.NotEqual[${Charactername}]}) {
/if (${ChatType.Equal[TELL]}) /tell ${ChatSender} Lag
/if (${ChatType.Equal[GROUP]}) /gsay Lag
/if (${ChatType.Equal[OOC]}) /ooc Lag
/if (${ChatType.Equal[SHOUT]}) /shout Lag
/if (${ChatType.Equal[SAY]}) /say Lag
}
/goto :Loop
/return



When I do /mac roleplay it say this in the mq2 window...Flow ran into another subroutine. roleplay.mac@14 (Event_Chat(string ChatType,string ChatSender,string ChatText)):Sub Event_Chat (string ChatType,string ChatSender,string ChatText).

I got no clue on how to fix it so can anybody help me plz...would really like to include this with my rh.mac so it can look like I am actually playing by giving reponses instead of telling everybody I missed them talking to me for the past 20min because of battle spam lol.
 
Ok here is the whole code.....


#chat group
#chat tell
#chat say
#chat shout
#chat ooc

#event exp "#*#experience!!"
#event joingroup "#*#invitesyou#*#

Sub Main
/declare fighting int outer 0
/declare statementvar int outer
/declare Charactername string outer ${Me.CleanName}

:Mainloop
/doevents
/if (${Me.Target.Type.Equal[pc]}) /call CheckForTargets
/if (!${Me.Pet.ID}) /call castingpet
/if (${Window[TradeWnd].Open}) {
/delay 2s
/notify TradeWnd TRDW_Trade_Button leftmouseup
}
/delay 2s
/goto :Mainloop
/return

sub castingpet
/declare myXcoords int local ${Me.X}
/declare myYcoords int local ${Me.Y]
/delay 5s
/if (${myXcoords}==${Me.X}) && (${myYcoords}=={Me.Y}) {
/cast ${petspell}
/delay 10s
}
/return

Sub Event_exp
/varset fighting 0
/return

Sub Event_Chat(string ChatType,string ChatSender,string ChatText)
/if (${ChatText.Equal[?]}) && (${ChatText.NotEqual[${Charactername}]}) && (${ChatSender.NotEqual[${Charactername}]}) {
/if (${ChatType.Equal[TELL]}) /tell ${ChatSender} Dude?
/if (${ChatType.Equal[GROUP]}) /gsay Dude?
/if (${ChatType.Equal[OOC]}) /ooc Dude?
/if (${ChatType.Equal[SHOUT]}) /shout Dude?
/if (${ChatType.Equal[SAY]}) /say Dude?
}
/if (${ChatText.Equal[.]}) && (${ChatText.NotEqual[${Charactername}]}) && (${ChatSender.NotEqual[${Charactername}]}) {
/varset statementvar ${Math.Rand[2]}
/if (${ChatType.Equal[TELL]}) {
/if (${statementvar}==0) /tell ${ChatSender} Okie.
/if (${statementvar}==1) /tell ${ChatSender} Sure.
/if (${statementvar}==2) /tell ${ChatSender} Right on.
}
/if (${ChatType.Equal[GROUP]})
/if (${statementvar}==0) /gsay Okie.
/if (${statementvar}==1) /gsay Sure.
/if (${statementvar}==2) /gsay Right on.
}
/if (${ChatType.Equal[OOC]})
/if (${statementvar}==0) /ooc Okie.
/if (${statementvar}==1) /ooc Sure.
/if (${statementvar}==2) /ooc Right on.
}
/if (${ChatType.Equal[SHOUT]})
/if (${statementvar}==0) /shout Okie.
/if (${statementvar}==1) /shout Sure.
/if (${statementvar}==2) /shout Right on.
}
/if (${ChatType.Equal[SAY]})
/if (${statementvar}==0) /say Okie.
/if (${statementvar}==1) /say Sure.
/if (${statementvar}==2) /say Right on.
}
}

/if (${ChatText.Equal[${Charactername}]}) && (${ChatSender.NotEqual[${Charactername}]}) {
/if (${ChatType.Equal[TELL]}) /tell ${ChatSender} Lag
/if (${ChatType.Equal[GROUP]}) /gsay Lag
/if (${ChatType.Equal[OOC]}) /ooc Lag
/if (${ChatType.Equal[SHOUT]}) /shout Lag
/if (${ChatType.Equal[SAY]}) /say Lag
}
/return


Sub Event_joingroup
/ctrl /keypress i
/delay 1s
/target ${GroupLeader.Name}
/follow ${GroupLeader.Name}
/return

Sub CheckForTargets
/if (${fighting}==1) /return
/if (${aggroAnim.Find[|${Me.Pet.Animation}|]}) {
/target pet
/assist
/gsay Kill a ${Target.CleanName}
/target ${GroupLeader.Name}
/follow ${GroupLeader.Name}
/varset fighting 1
/return
}

/if (${aggroAnim.Find[|${NearestSpawn[1].Animation}|]}) {
/target ${NearestSpawn[1]}
/if (${Me.Target.Type.Equal[pc]}) /assist ${Target.CleanName}
/gsay Kill a ${Target.CleanName}
/pet attack
/target ${GroupLeader.Name}
/follow ${GroupLeader.Name}
/varset fighting 1
/return
}
/if (${aggroAnim.Find[|${NearestSpawn[2].Animation}|]}) {
/target ${NearestSpawn[2]}
/if (${Me.Target.Type.Equal[pc]}) /assist ${Target.CleanName}
/gsay Kill a ${Target.CleanName}
/pet attack
/target ${GroupLeader.Name}
/follow ${GroupLeader.Name}
/varset fighting 1
/return
}
/if (${aggroAnim.Find[|${NearestSpawn[3].Animation}|]}) {
/target ${NearestSpawn[3]}
/if (${Me.Target.Type.Equal[pc]}) /assist ${Target.CleanName}
/gsay Kill a ${Target.CleanName}
/pet attack
/target ${GroupLeader.Name}
/follow ${GroupLeader.Name}
/varset fighting 1
/return
}
/if (${aggroAnim.Find[|${NearestSpawn[4].Animation}|]}) {
/target ${NearestSpawn[4]}
/if (${Me.Target.Type.Equal[pc]}) /assist ${Target.CleanName}
/gsay Kill a ${Target.CleanName}
/pet attack
/target ${GroupLeader.Name}
/follow ${GroupLeader.Name}
/varset fighting 1
/return
}
/if (${aggroAnim.Find[|${NearestSpawn[5].Animation}|]}) {
/target ${NearestSpawn[5]}
/if (${Me.Target.Type.Equal[pc]}) /assist ${Target.CleanName}
/gsay Kill a ${Target.CleanName}
/pet attack
/target ${GroupLeader.Name}
/follow ${GroupLeader.Name}
/varset fighting 1
/return
}
/if (${aggroAnim.Find[|${NearestSpawn[6].Animation}|]}) {
/target ${NearestSpawn[6]}
/if (${Me.Target.Type.Equal[pc]}) /assist ${Target.CleanName}
/gsay Kill a ${Target.CleanName}
/pet attack
/target ${GroupLeader.Name}
/follow ${GroupLeader.Name}
/varset fighting 1
/return
}
/if (${aggroAnim.Find[|${NearestSpawn[7].Animation}|]}) {
/target ${NearestSpawn[7]}
/if (${Me.Target.Type.Equal[pc]}) /assist ${Target.CleanName}
/gsay Kill a ${Target.CleanName}
/pet attack
/target ${GroupLeader.Name}
/follow ${GroupLeader.Name}
/varset fighting 1
/return
}
 
no /return after Sub CheckForTargets
Rich (BB code):
/if (${aggroAnim.Find[|${NearestSpawn[7].Animation}|]}) {
/target ${NearestSpawn[7]}
/if (${Me.Target.Type.Equal[pc]}) /assist ${Target.CleanName}
/gsay Kill a ${Target.CleanName}
/pet attack
/target ${GroupLeader.Name}
/follow ${GroupLeader.Name}
/varset fighting 1
/return
}
should be
Rich (BB code):
/if (${aggroAnim.Find[|${NearestSpawn[7].Animation}|]}) {
/target ${NearestSpawn[7]}
/if (${Me.Target.Type.Equal[pc]}) /assist ${Target.CleanName}
/gsay Kill a ${Target.CleanName}
/pet attack
/target ${GroupLeader.Name}
/follow ${GroupLeader.Name}
/varset fighting 1
/return
}
/return
 
Ok got a problem with the chat on it now,when I do /mac roleplay it says....

Failed to parse /if command. Could not find command to execute.
roleplay@51 (Event_Chat(string ChatType,string ChatSender,string ChatText)):/if (${ChatType.Equal [SHOUT]})
roleplay.mac@15 (Main):Mainloop
 
I got it fixed but it will only say something if someone says my name....cant get it to say anything else like "ok, sure, right on" when someone says something in group ooc or shout....any idea how to fix this?
 
Macro Help!!

Users who are viewing this thread

Back
Top
Cart