| - SellItem.mac -
|
| Usage: /macro SellItem "XXXXX"
Sub Main
/declare OldMoney int local
/declare NewMoney int local
/call Sell
/return
Sub Sell
/autoinv
:Finding
/if (${FindItemCount[${Param0}]}==0) /goto
/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
/echo No more to sell!!!
/endmacro
/return


