Not finding vendor items currently offscreen

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

Miseaujeu
a lesser mummy
a lesser mummy
Posts: 32
Joined: Mon Nov 24, 2003 6:25 pm

Not finding vendor items currently offscreen

Post by Miseaujeu » Thu Jan 29, 2004 12:46 pm

Code: Select all

#turbo

Sub Main
	/tar Ironstove
	/face
	/click right target
	/delay 1s
	/call Purchase "Lettuce"
/return


sub Purchase(Item)
   :try2buyagain
   /selectitem @Item merchant
   /delay 1s
   /if "$selecteditem()"==@Item {
      /sendkey down shift
      /click left merchant buy
      /sendkey up shift
   } else {
      /delay 1s
      /goto :try2buyagain
   }
   /delay 20
   /click left merchant done
/return
this will work fine if the tasty "Lettuce" is in the first bunch of vendor items ... but if I would need to scroll down to see the rest of the 80 -- the macro will not find it.
Might some kind soul `splain what I'm missing?

-M

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Thu Jan 29, 2004 1:17 pm

D'uh. Does the item you are trying to buy have spaces in it?

bob_the_builder
a hill giant
a hill giant
Posts: 275
Joined: Tue Jul 22, 2003 1:22 pm

Post by bob_the_builder » Thu Jan 29, 2004 1:21 pm

Code: Select all

   /selectitem "@item" merchant 
   /delay 10 
   /click left merchant buy 
That's whats in my buyitem.mac
/selectitem "item name"|slot# [merchant|self]
Finds an item in merchant inventory or your inventory by name or in a specific slot#

/selectitem "emerald" merchant /selectitem slot 5 merchant

Miseaujeu
a lesser mummy
a lesser mummy
Posts: 32
Joined: Mon Nov 24, 2003 6:25 pm

Post by Miseaujeu » Thu Jan 29, 2004 1:52 pm

Code: Select all

#turbo

Sub Main
   /tar Ironstove
   /face
   /click right target
   /delay 1s
[color=red]   /call Purchase "Many Spaced Item Name"[/color]
/return


sub Purchase(Item)
   :try2buyagain
   /selectitem [color=red]"[/color]@Item[color=red]"[/color] merchant
   /delay 1s
   /if "$selecteditem()"==[color=red]"[/color]@Item[color=red]"[/color] {
      /sendkey down shift
      /click left merchant buy
      /sendkey up shift
   } else {
      /delay 1s
      /goto :try2buyagain
   }
   /delay 20
   /click left merchant done
/return
Okies, then this should do the trick.
Thanks

-M