Thread Tools Display Modes
01-26-06, 06:56 AM   #1
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Cirk's Autorank

Autorank automatically casts the appropriate rank of a spell when targetting lower level friendly players, and provides support for a self-casting key.

Current version
Autorank is currently version 1.12.0.

Download page
http://www.wowinterface.com/download...fo.php?id=4536

Known bugs
None when running with the default client.

Future enhancements
None planned.


-- Cirk of Doomhammer
__________________
Cirk's Addons

Last edited by Cirk : 10-04-06 at 10:23 PM. Reason: version 1.12.0
  Reply With Quote
01-31-06, 07:02 AM   #2
Vudoo
A Murloc Raider
Join Date: Jan 2006
Posts: 4
It seems to conflict with selfcast mods like EZSelfcast and Telo's Selfcast since each one hooks the UseAction function. It would be great if you can include selfcast functions internally.

EDIT: Managed to come up with a work-around.

Within the function Autorank_UseAction (LINE 318), I added a condition for the alt-key:

if (IsAltKeyDown()) then _originalUseAction(slot, cursor, 1); end

So, if ALT is held down, it will attempt to cast the spell on myself.

Last edited by Vudoo : 02-01-06 at 07:54 PM.
  Reply With Quote
01-31-06, 07:23 AM   #3
Cladhaire
Salad!
 
Cladhaire's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 1,935
Any AddOn that changes the arguments to a function in the hook chain has this sort of issue, and we don't have any reliable way to ensure we're the last hook in the chain (thus being executed first). In this particular example there are probably ways around that.
__________________
"There's only one thing that I know how to do well and I've often been told that you only can do what you know how to do well, and that's be you-- be what you're like-- be like yourself. And so I'm having a wonderful time, but I'd rather be whistling in the dark..."
  Reply With Quote
01-31-06, 09:18 PM   #4
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by Vudoo
It seems to conflict with selfcast mods like EZSelfcast and Telo's Selfcast since each one hooks the UseAction function. It would be great if you can include selfcast functions internally.
Hmmm, I'm guessing the problem is with wanting to self-cast spells that are not on the main action bar (where by default the ALT key is used to self-target spells), and as Cladhaire said, the sequencing of function hooks. Autorank hooks the functions only when it has loaded and determined that it is enabled for this player, meaning that it will usually be the last entry in the hooked function list (i.e., the first one called) because most addons hook their functions always at load time, whether enabled or not. (I did it this way in my addons to ensure that if you turn off the addon then the next time you log in, it won't even hook the functions, so minimizing any impact it could have while disabled, something that was more necessary before patch 1.9 and the per-character addons list).

I haven't looked at EZSelfcast but I assume it works pretty much the same way as Telos.

So, solution would be to either have a different structure for the way functions are hooked in LUA in WOW (not going to happen probably), modify Autorank to hook its function first (by virtue of being loaded first due to its name) regardless of enabled/disabled status (not so keen on this, but it is an option), or to add some sort of self-cast functionality to Autorank (possible )

If you want to modify your own copy of Autorank to see if you can make it work with Telo's and EZ in the meantime (by trying to hook the UseAction function first), try the following changes to Autorank.lua, noting that although these should work, I've not tested them! At line 317, just before the definition of Autorank_UseAction, insert the line _originalUseAction = UseAction;, and at line 345, just after the definition of Autorank_UseAction, insert the line UseAction = Autorank_UseAction;. This should then look something like:
Code:
-------------------------------------------------------------------------------
-- Hooked UseAction function (public)
-------------------------------------------------------------------------------
_originalUseAction = UseAction;
function Autorank_UseAction(slot, cursor, onSelf)
    ...
end
UseAction = Autorank_UseAction;
Hope that helps
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
02-22-06, 01:45 PM   #5
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
What about shaman spells?
  Reply With Quote
02-22-06, 04:33 PM   #6
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by mrruben5
What about shaman spells?
As far as I am aware (given that my shaman is only level 11), shaman spells are either non-instant heals (which for all other classes are not level restricted), totems, or enemy-target spells. And unfortunately totems can't be selected by Autorank because they aren't used on a specific target as such.

If you (or anyone) knows of any shaman spells that have multiple ranks and are level restricted and targetted, please let me know so I can add them to Autorank.

Cheers
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
03-28-06, 07:48 AM   #7
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
I've just updated Autorank for patch 1.10 (basically to accommodate the tooltip changes).

Vudoo, in regards to your change to get it to work for your preferred self-casting action, I still didn't include any functionality like that in this version, but you can either just replicate your fix again, or alternatively add this just after line 316 (i.e., after the check for the _enabled value):
Code:
onSelf = onSelf or IsAltKeyDown();
One day I should add that as a real option

Cheers,
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
03-29-06, 01:57 PM   #8
Ryianne
A Defias Bandit
Join Date: Mar 2006
Posts: 2
How about support for Divine Spirit in a future version?
  Reply With Quote
03-29-06, 04:20 PM   #9
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by Ryianne
How about support for Divine Spirit in a future version?
Oo, good idea Ryianne!

/em smacks self that didn't notice this was missing for his own level 60 priest...

Not sure when I'll be able to get an update with that in there (1.10 craziness ftl) but hopefully soon!

-- Cirk
__________________
Cirk's Addons
  Reply With Quote
03-31-06, 10:48 AM   #10
Ryianne
A Defias Bandit
Join Date: Mar 2006
Posts: 2
Fair enough. No rush needed!

Heehee.
  Reply With Quote
04-03-06, 07:20 AM   #11
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
I've just uploaded Autorank v1.10.1 (this one is for Vudoo and Ryianne ):
  • Added self-casting key support (disabled by default, use /autorank to see the options).
  • Added the Priest spell Divine Spirit to the list of spells supported by Autorank.
Note that Autorank's new self-casting key check will work by itself for any normal spells or actions on an action bar that are self-targettable, but it won't work for macros. You should be able to use it in conjunction with other self-casting addons that do support macros or other automatic self-casting features, although I haven't explicitly tested any of those.

Enjoy!
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
04-05-06, 09:23 AM   #12
Thanatos
A Murloc Raider
Join Date: Jan 2005
Posts: 9
Is it possible to add the smart-self cast feature?

So that if you have no one targeted or a hostile pc/npc and you press a buff spell, it casts on you?

These are features EZself cast had.
  Reply With Quote
04-05-06, 05:48 PM   #13
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by Thanatos
Is it possible to add the smart-self cast feature?

So that if you have no one targeted or a hostile pc/npc and you press a buff spell, it casts on you?

These are features EZself cast had.
Thanatos, you should be able to use Autorank in conjunction with other self-casting addons that do support macros or other automatic self-casting features. As such, I don't want to add any additional features to Autorank.

In otherwords, if you install both Autorank and EZself cast and set them to both use the same key (e.g., Alt) then they should work happily together, but as I noted above, I haven't tested this.

-- Cirk
__________________
Cirk's Addons
  Reply With Quote
04-10-06, 10:53 PM   #14
Stixum
A Murloc Raider
Join Date: Feb 2005
Posts: 4
Cirk,
Would it be possible to mod this so it would pick the appropriate flash heal for the damage done? I've been looking for something that does that either by a macro of an add on with no avail. Also, curious if it would be possible to mod this to target the person in your group/raid with the lowest health and targets them? Or do you have/know of something that does this already?

Basically looking for something that allows me to click one button to taget the person with the lowest health in the raid/group (group if not in raid) and another button that auto selects the appropriate heal to heal the damage. I'm thinking that it wouldn't be possible to macro both functions into the same button?

Hope the new hardware fixes the issues on Crashammer for you all!

Thanks!
  Reply With Quote
06-04-06, 12:56 PM   #15
BlackZam
A Murloc Raider
Join Date: Aug 2005
Posts: 7
I can't get the selfcast function to work.
  Reply With Quote
06-29-06, 11:25 PM   #16
Darthgnomer
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 7
Show the warlocks some love...

Please don't forget your warlock friends by adding support for Detect (Lesser/Greater) Invisibility. Thanks.
  Reply With Quote
06-30-06, 12:23 AM   #17
ninza
A Kobold Labourer
Join Date: Jun 2006
Posts: 1
Renew (rank 10)

I had problem when I tryied to cast Renew (rank 10) which is learnable from book, it always casted Rank 9 renew. Took a while to figure out why it happened and then I realized it was autorank which was causing it.

With my uber coding/scripting skills (or not) I managed to put lvl 50 renew to script code, which fixed it (though, I hope I didn't break anything).

Just if you would like to update autorank to work with those new ranks that are learnable from books thanks.

Very nice addon btw keep it going.
  Reply With Quote
08-03-06, 12:04 AM   #18
Mazzlefizz
A Pyroguard Emberseer
 
Mazzlefizz's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 3,521
Hmm...you're making me nervous that I've been casting the unnecessarily low level of Renew's, Ninza! Has this been fixed, Cirk?

Well, the original reason I was posted to this thread was for a feature request. Any chance you could add a mana ranking function, where it would downgrade the level of a spell if you don't have enough mana to cast the highest level? It sounds like a really useful function and a natural fit with this add-on.
__________________
MazzleUI Home Page: Mazzlefizz.WoWInterface.com
Info, FAQs, Forums, Download can be found at that link.
  Reply With Quote
10-04-06, 10:31 PM   #19
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by ninza
I had problem when I tryied to cast Renew (rank 10) which is learnable from book, it always casted Rank 9 renew. Took a while to figure out why it happened and then I realized it was autorank which was causing it.
Thanks for that Ninza, that was definitely my bad! Fixed in 1.12.0!

Originally Posted by Mazzlefizz
Hmm...you're making me nervous that I've been casting the unnecessarily low level of Renew's, Ninza! Has this been fixed, Cirk?
Errr, it has now Mazz!

Originally Posted by Mazzlefizz
Well, the original reason I was posted to this thread was for a feature request. Any chance you could add a mana ranking function, where it would downgrade the level of a spell if you don't have enough mana to cast the highest level? It sounds like a really useful function and a natural fit with this add-on.
I like that idea, although it might be difficult to implement in practice. Some classes (e.g., priest) have talents that allow them to cast a spell with no mana cost, and I wouldn't want Autorank to scale down that sort of crucial spellcast accidentally! Also, sometimes I'd just rather wait for the mana to be available for the rank I want to cast (usually doesn't take too long). Anyway, for 1.12.0 I've not added this feature, but I'll definitely keep thinking about it

Summary of the 1.12.0 changes from 1.11.0:
  • Added in the "learned from books" spell ranks.
  • Self-casting can now be used for all classes, and will also work with things like bandages (but only from the action bars).
  • Added support for mage conjure food and water spells, and for warlock create healthstone spells. (Just target the player you are summoning them for, and Autorank will adjust your action bar triggered spell to conjure the correct level items).
  • Added a /autorank conjure option to allow you to enable or disable the automatic rank selection for your conjured items.
  • Added support for Warlock detect invisibility spells.
  • Changed version and interface strings to match client patch 1.12.
__________________
Cirk's Addons
  Reply With Quote
10-11-06, 02:08 AM   #20
Bl4ckSh33p
A Flamescale Wyrmkin
 
Bl4ckSh33p's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2005
Posts: 124
Lightbulb

One suggestion: would be easier to translate if you add one var for several things like "rank". so you don't have to change it in every line.

(it's "Rang" in German)
__________________
» Bl4ckSh33p.de
» My WoW Tools (Portal)
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Released AddOns » Cirk's Autorank


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off