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 int local
/declare NewMoney int local
/call Sell
/return
Sub Sell
/autoinv
:Finding
/if (${FindItemCount[${Param0}]}==0) /goto :Done
/itemnotify ${FindItem[${Param0}].InvSlot} leftmouseup
:WaitFind
/if (${Bool[${SelectedItem}]}==FALSE) /goto :WaitFind
:Selling
/delay 1s
/vardata OldMoney ${Me.Cash}
/shift /notify MerchantWnd MW_Sell_Button leftmouseup
:WaitSell
/vardata NewMoney $(Me.Cash}
/if (${NewMoney}==${OldMoney}) /goto :WaitSell
/goto :Finding
:Done
/echo No more to sell!!!
/endmacro
/return 

