Switching Targets

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

browneyedlady1
orc pawn
orc pawn
Posts: 18
Joined: Fri Dec 05, 2008 4:32 am

Switching Targets

Post by browneyedlady1 » Mon Mar 16, 2009 6:24 pm

Hello,

I need assistance macroing my toons to change their targets.

I have reviewed the WIKI and I have not been able to produce the correct variables. I keep coming back wtih could not locate spawn 0-100.

For example: I tested this found in your Melee Wiki

holyshit2=/if (${Melee.Combat} && ${SpawnCount[npc radius 50 zradius 10]}>1 && ${Me.AltAbilityReady[area taunt]} && ${Melee.AggroMode}) /alt activate 110

Which works; however, I want my Shaman to switch targets and slow, cripple the add and my wiz to root and snare it and my bard to Mez it.
I have tried...

holyshit1=/if (${Me.CombatState.Equal[Combat]} && ${SpawnCount[npc radius 50 zradius 10]}>1 && ${Me.SpellReady[Balance of Discord]}) /casting 6827

This casts slow on the initial mob not the add. Then I tried /multiline ; /tar ${Spawn[${NewID}]} and that doesn't work either.

One last thing....

For my casters to even engage in a fight they have to actually melee, even after I use these

${Me.CombatState.Equal[Combat]}

!${Melee.Combat}

What is the correct code for casters in a combat state to engage in the fight (via casting) without having to actually melee a mob?

Thank you.

http://www.macroquest2.com/wiki/index.p ... e_Examples

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Mon Mar 16, 2009 6:35 pm

Change targets and cast what you want from a MACRO. Don't use melee for this.

browneyedlady1
orc pawn
orc pawn
Posts: 18
Joined: Fri Dec 05, 2008 4:32 am

Post by browneyedlady1 » Mon Mar 16, 2009 7:26 pm

Obviously we are not communicating effectively because you didn't understand my question. I found the example I listed in the Melee WIKI, if it doesn't belong there why are holyflags and downflags (mini macros) added to a characters melee ini file as shown in the Melee Wiki?

Then you didn't answer my question of what the variable or command is to change targets.

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Mon Mar 16, 2009 8:21 pm

You cannot change targets from a /holyshit.

Use a macro.

I can't be any clearer than that.

Lacky
a hill giant
a hill giant
Posts: 174
Joined: Mon Nov 22, 2004 4:02 pm

Post by Lacky » Mon Mar 16, 2009 9:12 pm

Why are you controlling casters with a melee specific plugin?
So I am wrong, Sue me.

browneyedlady1
orc pawn
orc pawn
Posts: 18
Joined: Fri Dec 05, 2008 4:32 am

Post by browneyedlady1 » Tue Mar 17, 2009 1:21 am

I usually bot 4-5 toons depending on what quest I am working on and I am having problems getting autobot to work for any of my toons as it freezes my PC and crashes EQ. After reading the forums for days on end, I decided to try Holyflags and Downflags and I was honestly unaware that it was meant for just MELEE classes.

However, it works fantastic for my casters as my Shaman, slows, cripples, dots that mob and then casts his group AE heal and buffs, simulteneously my wizard snares and nukes. My casters also use their AA's if the correct variables are used, so again, I am very pleased with using MQ2Melee to control my casters via the downflags and holyflags. Then I use EQBC to control their movements and assists.

What I was trying to accomplish by posting here and asking for help was to see if there was a way for my Pally to switch targets and offtank via a holyflag. Right now the Pally recognizes that the mob is in the camp, but will not change targets to engage the add. So I have been tweaking and working with the holyflag.

holyshit0=/if (${Melee.Combat} && ${SpawnCount[npc radius 30 zradius 5]}>1 && ${Spawn[${MobID}].TypeEqual[NewAddID]} && ${Me.SpellReady[Crush of Compuction]}) /multiline ; /tar ${NewAddID} ; /casting 19143 ; /attack on

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Tue Mar 17, 2009 4:24 am

browneyedlady1 wrote:holyshit0=/if (${Melee.Combat} && ${SpawnCount[npc radius 30 zradius 5]}>1 && ${Spawn[${MobID}].TypeEqual[NewAddID]} && ${Me.SpellReady[Crush of Compuction]}) /multiline ; /tar ${NewAddID} ; /casting 19143 ; /attack on
You have to use a macro do /declare NewAddID and MobID -- you might as well make use of it. Take this whole /if statement, fix the syntax error, drop it in your macro, and you are done -- almost.

Code: Select all

sub main
/declare MobID int outer
/declare NewAddID int outer

:loop
| i have no idea what you were trying to do with TypeEqual -- i'm doing it here how i would do it
| i have also made the assumption that the IDs are ints
| i don't think this is what you want to do anyway since it will only
|     switch targets if the spell is ready
/if (${Melee.Combat} && ${SpawnCount[npc radius 30 zradius 5]}>1 && ${MobID}!=${NewAddID} && ${Me.SpellReady[Crush of Compuction]}) {
    /tar id ${NewAddID}
    /delay 3s ${Target.ID}==${NewAddID}
    /casting 19143 
    /attack on
    /varset MobID ${NewAddID}
} else {
    /delay 1
}
/goto loop
/return
if you are hellbent on using just holyshits:

Code: Select all

holyshit0=/if (${Melee.Combat}  && ${MobID}!=${NewAddID}) /tar id ${NewAddID}
holyshit1=/if (!${Melee.Combat} && ${Target.ID}==${NewAddID}) /multiline ; /varset MobID ${NewAddID} ; /attack on
holyshit2=/if (${Me.SpellReady[Crush of Compuction]}) /casting 19143

browneyedlady1
orc pawn
orc pawn
Posts: 18
Joined: Fri Dec 05, 2008 4:32 am

Post by browneyedlady1 » Tue Mar 17, 2009 10:52 am

Thank you.

I really appreciate you taking the time to read and reply. I will test both and let you know how it turns out.

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Switching Targets

Post by xyilla » Sun Sep 07, 2025 6:26 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Switching Targets

Post by xyilla » Sun Sep 07, 2025 6:27 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Switching Targets

Post by xyilla » Sun Sep 07, 2025 6:28 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Switching Targets

Post by xyilla » Sun Sep 07, 2025 6:29 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Switching Targets

Post by xyilla » Sun Sep 07, 2025 6:31 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Switching Targets

Post by xyilla » Sun Sep 07, 2025 6:32 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Switching Targets

Post by xyilla » Sun Sep 07, 2025 6:33 pm