Thread Tools Display Modes
04-05-06, 02:39 PM   #41
Aquentvp
A Murloc Raider
Join Date: Apr 2006
Posts: 6
ZHC + ToEP charm macro

So lemme get this straight. Using Aktash's multiple trinket macro from Cirk's post...

/script if not FastcastUseItem(14) or not FastcastUseItem(13) then CastSpellByName("Scorch"); end

...but replacing "Scorch" with "Shadow Bolt," I could activate one of my trinkets (if it's ready), or the other trinket (if the first is on cooldown, but the next is ready), and then cast Shadow Bolt with the benefits of FastCase. Is this true?

By the way, thank you Cirk for this wonderful addon!
  Reply With Quote
04-05-06, 05:37 PM   #42
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by Maia
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.
No, not ideal I'm afraid. Even if I add functionality to Fastcast to support this (which I probably will soon), you'd still have the problem of dealing with older versions of Fastcast, and this approach would be your best one for those.


Originally Posted by Maia
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):

...

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?
Well FastcastStopCasting("force") would be just the same as calling SpellStopCasting() directly (which Fastcast never blocks from happening) but at any rate the issue isn't what you are doing inside the macro itself (or inside functions the macro calls), but that Fastcast won't run the macro at all! Basically since this macro started a spell-cast, Fastcast is protecting the spell the macro cast from being interrupted early by not running that same macro again until the minimum time (i.e., _actionEndTime) has been reached or the spell stopped casting already (see line 568 of Fastcast.lua). A simple way to check that is to just add some debug in your functions and see that the debug isn't being shown. That's why I suggested the alternative method of not calling CastSpellByName, since then Fastcast won't realize your macro started casting a spell and hence won't block it from running again.

I guess ideally I shouldn't be enforcing that check for macros anymore now that I've added the FastcastStopCasting function, but if I take it out again (i.e., macros will always run) then any existing macros using SpellStopCasting will break until they are modified to use FastcastStopCasting.

I'd suggest going with something like the solution I suggested for now, and when I update Fastcast, you'll be able to check for the new feature (somehow, I'll keep that requirement in mind) and do an either-or approach in your addon.

Cheers
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
04-06-06, 06:55 PM   #43
Graguk
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 9
I guess ideally I shouldn't be enforcing that check for macros anymore now that I've added the FastcastStopCasting function, but if I take it out again (i.e., macros will always run) then any existing macros using SpellStopCasting will break until they are modified to use FastcastStopCasting.
Let us know if you decide to do that.. I'd rather be able to use my SpellStopCasting() macro and not have to use FastcastStopCasting, but if that's the only way to accomodate this healing addon, so be it. I just want to know about it :P
  Reply With Quote
04-06-06, 07:15 PM   #44
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by Graguk
Let us know if you decide to do that.. I'd rather be able to use my SpellStopCasting() macro and not have to use FastcastStopCasting, but if that's the only way to accomodate this healing addon, so be it. I just want to know about it :P
I was thinking if I do change this, I'd add it as an option (e.g., [x] Protect macros) on the settings window - defaults to enabled for backwards compatibility) but that still wouldn't help Maia's addon alone if players do have it enabled. I'm still pondering a good solution for this, but it will probably involve some mechanism that would allow addons to hook or register a boolean-test-function that would be called by Fastcast to check whether a spell or macro should be interruptable/runable.

-- Cirk
__________________
Cirk's Addons
  Reply With Quote
04-09-06, 10:18 AM   #45
Maia
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 15
Originally Posted by Cirk
Well FastcastStopCasting("force") would be just the same as calling SpellStopCasting() directly (which Fastcast never blocks from happening) but at any rate the issue isn't what you are doing inside the macro itself (or inside functions the macro calls), but that Fastcast won't run the macro at all! Basically since this macro started a spell-cast, Fastcast is protecting the spell the macro cast from being interrupted early by not running that same macro again until the minimum time (i.e., _actionEndTime) has been reached or the spell stopped casting already (see line 568 of Fastcast.lua). A simple way to check that is to just add some debug in your functions and see that the debug isn't being shown.
Hmm, so FastCast saves the function name and will prevent calling that function again until it thinks it may be called again? Because the function that is available via a keybinding in my addon does something like the following (pseudo-code):
Code:
function SpecialHeal()
   if _isCasting then
      if UnitIsOverhealed() then
         SpellStopCasting()
         _isCasting = false
      end
      return
   end
   local damage = UnitHealthMax("target") - UnitHealth("target")
   local spell = GetBestRank(damage)
   CastSpellByName(spell)
   _isCasting = true
end

function UnitIsOverhealed()
   -- guess you can imagine what happenes here, but lets do something simple:
   if UnitHealthMax("target") == UnitHealth("target") then
      return true
   else
      return false
   end
end
Did I understand it correctly that FastCast will magically hook that function on the fly and not execute it as long as it's preventing a spell from being cancelled?

Thanks again...

Last edited by Maia : 04-09-06 at 10:26 AM.
  Reply With Quote
04-15-06, 06:30 PM   #46
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Sorry for the delay Maia, missed this update somehow!
Originally Posted by Maia
Did I understand it correctly that FastCast will magically hook that function on the fly and not execute it as long as it's preventing a spell from being cancelled?
Basically your function is being called by a macro, and that macro is being executed by a call to UseAction triggered from an action button on one of the user's action bars. Fastcast hooks the UseAction function, and uses it to determine whether it should allow the action to proceed or not. For normal (non-macro) spell or skill actions, Fastcast won't allow another action to interrupt that spell until it has reached the "end-time" of the spell - i.e., it will simply ignore the call to UseAction. If the action is a macro rather than a spell, Fastcast looks to see if the macro starts a spell, and if it does, then it treats the spell cast by that macro just like it treats a normal spell cast, so that if that same macro is called again (via UseAction) and the spell it cast last time is still casting, then Fastcast will ignore it.

(The difference between macros and normal spells is that while the last spell is still casting, Fastcast will allow a different macro to be run at any time, but won't allow a different spell to start until the end-time is reached.).

What this means for you is that any UseAction called macros that call your SpecialHeal function will be ignored by Fastcast once they start casting a spell (until the end-time for the spell is reached of course). I.e., the macro won't be executed, and SpecialHeal won't be called again. (You can test this easily - add some debug to your macro and see that it isn't being executed, or alternatively do /script SpecialHeal() from the editbox and see that it is executed even when Fastcast won't).

So, the way around this (for now) is:
  1. Your users will need to press a different macro key to do the overheal interrupt check (definitely not ideal).
  2. Don't let Fastcast figure out that your macro is casting a spell (i.e., use my previous suggestion about hooking the original CastSpellByName). Fast-casting will effectively be disabled for the spells you cast from SpecialHeal() though.
  3. Wait for the next version of Fastcast which will have a mechanism for your addon to hook into the Fastcast end-time check process, as well as an option to disable "same-macro" checking.
Of course, the problem with (3) is that some of your users may have the latest and greatest Fastcast and some won't. So, for those that won't have upgraded yet, you'll probably want to implement option (2) anyway (which will work now) as a fallback position.

Hope that helps
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
04-24-06, 04:22 AM   #47
raistlinthewiz
A Defias Bandit
Join Date: Aug 2005
Posts: 2
so this is a totaly legal mod?
  Reply With Quote
04-26-06, 10:36 AM   #48
Astos
An Aku'mai Servant
 
Astos's Avatar
Join Date: Feb 2006
Posts: 33
Originally Posted by raistlinthewiz
so this is a totaly legal mod?
Yes. Everything it does it does from the addon directory. Completely legal and completely awsome! Do yourself a favor and download it.
  Reply With Quote
05-13-06, 10:23 AM   #49
Skizz
A Murloc Raider
Join Date: May 2006
Posts: 5
Nice work Cirk!

I understand that the "casting bar adjustment" works only under certain conditions if I use a separate mod to modify of casting bar. I use eCastingBar; should the "casting bar adjustment" work with this mod? It is a fairly popular mod for modifying how your casting bar looks, but I'm not sure whether it uses the "CastingBarFrame" and "CastingBarFrameStatusBar" objects that you mention in the Readme file. Does eCastingBar work with the "casting bar adjustment" in your FastCast? Or how do I check this myself?

I simply did a search through all the files of the eCastingBar mod for "CastingBarFrame" and "CastingBarFrameStatusBar". I wasn't able to find any instances of "CastingBarFrameStatusBar" and I was able to find only two instances of "CastingBarFrame" (in "eCastingBar.lua"). I'm assuming this means FastCast's "casting bar adjustment" does not work with eCastingbar.

The reason why I ask this is because it doesn't seem like my casting bar (from eCastingBar) is adjusting to the padding setting as I change it. If there isn't any way to get FastCast to work with eCastingBar, would anyone have any suggestions for another casting bar mod with similar capabilities of eCastingBar that works with FastCast's "casting bar adjustment" option?

Thanks in advance. Great mod Cirk, keep it up!

Last edited by Skizz : 05-13-06 at 10:25 AM.
  Reply With Quote
05-30-06, 01:30 PM   #50
Ashes
A Kobold Labourer
Join Date: May 2006
Posts: 1
macro that sets padding time to latency

I have taken the liberty to add a function in the macro callable functions portion of the Fastcast add on. It allows one to set the current latency with one the push of a button. You could even have it “calibrate” your latency everytime you cast a spell.

Code:
function Fastcast_SetLat()
	local up, down, lag = GetNetStats();
	lag = lag / 1000;
	_fastPadding = lag + .005;
end
And the macro I use to activate this function:
Code:
/script Fastcast_SetLat();
/fastcast fast
Very handy if your latency changes from time to time.
  Reply With Quote
06-23-06, 05:48 PM   #51
smokes
A Kobold Labourer
Join Date: Jun 2006
Posts: 1
I dont know if you still check this forum, (its been 2 months since your last reply) but in case you do...

I was wondering if its possible to set up a macro to work with FastCast that incorperates the 8/8 Netherwind bonus of instant cast spells.

The current macro I use is:

/script local f for i=1,24 do f=f or strfind(UnitBuff("player",i) or "","Shadow_Teleport") end if not f then CastSpellByName("Scorch") else CastSpellByName("Pyroblast") end

Where "Shadow_Teleport" is the name of the buff givin by the NW proc.

Thanks
  Reply With Quote
06-29-06, 04:48 AM   #52
Black.
A Kobold Labourer
Join Date: Jun 2006
Posts: 1
there is a bug:

while mounted and attacked by mobs/player it is NOT possible to dismount when fastcast is enabled!
pressing your mount icon doesnt do anything.

its very unconfortable to turn it on/off every time i mount
  Reply With Quote
07-04-06, 10:08 PM   #53
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Some replies! (Sorry for the delay )

Originally Posted by Skizz
I understand that the "casting bar adjustment" works only under certain conditions if I use a separate mod to modify of casting bar. I use eCastingBar; should the "casting bar adjustment" work with this mod? It is a fairly popular mod for modifying how your casting bar looks, but I'm not sure whether it uses the "CastingBarFrame" and "CastingBarFrameStatusBar" objects that you mention in the Readme file. Does eCastingBar work with the "casting bar adjustment" in your FastCast? Or how do I check this myself?
Hey Skizz. I've been meaning to look at eCastingBar myself for a while to see if it would work with Fastcast (and what I'd need to do to make it so), so I'll do that, and see if I can roll something into the next Fastcast release.


Originally Posted by Ashes
I have taken the liberty to add a function in the macro callable functions portion of the Fastcast add on. It allows one to set the current latency with one the push of a button. You could even have it “calibrate” your latency everytime you cast a spell.
Hi Ashes. I actually originally had something very similar to this when I was first trying to figure out how to best implement Fastcast, and (for my testing at least) came to the conclusion that the padding factor to use wasn't directly proportional to the latency reported by the network code. Specifically the padding needs to absorb the minor variations in latency which aren't directly related to the actual value of the latency (although it is usually true that a higher latency has a higher degree of variation). I know for myself that my latency varies between 270 to 700 or so, and I basically use the same value (of 0.2) for the padding all the time. Of course thats not to say the approach you've described doesn't have merit, and may in fact be a great way to do it for many players . Maybe one day I'll add an "Auto padding" option to Fastcast, using something very similar (e.g., below 200, use 0.1, between 200 and 400 use 0.2, etc.).


Originally Posted by smokes
I dont know if you still check this forum, (its been 2 months since your last reply) but in case you do...

I was wondering if its possible to set up a macro to work with FastCast that incorperates the 8/8 Netherwind bonus of instant cast spells.

The current macro I use is:

/script local f for i=1,24 do f=f or strfind(UnitBuff("player",i) or "","Shadow_Teleport") end if not f then CastSpellByName("Scorch") else CastSpellByName("Pyroblast") end

Where "Shadow_Teleport" is the name of the buff givin by the NW proc.

Thanks
To make this fast-castable, you should simply be able to add something like:
/script if FastcastStopCasting() then local f for i=1,24 do f=f or strfind(UnitBuff("player",i) or "","Shadow_Teleport") end if not f then CastSpellByName("Scorch") else CastSpellByName("Pyroblast") end end


Originally Posted by Black.
there is a bug:

while mounted and attacked by mobs/player it is NOT possible to dismount when fastcast is enabled!
pressing your mount icon doesnt do anything.

its very unconfortable to turn it on/off every time i mount
Black, I don't have this problem at all, at least with normal mounts (and paladin summoned mounts). Are you using version 1.10.2 of Fastcast? (There was problems in earlier versions with things like what you are reporting).


Cheers
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
07-05-06, 01:28 PM   #54
Anothermage
A Kobold Labourer
Join Date: Jul 2006
Posts: 1
Firstly, after reading the section on Fastcast and macros a few times, I'm still a bit confused; is the following macro (as is), able to take advantage of FastCast's chain casting?

/script Stop=SpellStopCasting;if not CastingBarFrame.casting and GetInventoryItemCooldown("Player",14)==0 then UseInventoryItem(14);Stop();end
/cast Frostbolt

*note: activates toep whenever it is up and casts frostbolt (even if toep is on cooldown).

Secondly, I've been using this macro for a while and when I am trigger happy (assuming cooldown on toep is down) then I will get a couple short interrupt at the beginning of the cast (after toep is activated) - assuming I am rapidly clicking the macro. This can get annoying and cause me to lose valuable casting time. I've almost learned not to be 'trigger happy' but sometiems I still fall into this old trend.

Anyway, I just tried FastCast (not even thinking about my trigger happy macro problem), and surprisingly, the problem above has disappeared. This seems to solve my macro problem when "Protect Channeling" is enabled, whether or not FastCast is enabled. That is, the Protect Channeling seems to have fixed my problem with the interruptions when rapidly clicking the macro. So, why does "Protect Channeling" fix this? Does the ToEP act as a "Channeled Spell?"

Thanks
  Reply With Quote
07-05-06, 05:36 PM   #55
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by Anothermage
Firstly, after reading the section on Fastcast and macros a few times, I'm still a bit confused; is the following macro (as is), able to take advantage of FastCast's chain casting?

/script Stop=SpellStopCasting;if not CastingBarFrame.casting and GetInventoryItemCooldown("Player",14)==0 then UseInventoryItem(14);Stop();end
/cast Frostbolt

*note: activates toep whenever it is up and casts frostbolt (even if toep is on cooldown).

Secondly, I've been using this macro for a while and when I am trigger happy (assuming cooldown on toep is down) then I will get a couple short interrupt at the beginning of the cast (after toep is activated) - assuming I am rapidly clicking the macro. This can get annoying and cause me to lose valuable casting time. I've almost learned not to be 'trigger happy' but sometiems I still fall into this old trend.

Anyway, I just tried FastCast (not even thinking about my trigger happy macro problem), and surprisingly, the problem above has disappeared. This seems to solve my macro problem when "Protect Channeling" is enabled, whether or not FastCast is enabled. That is, the Protect Channeling seems to have fixed my problem with the interruptions when rapidly clicking the macro. So, why does "Protect Channeling" fix this? Does the ToEP act as a "Channeled Spell?"

Thanks
Hi Anothermage, I can see where some confusion can be coming from here . The reason you get the interrupts when you are "spamming" your macro key has to do with the (slight) delay between initiating an action (e.g., triggering the ToEP, requesting casting of Frostbolt) and the game getting the "okay" from the server, during which the casting bar won't yet be shown, and possibly the cooldown of the ToEP won't have changed yet either. In your macro case this results in you calling SpellStopCasting early, hence the interrupts.

When Fastcast is enabled at all (either for fast-casting or channeling-protection) it effectively waits for confirmation from the server for the last initiated action before allowing the same action to occur again (this is needed due to the sequencing involved), even though, when that confirmation is received it does nothing special with it (if fast-casting is disabled). Only if you disable both fast-casting and channeling-protection will Fastcast effectively remove itself "from the loop".

In order for your macro to make proper use of Fastcast's fast-casting for chain-casting you'll need to have another SpellStopCasting() call in there, since otherwise your Frostbolt won't be fast-cast. However, since presumably you don't want your macro to interrupt any other spell already being cast, you'll probably want to make use of Fastcast's macro callable functions. Basically, if you enable fast-casting, you can replace your existing macro with:

/script if FastcastStopCasting() then FastcastUseItem("Talisman of Ephemeral Power") CastSpellByName("Frostbolt") end

Alternatively, if the ToEP does require a SpellStopCasting call after it (not all trinkets do) then you'd use:

/script if FastcastStopCasting() then if FastcastUseItem("Talisman of Ephemeral Power") then SpellStopCasting() end CastSpellByName("Frostbolt") end

Note that if you disable the fast-casting option, then these macros will interrupt your current spell cast every time, which you definitely won't want, so you'd be better using your current macro (or a slight variation using just FastcastUseItem say).

Anyway, hope that helps some!

Cheers
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
07-20-06, 08:27 AM   #56
Skizz
A Murloc Raider
Join Date: May 2006
Posts: 5
Originally Posted by Cirk
Hey Skizz. I've been meaning to look at eCastingBar myself for a while to see if it would work with Fastcast (and what I'd need to do to make it so), so I'll do that, and see if I can roll something into the next Fastcast release.
Woot! Nice to know you're still around. I'm still loving your mod. How's that eCastingBar-compatible version coming along? I'm looking foward to it. Good luck and keep up the great work!

Last edited by Skizz : 07-20-06 at 08:31 AM.
  Reply With Quote
07-20-06, 09:49 AM   #57
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by Skizz
Woot! Nice to know you're still around. I'm still loving your mod. How's that eCastingBar-compatible version coming along? I'm looking foward to it. Good luck and keep up the great work!
I'm working on the new version of Fastcast now . Got a few things to finish tweaking before I add the eCastingBar (and CastingProgress) support, but I did have a quick look at both those mods and it should be fairly straight forward.

Watch this space!

-- Cirk
__________________
Cirk's Addons
  Reply With Quote
07-20-06, 11:05 AM   #58
Skizz
A Murloc Raider
Join Date: May 2006
Posts: 5
Originally Posted by Cirk
I'm working on the new version of Fastcast now . Got a few things to finish tweaking before I add the eCastingBar (and CastingProgress) support, but I did have a quick look at both those mods and it should be fairly straight forward.

Watch this space!

-- Cirk
Sweet, can't wait!
  Reply With Quote
07-21-06, 07:36 AM   #59
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Version 1.11.0 of Fastcast is now available! (finally )

Changes from v1.10.2:
  • FastcastCast now checks to see if the requested spell is on an action bar somewhere, and if so uses the action to check whether the spell is castable or not. Useful for spells and actions that have limitations that are unrelated to their cooldowns (e.g., some Rogue and Warrior talents).
  • FastcastUseItem now checks the player's bags to allow for using items such as health stones, potions, and bandages.
  • Added support for adjusting the casting bar for eCastingBar and CastProgress.
  • Introduced concept of Fastcast aware macros, to allow for other types of macro supported spell casting (such as mana conservation macros and addons).
  • Added the FastcastEnabled, FastcastAware, and FastcastIgnore macro-callable functions, and made FastcastIsCasting and FastcastStopCasting automatically flag the macro as Fastcast aware.
  • Improved handling of spells that are first cast and then a target is selected (e.g., heal spells).
  • Cleaned up login and logout code, and event registration and handling.
  • Added handling of the "There is nothing to attack" error.
  • Fixed a bug where Fastcast was always trying to adjust the timing of the casting bar, even when this option was disabled.
  • Fixed a bug where druid shapeshifts and rogue stealth and similar abilities were not properly being handled when cast from the action bar rather than from the shapeshift bar.
  • Updated TOC and button code for patch 1.11.

Those of you waiting for eCastingBar or CastProgress support will find it in this version (enjoy Skizz), although note that with eCastingBar, if you toggle off and on the eCastingBar feature itself, you'll need to either toggle on and off both of Fastcast's fast-casting and channel protection features as well (toggle them both to off, then on again) or logout and in again, to get Fastcast to properly see the eCastingBar casting bar.

I've also improved the way in which Fastcast handles macros, to allow macros to indicate that they are "Fastcast aware" and so can be trusted to be called anytime the user triggers the action, even if there is a spell cast in progress already from that macro. This means that addons that provide features such as mana conservation (such as what Maia was working on) that are triggered via macro just need to make sure they call FastcastAware() or use FastcastIsCasting() or FastcastStopCasting() and Fastcast.

Note that existing macros that use these functions to allow fast-casting of macro called spells (e.g., for the trinket + spell combos) should still work properly with this change, but if you have any problems with them, please post here and I'll be happy to help figure out what needs to be changed.

Lastly, a couple of bug fixes, including that annoying "can't always use shapeshift, stealth, or shadowform abilities from the action bar" bug that has been floating around in one form or another for ages (for Xerophyte, Exilera, Azgrim, Vista, dynamicbr, and everyone else that were affected by this).

Enjoy!
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
07-21-06, 09:49 AM   #60
Skizz
A Murloc Raider
Join Date: May 2006
Posts: 5
WOOT! Thanks Cirk, can't wait to get home and try this!
  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