Macro help/advice

Status
Not open for further replies.

Vesryn

Sometimes knowledgeable
Joined
Aug 31, 2006
Messages
290
Reaction score
0
Points
16
Location
Fairbanks, Alaska
I'm currently working on modifying the mage mac we have in the macro section to deal with the new pet summon item spells, however I ran into a stumbling block.

I was trying this code thinking it might work, but apparently I missed something on the openpacks command. (I pulled this from the batwings.mac I found in the macro section. I looked around in the macro but I didn't see anything else relating to openpacks other than that one line, so maybe I need to use something else?)

/call Openpacks
/for l0 0 to 4
/ctrlkey /itemnotify ${FindItem[=Summoned: Lucid Belt].InvSlot} leftmouseup
/call GiveToPet
}

etc etc for the armor items. I think just having an open inv slot will work, since the macro puts it there automatically if one is open. However I haven't figured out the language to have it pull the items named out of the bag and give it to the pet. Admittedly this is a bit further than I usually go modifying macros, but its such a useful macro. I do plan to study the mq2 wiki some more when I'm not so tired, since I want to learn some more on my own.
 
Last edited:
Is the bag opening when you call the /call Openpacks?

Do the Summoned: Lucid Belt stack?

Shouldnt need the /ctrlkey

Just make sure your /call OpenPacks is working, all bags open and it has your Lucid Belt in one of the open bags or main 8 slots.

then just use this should work. As long as your bags are open, and you have the item
Code:
/itemnotify ${FindItem[=Summoned: Lucid Belt].InvSlot} leftmouseup
 
I don't think the openpack command was working, as the bag didn't open up and thats where the macro ended itself. I'll try what you suggested, basically I'm trying to add in during the pet item summon portion of the macro to take the armor/items out of the bag they come in. I know if I can get this portion working I can get it to work for the pet weapons as well, and that should get the macro updated for TSS mostly.
 
Do you have a sub called Sub OpenPacks ? What Include files are listed up top as well.

I belive openpacks is in a common.inc but not 100% sure on that. I can post the sub if you dont have it and we can see if that fixes your issue.

You cannt find or pick up an item without the bags being open.
 
Alright, that helped a ton. Got the mechanics down for handing in the belt, but everything after that instead of giving to the pet the mage just puts it back into inventory instead of giving it. Here's what I have:

/call Cast "${summonedBeltSpell}" ${summonedBeltType} 7s
/delay 4s
/autoinventory
/call Openpacks
/itemnotify ${FindItem[=Summoned: Lucid Belt].InvSlot}

leftmouseup
/call GiveToPet
/itemnotify ${FindItem[=Eidolon Plate Boots].InvSlot}

leftmouseup
/call GiveToPet
/itemnotify ${FindItem[=Eidolon Plate Greaves].InvSlot}

leftmouseup
/call GiveToPet
/itemnotify ${FindItem[=Eidolon Plate

Breastplate].InvSlot} leftmouseup
/call GiveToPet
/itemnotify ${FindItem[=Eidolon Plate Guantlets].InvSlot}

leftmouseup
/call GiveToPet
/itemnotify ${FindItem[=Eidolon Plate Vambraces].InvSlot}

leftmouseup
/call GiveToPet
/itemnotify ${FindItem[=Eidolon Plate Helm].InvSlot}

leftmouseup
/call GiveToPet
/itemnotify ${FindItem[=Eidolon Plate Bracers].InvSlot}

leftmouseup
/call GiveToPet
/itemnotify ${FindItem[=Eidolon Plate Bracers].InvSlot}

leftmouseup
/call GiveToPet

I thought maybe I needed to put a delay in in case it was handing in too quickly, but putting a short delay after each one didn't accomplish anything but ake longer. I'm thinking I might have some syntax wrong, or theres something I left out for it to keep handing the armor parts to the pet.

I'm pretty sure I have the new rod spell fixed in it, as well as raging servant, just have to polish up the pet toy area and it should be gtg.
 
what does the GiveToPet sub look like?
 
Code:
/itemnotify ${FindItem[=Eidolon Plate Bracers].InvSlot} 

leftmouseup

should be

Code:
/itemnotify ${FindItem[=Eidolon Plate Bracers].InvSlot} leftmouseup

Unless it was a board copy/paste issue. Like Jim said, post the GiveToPet sub as well.
 
Sub GiveToPet
/declare i int local
/varset i 1
:give_item
/delay 5 ${Cursor.ID}
/if ( ${Cursor.ID} && !${InvSlot[trade4].Item.ID} ) {
/if ( ${Cursor.Name.Find[summoned:]} ) {
/click left target
/delay 1s ${InvSlot[trade${i}].Item.ID}
} else {
/autoinventory
}
/goto :give_item
}
/for i 1 to 4
/if ( ${InvSlot[trade${i}].Item.ID} && !${InvSlot[trade${i}].Item.Name.Find[summoned:]} )

/notify GiveWnd GVW_Cancel_Button leftmouseup
/next i
/if ( ${Window[GiveWnd].Open} ) {
/notify GiveWnd GVW_Give_Button leftmouseup
/delay 5s !${Window[GiveWnd].Open}
}
/if ( ${Window[InventoryWindow].Open} ) /keypress inventory
/return
Is the givepet sub. Checking the spacing right now, I mighta goofed on that one. Fixing the spacing didn't change anything. To clarify, I can get the summoned lucid belt to get given to the pet, but all the items after the first one basically get autoinv'ed. Actually I see one spot that might be a problem, where it says fitem.name.find[summoned: ]. Is there a way I can have that pick out the eidolon as well as summoned? Hmm, trying something else while I'm thinking
 
Last edited:
Yea, I'm pretty sure it is the givetopet sub, since the eidolon doesn't have summoned: in its name it doesn't register and gets autoinventoried.
 
At the risk of imposing my code on you, below is something I chopped out of my other macros and made to fit for this.

Code:
call Cast "${summonedBeltSpell}" ${summonedBeltType} 7s 
/delay 4s
/autoinventory
/delay 5
/call Openpacks
/tar ${Me.Pet}
/nomodkey /itemnotify ${FindItem[=Summoned: Lucid Belt].InvSlot} leftmouseup 
/click left target
:open1
/if (!${Window[GiveWnd].Open}) /goto :open1
:showing1
/if (${Window[GiveWnd].Child[GVW_MyItemSlot0].Tooltip.Length}<1) /goto :showing1
/nomodkey /itemnotify ${FindItem[=Eidolon Plate Boots].InvSlot} leftmouseup 
/click left target
/nomodkey /itemnotify ${FindItem[=Eidolon Plate Greaves].InvSlot} leftmouseup 
/click left target
/nomodkey /itemnotify ${FindItem[=Eidolon Plate Breastplate].InvSlot} leftmouseup 
/click left target
:done1
/if (${Window[GiveWnd].Child[GVW_MyItemSlot3].Tooltip.Length}<1) /goto :done1
/delay 3
/notify GiveWnd GVW_Give_Button leftmouseup
:closing1
/if (${Window[GiveWnd].Open}) /goto :closing1
/nomodkey /itemnotify ${FindItem[=Eidolon Plate Guantlets].InvSlot} leftmouseup 
/click left target
:open2
/if (!${Window[GiveWnd].Open}) /goto :open2
:showing2
/if (${Window[GiveWnd].Child[GVW_MyItemSlot0].Tooltip.Length}<1) /goto :showing2
/nomodkey /itemnotify ${FindItem[=Eidolon Plate Vambraces].InvSlot} leftmouseup 
/click left target 
/nomodkey /itemnotify ${FindItem[=Eidolon Plate Helm].InvSlot} leftmouseup 
/click left target
/nomodkey /itemnotify ${FindItem[=Eidolon Plate Bracers].InvSlot} leftmouseup 
/click left target
:done2
/if (${Window[GiveWnd].Child[GVW_MyItemSlot3].Tooltip.Length}<1) /goto :done2
/delay 3
/notify GiveWnd GVW_Give_Button leftmouseup
:closing2
/if (${Window[GiveWnd].Open}) /goto :closing2
/nomodkey /itemnotify ${FindItem[=Eidolon Plate Bracers].InvSlot} leftmouseup 
/click left target
:open3
/if (!${Window[GiveWnd].Open}) /goto :open3
:showing3
/if (${Window[GiveWnd].Child[GVW_MyItemSlot0].Tooltip.Length}<1) /goto :showing3
/delay 3
/notify GiveWnd GVW_Give_Button leftmouseup
:closing3
/if (${Window[GiveWnd].Open}) /goto :closing3

I just read your note. Perhaps changing these red lines would make it work as is though

Code:
Sub GiveToPet 
[COLOR=red]/declare i int local 1[/COLOR]
:give_item 
/delay 5 ${Cursor.ID} 
/if ( ${Cursor.ID} && !${InvSlot[trade4].Item.ID} ) { 
/if ( ${Cursor.Name.Find[summoned:]} [COLOR=red]|| ${Cursor.Name.Find[eidolon]}[/COLOR]) { 
/click left target 
/delay 1s ${InvSlot[trade${i}].Item.ID} 
} else { 
/autoinventory 
} 
/goto :give_item 
} 
/for i 1 to 4 
/if ( ${InvSlot[trade${i}].Item.ID} && [COLOR=red]([/COLOR]!${InvSlot[trade${i}].Item.Name.Find[summoned:]} [COLOR=red]|| !${InvSlot[trade${i}].Item.Name.Find[eidolon]})[/COLOR]) /notify GiveWnd GVW_Cancel_Button leftmouseup 
/next i 
/if ( ${Window[GiveWnd].Open} ) { 
/notify GiveWnd GVW_Give_Button leftmouseup 
/delay 5s !${Window[GiveWnd].Open} 
} 
/if ( ${Window[InventoryWindow].Open} ) /keypress inventory 
/return
 
Status
Not open for further replies.