Mouseover targeting macro?

I recently started learning about macro and I make a very simple one.

/target [@mouseover]

Basically I use this to replace clicking on the persons/npcs/objects (both friendly and enemy, dead or alive)

My question is I can think of two ways to improve it but don’t know how to make it works

  1. give 2 conditions and integrate a basic attack into it, so a) it attacks the enemy target I mouseover, b) it targets the friendly NPC/players and tap-able objects. I tried to add a /cast commend to it but I figure it will generate error text upon using it on friendly target and I don’t know how to mute that specific error audio only when using this macro.

  2. integrate an auto-loot script into it. So when I mouseover a deadbody or objects, I can loot without clicking. But I don’t how the logic works, I drafted something like this:

/target [@mouseover]
/script SetAutoLootDefault(1)

/script SetAutoLootDefault(0)

#showtooltip
/cast [@mouseover,help,nodead][exists,nodead,nomod][@player] spell

Not sure about the auto loot, but that’s what I use to for both friendly and hostile npc using holy shock, let me know if that works

there is this section of the forum if you weren’t aware

1 Like

Yeah, it will have that error text and audio because this is basically trying to attack friendly target. I guess the 2nd approach is better. And I can make another one solely for enemy so it won’t have that error.

It doesn’t give me that error for me, are you sure you tried it?

Yes I am doing that in game.

I run it two different ways:

Not able to target friendly target, it will say you need a target
So I added the /target [@mouseover] in front of it
And it does generate error text and audio

Edit:
ah I just find out why, there needs to be a [exists] / [noexists] condition
The error text comes from when my mouse is slightly off and actually aims at the ground

Ok so what I do is that is bound to a key, like for me it’s E, I can press it over a target, and the spell will cast over my mouse over as a heal if it’s friendly, and damage them it they are hostile. Is yours bonded to a key?

You can also add modifiers such as shift or control if you want to cast it on your party or focus without mousing over them. It can all be done in one macro.

Yes my qert fg zxcv are all bound to spells.

So did my macro from earlier work? You aren’t getting that error message anymore right?

It shows invalid target but no error audio

2 things need to add to that, 1) a hide error text commend and 2) a only works on existing target condition.

I am trying to figure out how to make it work.

can you please tell me the spell you are trying to use?

Fracture, the basic DH attack

I just tested on my dh and it works, can you show me your entire macro for that?

#showtooltip
/target [@mouseover]
/cast [@mouseover,help,nodead][exists,nodead,nomod][@player] Fracture

I got it!

I changed the second line from @mouseover to @target
#showtooltip
/target [@mouseover]
/cast [@target,help,nodead][exists,nodead,nomod][@player] Fracture

Now it no longer generate error text and audio when I mouseover to ground and have not cleared my last target

ok so you don’t actually need /target[@mouseover] either, just use what i sent you in one line

/cast [(@mouseover)] is the same thing as /target[@mouseover), you can just condense them down

1 Like

It doesn’t work, it won’t target my mouseover. It only works when I manually targeted something.

That’s because you aren’t in range yet I bet, try it standing next to the dummies and do it. That was how I tested it to make sure it worked before I shared it

Just tried standing face to face and mouseover to npcs and players. It won’t target any of them.

Oh I think it can only target hostiles, it was different for the holy shock since you can cast it on a friendly, I’m glad you got it solved though!

1 Like