Need some help with this

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

einsteins
decaying skeleton
decaying skeleton
Posts: 4
Joined: Tue Jan 07, 2003 9:52 pm

Need some help with this

Post by einsteins » Tue Jan 07, 2003 10:14 pm

Hello all
I am new with MQ been using it for about a month now GREAT program!
I do not know how to code for these macros though I do seem to make some sense out of them when I look at them...
Anyhow for my question...
I found this Macro in the macros forum and tried to use it but I got some errors and have a few questions. It is a macro that sends tells to your group telling them what you are doing such as snaring, rooting, casting a dot, etc.
here is the code:

Code: Select all

|Groupalert.mac 
|This macro will tell your group info about your spells for you. 
|It's pretty basic, to change it just change the syntax in the events. 
|It's set up for a druid so that my group knows what I've snared, doted, charmed, etc 
|and when these respective spells break. 
|by: Malachi 

#event Snared "Your target has been ensnared" 
#event Root "Your target is bound by ensnaring roots" 
#event Charmed "Your target blinks" 
#event Snarebroke "Your ensnare spell has worn off" 
#event Rootbroke "The roots fall away" 
#event Charmbroke "Your charm spell has worn off" 
#event Doted "surrounded by a swarm" 

sub Main 

:MainLoop 
/doevents flush 
/doevents 

sub Event_Snared 
/g My mob has successfully been snared. 
/goto :MainLoop 

sub Event_Root 
/g My mob has successfully been rooted...for now. 
/goto :MainLoop 

sub Event_Charmed 
/g My mob is now my pet, at least for a few seconds. 
/goto :MainLoop 

sub Event_Snarebroke 
/g My ensnare spell has worn off, caution that's one fast mob! 
/goto :MainLoop 

sub Event_Rootbroke 
/g My roots have fallen away, that bugger's on the loose! 
/goto :MainLoop 

sub Event_Doted 
/g That nasty mob has been doted. 
/goto :MainLoop 
/return 
/end 
what I want to know is:
1) is this a good piece of working code as it would not work for me.
2) In the #events where it designates the text it looks for like the above says :
#event Snared "Your target has been ensnared"
Shouldnt 'Your Target' be replaced with something to designate and insert the exact name of my target? when I snare something in the game my message says "a 'Targetname' has been ensnared"
so the macro would never see the right text to match the #event?

I remember that one of the 2 errors I got was that it could not parse the Sub Event_snared

Anyhow, I hope that I have been clear with my question and certainly hope someone will lend me some help with getting this to work...once i have it working I will expand it quite a bit....I am using the New UI btw if that matters. (didnt think it would ...as from all the forum reading I have done it does not include any click actions like some of the tradeskill macros require)
Thankx again and as you can probably tell I hate using hotkeys...this seems like a much better solution.
einsteins

User avatar
SingleServing
a hill giant
a hill giant
Posts: 195
Joined: Tue Dec 17, 2002 11:00 pm

A few suggestions

Post by SingleServing » Tue Jan 07, 2003 10:22 pm

1. Every Sub requres a return. You must add returns to each and every sub

2. your events should not have "your target" they should read

#event Snared "has been ensared"
#event Charmed "blinks"

3. I see why it might kinda work but not always, heres how to fix the Main

Code: Select all

Sub Main 

:MainLoop 
/doevents flush 
/doevents 
/delay 5
/goto :MainLoop
/return
4. You can only use /goto commands within the same sub, you cannot goto a label in main if your in Event_Charmed.

5. Your events should look like

Code: Select all

Sub Event_Snared 

/g %t has successfully been snared. 

/return
That should get you going :)
[color=DarkBlue]Everything,[/color] [color=DarkBlue][b]is[/b][/color] [color=black]black[/color] [color=DarkBlue]and[/color] [color=white]white[/color][color=DarkBlue], when you zoom out it looks[/color] [color=gray]grey[/color][color=DarkBlue].[/color]

einsteins
decaying skeleton
decaying skeleton
Posts: 4
Joined: Tue Jan 07, 2003 9:52 pm

Post by einsteins » Tue Jan 07, 2003 11:03 pm

Thank you for the quick reply Single Serving...
I made the changes you said and here is what I have now...
whenI run the macro it does not give me an error but whe I cast snare on something I dont see any text that the sub event is supposed to show....
here is the macro now...

Code: Select all

#event Snared "has been ensnared" 
#event Root " is bound by ensnaring roots" 
#event Charmed "blinks" 
#event Charmbroke "Your charm spell has worn off" 

Sub Main 

:MainLoop 
/doevents flush 
/doevents 
/delay 5 
/goto :MainLoop 
/return

Sub Event_Snared 

/g %t has successfully been snared. 

/return


Sub Event_Root 

/g %t has successfully been Rooted. 

/return


Sub Event_Charmed 

/g %t has successfully been Charmed. 

/return


Sub Event_Charmbroke 

/g  Charm has BROKEN! beware and take evasive action!. 

/return


/end
Will the # event work with just part of the actual text?
Do I need the /end at the bottom of the code?

also...(I know I am a newb) how would I end or stop this macro?

Thank again...
einsteins

User avatar
SingleServing
a hill giant
a hill giant
Posts: 195
Joined: Tue Dec 17, 2002 11:00 pm

Post by SingleServing » Wed Jan 08, 2003 3:41 am

take the events flush out and put it after your "/g hiya a baddie is snared " text

Code: Select all

Sub Event_Snare

/g a baddie is snared!!
/doevents flush
/return
or even try it without flush, dunno if that would make a difference, my fault for not picking up on the /flush events then /do events hehe duh
[color=DarkBlue]Everything,[/color] [color=DarkBlue][b]is[/b][/color] [color=black]black[/color] [color=DarkBlue]and[/color] [color=white]white[/color][color=DarkBlue], when you zoom out it looks[/color] [color=gray]grey[/color][color=DarkBlue].[/color]

Malachi
a hill giant
a hill giant
Posts: 227
Joined: Tue Nov 19, 2002 1:29 am
Contact:

Hahahaha

Post by Malachi » Thu Jan 09, 2003 12:55 am

I abandoned that code cuz no one ever posted in that thread. I'm glad to see that someone actually wanted to use it tho, /blush. I'll take into account your ideas and all singleserving, I dunno what I was thinking w/ my failure to add /returns.

I'd never written anything with alerts before, and I didn't even know if a /g would actually send text to the group, as someone told me they had trouble with MQ automatically pausing when text was entered.

~Malachi
~Oh danny boy, the pipes the pipes are calling.~

User avatar
SingleServing
a hill giant
a hill giant
Posts: 195
Joined: Tue Dec 17, 2002 11:00 pm

Re: Hahahaha

Post by SingleServing » Thu Jan 09, 2003 2:25 am

Malachi wrote:I abandoned that code cuz no one ever posted in that thread. I'm glad to see that someone actually wanted to use it tho, /blush. I'll take into account your ideas and all singleserving, I dunno what I was thinking w/ my failure to add /returns.

I'd never written anything with alerts before, and I didn't even know if a /g would actually send text to the group, as someone told me they had trouble with MQ automatically pausing when text was entered.

~Malachi
I did, havn't tried to send text since, should try again and see if it was an isolated bug with that macro or what...
[color=DarkBlue]Everything,[/color] [color=DarkBlue][b]is[/b][/color] [color=black]black[/color] [color=DarkBlue]and[/color] [color=white]white[/color][color=DarkBlue], when you zoom out it looks[/color] [color=gray]grey[/color][color=DarkBlue].[/color]

einsteins
decaying skeleton
decaying skeleton
Posts: 4
Joined: Tue Jan 07, 2003 9:52 pm

Post by einsteins » Thu Jan 09, 2003 3:34 am

Ok ...
This is working perfectly....THANK YOU SingleServing for getting me on the right track...I plan to expand this code even more....
Malachi I liked your concept and hope you dont mind that I persued it here at help forum. It is a great idea and now is only limited to what you want to macro out to your group....
Here is what I ended up with ...

Code: Select all

|Druid Group alert Macro
|This Macro is desgined to send group tells about what you are casting


#event Snared "has been ensnared" 
#event Root "is entangled by roots" 
#event Charmed "blinks" 
#event Charmbroke "Your charm spell has worn off" 
#event Soe "with an avian spirit"
#event Epic "casting Wrath of Nature"
#event Drones "casting Drones of Doom"
#event Fury "immolated by blazing flames"
#event Moon "casting Moonfire"
#event Wood "casting Spirit of the Wood"
#event Tunares "casting Tunare's Renewal"
#event RO "casting Hand of Ro"
#event Winged "casting Winged Death"

Sub Main 

:MainLoop 
/doevents 
/delay 5 
/goto :MainLoop 
/return

Sub Event_Snared 

/g %t has successfully been snared. 
/doevents flush 
/return


Sub Event_Root 

/g %t has successfully been Rooted. 
/doevents flush 
/return


Sub Event_Charmed 

/g %t has successfully been Charmed. 
/doevents flush 
/return


Sub Event_Charmbroke 

/g Charm has BROKEN!,  beware and take evasive action, while I recharm...!. 
/doevents flush 
/return


Sub Event_Soe 

/say %t becomes faster and elevated with SOE!. 
/doevents flush 
/return


Sub Event_Epic

/g %t has been engulfed by the Wrath of Nature. 
/doevents flush 
/return


Sub Event_Drones

/g %t has been engaged with Drones of Doom. 
/doevents flush 
/return


Sub Event_Fury

/g %t is now suffering from the Fury of RO. 
/doevents flush 
/return


Sub Event_Moon

/g Nuking %t with Moonfire for 1150 damage. 
/doevents flush 
/return


Sub Event_Wood

/g Invoking SPIRIT of the WOOD...you gain massive regeneration and DS shield for the next 30 seconds. 
/doevents flush 
/return


Sub Event_Tunares

/g Druid C-Heal Tunares Renewal on %t 10 sec...Please dont wonder off!. 
/doevents flush 
/return


Sub Event_Ro

/g %t has now had it's Attack and AC debuffed with Hand of RO. 
/doevents flush 
/return


Sub Event_winged

/g %t has been engaged by deadly winged insects. 
/doevents flush 
/return



/end
Hope someone can get some use out of it...
Thankx again
einsteins[/quote]