Hey folks,
Has anyone fixed the old sellitems macro that used to be quite useful, it's great for selling the results of tradecrafting as its a pain selling each item/stack individually.
Many thanks in advance.
Moderator: MacroQuest Developers
Code: Select all
| - SellItem.mac -
|
| Usage: /macro SellItem "Bottle of Milk"
|
#turbo
#chat say
Sub Main
/varset v65 0
/target npc
/varset v66 "$target(name,clean)"
/click right target
:WaitForMerchant
/doevents
/if n $v65==0 /goto :WaitForMerchant
/sendkey down shift
:Selling
/finditem similar "$p0"
/delay 5
/if $find()==FALSE /goto :Done
/call SellItem
/goto :Selling
:done
/sendkey up shift
/press esc
/return
sub Event_Chat
/if "$p1"=="$v66" /if "$p0"~~"say" /if "$p2"~~"$char(name)" /varset v65 1
/return
Sub SellItem
/varset v99 $char(cash)
/click left merchant buy
/delay 5
/varset t9 15s
:WaitSell
/doevents
/if n $v99!=$char(cash) /goto :WaitEnd
/if $t9>0 /goto :WaitSell
:WaitEnd
/varset t9 0
/return