Thread Tools Display Modes
03-26-06, 08:06 PM   #21
Graguk
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 9
Awesome mod. I'm also playing from Australia and the latency issue has frustrated me too.

/salute

Now, I use a ToEP and Shadow Bolt macro, and would still like to use it in conjunction with your addon to get the full benefit from it.

You mentioned in your FAQ that you deliberately do not prevent macros running in case someone has their own SpellStopCasting() macros.

While I use SpellStopCasting() to interupt the clients cooldown when activating the trinket so I can also start casting Shadow Bolt in the same press of the button, I don't think this is the type of macro you are trying to avoid conflicting with.

I was wondering if you could make it possible to optionally disable that functionality so that I can still use my main ToEP/Shadow bolt macro and get the benefit from your addon? Either that, or point me to the line of code and or provide me with a code snippet?

Here's the macro in case you wanted to see it:

/script local a=GetInventorySlotInfo("Trinket1Slot");local b,c=GetInventoryItemCooldown("player",a);if c <= 0 then UseInventoryItem(a);SpellStopCasting();end CastSpellByName("Shadow Bolt(rank 9)");

Last edited by Graguk : 03-26-06 at 09:22 PM.
  Reply With Quote
03-26-06, 08:21 PM   #22
Graguk
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 9
If I were to remove the checks for "not isMacro" from lines 486 and 501, would that allow me to get the benefit from your addon for my macros? Looks like it should work, although I'm not certain I need to remove it from both lines..

I know that will then prevent me from manually using SpellStopCasting() to try to perform the same function.. However, if I wanted to do it manually, why would I install your addon?

Let me know your thoughts. Personally, I don't see any reason why you would accomodate people who want to manually time it, since they shouldn't bother installing this addon in that case :P
  Reply With Quote
03-26-06, 08:41 PM   #23
Graguk
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 9
If the intention of this check was to allow people to include SpellStopCasting() in a macro for a different spell, I thought FastCast only worked on the 2nd press of any given button?

ie Lets say I'm a mage, and I'm chain casting Frost Bolt on a player. I suddenly see another player that I want to counterspell, while still channeling my frost bolt, I target the new player and hit my macro for SpellStopCasting(), Counterspell. Since this is a different button to the one I was already casting, wouldn't it run anyway and interupt my frost bolt to cast counterspell?
  Reply With Quote
03-27-06, 12:53 AM   #24
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Hi Graguk! Lots of questions, I'll try and answer them as best I can (in reverse order no less )

Originally Posted by Graguk
If the intention of this check was to allow people to include SpellStopCasting() in a macro for a different spell, I thought FastCast only worked on the 2nd press of any given button?

ie Lets say I'm a mage, and I'm chain casting Frost Bolt on a player. I suddenly see another player that I want to counterspell, while still channeling my frost bolt, I target the new player and hit my macro for SpellStopCasting(), Counterspell. Since this is a different button to the one I was already casting, wouldn't it run anyway and interupt my frost bolt to cast counterspell?
Fastcast doesn't restrict you to only preventing interruptions on the same spell cast, since that would prevent you from doing combinations of different spells (e.g., Fireball, Scorch, Scorch, Fireblast), so without recognizing that the new request is a macro, Fastcast wouldn't allow it to happen until the cutoff time for the current spell had been reached.

The exception for this is of course for channeled spells, where any other key press we consider as an interruption for the channeled spell.


Originally Posted by Graguk
If I were to remove the checks for "not isMacro" from lines 486 and 501, would that allow me to get the benefit from your addon for my macros? Looks like it should work, although I'm not certain I need to remove it from both lines..
Yes that would allow you to have Fastcast treat your macros the same way that it treats non-macro spells, which would mean that you couldn't do any macro action while a spell was being cast (e.g., you wouldn't be able to do that Counterspell macro for example - you'd have to move first to interrupt your current spellcast, then do the macro). That would also mean that non-casting macros would also not work while you were casting. (This was the problem that Channelcast 1.9.1beta had).


Originally Posted by Graguk
Now, I use a ToEP and Shadow Bolt macro, and would still like to use it in conjunction with your addon to get the full benefit from it.
Ok, if I understand what you are after here, you want a single macro that you can use that will trigger ToEP if it is ready and then cast, or otherwise just cast your bolt spell, and you want to be able to fast-cast that macro just like it was a normal spell?

There are a couple of problems for Fastcast with this, the primary one being that if a macro is triggering multiple actions (non-global-cooldown instants, trinkets, etc.) then Fastcast can get confused as to what its state is when casting begins (since before the SPELLCAST_START message arrives, it will get one or two or even three SPELLCAST_STOP messages, depending on what your macro is doing and whether the previous spellcast was stopped early or not).

Also, the current approach allows you to (somewhat) stop spells from being fast-cast by putting them into a macro (although this isn't 100% a solution since if it is a simple macro that only casts that one spell, you can still fast-cast its last casting by starting a new cast).

So, whats to be done? Well, all I can think of right now is that maybe I could provide some functions that you could call in your macro to try and adjust Fastcast's state in such a way that it will allow you to do what you are after here. I'll have a ponder, and see what I can come up with.


Cheers,
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
03-27-06, 02:10 AM   #25
Graguk
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 9
Thanks for the reply. I now understand the problems you face :P

I'll look forward to seeing if you can come up with a solution, but a function that allow you to know what the "significant" spell in a macro is would probably do the trick.
  Reply With Quote
03-27-06, 07:54 PM   #26
Graguk
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 9
After disabling the check for isMacro, it did seem to work ok with my macro, although occassionally it got into a state where it wouldn't let me cast a spell for a little while. I'll do a bit more testing and see if I can be a bit more confident that it was FastCast causing the problem.
  Reply With Quote
03-28-06, 06:42 PM   #27
teedog
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 13
Ok, if I understand what you are after here, you want a single macro that you can use that will trigger ToEP if it is ready and then cast, or otherwise just cast your bolt spell, and you want to be able to fast-cast that macro just like it was a normal spell?
Exactly the functionality I'm looking for as well.
  Reply With Quote
03-30-06, 01:59 AM   #28
SerG78
A Kobold Labourer
Join Date: Mar 2006
Posts: 1
Fastcast works in WoW version 1.10?
Tested?
  Reply With Quote
04-01-06, 07:02 AM   #29
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
I've just uploaded Fastcast v1.10.0. Sorry about the delay in getting a 1.10 version released, but apart from the channeled spell events problem (which was relatively minor from what was reported to me up till today, oops) I was most concerned with non-1.10 related fixes and changes, which I hope you'll find useful:

Changes in this release are:
  • Fixes for channeled spell events for patch 1.10.
  • Allow channeled spell protection to work even with targetted spells (e.g., Blizzard).
  • Fast-casting between different spells should now work properly.
  • Reworked the way that macros are handled by Fastcast to greatly increase its utility with these.

teedog with this version of Fastcast, you can put a SpellStopCasting() call in your Frostbolt macro which will allow you to fast-cast it, without worrying about it interrupting itself. (It will still interrupt whatever spell you were casting before you started chain-casting it though, so use with caution). Of course your current macro without the SpellStopCasting() call should still work just as it does now (i.e., without fast-casting).

Raknor this version of Fastcast hooks the CastSpell and CastSpellByName functions (as well as SpellStopCasting) but only recognizes those calls when processing a macro, since that greatly simplifies the logic. However it might be something you can play with and experiment some to try and get what you were after.

Graguk these macro changes are mostly as a result of you getting me thinking about this, and me respec'ing my priest with the 1.10 patch . If you want to fast-cast your ToEP + Shadowbolt macro now, just note that you will need a SpellStopCasting() call in there even when your ToEP isn't on cooldown, which as I mentioned above means that it might interrupt a different spellcast when you first cast it. No special functions to call or anything, it should just work.

For example, on my priest Gimlet I've been experimenting with:
/script CastSpellByName("Inner Focus"); SpellStopCasting(); UseInventoryItem(GetInventorySlotInfo("Trinket1Slot")); CastSpellByName("Flash Heal");
Which basically tries to lead off with a zero mana critical heal (if Inner Focus is up) followed by more normal heals as I spam my macro key (where my trinket slot item in this case is one that gives +healing for a short time if it isn't on cooldown, and its on a different cooldown to Inner Focus).

Next release I might add a FastCast_NewSpell() function to be called by macros rather than SpellStopCasting, which will only interrupt the current spellcast if it is ready to be interrupted. (I didn't add that to this release cause I only just thought of it, dang).

Anyway, hope it all works right!
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
04-01-06, 06:51 PM   #30
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally posted by Aktash (over on the download page)
I'm using the following (simplifed, to fit into a macro, but you should get the idea) as a macro to activate trinkets when ready, and with the latest fastcast, this is no longer working correctly. It will only cast 1 scorch, and then does nothing. This problem didn't occur with v1.9.1 .
Thanks for the post Aktash. Yep, this is indeed a bug, and I've fixed it for the 1.10.1 release, which will be coming up very shortly (just doing some more testing on it).

(Basically the problem was that for some reason CastSpellByName doesn't trigger IsCurrentAction if the rank of the spell is not the highest one that you know, and I wasn't testing 1.10.0 consistently with my highest rank spells, oops)


-- Cirk
__________________
Cirk's Addons
  Reply With Quote
04-01-06, 08:34 PM   #31
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Just uploaded Fastcast v1.10.1 which should fix the bug that Aktash reported. In the ongoing improvements department, Fastcast now offers some nice functions for making your macroing life easier. Full details and explanations are on the download page (yeah, I know, its getting way too long) and in the Readme.txt file that is now in the release.

The four functions that Fastcast provides for macro usage are:
FastcastIsCasting()
FastcastStopCasting()
FastcastCast(spellName, onSelf)
FastcastUseItem(itemDesc)
So, with these, teedog's PoM casting macro:
/cast Presence of Mind
/script UseInventoryItem(GetInventorySlotInfo("Trinket1Slot"));
/cast Frostbolt(Rank 10);

might be changed to something like the following to allow it to be fast-cast:
/script if not FastcastIsCasting() then FastcastCast("Presence of Mind"); SpellStopCasting(); FastcastUseItem("Trinket1Slot"); CastSpellByName("Frostbolt(Rank 10)"); end
Graguk's ToEP casting macro:
/script local a=GetInventorySlotInfo("Trinket1Slot");local b,c=GetInventoryItemCooldown("player",a);if c <= 0 then UseInventoryItem(a);SpellStopCasting();end CastSpellByName("Shadow Bolt(rank 9)");
could be changed to be just like teedog's, or alternatively something like:
/script if FastcastStopCasting() then if FastcastUseItem("Talisman of Ephemeral Power") then SpellStopCasting(); end; CastSpellByName("Shadow Bolt"); end
Aktash's multiple trinket macro (which doesn't do any SpellStopCasting calls) coule be changed to:
/script if not FastcastUseItem(14) or not FastcastUseItem(13) then CastSpellByName("Scorch"); end
As an example using FastcastCast, The macro I posted above that I was testing on my priest became:
/script if FastcastStopCasting() then if FastcastCast("Inner Focus") then SpellStopCasting(); end; FastcastUseItem("Trinket1Slot"); CastSpellByName("Flash Heal"); end
Note that replacing CastSpellByName calls (or /cast) with FastcastCast will make the UI client ignore the cooldown of those spells, meaning that in teedog's macro (for example) the macro key changes from showing the cooldown and mana usage of the PoM spell to showing the cooldown/mana/range of Frostbolt instead. Similarly, in my priest macro case, it changed it from showing the cooldown of Inner Focus to the cooldown/mana/range of of Flash Heal.

Hope you find it useful!

-- Cirk
__________________
Cirk's Addons
  Reply With Quote
04-02-06, 12:35 AM   #32
Vileru
A Kobold Labourer
Join Date: Apr 2006
Posts: 1
New fastcast macros

In the thread on the mage forums you said you can create a pom/trinket macro. However, how would you go about creating simply a trinket + frostbolt macro with FastCast
  Reply With Quote
04-02-06, 01:29 AM   #33
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by Vileru
In the thread on the mage forums you said you can create a pom/trinket macro. However, how would you go about creating simply a trinket + frostbolt macro with FastCast
Hi Vileru, assuming you don't need to do a SpellStopCasting() call after your trinket (which normally you wouldn't) you could just do something like:
/script if FastcastStopCasting() then FastcastUseItem("trinket0slot"); CastSpellByName("Frostbolt"); end
Where for "trinket0slot" (which is the top-most trinket slot) you can also use "trinket1slot" (bottom slot) or the exact name of your item (e.g., "Talisman of Ephemeral Power", "Zandalarian Hero Charm", etc.) and it should find it in either trinket slot.

If you didn't want your macro to be fast-cast (i.e., wanted to always wait for the full-server delay) you could just use:
/script FastcastUseItem("trinket0slot"); CastSpellByName("Frostbolt")
Instead, which will just use your trinket if it is available, and cast Frostbolt.

Cheers
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
04-03-06, 09:09 AM   #34
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
First of all, apologies for uploading yet another release of Fastcast - the third one in as many days.

This release (version 1.10.2) fixes the bug that dynamicbr posted about over on the download page, where Fastcast was preventing some actions from working in Feral form. In fact Fastcast was blocking quite a lot of actions from being handled properly if the client indicated the action was "not usable", with the result that you couldn't toggle out of some toggle type actions (such as prowl for a druid) and wouldn't get error messages for actions you couldn't perform (like trying to cast when shapeshifted for druids and shadow priests).

(The cause of this was some code that I'd been experimenting with during the 1.10.0 development, and never removed again, d'oh)!

Anyway I'm hoping this version is now bug free now, and you can all stop downloading these fixes and go play instead! (Me too ).

-- Cirk
__________________
Cirk's Addons
  Reply With Quote
04-03-06, 10:05 AM   #35
Maia
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 15
Cirk,
as auto cancellation of heals (aka mana conserve) is history, I've added some code to an addon I provide to my guild which will warn if a spell being cast should better be cancelled. So my thought was to use code similar to:

Code:
function CastHeal()
   if isCasting and isOverhealing then 
      SpellStopCasting()
      isCasting = false
   else
      CastSpellByName(whatever)
      isCasting = true
   end
end
to be able to have one key that will either cast or cancel the spell (with the advantage that you dont have to jump anymore, and don't need to cancel using WSC either, which sometimes deselects the target if being hit too late).

Now the problem is that people using FastCast (including me cant cancel their heals, as FastCast seems to prevent SpellStopCasting() from working until shortly before the spell lands (am I right? If not, I must have a stupid bug in my code, and you can ignore the rest of this posting . So with your new version, I could add a FastcastStopCasting() to my code. But: everyone who doesnt have FastCast installed, or everyone with an older version that doesnt offer that function yet will end up with a big error message on his screen.

So my question is: is there any way to check if FastCast is installed and if FastcastStopCasting() is available, so my code will only run FastcastStopCasting() for people who have the latest FastCast?

Thanks in advance.
  Reply With Quote
04-03-06, 05:38 PM   #36
Graguk
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 9
Awesome improvements Cirk


BTW, I'm pretty certain that when you activate a trinket, the client activates a global cooldown so you usually do need a SpellStopCasting() call after activating a trinket.


EDIT: Sorry, I'm reading the FAQ now. Looks like you documented it pretty well

Now, to your new features.. You mention that to get a macro to work with Fastcast, you need a SpellStopCasting() call..

Here's an updated macro I use:

/script if GetInventoryItemCooldown("player", 14) == 0 then UseInventoryItem(14); SpellStopCasting(); end CastSpellByName("Shadow Bolt");

Are you saying I need to make it look like this:

/script SpellStopCasting(); if GetInventoryItemCooldown("player", 14) == 0 then UseInventoryItem(14); SpellStopCasting(); end CastSpellByName("Shadow Bolt");


or like this?:

/script if GetInventoryItemCooldown("player", 14) == 0 then UseInventoryItem(14); SpellStopCasting(); end SpellStopCasting(); CastSpellByName("Shadow Bolt");



Now, I know you've given us another option, but I'd just like to understand how fastcast uses the presence of SpellStopCasting to work with macros so I don't have to re-write my macros if I ever need to disable FastCast.

Last edited by Graguk : 04-03-06 at 05:45 PM.
  Reply With Quote
04-03-06, 06:11 PM   #37
Graguk
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 9
Ok, my first example was correct - need to have SpellStopCasting() as the first function in a macro. Cool, I temporarilly disable fastcast since it was occassionally preventing me from casting Lifetap after using my shadow bolt macro, but it sounds like you've fixed that.

The macro I've been using to manually interupt will work without any changes:

/script SpellStopCasting(); if GetInventoryItemCooldown("player", 14) == 0 then UseInventoryItem(14); SpellStopCasting(); end CastSpellByName("Shadow Bolt");
  Reply With Quote
04-03-06, 09:49 PM   #38
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by Maia
as auto cancellation of heals (aka mana conserve) is history, I've added some code to an addon I provide to my guild which will warn if a spell being cast should better be cancelled. So my thought was to use code similar to:

...

Now the problem is that people using FastCast (including me cant cancel their heals, as FastCast seems to prevent SpellStopCasting() from working until shortly before the spell lands (am I right? If not, I must have a stupid bug in my code, and you can ignore the rest of this posting . So with your new version, I could add a FastcastStopCasting() to my code. But: everyone who doesnt have FastCast installed, or everyone with an older version that doesnt offer that function yet will end up with a big error message on his screen.
Hi Maia. I assume that your addon basically provides functions like the CastHeal one you described above to be called from a macro, and users can just spam their macro key to cast and also cancel the spell again as needed? If thats the case, then Fastcast is probably interfering because it will see subsequent key presses for that macro and ignore them (because the spell that the macro originally cast is still casting).

Unfortunately there is no easy way around that in your addon while still keeping the fast-casting functionality for those spells - it would require (yet another) change to Fastcast, although it would probably be a worthwhile one for these special types of scenarios.

Originally Posted by Maia
So my question is: is there any way to check if FastCast is installed and if FastcastStopCasting() is available, so my code will only run FastcastStopCasting() for people who have the latest FastCast?
Well, as noted above, using FastcastStopCasting() won't fix the problem, but as a general coding tip whenever you want to conditionally call something in LUA, you can simply do something like:
Code:
if (FastcastStopCasting) then
  FastcastStopCasting();
else
  SpellStopCasting();
end
Now the only way I can think of to work around Fastcast here would effectively disable Fastcast's functionality for spells cast by your CastHeal function. If that approach sounds feasible, what you'll need to do is make a copy of the current CastSpellByName function when your application loads (so you get a reference to it before Fastcast hooks the function, which it does at or after the VARIABLES_LOADED event) which you can do simply by doing something like:
Code:
local maiaOriginal_CastSpellByName = CastSpellByName;
function CastHeal()
   if isCasting and isOverhealing then 
      SpellStopCasting()
      isCasting = false
   else
      maiaOriginal_CastSpellByName(whatever)
      isCasting = true
   end
end
Which will get a reference to the original CastSpellByName (well, somewhat original, since other addons that do this sort of thing, such as CTRA may have hooked it already) and use it for casting your spell.

What this means is that Fastcast won't consider any macro that calls your CastHeal function as casting a spell, because you aren't calling CastSpellByName anymore (which Fastcast has hooked) and so Fastcast won't realize that the macro has done anything. This will of course work with or without Fastcast present as well. You just need to make sure that any macros that call your CastHeal function don't also call CastSpellByName directly for anything that isn't an instant spell or trinket.

Hope that helps some.


Originally Posted by Graguk
Ok, my first example was correct - need to have SpellStopCasting() as the first function in a macro. Cool, I temporarilly disable fastcast since it was occassionally preventing me from casting Lifetap after using my shadow bolt macro, but it sounds like you've fixed that.

The macro I've been using to manually interupt will work without any changes:

/script SpellStopCasting(); if GetInventoryItemCooldown("player", 14) == 0 then UseInventoryItem(14); SpellStopCasting(); end CastSpellByName("Shadow Bolt");
Hi Graguk, yeah if you don't have SpellStopCasting() in there first, your trinket may not be able to be used because you will still be casting your previous spell.

You may not need the second SpellStopCasting() after the trinket, although that may depend on the trinket I guess - I don't need it for my Blessed Prayer Beads one on my priest for example.


Cheers,
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
04-04-06, 06:53 PM   #39
Zerosignal
A Kobold Labourer
Join Date: Apr 2006
Posts: 1
Would it be possible to add a feature to prevent the cancellation of Ice Block by button press for upto 8 seconds?

In laggy situations (mass AoEing) it is fairly easy to mistakenly cancel ice block.
  Reply With Quote
04-05-06, 07:59 AM   #40
Maia
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 15
Originally Posted by Cirk
I assume that your addon basically provides functions like the CastHeal one you described above to be called from a macro, and users can just spam their macro key to cast and also cancel the spell again as needed?
Exactly. It will attempt to choose the appropriate rank depending on pvp/pve, class,...

Originally Posted by Cirk
Now the only way I can think of to work around Fastcast here would effectively disable Fastcast's functionality for spells cast by your CastHeal function.
Well, so this is a either/or solution. Cast fast but not able to cancel or cast slow and be able to cancel? Hmm. Doesn't sound perfect.

As for hooking a function, I know how that works. Just didnt know I could check for the existance of a function in an if statement.

I might have a different solution, not knowing if it will work though. Right now FastcastStopCasting() will not always cancel, but only if GetTime() > _actionEndTime. So my idea is something like the following to force a cancellation (this gets only called if I want to cancel an overheal):

Code:
If (FastcastStopCasting) then
   _actionEndTime = 0
   FastcastStopCasting()
else
   SpellStopCasting()
end
well, this doesn't work at the moment, as _actionEndTime is local to your addon. But you could either add a flag to FastcastStopCasting to force a cancellation (e.g. FastcastStopCasting("forced")), or add a global flag, e.g. FastCast_CancelCurrentSpell = true which you could check for in FastcastStopCasting().

Think that's a possible solution?
  Reply With Quote

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


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