Mage Gives Pet Items to Target (For 75 Mages)

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

Moderator: MacroQuest Developers

Sandypants
decaying skeleton
decaying skeleton
Posts: 8
Joined: Fri Dec 16, 2011 12:23 am

Mage Gives Pet Items to Target (For 75 Mages)

Post by Sandypants » Fri Dec 16, 2011 1:31 pm

This is a pretty simple mac I made because I couldn't find one made by anyone else. It summons a muzzle of mowcha, an elemental armaments bag for weapons, and a plate of elements for armor and attempts to give whoever you are targeting these items. I only give Icefall Daggers, so these are the weapons that I chose to use to give to my pets. If you have a preference just change the two Icefall terms to some part of the name in whichever weapon you prefer to give to your pet.

You will need the spell_routines.inc file, mine was last modified 11/07/2004

You will need two empty spaces in your main inventory. This will not delete the bags afterward, you'll have to clean it yourself.

If you want it to target your own pet before starting the give process, set the parameter to 1.

For example, if you named your macro MageItem, you would type /mac MageItem 1

Otherwise leave it blank if you want to give the pet toys to someone else, just target their pet and start the macro.

Code: Select all


#include spell_routines.inc

Sub Main(bool PetSelf)

/if (${PetSelf} == 1) {
 /target ${Me.Pet}
}

/call cast "Summon Muzzle of Mowcha" gem4
/delay ${castEndTime}
/call click&wait
/notify GiveWnd GVW_Give_Button leftmouseup  |Clicks the Give Button after window is opened|

/delay ${refreshTime} 

/call cast "Summon Elemental Armaments" gem8 
/delay ${castEndTime}
|**/notify pack1 leftmouseup **|
/if (${Cursor.ID} ) /autoinv
/delay 10
/itemnotify ${FindItem[Phantom Satchel].InvSlot} rightmouseup
/delay 10
/itemnotify ${FindItem[Icefall].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Icefall].InvSlot} leftmouseup
/call click&wait
/notify GiveWnd GVW_Give_Button leftmouseup  |Clicks the Give Button after window is opened|
/delay 10

/delay ${refreshTime} 
/call cast "Summon Plate of the Elements" gem7 
/delay ${castEndTime}
/itemnotify ${FindItem[Phantom Satchel].InvSlot} leftmouseup
/delay 10
/autoinv
/itemnotify ${FindItem[Phantom Satchel].InvSlot} rightmouseup
/delay 10
/itemnotify ${FindItem[Eidolon].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Eidolon].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Eidolon].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Eidolon].InvSlot} leftmouseup
/call click&wait
/notify GiveWnd GVW_Give_Button leftmouseup 
/delay 10
/itemnotify ${FindItem[Eidolon].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Eidolon].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Eidolon].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Lucid].InvSlot} leftmouseup
/call click&wait
/notify GiveWnd GVW_Give_Button leftmouseup 
/delay 10

/return

sub click&wait
/click left target
/delay 10
/return

Manni
a lesser mummy
a lesser mummy
Posts: 51
Joined: Mon Oct 02, 2006 5:15 pm

Re: Mage Gives Pet Items to Target (For 75 Mages)

Post by Manni » Sat Jan 26, 2013 10:21 pm

I wanted to expand that little thing but I get crazy with parts of that.
The stupid /cleanup does not open the inventory, like said in the documentation
and also I loose the target of the friend pet. If anybody has a suggestion
how to get a workaround, searched in the forum and also via google
and I am hard at the edge to give up :(

I wanted to

1. check the target if it is a pet (also for group pet)
2. if no pet then check if own pet is available
3. if no pet is available cast a suitable pet
4. give all items and cast buffs on mage pet
5. only need 1 single free slot
6. only need my usual 3 casting slots (personal taste)
Slot 1: Pet
Slot 2: Fastbuff
Slot 3: Second Fastbuff

Code: Select all

| Mage Items & Buffs for Level 76
| V1.0 by Sandypants 12/2011
| V1.3 by Manni 01/2013
| 
| 1) Summon Pet, Give all Items, get gem1 Summon Pet
|
| Todo:
| - Check Aggro, to not get stop while getting attacked
| - open Inventory if closed
| - optimize Buffs for Own - Other Pets
| 


#include spell_routines.inc

Sub Main

/declare myPetString string local
/varset myPetString Pet

|-------------- Problem-Code--------------------
| open Inventory for bags - careful: clearup cleans vars!
| /cleanup
| /delay 10
| /keypress i
| /delay 10
|------------Debug Area (delete, not necessary)----------------------
/echo Target: ${Target} "- Target.pet: " ${Target.Pet} "- Me.pet: " ${Me.Pet}
/echo Target.Name: ${Target.Name}
/echo Target.Pet.Name: ${Target.Pet.Name}
/echo Target.Type: ${Target.Type}
/echo Target.Class: ${Target.Class}
/echo myPetString: ${myPetString}
/echo myPetStringType: ${Target.Type.Arg[0]}
|--------------------------------------------------------------------

/if (${Target.Type.EqualCS[${myPetString}]}) {
  /echo It is a kind of Pet, start Casting
  /call myDoPetCasting
  /return
} 

/target ID ${Me.Pet.ID}
/if (${Target.Type.EqualCS[${myPetString}]}) {
  /echo My lovely Pet
  /call myDoPetCasting
  /return
} 

/echo No Pet there, making Pet
  /call cast "Core of Air" gem1
  /target ID ${Me.Pet.ID}
  /call myDoPetCasting

/return


Sub myDoPetCasting

/stick 10
/delay 10

/call cast "Summon Muzzle of Mowcha" gem2
/delay ${castEndTime}
/call click&wait
/notify GiveWnd GVW_Give_Button leftmouseup  |Clicks the Give Button after window is opened|

|/** Cast weapons **/
/delay ${refreshTime}
/call cast "Summon Elemental Armaments" gem2
/delay ${castEndTime}
/if (${Cursor.ID} ) /autoinv
/delay 10
/itemnotify ${FindItem[Phantom Satchel].InvSlot} rightmouseup
/delay 10
/itemnotify ${FindItem[Icefall Icicle].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Searing Torch].InvSlot} leftmouseup
/call click&wait
/notify GiveWnd GVW_Give_Button leftmouseup  |Clicks the Give Button after window is opened|
/delay 10

|/** Destroy Routine is dangerous - check on empty bags useful **/
/itemnotify ${FindItem[Phantom Satchel].InvSlot} leftmouseup
/destroy

|/** Plate of the Elements **/
/delay ${refreshTime}
/call cast "Summon Plate of the Elements" gem2
/delay ${castEndTime}
/if (${Cursor.ID} ) /autoinv
/delay 10
/itemnotify ${FindItem[Phantom Satchel].InvSlot} rightmouseup
/delay 10
/itemnotify ${FindItem[Eidolon Plate Helm].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Eidolon Plate Vambraces].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Eidolon Plate Gauntlets].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Eidolon Plate Boots].InvSlot} leftmouseup
/call click&wait
/notify GiveWnd GVW_Give_Button leftmouseup
/delay 10
/itemnotify ${FindItem[Eidolon Plate Bracers].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Eidolon Plate Breastplate].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Eidolon Plate Greaves].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Lucid Belt].InvSlot} leftmouseup
/call click&wait
/notify GiveWnd GVW_Give_Button leftmouseup
/delay 10

|/** Destroy Routine is dangerous - check on empty bags useful **/
/itemnotify ${FindItem[Phantom Satchel].InvSlot} leftmouseup
/destroy

|/** Casting Trinkets and give to Pet **/
/delay ${refreshTime}
/call cast "Summon Aenda's Trinkets" gem2
/delay ${castEndTime}
/if (${Cursor.ID} ) /autoinv
/delay 10
/itemnotify ${FindItem[Phantom Satchel].InvSlot} rightmouseup
/delay 10
/itemnotify ${FindItem[Aenda's Satin Choker].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Aenda's Woven Shawl].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Aenda's Linked Bracelet].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Aenda's Gold Ring].InvSlot} leftmouseup
/call click&wait
/notify GiveWnd GVW_Give_Button leftmouseup
/delay 10
/itemnotify ${FindItem[Aenda's Ridged Earhoop].InvSlot} leftmouseup
/call click&wait
/itemnotify ${FindItem[Aenda's Jade Bracelet].InvSlot} leftmouseup
/call click&wait
/notify GiveWnd GVW_Give_Button leftmouseup
/delay 10

|/** Destroy Routine is dangerous - check on empty bags useful **/
/itemnotify ${FindItem[Phantom Satchel].InvSlot} leftmouseup
/destroy

/call cast "Magmaskin" gem2
/call cast "Rathe's Strength" gem2

/call cast "Burnout VI" gem2
/call cast "Iceflame Body" gem2
/call cast "Velocity" gem2
/call cast "Burning Aura" gem2
/call cast "Scorching Skin" gem2

/stick off

/return

sub click&wait
/click left target
/delay 10
/return