Modifying a Macro - one more question

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

Moderator: MacroQuest Developers

Paradigm68
a hill giant
a hill giant
Posts: 275
Joined: Wed Dec 08, 2004 4:37 pm

Modifying a Macro - one more question

Post by Paradigm68 » Thu Feb 10, 2005 9:17 pm

This part of the macro checks to make sure the item has "Summoned:" at the start of the name before giving to pet. If not, it autoinventories the item. Basically making sure you only give summoned items to the pet. I am trying to modify the macro to give aditional items, however, the other items do not have "summoned:" at the start. They have "Calliav's" . . .

Code: Select all

Sub GiveToPet 
   /declare i int local 
   /varset i 1 
:give_item 
   /delay 5 ${Cursor.ID} 
   /if ( ${Cursor.ID} && !${InvSlot[trade12].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 12 
      /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
I've been messing around with this but just can't get anything to work. How do I change "/if ( ${Cursor.Name.Find[summoned:]} )" to check for either "summoned:" or "Calliav's"?

thanks for any help.
Last edited by Paradigm68 on Fri Feb 11, 2005 12:49 am, edited 3 times in total.

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Thu Feb 10, 2005 9:48 pm

Code: Select all

/if (${Cursor.Name.Find[summoned:]} ||  ${Cursor.Name.Find[Calliav's]})
If they're all no rent you could do

Code: Select all

/if (${Cursor.NoRent})
but that appears to be backwards at the moment.

Edit: why must they fuck with me
Last edited by ieatacid on Thu Feb 10, 2005 10:03 pm, edited 1 time in total.

Paradigm68
a hill giant
a hill giant
Posts: 275
Joined: Wed Dec 08, 2004 4:37 pm

Post by Paradigm68 » Thu Feb 10, 2005 9:56 pm

Awesome - thank you very much!

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Thu Feb 10, 2005 10:14 pm

LOL, same answer, first one, that I gave, right as you cleared out the post in VIP. LMAO

It's good to know I came up with the same answer.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

Paradigm68
a hill giant
a hill giant
Posts: 275
Joined: Wed Dec 08, 2004 4:37 pm

Post by Paradigm68 » Thu Feb 10, 2005 10:57 pm

Ok that works perfectly . . .

Code: Select all

/if (${Cursor.Name.Find[summoned:]} ||  ${Cursor.Name.Find[Calliav's]})
but, now the check below, once the item is actually in the trade box, just cancells each trade.

I guess this needs to be changed also. . .

Code: Select all

/if ( ${InvSlot[trade${i}].Item.ID} && !${InvSlot[trade${i}].Item.Name.Find[summoned:]} ) /notify GiveWnd GVW_Cancel_Button leftmouseup 
Seen as all the items are no rent, I tried to change this based on what was posted above . . .

Code: Select all

/if ( ${InvSlot[trade${i}].Item.ID} && !${InvSlot[trade${i}].Item.NoRent} ) /notify GiveWnd GVW_Cancel_Button leftmouseup 
This didn't work.

Paradigm68
a hill giant
a hill giant
Posts: 275
Joined: Wed Dec 08, 2004 4:37 pm

Post by Paradigm68 » Fri Feb 11, 2005 1:17 am

Ok, it was simple . . .

Code: Select all

/if ( ${InvSlot[trade${i}].Item.ID} && !${InvSlot[trade${i}].Item.Name.Find[summoned:]} && !${InvSlot[trade${i}].Item.Name.Find[Calliav's]} ) /notify GiveWnd GVW_Cancel_Button leftmouseup 
Works now

xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Modifying a Macro - one more question

Post by xyilla » Wed Apr 09, 2025 4:25 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Modifying a Macro - one more question

Post by xyilla » Wed Apr 09, 2025 4:26 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Modifying a Macro - one more question

Post by xyilla » Wed Apr 09, 2025 4:28 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Modifying a Macro - one more question

Post by xyilla » Wed Apr 09, 2025 4:29 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Modifying a Macro - one more question

Post by xyilla » Wed Apr 09, 2025 4:30 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Modifying a Macro - one more question

Post by xyilla » Wed Apr 09, 2025 4:31 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Modifying a Macro - one more question

Post by xyilla » Wed Apr 09, 2025 4:32 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Modifying a Macro - one more question

Post by xyilla » Wed Apr 09, 2025 4:33 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Modifying a Macro - one more question

Post by xyilla » Wed Apr 09, 2025 4:34 pm