Mage macro need help with a change

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

dannte
decaying skeleton
decaying skeleton
Posts: 8
Joined: Wed Dec 03, 2003 1:40 pm

Mage macro need help with a change

Post by dannte » Sat Sep 25, 2004 5:28 pm

ok i got this macro from Showme1 it works fine but would like to make some changes. i am slowly looking into the coding but i don't have much time to learn with school and such. Anyways, i am looking to change the macro from casting ponly 4 nukes to nuke till mob is dead. other than that everything else is fine with this macro, but any changes to make it more efficient would be great.

edit: oh one more thing. i am very curiouse if i could add a line that would allow me to cast a mod rod to someone who sends me a tell with "rod" in it or "mod rod" and what that code would look like.

PS. sorry yes i know i am a newb and should work this stuff out but getting help and seeing examples on how a macro can change to do stuff differently helps me learn. only reason i am posting this.

Code: Select all

|mage.mac
|Version 1.0
|Usage: /mac mage (MA/Tank name) (fire/magic/bolt)
|When starting this macro you need to assign your main assist and your type of nuke!
|fire: will cast "sun vortex" ... example /mac mage maintankname fire
|magic: will cast "rock of taelosia" ... example /mac mage maintankname magic
|bolt: will cast "firebolt of tallon" ... example /mac mage maintankname bolt
|-----------------------------------------------------------------------------------
|Will add ini support to this eventually
|
|code is taken from here and there and some is my own thinking
|but right now this works exactly as I wanted it to. Thank you
|to those who helped me in the help forum!
|-----------------------------------------------------------------------------------
|what this does when you start it is cast a pet then buff yourself up with everything
|you can cast. It also sets you up with your first rod. At 97% you will begin battle
|and nuke up to 4 times per fight with whatever spell you pick. you will also debuff
|the mob with malosinia.
|-----------------------------------------------------------------------------------
|DO NOT USE THIS WHILE AFK FFS!!!!!!!!
|-----------------------------------------------------------------------------------


#Event exp "#*#experience!!#*#"   
#Event rageon "#*#has become ENRAGED#*#"
#Event rageoff "#*#is no longer enraged#*#"
#Event burn "#*#burnout V spell has worn off#*#"

#include spellcast.inc

Sub Main

/deletevar spellname
/deletevar _param1

/declare assist outer
/echo Assisting ${Param0}

/declare sentpet outer
/varset sentpet 0

/declare MaloCast outer
/varset MaloCast 0

/declare BoltCast outer
/varset BoltCast 0

/declare BoltCastB outer
/varset BoltCastB 0

/declare BoltCastC outer
/varset BoltCastC 0

/declare BoltCastD outer
/varset BoltCastD 0
 
/declare BurnOut outer
/varset BurnOut 0

/declare NukeAmount outer
/varset NukeAmount 4

/declare RodTimer timer outer 0
/varset RodTimer 0

/declare ModRod outer
/varset ModRod 0

/declare spellname string global
/declare _param1 string global

/varset _param1 ${Param1}

/call choose
/echo ${Param0} is the main tank and I'll be casting ${spellname} 

:MainLoop
/if (!${Me.Pet.ID}) /call SumPet
/delay 3
/call BuffCheck
/assist ${Param0} 
/if (${String[${BurnOut}].Equal[0]}) {
  /echo Casting Burnout V
  /if (${String[${Me.State}].Equal[SIT]}) {
    /stand
    /delay 1s
  }
  /delay 3
  /call cast "Burnout V"
  /delay 5
  /doevents
  /varset BurnOut 1 
}
/call ManaCheck
/if (${Target.ID} && ${Target.PctHPs}<=97) {
  /if (${String[${Target.Type}].Equal[NPC]}) {
    /if (${sentpet}==0) {
      /pet attack
      /varset sentpet 1
      /echo Pet Sent
    }
      /if (${MaloCast}==0) {
        /call Malo
    }
  }
}
  /if (${Target.PctHPs}<=97 && ${Target.PctHPs}>=90 && ${String[${Target.Type}].Equal[NPC]}) {
    /if (${BoltCast}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 1 
      /call cast ${spellname}
      /varset BoltCast 1
      /doevents
    }
  }
 
  /if (${Target.PctHPs}<=70 && ${Target.PctHPs}>=60 && ${String[${NukeAmount}].Equal[4]}) {
    /if (${BoltCastB}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 2
      /call cast ${spellname}
      /varset BoltCastB 1 
      /doevents
    }
  }

  /if (${Target.PctHPs}<=40 && ${Target.PctHPs}>=30 && ${String[${NukeAmount}].Equal[4]}) {
    /if (${BoltCastC}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 3
      /call cast ${spellname}
      /varset BoltCastC 1 
      /doevents
    }
  }

  /if (${Target.PctHPs}<=13 && ${Target.PctHPs}>=5 && ${String[${NukeAmount}].Equal[4]}) {
    /if (${BoltCastD}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 4
      /call cast ${spellname}
      /varset BoltCastD 1
      /doevents
    }
  } 
 
}
/doevents
/goto :MainLoop
/return

Sub Event_exp
  /varset sentpet 0
  /varset MaloCast 0
  /varset BoltCast 0
  /varset BoltCastB 0
  /varset BoltCastC 0
  /varset BoltCastD 0
  /echo Mob is dead!!! Resetting Variables!!
  /pet hold
/return

|-----------------------------------------------------------------------------------
|VERY IMPORTANT INFORMATION!! READ SLOWLY AND CAREFULLY!!
|
|I have this portion of the macro set to cast malosinia from
|my face slot item.. NOTE: if you do NOT have the time veil
|you will need to change the line /call cast "Veil of Lost Hopes" item to
|/call cast "Malosinia"
|-----------------------------------------------------------------------------------
 

Sub Malo
  /call cast "Veil of Lost Hopes" item
  /if (${Macro.Return.Equal["CAST_SUCCESS"]}) {
    /echo ${Target.Name} maloed.
    /varset MaloCast 1
    /return
  } else /if (${Macro.Return.Equal["CAST_RESISTED"]}) {
    /delay 1
    /echo trying again with malosinia
    /call Malo
  } else
    /echo check malo logic
  }
/return

Sub ManaCheck
  /if (${Me.PctMana}<=86 && ${RodTimer}<=0) {
    /call cast "Rod of Mystical Transvergance" item
    /if (${Macro.Return.Equal["CAST_SUCCESS"]}) {
      /varcalc ModRod ${ModRod} - 1
      /echo Rod timer set to 3200
      /varset RodTimer 3200
    }
  }
/return

Sub Event_rageon
  /echo %t is enraged. Backing pet off.
  /pet back off
  /delay 2
  /pet hold
/return

Sub Event_rageoff
  /doevents flush
  /echo %t is no longer enraged. Sending pet.
  /pet attack
/return

|-----------------------------------------------------------------------------------
|VERY IMPORTANT INFORMATION!! READ SLOWLY AND CAREFULLY!!
|
|NOTE: if you do NOT have elemental legs
|you will need to change the line  /call cast "Magi`kot's Pants of Convergence" item to
|/call cast "Rod of Mystical Transvergence"
|this is located at the BOTTEM of Sub Buffcheck just below
|-----------------------------------------------------------------------------------
   

Sub BuffCheck
  /if (!${Me.Buff[Elemental Siphon Recourse].ID}) {
    /echo Casting Elemental Siphon
    /call cast "Elemental Siphon"
    /delay 5
    /doevents
  }
  /if (!${Me.Buff[Khura's Focusing].ID} && !${Me.Buff[Focus of Soul].ID} && !${Me.Buff[Focus of the Seventh].ID} && !${Me.Buff[Talisman of Kragg].ID} && !${Me.Buff[Shield of Maelin].ID}) {
  /echo Casting Shield of Maelin
  /call cast "Shield of Maelin"
}
/doevents
  /if (!${Me.Buff[Xegony's Phantasmal Guard].ID} && !${Me.Buff[Blessing of the Nine].ID} && !${Me.Buff[Protection of the Nine].ID}) {
    /echo Casting Xegony's Phantasmal Guard
    /call cast "Xegony's Phantasmal Guard"
    /delay 5
    /doevents
    }
  /if (!${Me.Buff[Maelstrom of Ro].ID}) {
  /call cast "Maelstrom of Ro"
  }
  /if (${ModRod}==0) {
  /target myself
  /call cast "Magi`kot's Pants of Convergence" item
  /delay 2
  /echo Setting ModRod to 3
  /varset ModRod 3
  /autoinv
  }
/return

Sub Event_burn
  /target ${Me.Pet.CleanName}
  /delay 2s
  /call cast "burnout V"
/return

|-----------------------------------------------------------------------------------
|VERY IMPORTANT INFORMATION!! READ SLOWLY AND CAREFULLY!!
|
|NOTE: if you do NOT have the spell Rock of Taelosia
|you will need to change the line /varset spellname "Rock of Taelosia" to
|/varset spellname "Black Steel"
|-----------------------------------------------------------------------------------

Sub choose
/if (${String[${_param1}].Find["fire"]}>0) {
   /varset spellname "Sun Vortex"
   /return
}
/if (${String[${_param1}].Find["magic"]}>0) {
   /varset spellname "Rock of Taelosia"
   /return
}
/if (${String[${_param1}].Find["bolt"]}>0) {
   /varset spellname "Firebolt of Tallon"
   /return
}
/return

Sub SumPet
  /echo Summoning a pet to kill with!!
  /call cast "Monster Summoning IV"
/return 


[/code]

dannte
decaying skeleton
decaying skeleton
Posts: 8
Joined: Wed Dec 03, 2003 1:40 pm

Post by dannte » Sat Sep 25, 2004 6:38 pm

ok i have tried this to compensate for the lack of chaincasting throughout the mobs health.

Code: Select all

:MainLoop
/if (!${Me.Pet.ID}) /call SumPet
/delay 3
/call BuffCheck
/assist ${Param0} 
/if (${String[${BurnOut}].Equal[0]}) {
  /echo Casting Burnout V
  /if (${String[${Me.State}].Equal[SIT]}) {
    /stand
    /delay 1s
  }
  /delay 3
  /call cast "Burnout V"
  /delay 5
  /doevents
  /varset BurnOut 1 
}  
/call ManaCheck
/if (${Target.ID} && ${Target.PctHPs}<=97) {
  /if (${String[${Target.Type}].Equal[NPC]}) {
    /if (${sentpet}==0) {
      /pet attack
      /varset sentpet 1
      /echo Pet Sent
      /face
    }
      /if (${MaloCast}==0) {
        /call Malo
    }
  }
}
  /if (${Target.PctHPs}<=97 && ${Target.PctHPs}>=90 && ${String[${Target.Type}].Equal[NPC]}) {
    /if (${BoltCast}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 1 
      /call cast ${spellname}
      /varset BoltCast 1
      /doevents
    }
  }

  /if (${Target.PctHPs}<=89 && ${Target.PctHPs}>=85 && ${String[${Target.Type}].Equal[NPC]}) {
    /if (${BoltCast}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 2 
      /call cast ${spellname}
      /varset BoltCast 1
      /doevents
    }
  }

  /if (${Target.PctHPs}<=84 && ${Target.PctHPs}>=80 && ${String[${Target.Type}].Equal[NPC]}) {
    /if (${BoltCast}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 3 
      /call cast ${spellname}
      /varset BoltCast 1
      /doevents
    }
  }
 
  /if (${Target.PctHPs}<=79 && ${Target.PctHPs}>=75 && ${String[${Target.Type}].Equal[NPC]}) {
    /if (${BoltCast}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 4
      /call cast ${spellname}
      /varset BoltCast 1
      /doevents
    }
  }
 
  /if (${Target.PctHPs}<=74 && ${Target.PctHPs}>=71 && ${String[${Target.Type}].Equal[NPC]}) {
    /if (${BoltCast}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 5 
      /call cast ${spellname}
      /varset BoltCast 1
      /doevents
    }
  }
 
  /if (${Target.PctHPs}<=70 && ${Target.PctHPs}>=60 && ${String[${NukeAmount}].Equal[4]}) {
    /if (${BoltCastB}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 6
      /call cast ${spellname}
      /varset BoltCastB 1 
      /doevents
    }
  }

  /if (${Target.PctHPs}<=59 && ${Target.PctHPs}>=55 && ${String[${Target.Type}].Equal[NPC]}) {
    /if (${BoltCast}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 7 
      /call cast ${spellname}
      /varset BoltCast 1
      /doevents
    }
  }
 
  /if (${Target.PctHPs}<=50 && ${Target.PctHPs}>=45 && ${String[${NukeAmount}].Equal[4]}) {
    /if (${BoltCastC}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 8
      /call cast ${spellname}
      /varset BoltCastC 1 
      /doevents
    }
  }

  /if (${Target.PctHPs}<=44 && ${Target.PctHPs}>=40 && ${String[${NukeAmount}].Equal[4]}) {
    /if (${BoltCastC}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 9
      /call cast ${spellname}
      /varset BoltCastC 1 
      /doevents
    }
  }

  /if (${Target.PctHPs}<=39 && ${Target.PctHPs}>=35 && ${String[${NukeAmount}].Equal[4]}) {
    /if (${BoltCastC}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 10
      /call cast ${spellname}
      /varset BoltCastC 1 
      /doevents
    }
  }
 
 /if (${Target.PctHPs}<=34 && ${Target.PctHPs}>=30 && ${String[${NukeAmount}].Equal[4]}) {
    /if (${BoltCastC}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 11
      /call cast ${spellname}
      /varset BoltCastC 1 
      /doevents
    }
  }

/if (${Target.PctHPs}<=29 && ${Target.PctHPs}>=25 && ${String[${NukeAmount}].Equal[4]}) {
    /if (${BoltCastC}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 12
      /call cast ${spellname}
      /varset BoltCastC 1 
      /doevents
    }
  }

/if (${Target.PctHPs}<=24 && ${Target.PctHPs}>=19 && ${String[${NukeAmount}].Equal[4]}) {
    /if (${BoltCastC}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 13
      /call cast ${spellname}
      /varset BoltCastC 1 
      /doevents
    }
  }

/if (${Target.PctHPs}<=18 && ${Target.PctHPs}>=11 && ${String[${NukeAmount}].Equal[4]}) {
    /if (${BoltCastC}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 14
      /call cast ${spellname}
      /varset BoltCastC 1 
      /doevents
    }
  }

 /if (${Target.PctHPs}<=10 && ${Target.PctHPs}>=5 && ${String[${NukeAmount}].Equal[4]}) {
    /if (${BoltCastD}==0) {
      /if (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /echo this is cast 15
      /call cast ${spellname}
      /varset BoltCastD 1
      /doevents
    }
  } 
 
}
/doevents
/goto :MainLoop
/return

Sub Event_exp
  /varset sentpet 0
  /varset MaloCast 0
  /varset BoltCast 0
  /varset BoltCastB 0
  /varset BoltCastC 0
  /varset BoltCastD 0
  /echo Mob is dead!!! Resetting Variables!!
  /pet hold
/return
but it doesn;t hast at all the intervals as it should when the mob is at that %. sometimes i might get a long pause between health of 60% and 30% then it casts then holds off till about 10% or so again. and pet doesn;t alwayys attack now. Don;t know why that happens. anyways the original macro works fine with mobs that don;t have much health but with mobs that havve alot of health lmost of the time the char sits there and does nothing while waiting for the next % to come up in the macro.

what am i doing wrong?

[/code]

hiipii
a ghoul
a ghoul
Posts: 93
Joined: Sat Jun 19, 2004 5:01 pm

Post by hiipii » Sun Sep 26, 2004 3:12 am

for rod just add

Code: Select all

#chat tell
right under all the other events then add sub somewhere

Code: Select all

sub Event_Chat(ChatType, Sender, ChatText)
  /if (${ChatType.Find[rod]}||${ChatType.Find[modrod]}) {
    /target ${Sender}
    /call cast "Rod of Mystical Transvergance"
  }

dannte
decaying skeleton
decaying skeleton
Posts: 8
Joined: Wed Dec 03, 2003 1:40 pm

Post by dannte » Sun Sep 26, 2004 2:34 pm

will that give a rod to anyone that sends me a tell though? or just for people asking for rods?

irtehmage
decaying skeleton
decaying skeleton
Posts: 5
Joined: Thu Jul 21, 2005 9:27 am

Post by irtehmage » Fri Jul 22, 2005 6:16 am

I cannot get this macro to work [correctly].

I've been trying to get it to work so that I could PL some AA on my mage with my necro but the furthest i can get it to is casting a mod rod on myself. Then I get the errors: "Due to complete misuse of the String Top-Level Object, it has been removed." I mean the bot assists my Necro and everything, but it never sends pet in and never casts.

Anyone know what can be going on with it? If anyone can help a PM would be great. Thanks in advance for reading.

skyler
a snow griffon
a snow griffon
Posts: 311
Joined: Wed May 11, 2005 9:22 am

Post by skyler » Fri Jul 22, 2005 7:32 am

Nice to see that you've just recently became a member and in that time haven't bothered to read ANYTHING on these forums.

http://macroquest2.com/phpBB2/search.php

please try again

irtehmage
decaying skeleton
decaying skeleton
Posts: 5
Joined: Thu Jul 21, 2005 9:27 am

Post by irtehmage » Fri Jul 22, 2005 1:46 pm

see reply to your other reply...

thanks for your time.

skyler
a snow griffon
a snow griffon
Posts: 311
Joined: Wed May 11, 2005 9:22 am

Post by skyler » Fri Jul 22, 2005 1:59 pm

irtehmage wrote:see reply to your other reply...

thanks for your time.
ditto