Modifying a Macro - one more question
Posted: 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" . . .
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.
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
thanks for any help.