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
-
Slugman
- decaying skeleton

- Posts: 9
- Joined: Mon Feb 23, 2004 4:31 pm
Post
by Slugman » Mon Feb 23, 2004 5:23 pm
Hi. I am quite new to this Macro'ing but very excited about the possibilties.
I would like to start w/ something that's (hopefully) pretty simple...
I am an enchanter who is typically charming mobs in BoT, etc.
I would like to have a macro that does the following:
When my charm breaks, start the macro
Dismount my dino
Cast my Eld Rune (since I've prob been whack 3 times already. :-)
Cast a stun
Cast a mezz
Tash it, etc.
Recharm.
Is this hard to do? I'm not looking for someone to write it for me ( unless it's been done and someone can point it to me...) but rather give me some guidelines on how to get this going...
Thanks!
-
Gumby
- a ghoul

- Posts: 99
- Joined: Sat Jan 24, 2004 5:27 pm
Post
by Gumby » Mon Feb 23, 2004 7:16 pm
Nah wouldn't be hard, but I highly recommend giving it a shot on your own too.
Look up at the top of this forum for the Macro Scripting for Dummies post by elretardo; definitely a worthwhile read if you're attempting to learn MQ scripting and entertaining to boot... can't go wrong there.
After fooling around with some basic stuff (I wrote stupid and utterly trivial macros to start but it helps), look at the documentation and some of the examples that are included with the MQ source... you will refer to the manual, often. My recommendation is to scan through it once, go through it in detail another, and then refer to it whenever you're uncertain about something.
The Macro Depot is a decent spot as well, and there's always the other users here if you get stuck.
Two general pointers, store your pet's ID and do your target functions off of that. Take a look at one of the flavors of spellcast.inc over in the snippets section as well and you'll probably want to use it to handle your spell routines rather than writing your own; actually I'd recommend going through it as a training exercise if nothing else as it provides a clear example of a lot of the more useful functions in MQ. Anything you don't understand from it, look up in the manual. Do the same with the script examples in the depot (don't try genbot or the advpath scripts to start heh).
Once you're familiar with MQ as a whole, you could probably write what you need in about half an hour or less for a basic start. Similar things have been done before but the neat thing is you can start at the most rudimentary level, and then add features and complexity to the script you've already got. Extremely worthwhile endeavor.
Party on,
G
-
bob_the_builder
- a hill giant

- Posts: 275
- Joined: Tue Jul 22, 2003 1:22 pm
Post
by bob_the_builder » Mon Feb 23, 2004 8:35 pm
I was looking for soemthing too, thought I'd toss this together. I havent tried it. Let me know tho.
Make sure to have the latest spellcast.inc in your ./macro path
Code: Select all
| Grab a pet and keeps it charmed
| target a pet, /mac charmit
| charmit.mac
| 2/24/04 PM
| Bob_the_builder
|
| Make sure to put the proper spells in setupVarset
| Will cast EldritchRune if you have the AA
| If the ability is not met will cast ArcaneRune
|
| Requires the filter on for You being hit
#turbo 50
#include spellcast.inc
#event CharmOff "charm spell has worn off"
Sub Main
/if n $target(id)==0 /call EndCharm
:setupDeclare
/declare MyPet global
/declare CharmSpell global
/declare TashSpell global
/declare StunSpell global
/declare MezSpell global
/declare SelfRune global
/declare RuneTimer timer
:setupVarset
/varset MyPet $target(id)
/varset StunSpell "Word of Morell"
/varset MezSpell "Sleep"
/varset TashSpell "Howl of Tashan"
/varset CharmSpell "Command of Druzzil"
/varset SelfRune "Arcane Rune"
/varset RuneTimer 0
/call Charm
/endmacro
Sub Charm
/echo Charming < $target(name,clean) >
/dismount
/sit off
/face
/if n $target(distance)<=30 {
/call cast "@StunSpell"
}
/call cast "@MezSpell"
/call cast "@TashSpell"
/call cast "@CharmSpell"
/pet guard here
:mainloop
/doevents CharmOff
/doevents BeingHit
/if n $char(buff,"Arcane Rune")==0 {
/if n $char(buff,"Eldritch Rune")==0 {
/call RuneUp
}
}
/goto :mainloop
/return
Sub event_CharmOff
/target id @MyPet
/if n $target(id)==0 /call EndCharm
/call Charm
/return
Sub RuneUp
/if n @RuneTimer==0 {
/alt activate 173
/varset RuneTimer 606s
} Else {
/call Cast "Arcane Rune"
}
/return
Sub EndCharm
/echo No pet defined in target
/echo Ending Charm Session
/endmacro
/return
Bob_the_wanna_be_charmer
Last edited by
bob_the_builder on Tue Feb 24, 2004 9:02 pm, edited 26 times in total.
-
daerck
- a ghoul

- Posts: 134
- Joined: Mon Jan 12, 2004 8:44 pm
Post
by daerck » Mon Feb 23, 2004 11:04 pm
Code: Select all
:start
/if $target()=="FALSE" /goto :end
[color=red] /call CharmOff[/color]
-You don't have a Sub CharmOff, so this part doesn't work.
-You may want to use a look at $char(pet) instead of $target()=="FALSE" as a break condition
-In the Event_CharmOff, you probably want to target the mob, before calling it's name. And it should be /target id
@MyPet
-
bob_the_builder
- a hill giant

- Posts: 275
- Joined: Tue Jul 22, 2003 1:22 pm
Post
by bob_the_builder » Mon Feb 23, 2004 11:07 pm
Ok, think I posted a working Charm macro.. might add some other crap but i've had enough, om asleep.
Thanks daerck, I was cut / pasting into board here as I was writing the macro, sorry I didn't have ful code when you posted. Do apologize and thanks for your time.
Bob_is_asleep
-
Slugman
- decaying skeleton

- Posts: 9
- Joined: Mon Feb 23, 2004 4:31 pm
Post
by Slugman » Tue Feb 24, 2004 8:26 am
Sorry to be slow, when you said you think you posted a charm macro, did you mean the one above or somewhere else?
Thanks.
bob_the_builder wrote:Ok, think I posted a working Charm macro.. might add some other crap but i've had enough, om asleep.
Thanks daerck, I was cut / pasting into board here as I was writing the macro, sorry I didn't have ful code when you posted. Do apologize and thanks for your time.
Bob_is_asleep
-
bob_the_builder
- a hill giant

- Posts: 275
- Joined: Tue Jul 22, 2003 1:22 pm
Post
by bob_the_builder » Tue Feb 24, 2004 10:40 am
Yea, look above, posting as I go. Anything else we can add? feel free to comment.
Bob
-
Slugman
- decaying skeleton

- Posts: 9
- Joined: Mon Feb 23, 2004 4:31 pm
Post
by Slugman » Tue Feb 24, 2004 11:39 am
Ahh. I'm a dope. Didn't realize that you edited it.
Lemme try this one out and see what I can learn from it.
-
Mckorr
- Developer

- Posts: 2326
- Joined: Fri Oct 18, 2002 1:16 pm
- Location: Texas
Post
by Mckorr » Tue Feb 24, 2004 11:42 am
-
Mckorr
- Developer

- Posts: 2326
- Joined: Fri Oct 18, 2002 1:16 pm
- Location: Texas
Post
by Mckorr » Tue Feb 24, 2004 12:44 pm
It wasn't sarcasm, it was a joke :)
-
bob_the_builder
- a hill giant

- Posts: 275
- Joined: Tue Jul 22, 2003 1:22 pm
Post
by bob_the_builder » Tue Feb 24, 2004 1:05 pm
Any suggestions or fixes here? Thought I'd drop it in MacroDepot if it looks tight.
Bob_has_a_pet_to_make_coffee_now
-
SimpleMynd_01
- a lesser mummy

- Posts: 71
- Joined: Thu May 08, 2003 3:16 pm
Post
by SimpleMynd_01 » Tue Feb 24, 2004 2:20 pm
Code: Select all
/if n [color=red]$char(dar)[/color]<=RuneBuffer {
/echo Need to cast self rune
/call cast "@SelfRune"
}
So this works now? I thought it only updated when you zoned?
-SimpleMynd
-
bob_the_builder
- a hill giant

- Posts: 275
- Joined: Tue Jul 22, 2003 1:22 pm
Post
by bob_the_builder » Tue Feb 24, 2004 2:27 pm
Yeah, $char(dar) is not real time.
Used /if n $char(buff,"Arcane Rune")==0 {
Thanks SimpleMynd
Bob
Last edited by
bob_the_builder on Tue Feb 24, 2004 3:12 pm, edited 1 time in total.
-
SimpleMynd_01
- a lesser mummy

- Posts: 71
- Joined: Thu May 08, 2003 3:16 pm
Post
by SimpleMynd_01 » Tue Feb 24, 2004 2:43 pm
I use this for watching my Rune. Might be easier to just do it your way but this way if the mob uses up the rune I don't have to get hurt before putting up a new one. Doesn't happen often, but then again I'm a efficiency nut. :)
Code: Select all
Sub RuneCheck
/if n $char(buff,"Arcane Rune")==0 {
/if n $char(buff,"Eldritch Rune")==0 {
/goto :DoBuff6
}
}
/return
:DoBuff6
/if "$char(state)"=="SIT" /stand
/if n @EldritchRuneTimer==0 {
/alt activate 173
/varset EldritchRuneTimer 606s
} Else {
/call Cast "Arcane Rune"
}
/return
Hope this helps...
-SimpleMynd