Selling items...

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

User avatar
Hades0721
a lesser mummy
a lesser mummy
Posts: 31
Joined: Sun Apr 11, 2004 4:57 pm
Contact:

Selling items...

Post by Hades0721 » Wed Apr 21, 2004 3:57 am

Having problems getting this item selling macro to work. It will select the specified item, but will not sell it. Pulled this off of the depot forum a while back so had to edit for new MQ2Data. credit goes to the original writer whoever that was. Oh and can you put parameters into the events?

for instance

Code: Select all

#event Selling "@Param0"

Code: Select all

| - SellItem.mac - 
| 
| Usage: /macro SellItem "Bottle of Milk" 
| 11/21/03 

#event Selling "for the Electrum Malachite Bracelet."


Sub Main 
   /declare OldMoney global 
   /declare NewMoney local 

   /autoinv 
   

   :Finding 
      /newif (!${Bool[${FindItem[@Param0]}]}) /goto :Done 
      /selectitem "@Param0" self 

   :WaitFind 
      /newif (${Cursor}==NULL) /goto :WaitFind 

/doevents

   :WaitSell 
      /varset NewMoney ${Me.Cash} 
      /newif @NewMoney==@OldMoney /goto :WaitSell 
      /goto :Finding 

   :Done  
      /endmacro 

/return 

Sub Event_Selling
   :Selling 
      /delay 1s 
      /varset OldMoney ${Me.Cash}      
 |     /sellitem  
     /notify MerchantWnd Sell_Button leftmouseup 
      /keypress confirm_yes
/return
"I'm Goin' to Hell. Who's comin' with me?" - Eminem

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Wed Apr 21, 2004 11:55 am

(${Cursor}==NULL)
invalid. Use /newif (!${Cursor.ID})

(!${Bool[${FindItem[@Param0]}]})
invalid. Use /newif (!${FindItem[@Param0].ID})

/selectitem may not work too well either but i think you'll be ok
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

User avatar
Hades0721
a lesser mummy
a lesser mummy
Posts: 31
Joined: Sun Apr 11, 2004 4:57 pm
Contact:

Post by Hades0721 » Wed Apr 21, 2004 12:13 pm

Thanks Lax :P
"I'm Goin' to Hell. Who's comin' with me?" - Eminem