Mage summon macro

Got a cool macro idea? Wanna request a macro? Here is the place for you!

Moderator: MacroQuest Developers

topgun
a lesser mummy
a lesser mummy
Posts: 43
Joined: Thu Jan 09, 2003 8:27 am

Mage summon macro

Post by topgun » Thu Oct 23, 2003 2:55 am

I could really use a macro that summons a mage pet set.
That is
1 mask
1 belt
2 wps.

I need to check for fizzle, so i am sure that 1 set is on the cursor when the macro is done.
If i need to summon 2 sets like most pet classes want i just need to activate the macro twice.

Since wps can be 2 types, the macro can either just activate 3 gems, and the wps i have memmed will then be summoned, or i can specify the spells af parametres to the macro.

I short im pretty open to sugestions, but i am not a macro coder, so anyone out there who would help ?

topgun
a lesser mummy
a lesser mummy
Posts: 43
Joined: Thu Jan 09, 2003 8:27 am

Post by topgun » Tue Nov 11, 2003 4:17 am

No one who have the time and will to do this one :) :)

I think it simple, but have no skills in this myself.

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Tue Nov 11, 2003 4:47 am

topgun wrote:No one who have the time and will to do this one :) :)

I think it simple, but have no skills in this myself.

Code: Select all

|generic-cast.mac
#include gj-spellsub.inc
Sub Main
   /declare Fail global
   /declare DefaultSpellSet global
   /declare DoAgain global
   /declare StartCast global
   /declare SpellSlot global
   /declare SpellName global
   /declare CastTime global
   /declare CTimer timer
|------------ Edit These ----------------
   /varset DefaultSpellSet "default"
   /call SpellSub "Name of spell to cast"
   /call SpellSub "Name of spell to cast"
   /call SpellSub "Name of spell to cast"
   /call SpellSub "Name of spell to cast"
|-----------------------------------------
/return

Code: Select all

|gj-spellsub.inc
#event Collapse "Your gate is too unstable, and collapses."
#event NoLOS "You cannot see your target."
#Event CastStart "You begin casting"
#Event CastFizzle "Your spell fizzles!"
#Event CastInterrupt "Your spell is interrupted."
#Event CastNoMana "Insufficient Mana to cast this spell"
#Event CastTooFar "Your target is out of range, get closer!"
#Event Recovered "You haven't recovered yet..."
#Event CastResist "Your target resisted "
#Event Distracted "You are too distracted to cast a spell now!"
#Event NoTarget "You must first select a target for this spell!"
#Event Sitting "You must be standing to cast a spell."
#Event NoMem "You do not seem to have that spell memorized."
#Event Stunned "You can't cast spells while stunned!"

Sub SetupSpellVars
   /declare Fail global
   /declare DefaultSpellSet global
   /declare DoAgain global
   /declare StartCast global
   /declare SpellSlot global
   /declare SpellName global
   /declare CastTime global
   /declare SitAfterCast global
   /declare CTimer timer
   /varset SitAfterCast 0
   /varset DefaultSpellSet "default"
/return



|SpellSub
|Main spell casting sub.
|Used to handle all spell casting.  Auto mems spells and handles fizzles.
|Will need to set the DefaultSpellSet var to your default spell set.
|
|Usage /call SpellSub "spellname"
|
Sub SpellSub
   /if "@Param0"=="NA" /return
   /varset Fail 0
   /if n @SitAfterCast==1 /varset SitTimer 1140m
   /varset SpellName "@Param0"
   /if $char(state)==SIT {
      /stand
   }
   /varset Remem 0
   /if $char(ismoving)!=FALSE {
      /sendkey up up
      /sendkey up down
      /delay 1s
   }
   :WaitForStop
   /doevents
   /if n $BreakOut==1 /return
   /echo $char(ismoving)
   /if $char(ismoving)!=FALSE {
      /delay 1s
      /goto :WaitForStop
   }
   /if $char(book,"@SpellName")=="NULL" /varset Fail 1
   :MemWait
   /doevents
   /if n @Fail==1 {
      /varset Fail 0
      /if n @Remem==1 {
         /memspellset @DefaultSpellSet
         :loadsploop
         /delay 5
         /if $char(spellbook)=="TRUE" /goto :loadsploop
      }
      /if n @SitAfterCast==1 {
         /if $char(state)==STAND /sit
      }
      /return 1
   }   
   /varset SpellSlot $char(gem,"@SpellName")
   /if n @SpellSlot<0 {
      /delay 1s
      /goto :MemWait
   }
   /if n @SpellSlot==0 {
      /memspell 2 "@Param0"
      /varset SpellSlot 2
      /varset Remem 1
      :refreshwait
      /doevents
      /if n @Fail==1 {
         /varset Fail 0
         /if n @Remem==1 {
            /memspellset @DefaultSpellSet
            :loadsploop
            /delay 5
            /if $char(spellbook)=="TRUE" /goto :loadsploop
         }
         /if n @SitAfterCast==1 {
            /if $char(state)==STAND /sit
         }
         /return 1
      }   
      /delay 5
      /if n $char(gem,"@SpellName")<=0 /goto :refreshwait
   }
   /varset CastTime "$spell("@SpellName",casttime)"
   /varadd CastTime 1
   :BeginCast
   /varset Fail 0
   /varset DoAgain 0
   /varset StartCast 0
   /call WaitForStart
   :TimerLoop
   /doevents
   /if n @DoAgain==1 /goto :BeginCast
   /if n @Fail==1 {
      /varset Fail 0
      /if n @Remem==1 {
         /memspellset @DefaultSpellSet
         :loadsploop
         /delay 5
         /if $char(spellbook)=="TRUE" /goto :loadsploop
      }
      /if n @SitAfterCast==1 {
         /if $char(state)==STAND /sit
      }
      /return 1
   }
   /if n @CTimer>0 /goto :TimerLoop
   /delay 2
   /doevents
   /if n @DoAgain==1 /goto :BeginCast
   /if n @Remem==1 {
      /memspellset default
      :loadsploop
      /delay 5
      /if $char(spellbook)=="TRUE" /goto :loadsploop
   }   
/return 0

|WaitForStart
|Used by SpellSub to determine when to start spell countdown.
Sub WaitForStart
   /cast @SpellSlot
   :StartLoop
   /doevents
   /if n @Fail==1 /return
   /if n @DoAgain==1 /return
   /if n @StartCast==0 {
      /goto :StartLoop
   }
   /varset CTimer "@CastTime"s
/return

Sub Event_CastStart
   /varset StartCast 1
/return

Sub Event_CastFizzle
   /delay 2
   /varset DoAgain 1
/return

Sub Event_CastInterrupt
   /delay 2
   /if n @Fail==1 /return
   /varset DoAgain 1
/return

Sub Event_Sitting
   /stand
   /delay 2
   /varset DoAgain 1
/return

Sub Event_CastTooFar
   /varset Fail 1
   /varset CTimer 0
/return

Sub Event_Distracted
   /varset Fail 1
   /varset CTimer 0
/return

Sub Event_NoTarget
   /varset Fail 1
   /varset CTimer 0
/return

Sub Event_NoMem
   /varset Fail 1
   /varset CTimer 0
/return

Sub Event_CastNoMana
   /varset DoAgain 1
   /sit off
   /sit on
   :medingwait
   /delay 0
   /doevents
   /if n $char(mana,pct)<40 /goto :medingwait
   /sit off
/return

Sub Event_Stunned
   /delay 3s
   /varset DoAgain 1
/return

Sub Event_Recovered
   /delay 2s
   /varset DoAgain 1
/return

Sub Event_CastResist
   /varset Fail 1
/return

Sub Event_Collapse
   /varset DoAgain 1
/return

Sub Event_NoLOS
   /varset Fail 1
   /varset CTimer 0
/return
Last edited by grimjack on Mon Nov 24, 2003 6:13 am, edited 2 times in total.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

topgun
a lesser mummy
a lesser mummy
Posts: 43
Joined: Thu Jan 09, 2003 8:27 am

Post by topgun » Wed Nov 12, 2003 3:39 am

TNX a bunch, i can't wait to test this tonight.... Looks great :)

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Post by blueninja » Wed Nov 12, 2003 4:53 am

You probably want to /autoinv (drops what's on your target in your bags)between every cast too.

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Wed Nov 12, 2003 4:58 am

blueninja wrote:You probably want to /autoinv (drops what's on your target in your bags)between every cast too.
I had that in the original post. He wants all the pieces to end up on the cursor. I would imagine to hand all at once.

Thanks
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

topgun
a lesser mummy
a lesser mummy
Posts: 43
Joined: Thu Jan 09, 2003 8:27 am

Post by topgun » Wed Nov 12, 2003 5:02 am

Yep, no autodrop :) I want to use cursor stacking.

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Post by blueninja » Wed Nov 12, 2003 5:28 am

Oh sorry, last time I made a mage summon macro it would complain if I left stuff on the cursor.. That was quiver of marr though so I guess it works differently.

topgun
a lesser mummy
a lesser mummy
Posts: 43
Joined: Thu Jan 09, 2003 8:27 am

Post by topgun » Sun Nov 16, 2003 5:30 am

Can't get it to work.....

I change the values in generic-cast.mac to match my spellset and spells.

But no matter what i try i get an error.
Ending macro: Bad variable in /var function
gi-spellsub.inc@41 (Spellsub): /varset Fail 0
gi-spellsub.mac@13 (Main): /call SpellSub "Girdle of Magi'Kot"
Cleared the following: Timers Vars Arrays
The Current Macro has ended

NotSoCSharp
a ghoul
a ghoul
Posts: 85
Joined: Sat Oct 25, 2003 10:48 am

Post by NotSoCSharp » Mon Nov 17, 2003 8:04 am

Try adding

Code: Select all


/declare Fail global 

To Sub Main.

Lord Yei
orc pawn
orc pawn
Posts: 24
Joined: Mon Jan 27, 2003 9:48 am
Contact:

Drop on pet

Post by Lord Yei » Mon Nov 17, 2003 1:31 pm

I think it would require a little more code and plenty of cursor positions to make this really useable by mages....

cast 8 items (limit for cursor stack I believe)
Target Pet
/face
drop 4 on pet then OK
drop 4 on pet then OK

Also for armor you would need this
cast armor bag
drop in predefined slot (would need to be same one everytime for cursor positions)
open bag
target pet
/face
pick up 4 armor pcs, drop on pet, and OK
pick up 4 armor pcs, drop on pet, and OK

I am currently working on mage mac, but I am only in the middle and not ready to release code.

topgun
a lesser mummy
a lesser mummy
Posts: 43
Joined: Thu Jan 09, 2003 8:27 am

Post by topgun » Wed Nov 19, 2003 10:01 am

Will try that NotSoCSharp

Actually i need this mosty for summoning pet stuff to pet classes in raids, so this is perfect for me.

topgun
a lesser mummy
a lesser mummy
Posts: 43
Joined: Thu Jan 09, 2003 8:27 am

Post by topgun » Mon Nov 24, 2003 6:04 am

Tried your sugestion NotSoCSharp, bur still gets the same error

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Mon Nov 24, 2003 6:12 am

topgun wrote:Tried your sugestion NotSoCSharp, bur still gets the same error
You shouldn't. You may get an error but it won't be the same.

I have added the undeclared variable to the top of the Main sub. If you get any more errors let me know. I may test it when I get home if I have time.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Re: Drop on pet

Post by grimjack » Mon Nov 24, 2003 6:22 am

Lord Yei wrote:I think it would require a little more code and plenty of cursor positions to make this really useable by mages....

cast 8 items (limit for cursor stack I believe)
Target Pet
/face
drop 4 on pet then OK
drop 4 on pet then OK

Also for armor you would need this
cast armor bag
drop in predefined slot (would need to be same one everytime for cursor positions)
open bag
target pet
/face
pick up 4 armor pcs, drop on pet, and OK
pick up 4 armor pcs, drop on pet, and OK

I am currently working on mage mac, but I am only in the middle and not ready to release code.
Sure, but I don't seem to recall any of this as part of the request. I am guessing the person who requested this either sells sets of pet armor on request or hands them out to players who have pets on raids.

Thanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack