Simple Mage combat + self buf macro

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

zanomo
a hill giant
a hill giant
Posts: 285
Joined: Thu Jun 24, 2004 11:21 pm

Simple Mage combat + self buf macro

Post by zanomo » Sat Jun 26, 2004 5:54 am

Just created my first macro, copied the codes from here and there. Basically to keep the mage buffed when not in combat and to assist the main assist when the magic word is called and the mob is in a good engagement distance.

Your comments for improvements are most welcome. :cool:

Code: Select all

|----------------------------------------------------------------------------|
| GoMage - Mage Combat and Buff
| Zanomo Jun 26, 2004
| Usage: /mac GoMage [MainAssist]
| magic word is "Get Ready and Kill it"
|

#turbo 40
#include spellcast.inc
#chat group

sub main

/declare c int outer | counter variable 
/declare MinHP int outer 5 | hp percentage at which to stop nuking
/declare NukeMana int outer 1500 | Actual mana at which to stop nuking
/declare BuffTime int outer 20 | Buff duration under which to recast them 
/declare MA string outer | Main Assist 
/declare IniFile String outer
/declare Incword String outer
/declare engagedistance int outer 100


/varset IniFile "GoIni.ini"
/varset Incword "Get Ready and Kill it"

| INI setup variables
/if (${Defined[Param0]}) {
  /ini "${IniFile}" Settings MA ${Param0} 
  /varset MA ${Param0}
} else {
  /varset MA ${Ini[${IniFile},Settings,MA,NOTFOUND]}      
  /if (${MA.Equal["NOTFOUND"]}) {
  /echo You need to start the macro with /mac GoMage [Main Assist] and generate your .INI file.
  /endmacro
  } else {
  /echo Assisting ${MA} 
  }
}

/echo GoMage started

:mainloop
/doevents chat
/call Buffemup
/goto :mainloop
/endmacro 

Sub Buffemup
   /if (!${Me.Casting.ID} && !${Target.Type.Equal[NPC]}) {
   /if (!${Me.Buff["Shield of Maelin"].ID} && !${Me.Casting.ID}) /call Cast "Shield of Maelin"
   /if (${Me.AltAbilityReady[Elemental Form: Water]}) /call Cast "Elemental Form: Water" activate
   /if (${Me.Pet.ID}) {
       /if (!${Me.Buff["Elemental Draw Recourse"].ID} && !${Me.Casting.ID}) {
           /call Cast "Elemental Draw"
           /sit
       }
       /if (!${Me.PetBuff["Burnout V"]} && !${Me.Casting.ID}) {
           /call Cast "Burnout V"
           /sit
       }
       /if (!${Me.PetBuff["Kindle"]} && !${Me.Casting.ID}) {
           /call Cast "Kindle"
           /sit
       }
       /if (!${Me.PetBuff["Flameshield of Ro"]} && !${Me.Casting.ID}) {
           /target ${Me.Pet.Name}
           /delay 6
           /call Cast "Flameshield of Ro"
           /sit
       }
   }
}
/return

Sub Event_Chat(ChatType,Sender,ChatText)
/if (${ChatText.Equal[${Incword]} && ${Sender.Equal[${MA}]}) {
    /call Assist_call
    /call Nuke
    }
/return


Sub Assist_call
    /echo Incoming.
    /assist ${MA}
    /delay 1s
    /delay 10s  (${Target.Distance}<=${engagedistance})
    /if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=${engagedistance}) {
        /stand
        /pet kill
    }
/return

Sub Nuke
  /echo Nuking ${Target.Name} at ${Target.PctHPs}%
  /delay 5s ${Me.SpellReady["Firebolt of Tallon"]}
  :nuke
  /delay 5s
  /if (${Me.SpellReady["Firebolt of Tallon"]} && ${Target.PctHPs}>=${MinHP} && ${Me.CurrentMana}>=${NukeMana} ) /call cast "Firebolt of Tallon"
  /delay 7s
  /if (${Target.PctHPs} >= ${MinHP}) /goto :nuke
  /sit
/return


Last edited by zanomo on Sat Jun 26, 2004 11:07 pm, edited 1 time in total.

3djoker
a hill giant
a hill giant
Posts: 167
Joined: Thu Jun 24, 2004 11:19 pm

Post by 3djoker » Sat Jun 26, 2004 6:14 am

i'm new to the coding thing so be easy on me pls.

but what would i change, say, i i was a 57 mage. how could i change it to the spells i use? anything else besides the spells that i would have to change?

ty in advance

Rollerball
orc pawn
orc pawn
Posts: 12
Joined: Mon May 24, 2004 2:20 pm

Post by Rollerball » Sat Jun 26, 2004 11:01 am

zanomo,
It looks pretty good, just why do you use fire pet (assuming you're using fire pet because you added kindle)? my lvl 10 berserker does more dps than it.

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Post by Drumstix42 » Sat Jun 26, 2004 8:53 pm

May want to use [code] tags while post

[code] *put code here* [/code]

;)

leptoid
a lesser mummy
a lesser mummy
Posts: 35
Joined: Tue May 11, 2004 4:47 pm

Post by leptoid » Sat Jun 26, 2004 10:01 pm

I have trouble getting the "turbo" command to work in my macro. Anyone have any idea why? It always says "invalid preprocessor command" as the error. Maybe I need to download a class I don't have? =\

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Post by Drumstix42 » Sat Jun 26, 2004 10:04 pm

Well if it's a real simple macro, you don't really need to even set it:
#turbo [#]
This will prevent bad macros from locking up the client by allowing you to limit the number of commands per iteration.
The default is 20, while the maximum value is 40. A value of 1 will essentially disable #turbo.
^from the readme

leptoid
a lesser mummy
a lesser mummy
Posts: 35
Joined: Tue May 11, 2004 4:47 pm

Post by leptoid » Sat Jun 26, 2004 10:23 pm

here's the macro in question. problem is, it I take it out, then I get other errors. I'm hopeless. lol

http://macroquest2.com/phpBB2/viewtopic ... t=confused

zanomo
a hill giant
a hill giant
Posts: 285
Joined: Thu Jun 24, 2004 11:21 pm

Post by zanomo » Sat Jun 26, 2004 11:02 pm

3djoker wrote:but what would i change, say, i i was a 57 mage. how could i change it to the spells i use? anything else besides the spells that i would have to change?
I am new to this as well and in fact this is my first macro. To change it to suit your level, just find all occurance of the type of spell, i.e self buf, pet buf, Nuke, etc, and change it to match the spell appropriate for your level.

Say for example: Find and change all occurance of "Shield of Maelin" to "Shield of the Magi".

The self buf and the pet buf are just some repetitive lines casting spell to self or pet and can be added/changed/removed to suit your need. While for the Nuking, just change the level 61 "Firebolt of Tallon" to your preferred DD spell.
Rollerball wrote: It looks pretty good, just why do you use fire pet (assuming you're using fire pet because you added kindle)? my lvl 10 berserker does more dps than it.
Hi Rollerball, I am using an Air pet. I thought the kindle would allow the pet to mana regen faster such that in a long fight it can continue to cast and in this cast the Air elemental stun. I am not too sure if it would increase the stun rate but nevertheless, I kept it on just in case.

Drumstix42 wrote: May want to use code tags while post
Opps, thanks Drumstix42. Didn't know what that was for, and thought the List would do the trick. hehe.

Rollerball
orc pawn
orc pawn
Posts: 12
Joined: Mon May 24, 2004 2:20 pm

Post by Rollerball » Sun Jun 27, 2004 4:16 am

Oh god, you passed lvl 60 thinking the pet nukes (excluding fire pet lvls 50+) takes mana?

http://lucy.allakhazam.com/spell.html?i ... ource=Live
http://lucy.allakhazam.com/spell.html?i ... ource=Live
http://lucy.allakhazam.com/spell.html?i ... ource=Live
http://lucy.allakhazam.com/spell.html?i ... ource=Live (65 earth)

None of them cost mana. Both kindle and fire pet are waste of space...

3djoker
a hill giant
a hill giant
Posts: 167
Joined: Thu Jun 24, 2004 11:19 pm

Post by 3djoker » Sun Jun 27, 2004 2:36 pm

ok tried this today and for some reason nothing happens. all it says in the mq window is

gomage.mac

i changed all the spells to the ones i use. i just can't figure it out.

zanomo
a hill giant
a hill giant
Posts: 285
Joined: Thu Jun 24, 2004 11:21 pm

Post by zanomo » Mon Jun 28, 2004 11:42 pm

Rollerball wrote:Oh god, you passed lvl 60 thinking the pet nukes (excluding fire pet lvls 50+) takes mana?

None of them cost mana. Both kindle and fire pet are waste of space...
My bad... :oops: I didn't know that and all the while I have it memmed and casting to my pet.. :roll:
3djoker wrote: ok tried this today and for some reason nothing happens. all it says in the mq window is

gomage.mac

i changed all the spells to the ones i use. i just can't figure it out.
I am not sure what's wrong since it should give you an Assist message if the calling line is wrong. It is working fine for me.

I make A LOT of changes since my last post getting ideas from other macro posted and testing them bit by bit. :lol:

I hit a problem when I tried to have a non-pet class trying to determine if the buffs on the group member's pet has faded but somehow I can't get the pet buff checking code working. I can check my own pet buffs but is there a Type reference to group member pet's buff? I guess I can work around it by casting it on the caster and using his buff as a reference but just wanted to see if such Type exists...

While during my search and testing I stumble across the Type "Body" and woot, though in the readme it only said it is body type but when i tested it, it actually returns value such as "Undead", "Elemental", etc. hehe, I am using that to determine what type of spell to use against the mobs. :lol: