/finditem simliar

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

jago
orc pawn
orc pawn
Posts: 13
Joined: Tue Oct 01, 2002 2:15 am

/finditem simliar

Post by jago » Tue Dec 02, 2003 2:41 pm

hello,

how do i get /finditem similar XXXXX to open all the bags with the item?

all this command does for me is find one bag.

thanks

Yalp
a ghoul
a ghoul
Posts: 90
Joined: Thu Dec 05, 2002 6:28 pm

Post by Yalp » Tue Dec 02, 2003 3:01 pm

/finditem will not open any bags, it only works if the bags are already open and the item is on screen.

hope that helps

- Yalp
Because i wouldn't have it any other way

jago
orc pawn
orc pawn
Posts: 13
Joined: Tue Oct 01, 2002 2:15 am

Post by jago » Tue Dec 02, 2003 3:24 pm

/finditem for me does open 1 bag for me when i use this macro:

Code: Select all

| - SellItem.mac - 
| 
| Usage: /macro SellItem "Bottle of Milk" 
| 11/21/03 
#turbo
Sub Main 
   /target merchant
   /face
   /press u
   /press i
   /delay 1
   /finditem similar @Param0
   /delay 1
   /click right 940 600
   
   /declare OldMoney local 
   /declare NewMoney local 

   /autoinv 

   :Finding 
      /if n $count("@Param0")==0 /goto :Done 
      /finditem "@Param0" 

   :WaitFind 
      /if "$cursor()"=="FALSE" /goto :WaitFind 

   :Selling 
       
      /varset OldMoney $char(cash)      
      /sellitem $selecteditem(count) 
      /click left merchant sell 

   :WaitSell 
      /varset NewMoney $char(cash) 
      /if n @NewMoney==@OldMoney /goto :WaitSell 
      /goto :Finding 

   :Done 
      
      /endmacro 

/return 
however it doesnt sell items in which the bag is open, hence me adding the /click right mouseloc to open a second bag

Yalp
a ghoul
a ghoul
Posts: 90
Joined: Thu Dec 05, 2002 6:28 pm

Post by Yalp » Tue Dec 02, 2003 3:29 pm

/click right 940 600 if your bag is at that location it will right click the bag thus opening a bag
Because i wouldn't have it any other way