Sellitem.mac

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Trepid
decaying skeleton
decaying skeleton
Posts: 2
Joined: Tue Oct 01, 2002 7:53 pm

Sellitem.mac

Post by Trepid » Tue Oct 01, 2002 8:08 pm

HI all,

I need a little help on the "Sellitem.mac" macro wich is in the macroquest MQ-20020905.zip.

Problem:

When i run the macro (/macro sellitem "xxx")
It sell all xxx in bags 0,1,2,3,4 but it open bag 5 and stop.

All bags are classics 8 slots and i have a combiner in slot 7.

Anyway to make this macro sell what i have in bags 5 and 6 ?

Thanks in advance for your help/time .

Trepid.

macrotoon
a ghoul
a ghoul
Posts: 106
Joined: Wed Sep 18, 2002 4:38 pm

Post by macrotoon » Tue Oct 01, 2002 9:10 pm

To sell everything in your packs p0
Example

/call SellPack 6 | This would sell everything in pack 6 if it works right. havnt tested it, but seemed like it would.

Code: Select all

/Sub SellPack
   	/sendkey down shift 
     	/varcalc v2 $pack($p0,slots)-1 
/for v1 0 to $v2 
/click left pack $p0 $v1 
/delay 0
/varcalc p2 $char(plat)*1000+$char(gold)*100+$char(silver)*10+$char(copper) 
     	 /click left merchant sell 
      :SellItemLoop 
        	 /delay 0 
/if n calc($char(plat)*1000+$char(gold)*100+$char(silver)*10+$char(copper))==$p2 /goto :SellItemLoop
/next v1
      :DoneSellItem 
   	/sendkey up shift 
/return

User avatar
DeathSpiral
a ghoul
a ghoul
Posts: 95
Joined: Thu Aug 22, 2002 6:31 pm

Post by DeathSpiral » Tue Oct 01, 2002 9:32 pm

Actually, that one probably won't work. Try something more like this:

Code: Select all

| Sells all the items in a pack
|  $p0 - pack to sell from
sub SellPack
   /if "$invpanel"!="TRUE" /press i
   /if "$pack($p0,open)"!="TRUE" /click right inv $p0

   /sendkey down shift

   /for l0 0 to $int($pack($p0,slots)-1)
      /click left pack $p0 $l0
      /call SellBuy
   /next l0

   /sendkey up shift
/return

sub SellBuy
   /varset l0 $char(cash)

   /click left merchant buy

   :WaitForSale
      /doevents
      /if n $char(cash)==$l0 /goto :WaitForSale
/return
However, I get the feeling that that isn't what you are looking for - you want to know why sellitem.mac isn't selling all of an item and is 'halting' on your 6th pack, leaving it open. To address that: I don't know. What release are you running? Erm, wait, you said that... 20020905. Well, you could always re-download the eqgame.ini file, or, if you are feeling bold and daring and want to take on a 'test' version before the new release, try the latest IRC version. Keep us posted!
I am orc pawn, hear me yell for centurians...

Trepid
decaying skeleton
decaying skeleton
Posts: 2
Joined: Tue Oct 01, 2002 7:53 pm

Post by Trepid » Wed Oct 02, 2002 8:41 am

Works fine with the irc release ! don't know why.

Thx a lot for your help...

Trepid

Lichbait
decaying skeleton
decaying skeleton
Posts: 5
Joined: Fri Sep 20, 2002 2:27 am

Post by Lichbait » Thu Oct 03, 2002 7:29 am

Or maybe that bag open up over the vendor sell button? That would cause it to stop too.

Lichbait