New SellItem Macro

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

MajikL_p00p
orc pawn
orc pawn
Posts: 25
Joined: Sat Aug 31, 2002 1:57 am

New SellItem Macro

Post by MajikL_p00p » Fri May 30, 2003 9:55 pm

Its in a very crude form right now, hopefully everyone can help improve it.

Code: Select all

| - NewSellItem.mac - 
| IMPORTANT: The merchant window must already be open. 
| Usage: /macro NewSellItem "Bottle of Milk" 
| You also need to have all your bags open 
| on the screen and separated from each other. 
| This macro is assuming your merchant window is 
| already open 
| 

#turbo 
#chat say 

Sub Main 
:sellitem 
  /delay 1 
  /finditem "$p0" 
  /if $find()==FALSE /goto :Done 
  /delay 1 
  /varcalc v1 $char(plat)*1000+$char(gold)*100+$char(silver)*10+$char(copper) 
  /click left merchant buy 
  :Waitsell 
  /delay 0 
  /if n $v1==$calc($char(plat)*1000+$char(gold)*100+$char(silver)*10+$char(copper)) /goto :Waitsell 
  /delay 1 
/goto :sellitem 

:done 
/click left merchant done 
/return
Last edited by MajikL_p00p on Sat May 31, 2003 4:33 am, edited 1 time in total.

alcor75
a lesser mummy
a lesser mummy
Posts: 77
Joined: Wed Jan 29, 2003 7:35 am

Post by alcor75 » Sat May 31, 2003 2:11 am

This work for me (Default UI)

Code: Select all

| - NewSellItem.mac - 
| IMPORTANT: The merchant window must already be open. 
| Usage: /macro NewSellItem "Bottle of Milk" 
| You also need to have all your bags open 
| on the screen and separated from each other. 
| This macro is assuming your merchant window is 
| already open
| 

#turbo 
#chat say 

Sub Main 
:sellitem 
  /delay 1 
  /finditem "$p0" 
  /if $find()==FALSE /goto :Done 
  /delay 1 
  /varcalc v1 $char(plat)*1000+$char(gold)*100+$char(silver)*10+$char(copper)
  /click left merchant buy
  :Waitsell
  /delay 0 
  /if n $v1==$calc($char(plat)*1000+$char(gold)*100+$char(silver)*10+$char(copper)) /goto :Waitsell
  /delay 1 
/goto :sellitem 

:done 
/click left merchant done
/return

Alcor75

MajikL_p00p
orc pawn
orc pawn
Posts: 25
Joined: Sat Aug 31, 2002 1:57 am

Post by MajikL_p00p » Sat May 31, 2003 4:33 am

Thanks alcor thats much better than mine, I'll change the 1st one to that.

banananose
orc pawn
orc pawn
Posts: 27
Joined: Sun Sep 01, 2002 8:13 am

Post by banananose » Sat May 31, 2003 7:53 am

Did I miss something? I thought /finditem didn't work? Also, when I try /click left merchant buy or /click left merchant done, my cursor just goes to the upper left hand corner. I can modify the /clicks to mouseto and click easily enough for my own purposes - but /finditem?

alcor75
a lesser mummy
a lesser mummy
Posts: 77
Joined: Wed Jan 29, 2003 7:35 am

Post by alcor75 » Sat May 31, 2003 8:34 am

My /finditem, /click left merchant buy/done work as intended, with the actual limits, i use the dafault UI and last CVS .

Alcor75

banananose
orc pawn
orc pawn
Posts: 27
Joined: Sun Sep 01, 2002 8:13 am

Post by banananose » Sat May 31, 2003 10:02 am

Updating my CVS and recompiling did it - thanks Alcor and Majik :)