Wrote a quick macro to accept input from the macro line and then search vendors for that item and report back if it's there. I know I'm still stuck in the old times, but with my limited time it's easier to stick with what I know
What I do not know is the following:
1) Just in general, what is the purpose of the ,2 following the Item name when checking the merchant's ItemList for that item?
2) In this specific Macro, it will only report back positive hits for items that are assigned to odd number parameters, Item1, Item3, and Item5. I do not know why? When I manually /echo the ListItem check line (line num. 20) it returns a number larger than 0, but the macro seems to completely ignore items in the Item2 and Item4 variables. Is this something related to question 1 and, hence, goes back to my larger misunderstanding of why there's a ,2 on the line to begin with?
[CODE title="itemsearch"]Sub Main(string Item1, string Item2, string Item3, string Item4, string Item5)
/declare ListID int outer 0
/declare Found int outer 0
/declare a int outer 0
:waitforwindow
/if (${Merchant.Open} && ${Merchant.ItemsReceived}) {
/goto :checking
} else {
/delay 1
/goto :waitforwindow
}
:checking
/varset Found 0
/varset a 1
/for a 1 to 5
/varset ListID ${Window[MW_PurchasePage].Child[MW_ItemList].List[=${Item${a}},2]}
/if (${ListID} > 0) {
/echo \ag YES! Merchant has ${Item${a}} !!
/if (${Found} < 1) /varset Found 1
}
/varcalc a ${a} + 1
/next a
/goto :Finishing
:Finishing
/delay 1
/if (${Found}==1) {
/echo \ayWe found some items. Take time to buy them.
/goto :WaitToBuy
} else {
/echo \at All done here for now. Go to another merchant!
/nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp
/goto :waitforwindow
}
:WaitToBuy
/if (${Merchant.Open}) {
/delay 1
/goto :WaitToBuy
} else {
/echo \at All done here for now. Go to another merchant!
/goto :waitforwindow
}
/return[/CODE]
What I do not know is the following:
1) Just in general, what is the purpose of the ,2 following the Item name when checking the merchant's ItemList for that item?
2) In this specific Macro, it will only report back positive hits for items that are assigned to odd number parameters, Item1, Item3, and Item5. I do not know why? When I manually /echo the ListItem check line (line num. 20) it returns a number larger than 0, but the macro seems to completely ignore items in the Item2 and Item4 variables. Is this something related to question 1 and, hence, goes back to my larger misunderstanding of why there's a ,2 on the line to begin with?
[CODE title="itemsearch"]Sub Main(string Item1, string Item2, string Item3, string Item4, string Item5)
/declare ListID int outer 0
/declare Found int outer 0
/declare a int outer 0
:waitforwindow
/if (${Merchant.Open} && ${Merchant.ItemsReceived}) {
/goto :checking
} else {
/delay 1
/goto :waitforwindow
}
:checking
/varset Found 0
/varset a 1
/for a 1 to 5
/varset ListID ${Window[MW_PurchasePage].Child[MW_ItemList].List[=${Item${a}},2]}
/if (${ListID} > 0) {
/echo \ag YES! Merchant has ${Item${a}} !!
/if (${Found} < 1) /varset Found 1
}
/varcalc a ${a} + 1
/next a
/goto :Finishing
:Finishing
/delay 1
/if (${Found}==1) {
/echo \ayWe found some items. Take time to buy them.
/goto :WaitToBuy
} else {
/echo \at All done here for now. Go to another merchant!
/nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp
/goto :waitforwindow
}
:WaitToBuy
/if (${Merchant.Open}) {
/delay 1
/goto :WaitToBuy
} else {
/echo \at All done here for now. Go to another merchant!
/goto :waitforwindow
}
/return[/CODE]

