Page 1 of 2

Simple Forgotton Halls for Cleric 40ish

Posted: Thu Oct 04, 2007 6:46 pm
by pantaloonz
Greetings,

This is my very first post, while I don't expect anyone involved in this project to be gentle I would happily take suggestions for improving this macros.

This is also my first macro that I spent more than 8 minutes on. This macro is for a cleric in their early to mid 40's (that's all that I've tested anyway)

Usage: zone into forgotten halls and let it rip.
Here's what it does, (I know you alll can read the code much better than I) however: This will target the nearest NPC, I use it the rat area, kill it. Then med to full and repeat. Every 41.667 Minutes it will rebuff the toon.

Critism welcome, if this helps you, all the best to you.

Code: Select all

| This Macro has been created for a cleric to kill things in forgotten halls
| This macro is level specific and needs to be updated when you get better spells
#turbo 
#Include spell_routines.inc 


Sub Main
/declare bufftimer timer outer 0
/declare session timer outer 0
/varset session 20000s

:main
/if (!${session}) /goto :dead
/if (!${bufftimer}) /goto :rebuff
/sit off
/keypress F8
/keypress 1
/goto :loop

:loop
/if (${Me.Casting.ID}) /goto :loop
/if (${Target.ID} && ${Target.Type.NotEqual[PC]}) {
/call cast "Retribution" }
/delay 5
/if (${Me.PctHPs}< 10) goto :dead
/if (${Target.ID}) /goto :loop 
/goto :med2full


:med2full
/target <toon>
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/if (${Me.PctMana}< 50) /goto :med2full
/if (${Target.PctHPs}< 75) /goto :healme 
/if (${Me.PctMana}> 99) /goto :main
/goto :med2full

:healme
/target <toon>
/call cast "Superior Healing"
/delay 5
/goto :med2full


:rebuff
/target <toon>
/call cast "Blessing of Faith"
/delay 20
/call cast "Armor of Faith"
/delay 20
/call cast "Resolution"
/delay 20
/call cast "Symbol of Naltron"
/varset bufftimer 2500s
/goto :med2full

:dead
/say I died
/call cast "gate"
/endmacro
--end code--

I'm having trouble figuring out how to use /doevents
as I want to put in a check that if I get a tell from someone (I have no in game friends) it makes me gate and ends the macro. I'll pose that in the help section

Pantz

Edits: Clean Code not done however made changes

Added a check for target type NOT a PC as under the right circumstances I was nuking myself

Changed some logic so if HP's drop too low it attempts a gate

Changed the End of Session /goto in order to gate back to bind.

Note: This Macro decays at level 49 (this toon not twinked)
mobs were kicking my butt all over. Need to learn how to macro a skin spikes potion +)

Posted: Thu Oct 04, 2007 7:20 pm
by discip1e
hey bud, could you possibly use code tags around that?

hard on the eyes.

Posted: Thu Oct 04, 2007 7:41 pm
by jacensolo
Some possible changes:

1. Instead of rebuffing every x minutes, you could do rebuff individual buffs as they drop. A bit more code, but more mana/time efficient in the long run.

2. Use /calls where possible rather than /goto. Like having rebuffing as a Sub instead of in the loop there. Basically, if it's not something being run through everytime, a Sub is probably better for it than using /goto.

3. For the /doevents, you want to add a chat event that watches tells like this:

Code: Select all

#chat tell
Then add a Sub to gate and endmac for it, like this:

Code: Select all

Sub Event_Chat
 /call cast Gate
 /endm

Posted: Thu Oct 04, 2007 8:07 pm
by pantaloonz
Thanks for the immediate input,

2 things:

I'll look up the code tags, forum newbie boo boo for sure.

and thanks for the introduction to doevents.

I will try and update the macro accordingly.

Pantz

Posted: Thu Oct 04, 2007 9:12 pm
by bannor
And take out your char name

Posted: Thu Oct 04, 2007 9:23 pm
by devNull
bannor wrote:And take out your char name
/target myself

Posted: Thu Oct 04, 2007 10:14 pm
by dont_know_at_all
edited to for code brackets and toon name...

Posted: Fri Oct 05, 2007 2:16 am
by Canadian_Cowgirl
This is a great start. I don't really have anything to add that hasn't been said before, I just wanted to give you a thumbs up for being proactive and trying. You'll find this bunch is very friendly and helpful when you try for yourself.

-C_CG.
(Who has had many one-sided conversations with dkaa while he's studiously drinking his coffee. 'Okay, but how do I..' .. .. 'OH! I see, thanks dkaa!')

Posted: Fri Oct 05, 2007 2:44 am
by pw
Not tested because MQ2 down atm, but here's an adaptation of something I use for self-buffing:

Code: Select all

    /if (!${Me.Buff[Conviction].ID} || ${Me.Buff[Conviction].Duration.TotalMinutes} < 5) { 
      /cast Conviction
      /doevents 
    } 

Posted: Fri Oct 05, 2007 3:00 am
by TMS
pw wrote:Not tested because MQ2 down atm, but here's an adaptation of something I use for self-buffing:

Code: Select all

    /if (!${Me.Buff[Conviction].ID} || ${Me.Buff[Conviction].Duration.TotalMinutes} < 5) { 
      /cast Conviction
      /doevents 
    } 

Code: Select all

/if (${Spell[Fire Shield].Stacks[2]}) {
	/keypress F1
	/casting "Singing Steel Bracer" item
	/delay 6s
}
Will rebuff 12 seconds before the Buff runs out.

Posted: Fri Oct 05, 2007 7:38 am
by jacensolo
Might want to add some code into that to possibly check and return to previous target.

"UberMonk, why aren't you meleeing?!?! We're all gonna die!!"

"Oh, sorry guys, my lazy macro self-targetted, and I wasn't paying attention..."

Obviously, wouldn't happen on a cleric mac, but might get worse if the mac decided the mob was dead and moved on to the next one.

Posted: Fri Oct 05, 2007 9:41 am
by pantaloonz
Greets,

Thanks for all the suggestions, I'm working on some cleaner code right now and will test shortly once the patched code is released.

Thanks for the tip on the targetting as fairly soon, I'll be writing the companion macro that will control some type of melee toon (if I want to buy the damn expansion that is)

Q: Is is alright to post the retooled macro in the same thread? I'm still trying to get a feel for the community here.

Thanks

Posted: Fri Oct 05, 2007 11:32 am
by Bad Karma
pantaloonz wrote:Q: Is is alright to post the retooled macro in the same thread? I'm still trying to get a feel for the community here.
It's preferred, to help keep the forums neat and clean. :) To do so, though, simply go back to your first post, and click the {EDIT} button....then, copy and paste over the old code. That way, the most current version is always available on your first message, and everything after that is discussion.... Helps in making finding the latest update easy when your threads hit 64+ pages! ;)

Posted: Fri Oct 05, 2007 1:08 pm
by dont_know_at_all
Well, sometimes it's better to leave an imperfect macro untouched so that comments stay relevant.

Posted: Tue Jan 12, 2010 3:48 pm
by pantaloonz
Greetings,

This was originally the Forgotten Halls for Cleric in the 40ish. I'm back and playing an Enchanter now, and taking onine classes. So what the hell, decided to see if could multitask.

This Macro is now Enchanter Centric, but could be easily modified for any caster variety, it is very specific and will require you to change your spell selections and gem choices.

If this helps you excellent, if you have improvement tips, by all means.. dkaa, I know I need to work on my /do events and learn to not use /goto, I'll get there.

This macro requires Plugins: MQ2Cast, MQ2Exchange, MQ2Melee, MQ2MoveUtils INC's: MQ2Cast_Spell_Routines.inc Ninjadvloot.inc

Toon is level 55 and working on AA. Your mileage will vary. Don't forget to suspend your mercs getting expedition!

Code: Select all

| This Macro has been created for a enchanter WITH A TANK MERC to kill things in forgotten halls 
| This macro is level specific and needs to be updated when you get better spells
| What it does:
| Sets some timers, an instance timer, and a bufftimer.
| Checks those timers, and rebuffs if needed (very few buffs still)
| Will Target nearest rat, debuff it, wait a bit then nuke the crap out of it till dead
| After that it will loot the rat
| Can overcome simple problems, like not nuking a corpse, and a gate when low HP check.

#turbo 
#Include MQ2Cast_Spell_Routines.inc
#Include Ninjadvloot.inc


Sub Main 
/declare bufftimer timer outer 0 
/declare session timer outer 0 
/varset session 20000s 

:main
/if (!${session}) /goto :dead 
/if (!${bufftimer}) /goto :rebuff 
/sit off 
/moveto loc -600 170
/target myself
/call MQ2Cast "Berserker Spirit" gem3 -maxretries|2
/target a squeak
/delay 5s ${Cast.Ready[Tashania]}
/call MQ2Cast "Tashania" -maxretries|2
/delay 5s ${Cast.Ready[Shiftless Deeds]}
/call MQ2Cast "Shiftless Deeds" gem6 -maxretries|3
/delay 5s ${Cast.Ready[Cripple]}
/call MQ2cast "Cripple" gem4 -maxretries|2
/goto :loop
/goto :med2full 

:loop
/delay 10s
/delay 5s ${Cast.Ready[Dementia]}
/call MQ2cast "Dementia" gem2 -kill
/if (${Target.ID} && ${Target.Type.NotEqual[Corpse]}) /goto :loop
/goto :loot
/goto :med2full

:med2full
/delay 5s
/target Myself
/if (${Me.Standing} && !${Me.Mount.ID}) /sit 
/if (${Me.PctMana}< 50) /goto :med2full
/target <tankname>
/delay 2s 
/if (${Target.PctHPs}< 85) /goto :med2full 
/if (${Me.PctMana}> 80) /goto :main
/goto :med2full 

:rebuff 
/target myself
/call MQ2Cast "Clarity II" gem1 -maxretries|3
/target <tankname>
/call MQ2Cast "Staff of the Serpent" item
/varset bufftimer 1400s 
/goto :med2full 

:loot
/target corpse
/delay 2s
/if (${Target.Type.NotEqual[Corpse]}) /goto :med2full
/moveto id
/delay 2s
/call LootCorpse
/delay 5s
/goto :med2full

:dead 
/say I died 
/call MQ2Cast "gate" gem9 -maxretries|9 
/endmacro
My Code is imperfect, this guy goes along pretty well but still runs into weird conditions sometimes so I need to monitor it. But the loot functionality keeps my merc cost a wash at least :)

Pantz.