if resisted a_spell_01 then ....

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

User avatar
Pax
a lesser mummy
a lesser mummy
Posts: 52
Joined: Fri Dec 19, 2003 11:04 am
Location: Denmark

if resisted a_spell_01 then ....

Post by Pax » Wed Dec 31, 2003 12:13 am

im fiddling around with a command set for my dummy ranger so far ive been able to get him to do most of the stuff i want him to do.

but there is one thing i acnt seem to get him to do is give me one reply if the spell hit and another if it was resisted.

Code: Select all

Sub Event_snare
  /attack off  
  /cast "ensnare"
  /t 'all knowing master of ranger snares' casting Snare on %t 
  /delay 5s
  /cast "cinder jolt" 
  /delay 3s
  /attack on
/return
this is how the code is now, what i would like it to do is tell 'all knowing master of ranger snares' wether the spell was resisted / interrupted / (gasp) target was indeed snared.
i have looked at some of the macros who can do that, but cant seem to get it to work.
any help or input would be nice ;)

User avatar
wilso132
Contributing Member
Contributing Member
Posts: 106
Joined: Thu Oct 17, 2002 11:53 am

Post by wilso132 » Wed Dec 31, 2003 12:21 am

Use one of the spell macros in the forum that checks to see if it went off or not (and if it doesn't have it, add in a line of resisted code)... then use /call cast Ensnare.

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Wed Dec 31, 2003 12:32 am

^ the easy way

If you really just want to add the ability to your own macro then what you need is an event for interrupt, one for resist, and one for stick.

Something like this.

#Event Resist "Your spell was resisted"
#Event Snared "is ensnared"

Then the acciated subs would be

Sub Event_Resist
/t "master" I was resisted
/return

Sub Event_Snared
/t "master" target is snared
/return

BTW I am not sure those events will work as written I didn't look up the return messages just used something close for an example.

User avatar
Pax
a lesser mummy
a lesser mummy
Posts: 52
Joined: Fri Dec 19, 2003 11:04 am
Location: Denmark

would this work

Post by Pax » Wed Dec 31, 2003 1:09 am

adding this to the top

Code: Select all

#Event Resist "Your spell was resisted" 
#Event Snared "is ensnared" 
and adding this to the end or where ever i have my sub events

Code: Select all

Sub Event_Resist 
/t "master" I was resisted 
/return 

Sub Event_Snared 
/t "master" target is snared 
/return 
and then just edit my snare event to

Code: Select all

Sub Event_snare 
  /attack off  
  /cast "ensnare" 
  /delay 5s 
  /cast "cinder jolt" 
  /delay 3s 
  /attack on 
/return 
and then what ever the outcome of the snare even is it will trigger one of the other 2 events ?

i wont say im sorry for the questions but i am gratefull for the help in this learning curve (i have a hard time learning from pure text, i need to type it and see what it does to understand it)

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Wed Dec 31, 2003 1:54 am

Yes that would work.. but only for resist and actual snaring. It won't awnser if it is interrupted and fizzles. Don't know if you already have those handled or not, but if not then you make another Event for each and then another sub for each to add those.

Also just to make sure you don't get lost if you directly copy from here into your macro the proper events for Snared and Resisted would be.

#Event Snared "has been ensnared."
#Event Resisted "You target resisted the "

Then the subs and you can put whatever you want to inplace of the /t "master" text..

There is no real reason to remove the /t master I am casting ensnare from your casting routine. It has no effect on the events and will only send you a tell that it is casting Ensnare when you go through this loop.

Also to note the resisted event will tell you if any of his spells were resisted not Only snare.. so if he nukes and gets resisted you will get the tell to master if that is what the Sub Event_resisted says to do.

User avatar
Pax
a lesser mummy
a lesser mummy
Posts: 52
Joined: Fri Dec 19, 2003 11:04 am
Location: Denmark

Post by Pax » Wed Dec 31, 2003 10:37 am

thanks goof didnt have time to test it before now, but works like it should .... now im just gonna have to build some more stuff into it 8)

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Wed Dec 31, 2003 4:58 pm

Take a look at SpellCast.inc (search)
That has a lot of what you're looking for, as well as stuff you'll most likelty be needing in the near future. Most casting macros on this stite use it, also, so it won't hurt to grab it anyway. If you want to use it, rather than hardcoding it in your own macro, just put a line at the top of you macro that reads /include spellcast.inc, and have the .inc in the same directory as your macros.

User avatar
Pax
a lesser mummy
a lesser mummy
Posts: 52
Joined: Fri Dec 19, 2003 11:04 am
Location: Denmark

/include spellcast.inc

Post by Pax » Fri Jan 02, 2004 2:33 am

i tried including this one as suggested with

Code: Select all

/include spellcast.inc
as the very first line.

Code: Select all

/include spellcast.inc

#turbo 
#Event kill "someone told you, 'kill" 
#Event enraged "has become enraged" 
#Event toofar "Your target is too far away, get closer!" 
#Event follow "samesomeone told you, 'follow'" 
#Event snare "guess who told you, 'snare'"
#Event Resist "Your target resisted" 
#Event Snared "has been ensnared." 

Sub Main 
and the i did

Code: Select all

/call cast "ensnare"
but it just came with some errors about unable to call functions

what did i do wrong ?

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Fri Jan 02, 2004 7:50 am

Well first it is #Include Spellcast.inc not / also be sure you already downloaded the spellcast.inc to your macro folder.

Then to cast the spell use /call Cast "Ensnare" capitalization is important.

User avatar
Pax
a lesser mummy
a lesser mummy
Posts: 52
Joined: Fri Dec 19, 2003 11:04 am
Location: Denmark

Post by Pax » Fri Jan 02, 2004 9:07 am

thanks goof ill see if i cant get it to work ;)

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Fri Jan 02, 2004 10:59 pm

Something important to keep in mind if you're going to trigger off "has become enraged" as an event...

If you are too far away, you will not see this message, and your bot will just stand there.

You can avoid this by trapping "resisted" and "interrupted" events only. The mob can be on the other side of the zone and you will still get a "resist" message. If it is out of /em range when the spell lands, however, you will not get any message at all if it is successful. Therefore, you can assume that no message = snared.

I'd suggest a /delay <however long the spell takes> if you want feedback on a successful snare or success to trigger the next event/action.