Page 7 of 11

Re: Chain Casting?

Posted: Wed Oct 27, 2004 11:54 am
by Chill
Furiousness wrote:Could someone post me a quick idea on how to chain cast?

I have a loop that runs two nukes, basically I want to cast the next as soon as the previous has finished, rinse repeat....
This probably isnt the right place for that question, but since you asked here I will answer it here.
Furiousness wrote:ie if !me.casting.id && me.spellready[nuke] /cast nuke
Dont worry about ${Me.Casting} use ${Me.SpellReady["SPELL NAME"]}. And if you're going to include Spell_Routines.inc (which I suggest you do) make sure you /call cast "SPELL NAME" all your spells.

I have a macro my chanter uses that chain nukes for me using two nukes I alternate (along with tashing, slowing, buffing, and some other stuff). I updated it recently and dont have my newest code on this machine, but here is what I think I am using:

Code: Select all

#Include SpellCast.inc 
...
/declare MobID int outer
/declare MinHP int outer 5
/declare Nuke1Mana int outer 2000
/declare Nuke2Mana int outer 3000
...
/varset MobID ${Target.ID}
...
/if (${Target.PctHPs}>${MinHP}) /call Nuke
...

Sub Nuke
  :nuke
  /if (${Target.ID}!=${MobID}) /return
  /call Boggle
  /if (${Me.PctMana} < 95 && ${Target.PctHPs}>=${MinHP}) /call ManaTap
  /if (${Me.SpellReady["Ancient: Chaos Madness"]} && ${Target.PctHPs}>=${MinHP} && ${Me.CurrentMana}>=${Nuke1Mana} && ${Target.ID}==${MobID}) { 
    /call cast "Ancient: Chaos Madness"
  } else {
    /if (${Me.SpellReady["Madness of Ikkibi"]} && ${Target.PctHPs}>=${MinHP} && ${Me.CurrentMana}>=${Nuke2Mana} && ${Target.ID}==${MobID}) /call cast "Madness of Ikkibi"
  }
  /doevents damage

  /if (${Target.PctHPs} >= ${MinHP}) /goto :nuke
/return

Sub Boggle
  /delay 1
  /if (${Me.TargetOfTarget.ID} == ${Me.ID}) { 
    /call cast "Boggle" 
    /return AGRO 
  } 
/return NOAGRO 
I will try to edit this after work and paste exactly what I have from my macro since I know for sure it works, but I hope that helps you get started.

If you want to post what you come up with to the Macro Help or Macro Depot forum, I will try to help you get it doing what you want. If you tell me what class you are, what spells you want to use, and what else you might want to do while nuking (or I can see it in your macro), I can try to help you get your macro working.

Re: Chain Casting?

Posted: Wed Oct 27, 2004 12:05 pm
by Chill
A_Druid_00 wrote:Maybe just try:

Code: Select all

/if ${me.spellready[WTFeveryourspellis]} /cast WTFeveryourspellis
Case and quotes matter. Your example should be:

Code: Select all

/if (${Me.SpellReady["WTFeveryourspellis"]}) /call cast "WTFeveryourspellis"
See above for solid examples.

Posted: Wed Oct 27, 2004 12:19 pm
by fearless
And that is a mighty fine example Chill ;)

Posted: Wed Oct 27, 2004 3:52 pm
by Rusty~
ok added in an outer variable to show if your last spell didn't take hold. /if ${spellNotHold} is 1, then your last spell didn't take hold, otherwise it's 0

Posted: Wed Oct 27, 2004 7:04 pm
by Furiousness
Aewsome, thank you, slaps head for not reading the instructions....../call cast "Spellname"


Doh!!! That would be it as the native /cast one wont check that all is ready!!!


Thank you very much Chill.

Posted: Tue Nov 02, 2004 6:29 am
by RDPidb
No support for feighn death ??!!!!!
Add an event for "has fallen to the ground" and make it return FDFAILED or something. oh standing back up after it fails woudl be good in the .inc ... cant think of any reason you would not want to stand after a failed FD.

Code: Select all

CAST_FD_FAILED    | You fall to the ground - fd was not succesfull

#event FDFailed "#*#has fallen to the ground#*#" 

/doevent FDFailed

Sub Event_FDFailed
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_FD_FAILED
/return 

or maybe this

Code: Select all

Sub Event_FDFailed
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_FD_FAILED
   /if (!${Me.Standing}) /stand
/return 

thx

Posted: Tue Nov 02, 2004 7:27 am
by Alisandra
The problem with that is it triggers when someone *else* fails FD near you. This works for me:

Code: Select all

#event FDFail "#1# has fallen to the ground.#*#"

Code: Select all

Sub Event_FDFail(EventLine,TargetName)
   /if ( ${TargetName.Equal[${Me.Name}]} && ${Defined[castReturn]} ) /varset castReturn CAST_RESTART
/return

Posted: Tue Nov 02, 2004 8:26 am
by RDPidb
ah, very good point.
Thanks for the info.

Could you do :

Code: Select all

#event FDFail "#1# ${Me.Name} has fallen to the ground.#*#" 
??

Also I notice that you have yourself targeted there? or am I reading it wrong.
What happenes when you have a MOB targeted.

Posted: Tue Nov 02, 2004 10:26 am
by Chill
RDPidb wrote:Could you do :

Code: Select all

#event FDFail "#1# ${Me.Name} has fallen to the ground.#*# 
??
No, but this should should work:

Code: Select all

#event FDFail "#1# has fallen to the ground."
...
Sub Event_FDFail(string Line,string FDName) 
   /if ( ${FDName.Equal[${Me.Name}]}) {
      /echo OMFG FD Failed!!
      <CODE GOES HERE>
   } 
/return
P.S. Looking up I see Alisandra pretty much just gave you this code for the event...

Posted: Tue Nov 02, 2004 11:23 am
by Rusty~
Ok.. added in the FD thing. I don't play any FD classes so it's not tested.. should work though.

Posted: Sun Nov 07, 2004 5:53 am
by Rand
While doing the french translation I found that :

#event Stunned "You cannot cast while stunned#*#"

should be :

#event Stunned "You can't cast spells while stunned!#*#"

You can find the text in eqstr_us.txt, at index 175.

Posted: Sat Nov 13, 2004 7:51 pm
by botofall
can you add anything that makes it possible to switch from 2h weapons to 2 1h weapons,,, or add a de-equip feature maby to make it simple ?

or did i miss a way to do that reading thru your file

Posted: Thu Dec 09, 2004 1:41 pm
by micron1090
First off, great include, love it.

But I have a small bug in all of my macros that use this include. If i start casting a spell that fizzles, like a nuke, and the target i'm attacking dies before i start the fizzle recast, i get stuck in an infinite loop that says 'You must first select a target for this spell!'.

i'm calling the spell using the following:

Code: Select all

  /if (${Me.SpellReady["spellname"]}) /call cast "spellname" 
I've tried faking it out by doing:

Code: Select all

Sub Event_NoTarget
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_SUCCESS
/return
but to no avail. Any ideas?

Posted: Thu Dec 09, 2004 1:49 pm
by A_Druid_00
Add a timeout...

Code: Select all

/call Cast "nukespell" gemX 10s
Then the longest you'll be spamming yourself is 10 seconds.

Posted: Thu Dec 09, 2004 2:04 pm
by Cr4zyb4rd
Just noticed the FD thing a couple of posts above. I really don't see how this belongs in here at all, but "the right way" to define the event so that it only triggers on yourself is

Code: Select all

#Event FDFail "|${Me.Name}| has fallen to the ground."
This lets MQ2's extremely fast pattern matching engine look for the proper event, and saves it from triggering the subroutine at all if somebody else fails nearby.