sellitem.mac for Merchant selling

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

bob_the_builder
a hill giant
a hill giant
Posts: 275
Joined: Tue Jul 22, 2003 1:22 pm

sellitem.mac for Merchant selling

Post by bob_the_builder » Tue Nov 04, 2003 9:06 am

Code: Select all

| - SellItem.mac - 
| 
| Usage: /macro SellItem "Bottle of Milk" 
| 11/21/03 

Sub Main 
   /declare OldMoney local 
   /declare NewMoney local 

   /autoinv 
   /sendkey down shift 

   :Finding 
      /if n $count("@Param0")==0 /goto :Done 
      /finditem "@Param0" 

   :WaitFind 
      /if "$cursor()"=="FALSE" /goto :WaitFind 

   :Selling 
      /delay 1s 
      /varset OldMoney $char(cash)      
      /sellitem $selecteditem(count) 
      /click left merchant sell 

   :WaitSell 
      /varset NewMoney $char(cash) 
      /if n @NewMoney==@OldMoney /goto :WaitSell 
      /goto :Finding 

   :Done 
      /sendkey up shift 
      /endmacro 

/return 
updated with /sellitem count
Last edited by bob_the_builder on Sun Dec 07, 2003 1:02 am, edited 3 times in total.

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Post by EqMule » Tue Nov 04, 2003 11:18 am

when in merchantmode you will always get $cursor()=FALSE since it cant pick up things, just select them.
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

Seventh
orc pawn
orc pawn
Posts: 16
Joined: Thu Nov 20, 2003 7:14 pm

Post by Seventh » Fri Nov 21, 2003 10:12 am

This works great, one thing concerns me however.

If I'm selling unstackable items, eg: darkwood bows, I get a merchant message "You recieve 4985 platinum from Merchant whoever for the darkwood bow(s)".

I don't, of course, since they're selling once at a time, but I'm not sure what kind of eyebrow this might raise in GMland.

Edit: Replacing "/sellitem 20" with "/sellitem 1" remedies this. Probably a good idea to save an alternate version of this macro for selling unstackable stuff.

- S7

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Post by EqMule » Fri Nov 21, 2003 11:10 am

or change it to /sellitem $selecteditem(count) which would return the correct number everytime...
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

honduras
orc pawn
orc pawn
Posts: 14
Joined: Sat Aug 30, 2003 5:22 pm

Post by honduras » Sat Nov 22, 2003 12:08 am

greeting comrades
doesnt work the way i want it to be so i put in a click the way that its autosell every item specified. Also add in a delay which should be unecessary.


Code: Select all

| - SellItem.mac - 
| 
| Usage: /macro SellItem "Bottle of Milk" 
| 11/21/03 

Sub Main 
   /declare OldMoney local 
   /declare NewMoney local 

   /autoinv 
   /sendkey down shift 

   :Finding 
      /if n $count("@Param0")==0 /goto :Done 
      /finditem "@Param0" 

   :WaitFind 
      /if "$cursor()"=="FALSE" /goto :WaitFind 

   :Selling 
      /delay 1s
      /varset OldMoney $char(cash)      
      /sellitem $selecteditem(count)
      /click left merchant sell 

   :WaitSell 
      /varset NewMoney $char(cash) 
      /if n @NewMoney==@OldMoney /goto :WaitSell 
      /goto :Finding 

   :Done 
      /sendkey up shift 
      /endmacro 

/return 

jago
orc pawn
orc pawn
Posts: 13
Joined: Tue Oct 01, 2002 2:15 am

Post by jago » Tue Dec 02, 2003 5:14 pm

how do i get this to open the packs? since the macro will not work without the packs open?

bob_the_builder
a hill giant
a hill giant
Posts: 275
Joined: Tue Jul 22, 2003 1:22 pm

Post by bob_the_builder » Mon Dec 08, 2003 3:48 pm

Code: Select all

/if $invpanel==FALSE /press i
From there on /finditem "@Param0" will open the pack to find the item

Bob

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Fri Jan 09, 2004 1:57 pm

Is this still working for anyone?

It's not for me : (

bob_the_builder
a hill giant
a hill giant
Posts: 275
Joined: Tue Jul 22, 2003 1:22 pm

Post by bob_the_builder » Fri Jan 09, 2004 3:36 pm

It works for me, what part doesnt work for you?

You should be able to do these commands from a prompt. For ease of use, find a merchant and open there buy/sell window and find the name of an item to test, perferably not the first item. Use that name in place of _item_name_

Code: Select all

/selectitem "_item_name_" merchant



Did that select the item corectly?

Code: Select all

/click left merchant sell



Did that sell the item?

Code: Select all

/click left merchant done
Did that exit you from the merchant?

If you post the results of each line wether it worked or didn't and what happened then maybe we can assist you further troubleshooting.

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Fri Jan 09, 2004 6:20 pm

whoa...de javu

I could have sworn I read this EXACT message somewhere...
Now I'm gonna have to search for it.
[b]- Bad Karma
________________________________________[/b]

In our own quest for excellence, we should strive to take the time to help those who help themselves.

All others should [b]RTFM[/b]!!!!!!!!!

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Fri Jan 09, 2004 9:54 pm

That was weird, but after a reboot and restart of EQ and MQ it works fine now. Thanks for your reply.

bob_the_builder
a hill giant
a hill giant
Posts: 275
Joined: Tue Jul 22, 2003 1:22 pm

Post by bob_the_builder » Sat Jan 10, 2004 9:21 am

But I think this is redundant

Code: Select all

      /sellitem $selecteditem(count) 
      /click left merchant sell 
Use /sellitem instead of a /click left

Bob

Epoch18
orc pawn
orc pawn
Posts: 16
Joined: Mon Sep 15, 2003 1:39 pm

Post by Epoch18 » Sun Jul 18, 2004 6:13 pm

This one isn't working for me. Not sure why...

Any help? Maybe too old to work with current version of MQ2?

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Post by Drumstix42 » Sun Jul 18, 2004 6:27 pm

You may realize this is the :: Macros - Pre Data (Parms) :: forum...

Epoch18
orc pawn
orc pawn
Posts: 16
Joined: Mon Sep 15, 2003 1:39 pm

Post by Epoch18 » Sun Jul 18, 2004 6:29 pm

I know... that's why I'm asking for help. Maybe someone knows a bit of updated code?

I've already changed the :Finding to

Code: Select all

   :Finding 
      /if (${count("@Param0")}==0) /goto :Done 
      /finditem "@Param0" 
... but it still seems to be having trouble with this:

Code: Select all

   /sendkey down shift 
I'm sure this is VERY simple. Maybe someone will post the update cade before I figure it out...