A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.
Moderator: MacroQuest Developers
-
Midnight
- a lesser mummy

- Posts: 68
- Joined: Wed Nov 12, 2003 12:51 pm
Post
by Midnight » Thu Apr 22, 2004 10:48 am
Some of the other monk attack macros didn't look the best, so I made this one. /movetomob taken from an ancient Grimjack macro. You will want to comment/uncomment some of the code. I didn't add a check for epic or any kind of haste because I haven't used my epic for ages.
Updated 5.03.04 - Lots of code changes, debug junk
Updated 4.23.04 - Changed max/min range crap
Code: Select all
| - Attack.mac -
| - Original Attack code [Grimjack]
| - Modified for Monk [Midnight]
|
#event enraged "has become ENRAGED"
#event offrage "is no longer enraged"
|#event stunned "You are stunned!"
|#event unstunned "You are unstunned"
#event mobgate "Gates."
|#event feared "You lose control of yourself."
|#event unfeared "You have control of yourself again."
sub Main
/declare enragevar int outer
/declare stunvar int outer
/declare fearvar int outer
/declare atk int outer
/declare npcid int outer
/varset enragevar 0
/varset stunvar 0
/varset fearvar 0
/varset atk 1
/varset npcid ${Target.ID}
/if (${Bool[${Target}]}==0) {
/echo No target - Haling script!
/end
}
/echo Fighting a level ${Target.Level} ${Target.CleanName} [${Target.MaxRange}]
/stand
/face fast nolook
/call MovetoMob
:CloserAF
/if (${Target.ID}!=${npcid}) /goto :EndAF
/if (${atk}==1) {
/if (${Me.State.Equal[FEIGN]}) /end
/face fast nolook
/if (${Target.Distance}>${Target.MaxRange}-5) {
/echo DEBUG - Creeping Forward [${Target.Distance} / ${Target.MaxRange}]
/keypress forward hold
/keypress forward
}
/if (${Target.Distance}<${Target.MaxRange}-12) {
/echo DEBUG - Creeping Backward [${Target.Distance} / ${Target.MaxRange}]
/keypress back hold
/keypress back
}
/if (${Target.Distance}<=${Target.MaxRange}) /attack on
/if (${Target.Distance}>${Target.MaxRange}+2) {
/attack off
/call MovetoMob
}
/if (${Target.Distance}<=${Target.MaxRange}) /if (${Me.AbilityReady[Flying Kick]}) /doability "Flying kick"
/if (${Target.Distance}<=${Target.MaxRange}) /if (${Me.AbilityReady[Disarm]}) /doability "Disarm"
| /if (${Target.Distance}<=${Target.MaxRange}) /if (${Me.AbilityReady[Intimidation]}) /doability "Intimidation"
}
/if (${Me.AbilityReady[Mend]}) /if (${Me.PctHPs}<50) {
/echo << ${Me.PctHPs}% LOW HP - MEND >>
/doability "Mend"
}
/if (${Me.PctHPs}<20) {
/doability "Feign Death"
/look
/echo << ${Me.PctHPs}% LOW HP - FD >>
/end
}
/doevents
/goto :CloserAF
:EndAF
/echo The mob is dead (AA: ${exp(last,aa)} ~ ${exp(total,aa)})
/keypress forward
/keypress back
/attack off
/varset npcid 0
/look
/return
sub MoveToMob
/if (${Target.Distance}<${Target.MaxRange}) {
/face fast nolook
/return
}
/keypress forward hold
:Movementloop
/if (${Bool[${Target}]}==0) /return
/if (${Me.State.Equal[FEIGN]}) /end
/face nolook
/if (${Target.Distance}<${Target.MaxRange}-4) {
/face fast nolook
/keypress forward
/echo DEBUG - Destination Reached [${Target.Distance}]
/return
}
/echo DEBUG - Running to mob [${Target.Distance}]
/if (${Target.Distance}>${Target.MaxRange}-10) /goto :MovementLoop
/return
| ### SUBS ### |
Sub Event_mobgate
/echo Enemy gated - Halting script!
/attack off
/end
Sub Event_enraged
/if (${Bool[${Target}]}==1) {
/if (${Target.PctHPs}<20) {
/varset enragevar 1
/varset atk 0
/echo Mob is Enraged - Halting Attack
/attack off
}
}
/return
Sub Event_offrage
/if (${Bool[${Target}]}==1) {
/if (${Target.PctHPs}<10) {
/varset enragevar 0
/varset atk 1
/echo Mob is no longer Enraged - Rengaging
/stand
/attack
}
}
/return
Sub Event_feared
/if (${Bool[${Target}]}==1) {
/varset fearvar 1
/varset atk 0
/echo You are feared - Halting Attack
/attack off
}
/return
Sub Event_unfeared
/if (${Bool[${Target}]}==1) {
/varset fearvar 0
/varset atk 1
/echo You are no longer Feared - Rengaging
/stand
/attack
}
/return
Sub Event_stunned
/if (${Bool[${Target}]}==1) {
/varset stunvar 1
/varset atk 0
/echo You are stunned - Halting Attack
/attack off
}
/return
Sub Event_unstunned
/if (${Bool[${Target}]}==1) {
/varset stunvar 0
/varset atk 1
/echo You are no longer stunned - Rengaging
/stand
/attack
}
/return
Last edited by
Midnight on Sun May 02, 2004 10:16 am, edited 2 times in total.
-
MrSmallie
- a hill giant

- Posts: 167
- Joined: Fri Oct 11, 2002 11:18 am
Post
by MrSmallie » Thu Apr 22, 2004 12:03 pm
Out of curiosity...
Why do you have:
Code: Select all
/keypress forward hold
/keypress forward
Instead of just /keypress forward?
Me
[img]http://home.comcast.net/~mrsmallie/ches.JPG[/img]
-
Midnight
- a lesser mummy

- Posts: 68
- Joined: Wed Nov 12, 2003 12:51 pm
Post
by Midnight » Thu Apr 22, 2004 12:30 pm
So it only nudges forward instead of running headlong into the mob... It's basically the replacement for /send up. Run it and you'll see that it's very clean
-
s16z
- a ghoul

- Posts: 97
- Joined: Thu Apr 01, 2004 12:03 pm
Post
by s16z » Thu Apr 22, 2004 12:36 pm
Code: Select all
/if (${String[${Me.State}].Equal[FEIGN]}==1) /end
No need to convert ${Me.State} to a string, since it is a string. Use
Code: Select all
/if (${Me.State.Equal[FEIGN]}) /end
Is missing a ')'
Change this:
to
Also, i'd change my logic for the 'low hp' feign to check to make sure I actually succeeded, before ending the macro :)
-
Soultrapper
- orc pawn

- Posts: 28
- Joined: Thu Apr 22, 2004 1:30 pm
Post
by Soultrapper » Thu Apr 22, 2004 1:35 pm
If the epic clicks could also be included (unless VQ, DV etc are present in buff window) that would rock.
-
Midnight
- a lesser mummy

- Posts: 68
- Joined: Wed Nov 12, 2003 12:51 pm
Post
by Midnight » Thu Apr 22, 2004 4:02 pm
Suppose I'll make those code changes just so its more clean.. works with the alternate though. and the Distance > 1 is really 18.. but the board sees 8 with parenthesis as a smiley face and blocks out the code.
Also, I'm not seeing a true/false check in your Target.ID suggestion so I'm keeping it as is.. since I have 6 references
-
s16z
- a ghoul

- Posts: 97
- Joined: Thu Apr 01, 2004 12:03 pm
Post
by s16z » Thu Apr 22, 2004 5:17 pm
If you don't have a target, then ${Target.ID} returns null, which is the same as false. If you have a target, it returns the ID number, which is the same as true.
-
donmacro
- decaying skeleton

- Posts: 5
- Joined: Sun Feb 15, 2004 2:04 pm
Post
by donmacro » Thu Apr 22, 2004 8:45 pm
anything special i need to do like instructions?
-
Midnight
- a lesser mummy

- Posts: 68
- Joined: Wed Nov 12, 2003 12:51 pm
Post
by Midnight » Fri Apr 23, 2004 12:06 am
just /macro attack.. or make an alias. thats it. just starts fighting whatever you have targeted. stops when its dead
-
Soultrapper
- orc pawn

- Posts: 28
- Joined: Thu Apr 22, 2004 1:30 pm
Post
by Soultrapper » Fri Apr 23, 2004 7:36 am
Wooot, my very first "useful" mod 2 days after installing MQ:
Code: Select all
sub ClickEpic
/for tempvar 1 to 15
| If you have any buff that doesn't stack w/ epic that's not the chanter haste you deserve the "Your spell did not take hold." spam
/if (${Me.Buff[@tempvar].ID} == 3178 || ${Me.Buff[@tempvar].ID} == 3240 || ${Me.Buff[@tempvar].ID} == 1940) {
/return
}
/next tempvar
/cast item "Celestial Fists"
/return
There's prob a better way of doin it, but this works :b
-
Midnight
- a lesser mummy

- Posts: 68
- Joined: Wed Nov 12, 2003 12:51 pm
Post
by Midnight » Fri Apr 23, 2004 12:47 pm
Grimjack enlightened me on my jacked up code using absolute values for min/max range.. so I took his suggestion and changed it so you never have to open it and edit the damn macro. Much more efficient now.. Oh and thanks to Lax for answering my gimp questions that I should have figured out on my own if I had actually looked closer before I asked
-
s16z
- a ghoul

- Posts: 97
- Joined: Thu Apr 01, 2004 12:03 pm
Post
by s16z » Fri Apr 23, 2004 3:40 pm
Code: Select all
Sub Main
/declare BadBuffList array
/declare BadBuffCount global
/varset BadBuffList[1] "Speed of Vallon"
/varset BadBuffList[2] "Vallon's Quickening"
/varset BadBuffList[3] "Strength of Tunare"
/varset BadBuffList[4] "Hinderance of the Vas Ren"
/varset BadBuffList[5] "Muscle Shock"
/varset BadBuffList[6] "Dismal Rage of the Shrine"
/varset BadBuffList[7] "Enfeebling Shock"
/varset BadBuffList[8] "Exhaustion"
/varset BadBuffList[9] "Curse of Eternal Suffering"
/varset BadBuffList[10] "Flesh Pile"
/varset BadBuffList[11] "Gemination"
/varset BadBuffList[12] "Grip of Mortal Reality"
/varset BadBuffList[13] "Spirit Cleaver"
/varset BadBuffList[14] "Remission of Strength"
/varset BadBuffList[15] "Allure of Hatred"
/varset BadBuffList[16] "Wind of Xegony"
/varset BadBuffCount 16
:Loop
| Do your loop code here
/call ClickEpic
/goto :Loop
Sub ClickEpic
/for tempvar 1 to @BadBuffCount
/if (${Me.Buff[@BadBuffList[@tempvar]].ID}) {
/return
}
/next tempvar
/if (${Me.Buff[Celestial Tranquility].ID) {
/if (${Me.Buff[Celetstial Tranquility].Duration}<=1) {
/cast item "Celestial Fists"
}
}
/return
Not tested, I'm at work. Working. Really I am.
-
s0meth1ng
- orc pawn

- Posts: 28
- Joined: Sun Feb 22, 2004 7:00 am
Post
by s0meth1ng » Sun May 02, 2004 4:57 am
Is this Still usable with MQ now?
-
Midnight
- a lesser mummy

- Posts: 68
- Joined: Wed Nov 12, 2003 12:51 pm
Post
by Midnight » Sun May 02, 2004 10:13 am
Oh yeah.. this is a f'd up version.. lots of bugs. I'm posting my current macro. Tweak the settings and comment out what you want. I leave the debugging junk in there because I wanted to see what checks were working or not. Might want to comment those out. Heh
-
bohicaseti
- a lesser mummy

- Posts: 33
- Joined: Sat Mar 06, 2004 5:55 am
Post
by bohicaseti » Fri May 07, 2004 2:31 pm
Did a minimal test with this. No errors, but I didn't have a chance to test it with one of the overwriting buffs on me, but it should work as far as the array goes.
Code: Select all
Sub Main
/declare BadBuffCount int outer
/declare BadBuffList[16] string outer ARRAY
/varset BadBuffList[1] "Speed of Vallon"
/varset BadBuffList[2] "Vallon's Quickening"
/varset BadBuffList[3] "Strength of Tunare"
/varset BadBuffList[4] "Hinderance of the Vas Ren"
/varset BadBuffList[5] "Muscle Shock"
/varset BadBuffList[6] "Dismal Rage of the Shrine"
/varset BadBuffList[7] "Enfeebling Shock"
/varset BadBuffList[8] "Exhaustion"
/varset BadBuffList[9] "Curse of Eternal Suffering"
/varset BadBuffList[10] "Flesh Pile"
/varset BadBuffList[11] "Gemination"
/varset BadBuffList[12] "Grip of Mortal Reality"
/varset BadBuffList[13] "Spirit Cleaver"
/varset BadBuffList[14] "Remission of Strength"
/varset BadBuffList[15] "Allure of Hatred"
/varset BadBuffList[16] "Wind of Xegony"
:Loop
| Do your loop code here
/call ClickEpic
/goto :Loop
/return
Sub ClickEpic
/declare tempvar int local
/for tempvar 1 to @BadBuffCount
/if (${Me.Buff[@BadBuffList[@tempvar]].ID}) {
/return
}
/next tempvar
/if (!${Me.Buff[Celestial Tranquility].ID}) /cast item "Celestial Fists"
/return
Friends help friends move . . . .
Real friends help friends move dead bodies.