What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Healer detection & possible toggle function?

Dagradt

Community Developer
Joined
Jul 26, 2010
Messages
1,423
Reaction score
43
First: I was wondering if there was a way I could detect what spec my target is... (Mainly for the purposes of finding a healer), atm I am using a simple code:

"if ((StyxWoW.Me.CurrentTarget.Class == WoWClass.Druid || Paladin || Priest || Shaman) && StyxWoW.Me.CurrentTarget.Maxmana >= 100000)"

Obviously this may bug as Boomkins and Elemental shamans also fall into this category... I've thought about negating the Boomkin and Elemental via there class buff (forgot the names), but this also assumes that there isn't another Ele or boom, within the area to also apply the class buff. So is there a way to detect your targets spec?

Secondly: Is there a way I could make a toggle function to force a rotation? So if I was in an arena and I know that the paladin in the corner is a healer, I could press a key, lets say Caps Lock (sense it is never used, and which would be per-determined in the code), and the CC will force a rotation till the key is pressed again. Is this possible?

Thank you for your time,
Dagradt
 
First: I was wondering if there was a way I could detect what spec my target is... (Mainly for the purposes of finding a healer), atm I am using a simple code:

"if ((StyxWoW.Me.CurrentTarget.Class == WoWClass.Druid || Paladin || Priest || Shaman) && StyxWoW.Me.CurrentTarget.Maxmana >= 100000)"

edit: Quick thought: each spec usually has a spec-specific passive, increases mana, health, energy, etc. You may be able to find this aura if you check the target's aura collection (not active auras, make sure you're checking /all/ auras). Long shot but it might work.

I think the only real way to do this is via class buffs, class abilities, and HP/Mana values. Ugly solution but as far as I know there isn't an easy way to query spec information.

Few other options:

Look into API NotifyInspect - WoWWiki - Your guide to the World of Warcraft and use Lua to retrieve inspect information. I'm unsure if this works for hostile players.
You could write something that fetches the primary spec of each player from their armoury page but that would be unreliable and slow.

Secondly: Is there a way I could make a toggle function to force a rotation? So if I was in an arena and I know that the paladin in the corner is a healer, I could press a key, lets say Caps Lock (sense it is never used, and which would be per-determined in the code), and the CC will force a rotation till the key is pressed again. Is this possible?

You have a few options:

Use Lua to retrieve the status of an in game macro. Requires use of Lua every tick so it probably isn't a good idea. There are a few CCs that make use of this, I think EzRet is one of them, so you can probably start there for code examples.
Capture the user's keyboard input through a windows form. Bad idea because the form requires focus.
Hook WH_KEYBOARD_LL and capture key input directly. There is probably a library out there that will allow you to do this, if not it will require some research on your part.


Good luck!
 
Last edited:
@Fiftypence,

Again thank you for your ongoing help! I did add Aura checks for druids(make sure it isn't a boomkin), Shamans(make sure Elemental Oath is not present), and Priests(check for ShadowForm), Paladins are easy to spot. It seems to be working smoothly. I will use your above response to see if I can't get this to work!

Again thank you,
Dagradt
 
@Serium, Noamchomsky

Also very good info, thanks!

Edit: The WoWPartyMember only works for people in your won group, I need to detect an enemy play. In any case I like this new method of group finding!
 
Last edited:
@Serium, Noamchomsky

Also very good info, thanks!

Edit: The WoWPartyMember only works for people in your won group, I need to detect an enemy play. In any case I like this new method of group finding!
Oh well then your best bet is to go by spells, buffs and spec.

P.S. About the toggle function, it is possible to do it with a macro but that is an area which i haven't found a fitting project to use for.
 
@serium,

Would it be possible to see what code you have used for this macro to work?
 
@Serium,

Only issue is that if the above stated code were to work as a key logger, your system may also read it as such and file the CC as a virus or malicious item, lol! In any case I will deffenatly look intothis as well.
 
Last edited:
Are you willing to share what you came up with for hostile spec detection? I wanted to implement the same thing.
 
@Serium,

Only issue is that if the above stated code were to work as a key logger, your system may also read it as such and file the CC as a virus or malicious item, lol! In any case I will deffenatly look intothis as well.

I am using a Macro to set a var in the WoWClient and in the beginning of my CC, I will use Lua.GetReturnVal to get the value of this Var.
Also you can integrate all the manual control into one Var and it means you only need to use: Lua.GetReturnVal for all your manual control. For example: pause the CC, manual use different burst skill, control skill, toggle between different scene, like dual, world PvP, etc.

I remember in the CLU PvP, you also use the same way to do it. But you use different Var and need to call Lua.GetRetrunVal several times and it will make the CC slower.

But of course, there is a shortage that it is not a "real time control". Since all your manually command will be received by CC once per rotation. But if your CC is quick enough, 200ms delay should not be a problem.
 
Back
Top