>autopurchased_item< Found in Slot '-5997'

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

>autopurchased_item< Found in Slot '-5997'

Post by Miseaujeu » Fri Jan 23, 2004 8:12 pm

while running the following code :

Code: Select all

sub Purchase(Item,Qty,Merch)
/target @Merch
   /face
   /delay 10
   /click right target
   :buy
      /delay 5
      /selectitem "@Item" merchant
      /delay 1s
      /if "$selecteditem()"=="@Item" {
         /sendkey down shift
         /click left merchant buy
         /delay 1s
         /sendkey up shift
      } else {
         /goto :buy
      }
      /delay 20
   /varadd Purchased 1
   /if @Purchased<@Qty /goto :buy
   /click left merchant done
it will successfully target the merchant and /right click on him so that you're then seeing his wares. But then it goes bad :cry:
It'll highlight ( as in put a yellow square around ) the correct item ( a Water Flask for example ) but FOR SOME REASON even though the item is on the VENDOR, the button at the bottom says "SELL" instead of "BUY" Also, in the MQ debugging window it says the following

'Water Flask' Found in slot '-5997'

? any idea on what I might be doing wrong ?

-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 » Fri Jan 23, 2004 9:16 pm

Change the delay after the right click to like 15.

If you selectitem before it's ready, bad things happen.

You don't need any delay after face.

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

Post by Miseaujeu » Fri Jan 23, 2004 9:55 pm

thanks for the quick reply!

however am still having the same trouble. The new code is as follows:

Code: Select all

sub Main
/echo Start
/declare x1 global
/varset x1 Lettuce
   /target "Merchant Tekram"
   /face
   /click right target
   :buyitagain
   /delay 5s
   /selectitem @x1 merchant
   /delay 5s
   /if "$selecteditem()"==@x1 {
      /sendkey down shift
      /click left merchant buy
      /sendkey up shift
   } else {
      /goto :buyitagain
   }
   /delay 20
   /click left merchant done
/return
/sigh I should probably also mention at this time that I've not been able to make any versions of MQ2 newer than the Christmas compile run on my machine. I get CTD after char select screen every time :cry:

-M

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Fri Jan 23, 2004 10:02 pm

Try getting the latest source and then try renaming the bmpwad8.s3d file to something else in your mq2\release folder. Not sure if that will help but I thought I recalled someone else having problems with it.

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

"V" for Vic-tory !

Post by Miseaujeu » Fri Jan 23, 2004 10:20 pm

Ah-ha! That did it. I downloaded the updated Jan 17th, renamed that file *.OLD and re-compiled. Perfection. Then ran the above macro ... and it worked as well !

I am very, very pleased.

/golf clap

-M

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Fri Jan 23, 2004 10:22 pm

:D

cronic
a grimling bloodguard
a grimling bloodguard
Posts: 536
Joined: Wed Nov 26, 2003 11:01 pm

Post by cronic » Mon Jan 26, 2004 3:42 am

I had trouble with that. My script would select the item on the merchant, and it would appear to be going correctly (pretty yellow box and all) but in truth it was actually selecting my helm (wtf?). My script had to sell my banded helm for me to find out something was wrong. I don't recall how I fixed it, but it had nothing to do with the above fix. Hmph.

cronic