mana robing inspired by the mana robe macro

A forum for macro code snippets to be used in writing other macros. Post routines or .inc files here only, completed macros go to the Macro Depot. MQ2Data format only!

Moderator: MacroQuest Developers

flabbie
orc pawn
orc pawn
Posts: 11
Joined: Wed May 18, 2005 7:57 pm

mana robing inspired by the mana robe macro

Post by flabbie » Thu Jan 26, 2006 4:43 pm

If you use the macro made here, it's much better!

This one written by horseshoecrabs is far more superb.

This is the one I integrated into my personal macro that I use. Not nearly as smart but here goes!

Somewhere towards the top

Code: Select all

#include spell_routines.inc
#event autorobe "#*#[MQ2] autorobe"
Within your main loop (if someone could drop me a message on how to succesfully put this within the subroutine, I'd lub yu...for reasons beyond my current understanding, declaring this variables within the sub doesn't work)

Code: Select all

/declare oldRobe string outer
/declare robestop int outer 0
and of course the actual subroutine

Code: Select all

Sub event_autorobe

/if (${Me.PctMana} > 95) {
	/echo Mana is GOOD!
	/return
	}

/if (${Bool[${Me.Buff["Ether Skin"]}]}==TRUE ) {
	/notify BuffWindow Buff${Math.Calc[${Me.Buff[Ether Skin].ID}-1].Int} leftmouseup
	}

/call cast "Wand of Impenetrable Force" item
/call EquipItem "Fabled Mana Robe" 
/varset oldChest ${Macro.Return} 

/if (${Me.PctMana} < 90 && ${Me.AltAbilityReady["Harvest of Druzzil"]}) { 
      /echo Casting Harvest of Druzzil 
      /aa act Harvest of Druzzil 
      } 

:robeloop
/if (${Me.PctMana} > 95) {
	/echo Robing is done!
	/goto :robedone
	}

/if (${robestop} > 0) {
	/echo Robing interupted!
	/goto :robedone
	}



/cast item "Fabled Mana Robe"

/if (${Bool[${Me.Buff["Force Shield"]}]}==FALSE ) {
	/call cast "Wand of Impenetrable Force" item
}

/goto :robeloop

:robedone
/call EquipItem ${oldChest} 
/bandolier activate mana
/cast "Ether Skin"
/delay 4s
/return
Last edited by flabbie on Thu Jan 26, 2006 4:57 pm, edited 1 time in total.

flabbie
orc pawn
orc pawn
Posts: 11
Joined: Wed May 18, 2005 7:57 pm

Post by flabbie » Thu Jan 26, 2006 4:57 pm

The premise of this macro is very simple. Most wizards that use a manarobe will use some form of a clicky rune device to eat the negative hp effects of mana convert.

What this snippet does is simply checks your buffs window for the specific rune icon then casts the clicky rune if it's not there or casts the manarobe if it is. There is also a simple check mana check so that this mana robe sub doesn't go on indefinately. I included a variable to also halt the manarobing if you need to so to nuke a current mob.

I will be editing this to make it more user friendly for the people who have say a regular manarobe or use the wiz epic 1.0. They will become variables at the beginning at the subroutine.

Any feedback is welcome and changes will come as soon as I test them to verify that they actually work...cause non working code is the devil.

Please be patient with me. this isn't my first language so I tend to mess it up....lots. This is very simplistic coding and there are much better mana robing macros and snipets out there.

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Thu Jan 26, 2006 6:02 pm

This should work a little bit better, compare it to yours to see the changes that I made. There's still some things that I would change but I don't have the time at the moment to run through it.

Code: Select all

Sub event_autorobe
/if (!${Defined}) /declare oldRobe string local ${InvSlot[chest].Item.Name}
/if (!${Defined}) /declare robestop int local

/if (${Me.PctMana} > 95) {
  /echo Mana is GOOD!
  /return
}
/if (${Me.Buff[Ether Skin].ID}) /notify BuffWindow Buff${Me.Buff[Ether Skin].ID} leftmouseup
/if (${Spell[Force Shield].Stacks}) /call cast "Wand of Impenetrable Force" item
/call EquipItem "Fabled Mana Robe"
/varset oldRobe ${Macro.Return}

/if (${Me.PctMana} < 90 && ${Me.AltAbilityReady[Harvest of Druzzil]}) {
  /echo Casting Harvest of Druzzil
  /call cast "Harvest of Druzzil" alt
}

:robeloop
/if (${Me.PctMana} > 95) {
  /echo Robing is done!
  /goto :robedone
}

/if (${robestop}) {
  /echo Robing interupted!
  /goto :robedone
}

/call cast "Fabled Mana Robe" item

/if (!${Me.Buff[Force Shield].ID}) /call cast "Wand of Impenetrable Force" item

/goto :robeloop

:robedone
/call EquipItem ${oldRobe}
/bandolier activate mana
/if (${Spell[Ether Skin].Stacks}) /call cast "Ether Skin" gem1
/delay 4s
/return 
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

flabbie
orc pawn
orc pawn
Posts: 11
Joined: Wed May 18, 2005 7:57 pm

Post by flabbie » Thu Jan 26, 2006 6:42 pm

Oh cool, thank you for the feedback!

Let me test it and i"ll get back to you.

If I'm reading the code right, your added line at the top allows the script to start robing right away out of the current rune that's already on instead of clicking off the higher rune for the clicky one. Very clever!

For the second addition, I didn't know you could use that syntax with the ! so that's why I used the bool! Let me log in and play with it!

flabbie
orc pawn
orc pawn
Posts: 11
Joined: Wed May 18, 2005 7:57 pm

Post by flabbie » Thu Jan 26, 2006 6:45 pm

Hmm...I have some reading to do. I need to familiarize myself with calling and changing values to global and local variables....

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Thu Jan 26, 2006 7:09 pm

flabbie wrote:If I'm reading the code right, your added line at the top allows the script to start robing right away out of the current rune that's already on instead of clicking off the higher rune for the clicky one. Very clever!
Actually, no. It still clicks off the first rune, though that is one of the things I would have changed had I more time when I was working on it.

I can take a look at it more later and make some other recommendations.
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Thu Jan 26, 2006 8:11 pm

oh and the above was untested, so it might not be 100% right.
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Thu Jan 26, 2006 10:28 pm

Code: Select all

Sub event_autorobe
|This sub requires spellroutines.inc to be included in the main macro
|To start this sub, type "/echo autorobe"
|To stop this sub, type "/varset robestop 1" or wait for you to be > 95% mana

|Check if the declares we need are available
/if (!${Defined}) /declare oldRobe string local ${InvSlot[chest].Item.Name}
/if (!${Defined}) /declare robestop int local

|Check if we should harvest
/if (${Me.PctMana} < 90 && ${Me.AltAbilityReady[Harvest of Druzzil]}) /call cast "Harvest of Druzzil" alt

|Check mana after harvesting
/if (${Me.PctMana} > 95) {
  /echo Mana is GOOD!
  /return
}

|Why get rid of old rune?
|/if (${Me.Buff[Ether Skin].ID}) /notify BuffWindow Buff${Me.Buff[Ether Skin].ID} leftmouseup

|Cast a rune if we don't have one, use Stacks to verify
/if (${Spell[Force Shield].Stacks}) /call cast "Wand of Impenetrable Force" item

|Equip Mana Robe (slightly unnecessary because spellroutines.inc does it for us when casting)
|/call EquipItem "Fabled Mana Robe"

|Set the item to return to chest slot (slightly unnecessary because spellroutines.inc does it for us when casting)
|/varset oldRobe ${Macro.Return}

|Start our loop
:robeloop

|Check if we should be done
/if (${Me.PctMana} > 95 || ${robestop}) {
  /echo Robing is done!
  /goto :robedone
}

|Start eating our rune
|If the robe is not equipped already, spellroutines will equip it here and swap it back.
/call cast "Fabled Mana Robe" item

|Check our rune
/if (${Spell[Force Shield].Stacks}) /call cast "Wand of Impenetrable Force" item

|Restart the loop
/goto :robeloop

|Finish up
:robedone

|Make sure we have our original robe on
/if (${InvSlot[chest].Item.Name.NotEqual[${oldrobe}]}) /call EquipItem "${oldRobe}"

|Works for original poster, not for everybody!
|/bandolier activate mana

|Get rid of temp rune
/if (${Me.Buff[Force Shield].ID}) /notify BuffWindow Buff${Me.Buff[Force Shield].ID} leftmouseup

|Put our better rune on
/if (${Spell[Ether Skin].Stacks}) /call cast "Ether Skin" gem1

|Make sure everything is finished up and exit
/delay 4s !${Me.Casting.ID}

|Buh bye!
/return
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Fri Jan 27, 2006 9:35 am

I think this should be the final version, still untested.

Enjoy

Code: Select all

Sub event_autorobe
|This sub requires spellroutines.inc to be included in the main macro
|To start this sub, type "/echo autorobe"
|To stop this sub, type "/varset robestop 1" or wait for you to be > 95% mana

|Check if the declares we need are available

/if (!${Defined[oldrobe]}) /declare oldRobe string local ${InvSlot[chest].Item.Name}
/if (!${Defined[ManaRobe]}) /declare ManaRobe string local Fabled Mana Robe
/if (!${Defined[robestop]}) /declare robestop int local
/if (!${Defined[ManaStop]}) /declare ManaStop int local 95

|Name of your Rune spell
/if (!${Defined[RuneToEat]}) /declare RuneToEat string local Force Shield
|Name of what to cast, can be the same as RuneToEat if you are using a spell
/if (!${Defined[RuneToEatSource]}) /declare RuneToEatSource string local Wand of Impenetrable Force
|Type of casting [gem#|alt|item] where gem# is something like gem6
/if (!${Defined[RuneToEatType]}) /declare RuneToEatType string local item

|Name of your Better Rune spell
/if (!${Defined[BetterRune]}) /declare BetterRune string local Ether Skin
|Name of what to cast, can be the same as BetterRune if you are using a spell
/if (!${Defined[BetterRuneSource]}) /declare BetterRuneSource string local Ether Skin
|Type of casting [gem#|alt|item] where gem# is something like gem6
/if (!${Defined[BetterRuneType]}) /declare BetterRuneType string local gem1



|Check if we should harvest
/if (${Me.PctMana} < 90 && ${Me.SpellReady[Harvest]}) /call cast "Harvest"
/if (${Me.PctMana} < 90 && ${Me.AltAbilityReady[Harvest of Druzzil]}) /call cast "Harvest of Druzzil" alt

|Check mana after harvesting
/if (${Me.PctMana} > ${ManaStop}) {
  /echo Mana is GOOD!
  /return
}

|Cast a rune if we don't have one, use Stacks to verify
/if (${Spell[${RuneToEat}].Stacks}) /call cast "${RuneToEatSource}" ${RuneToEatType}

|Start our loop
:robeloop

|Check if we should be done
/if (${Me.PctMana} > ${ManaStop} || ${robestop}) {
  /echo Robing is done!
  /goto :robedone
}

|Start eating our rune
|If the robe is not equipped already, spellroutines will equip it here and swap it back.
/call cast "${ManaRobe}" item

|Check our rune
/if (${Spell[${RuneToEat}].Stacks}) /call cast "${RuneToEatSource}" ${RuneToEatType}

|Restart the loop
/goto :robeloop

|Finish up
:robedone

|Make sure we have our original robe on
/if (${InvSlot[chest].Item.Name.NotEqual[${oldrobe}]}) /call EquipItem "${oldRobe}"

|Get rid of temp rune
/if (${Me.Buff[${RuneToEat}].ID}) /nomodkey /notify BuffWindow Buff${Me.Buff[${RuneToEat}].ID} leftmouseup

|Put our better rune on
/if (${Spell[${BetterRune}].Stacks}) /call cast "${BetterRuneSource}" ${BetterRuneType}

|Make sure everything is finished up and exit
/delay 4s !${Me.Casting.ID}

|Buh bye!
/return
Last edited by fearless on Thu Jul 27, 2006 9:30 am, edited 1 time in total.
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

horseshoecrabs
a ghoul
a ghoul
Posts: 89
Joined: Fri Jun 10, 2005 6:35 pm

Post by horseshoecrabs » Fri Feb 03, 2006 4:59 pm

Hi Flabbie,

Thanks for the kind words. I dropped out of EQ for a couple of months while my RL job was kicking my ass. I may go back and actually re-tool some of my own macro for a greater level of flexibility.

First, I failed to read or understand some other posts in the macros depot. Because of that failing, I started work on creating what turns out to be a somewhat crippled version of spellroutines.inc (iirc).

Using a simple inclusion file that allows you to call forth an item from inventory and properly equip it in the right spot doesn't necessarily do a whole lot to shorten your own macros, but it does make it incredibly simple to take generic code such as manarobe and make it do other stuff too such as click a belt, click a mask, etc. and then put it away when finished.

When I've had a chance to actually sit down and do some thinking and scripting, I'll post the new results in my old thread and describe the motions of making it all work.

Oh yes, nice work on your macro. I'll give it a try when time permits. :)

Cheers,

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: mana robing inspired by the mana robe macro

Post by xyilla » Thu Jul 03, 2025 6:10 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: mana robing inspired by the mana robe macro

Post by xyilla » Thu Jul 03, 2025 6:11 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: mana robing inspired by the mana robe macro

Post by xyilla » Thu Jul 03, 2025 6:13 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: mana robing inspired by the mana robe macro

Post by xyilla » Thu Jul 03, 2025 6:14 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: mana robing inspired by the mana robe macro

Post by xyilla » Thu Jul 03, 2025 6:15 am