Thread Tools Display Modes
09-27-05, 07:07 AM   #1
johnbuns2
A Murloc Raider
Join Date: Aug 2005
Posts: 8
Angry Channeled Spells, stop the interrupting!!!

Hey, I made a macro based off of the new Cast Aide AddOn's script, to stop channeled spells from canceling if you accidentally hit the button more then once. Arcane missiles was my biggest problem. Lag would hit and i wouldn't cast the spell so i'd think i needed to hit it again or something. Anyways you get the idea. So i made this.

/script cS, W = "Arcane Missiles(Rank 7)", 3
/script --CastSpellByName("Arcane Missiles(Rank 7)")
/script if sA==nil then sT = time(); eT = time() + W; CastSpellByName(cS); sA = true end; if eT <= time() then sA = nil end


Problem is, for some reason it doesn't activate the first time you press it, I have to keep pressing it, and waste 1 or 2 seconds before it goes. After it does fire, it's safe from interruption for the specified time period. But i really would like to get rid of that 1 or 2 second period.

Here's the original LUA i wrote, before i shrunk it down.

function spellWait(cSpell, cWait)
if SpellIsActive == nil then
sTime = time()
eTime = time() + cWait
CS(cSpell)
SpellIsActive = true
end

if eTime <= time() then
SpellIsActive = nil
end
--DEFAULT_CHAT_FRAME:AddMessage(sTime)
end


Can someone try these out and tell me what i'm doing wrong? or if this is even possible?

I talk more about the macro's purpose here.

http://forums.worldofwarcraft.com/th...hreadID=222113

EDIT: I made CS = CastSpellByName for all my functions.

Last edited by johnbuns2 : 09-27-05 at 07:17 AM.
  Reply With Quote
09-27-05, 09:46 AM   #2
Sariash
A Fallenroot Satyr
Join Date: Jan 2005
Posts: 23
hmm, not sure what exactly all your code does... I just use a simple

"/script if (not CastingBarFrame.channeling) then CastSpellByName("Hellfire(Rank 3)") end" and can chainpress a spell in hectic situations without interupting it ;-)
  Reply With Quote
09-27-05, 09:49 AM   #3
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
On a second pass (even much later) it never had a chance to "end" the spell. So you're hitting it again to tell the macro that it's done casting.

For instance:

00:00 - macro hit. sA=nil, sT=current time, eT=3 secs from now, spell cast
00:01 - macro hit. sA=true, skip cast, eT>current time, skip =nil
00:08 - macro hit. sA=true, skip cast, eT<current time, sA=nil
00:09 - macro hit. sa=nil, sT=current time, etc

You can fix this by putting the check to see if the spell finished before the cast. Move the if eT<=time() etc end to the start of the line, and insert the bits in bold.

/script cS, W = "Arcane Missiles(Rank 7)", 3
/script --CastSpellByName("Arcane Missiles(Rank 7)")
/script if eT and eT<=time() then sA=nil eT=nil end if sA==nil then sT=time() eT=time()+W CastSpellByName(cS) sA=true end

(It was hitting 256-character limit so removed ;'s which are optional and removed spaces around ='s)

A simpler macro to do the same thing is:

/script if not CastingBarFrame.channeling then CastSpellByName("Arcane Missiles(Rank 7)") end

The value CastingBarFrame.channeling = 1 while you're channeling, nil otherwise.
  Reply With Quote
09-27-05, 09:58 AM   #4
johnbuns2
A Murloc Raider
Join Date: Aug 2005
Posts: 8
Wow!

Wow, thanx! You're my hero =D.
  Reply With Quote
09-27-05, 10:01 AM   #5
johnbuns2
A Murloc Raider
Join Date: Aug 2005
Posts: 8
CastAide

Ima try to put this script in the CastAide AddOn. Thanx again.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Channeled Spells, stop the interrupting!!!

Thread Tools
Display Modes

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