General Looking for a way to Target Self
Reply
Looking for a way to Target Self
Looking for a way to target self and back on Target that does not use //keypress "TAB".


For example

in a macro where:

1 If HP <20%

2 Target Self

3 Click Item (That requires self targeting)

4 Back on Original Mob
Fri Dec 14, 2012 12:31 pm
This is very very basic but can give you an idea and its off the top of my head.
Lots of ways of handling this, depending on what macros you have your hands on you can pull out good ideas from most of those.

Macro
More +
Sub Randomstuff
/delcare x int local 0
/if ((${Me.PctHps}<=20) && ${Target.Type.Equal[NPC]} && !${Target.Type.Equal[Corpse]}) {
/varset x ${Target.ID}
/target ${Me.CleanName}
/delay 5
/cast item here
/delay xxx here
/target id ${x}
}
/return

_________________
To be continued...
Fri Dec 14, 2012 3:17 pm
Listen to This Guy
as always, i recommend NOT using a /target then /cast command. just use /casting and let it handle it. this assumes you have MQ2Cast loaded.
Macro
More +
/casting "item name" slotname -targetid|${Me.ID}

The quotes around the item name are important.
_________________
Sorvani
Fri Dec 14, 2012 8:46 pm
Senior Project Member
sorvani's way > mine 99.9% of the time. I think I need to read the mq2 documentation again ;)
_________________
To be continued...
Sat Dec 15, 2012 12:00 pm
Listen to This Guy
Thanks,

What is the difference between:

/target ${Me.CleanName}

AND

/target ${Me.Name}

Thanks.
Thu Dec 20, 2012 5:27 pm
I just always use CleanName, for self targeting I don't think there is a difference, at least when I /echo it I do not see any but look at this example.
Necro pet targeted:
/echo ${Target.Name} -->Joober000
/echo ${Target.CleanName} -->Joober
_________________
To be continued...
Thu Dec 20, 2012 6:41 pm
Listen to This Guy
Nothing for players.

Me is the type Character. Character has a bunch of values like... AGI. So Me.AGI is legal.
Target is type Spawn. It has some values too.. like Target.PctHPs.

Me is a Character type, but Character inherits the Spawn type. That means any properties/values/methods that Spawn has Character will have too. It's a one way street though. That means Me.PctHPs is legal, but Target.AGI is not.

This is all just a way too detailed way of telling you that Me may have some properties/methods/values that at times may not seem to have any use. In reality it's just because it's part of a structure that gets used for multiple things.

${Target.Name} would evaluate to #King_Tormax00
${Target.CleanName} would evaluate to King Tormax
${Me.Name} would evaluate to Maudigan
${Me.CleanName} would evaluate to Maudigan

All that being said, target will work with #King_Tormax00 or King Tormax I believe.
Thu Dec 20, 2012 6:44 pm
Project Lead
Could CleanName vs Name help not targeting a corpse when healing?

for example:
/if (${Group.Member[2].PctHPs}<${tankhealpercent} && ${Group.Member[2].Type.Equal[PC]} && ${Group.Member[2].Type.NotEqual[CORPSE]} ) {
/target ${Spawn[pc ${Group.Member[2].CleanName}]}
/delay 3

/call cast ${smallhealspell} gem3 4s CheckHP
/g HEALING %T
/return
Thu Dec 20, 2012 10:15 pm
Well like maud said you should really read the TLO and datatypes.
Take a look at the mq2 wiki, I would pull out examples and write more but I am trying to fix my other computer.
_________________
To be continued...
Thu Dec 20, 2012 10:47 pm
Listen to This Guy
Ok Ty
Thu Dec 20, 2012 11:18 pm
also, this fails on ALL eqemu servers. the corpse type is not returned correctly by MQ2. I keep meaning to look and see how they decide corpse and to change something to make it work for the emu, but have not got around to it.
Macro
More +
${Group.Member[2].Type.NotEqual[CORPSE]}

_________________
Sorvani
Thu Dec 20, 2012 11:33 pm
Senior Project Member
sorvani yeah corpse check can be stupid. I'm sure part of my checks fail on that check but its yet to cause me any issues so I've pretty much ignored it.
sadface that my video card died so I'm formating my machine finally and making it a nix box.
_________________
To be continued...
Thu Dec 20, 2012 11:56 pm
Listen to This Guy
thanks
Mon Aug 26, 2013 6:06 am
General Looking for a way to Target Self
Reply