Just a couple questions

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

yoda
orc pawn
orc pawn
Posts: 19
Joined: Thu Feb 12, 2004 6:44 pm

Just a couple questions

Post by yoda » Thu Feb 12, 2004 6:58 pm

Hello, I have worked with MQ but haven't messed with it much in a very long time, and very happy to see there is a MQ2, since I stopped using when MQ originally broke.

I am trying to write a macro to up my skill in Jewelcraft, I would like to be able to sell the item back to the merchant when done, becuase of limited room in bags, since 1 combined item will not stack. So my question is, after the combine is done, how do you know when to /autoinventory, or not to, if the fail combines...have looked around trying to find some sample code to "borrow" from but had no luck.

Also, how do you combine in a Jeweler's Kit? If you Kit is in Inventory slot 8 (last slot) Woult the code be:

Code: Select all

/click left inventory 8 combine

Next Question,
If I want to left click the item, or put the item on my cursor, in the 8th inventory slot (Last Slot) Jewellers Kit and the 1st slot in that kit, would the following code be correct, if not, how would you do it:

Code: Select all

/click left inventory (8,0)
Last Question,
Does

Code: Select all

/finditem
with the appropriate item name after it, actually put that item on the cursor? If not, if you needed to select an item in your inventory, that you don't know where it will be, in order to sell back to merchant?

I really appreciate anyones help on these questions, or if they can point me to some existing code that already has it.

Thanks again in advance!

Shali
a ghoul
a ghoul
Posts: 87
Joined: Sun Dec 07, 2003 12:39 pm

re

Post by Shali » Thu Feb 12, 2004 7:37 pm

combining in a jeweler's kit

well theres slot 0, so just subtract 1 from what slot # its in, it would be

Code: Select all

/click left pack 7 combine
for putting an item in the 1rst slot of a jewelers kit in 8th slot do

Code: Select all

/click left pack 7 0
last question, yes, if you do

Code: Select all

/finditem "silver bar"
it would left click on a silver bar, of cource, you have to remember, if you have more than one of these in a stack you have to do:

Code: Select all

/sendkey down ctrl
/finditem "silver bar"
/sendkey down ctrl
so in conclusion, say you wanted to make an unenchanted fire opal ring, this is what you would do:

Code: Select all

/sendkey down ctrl

/finditem "silver bar"
/delay 1
/click left pack 7 0

/finditem "fire opal"
/delay 1
/click left pack 7 1

/click left pack 7 combine
  :waitforcombine
/if $cursor()==FALSE /goto :waitforcombine

/autoinventory
hope this helps

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

Post by bob_the_builder » Thu Feb 12, 2004 11:21 pm

Did this recently change ... little confused all sudden

If i do the following:

/click left "Planar Jewelry Kit" combine

Nothing happens

But I can do a

/click left pack 7 combine

Did the "pack" replace "Jewelry kit" or is it just a substitue for?

Bob
Last edited by bob_the_builder on Fri Feb 13, 2004 8:37 am, edited 1 time in total.

Shali
a ghoul
a ghoul
Posts: 87
Joined: Sun Dec 07, 2003 12:39 pm

re

Post by Shali » Thu Feb 12, 2004 11:40 pm

as far as my knowledge goes, you cant use pack name, just use pack 0-7

yoda
orc pawn
orc pawn
Posts: 19
Joined: Thu Feb 12, 2004 6:44 pm

Post by yoda » Fri Feb 13, 2004 10:42 am

1. What if the combine fails, how will this work?

Code: Select all

/click left pack 7 combine 
  :waitforcombine 
/if $cursor()==FALSE /goto :waitforcombine 

/autoinventory 
If it fails, nothing would be on cursor and then the macro would be stuck in an endless loop, would it not?

2. If you have right clicked a merchant, and do /finditem, would it be correct to assume that it would not put that item on the cursor, but instead highlight that so all you would have to do is:

Code: Select all

/click left merchant sell
in order to sell that item back?

3. Just for clarification, must the inventory bag be opened in order for /find item to work, I think I read that it has to be...

Maybe easier to post what I have to sell an item and it can be critiqued:

To sell an item that is in a bag somewhere:

Code: Select all

Sub SellRing 
	/for Counter 0 to 9
		/press esc 
    	/next Counter

	/target a clockwork jeweler 
	
	/click right target 
    	/delay 2s 

| Open up entire inventory 
    /press i 
    /for Counter 0 to 7 
        /delay 2 
        /click right inventory @Counter 
    /next Counter 

    /finditem "Fire Opal Ring" 
    /delay 2 
    /if $find()==FALSE /goto :Done 
    /click left merchant sell 
    /delay 1s 

    :Done
    /return 
4. To clear out the jewelry bag before combine, any problems with this:
(in particular, the bolded text)

Code: Select all

Sub ClearJewelKit 

    /declare Counter local 

    /sendkey down shift 

    /for Counter 0 to 3 
	[b]/click left pack 7 @counter[/b]
        /delay 2 
        
	/autoinventory 
        /delay 2 
    /next Counter 

    /sendkey up shift 

/return 
5. Is there a difference between

/delay 2 and /delay 2s? (with and without the "s")

Shali
a ghoul
a ghoul
Posts: 87
Joined: Sun Dec 07, 2003 12:39 pm

re

Post by Shali » Fri Feb 13, 2004 12:36 pm

didnt include the full code that i would use for this, ill do that now i guess, this is what i usually do for my TS macros:


Code: Select all

#event Succeed "You have fashioned the items together to create something new"
#event Fail "You lacked the skills"


Sub Main

:makering

/sendkey down ctrl 

/finditem "silver bar" 
/delay 1 
/click left pack 7 0 

/finditem "fire opal" 
/delay 1 
/click left pack 7 1 

/click left pack 7 combine 
  :waitforcombine 
/doevents
/if n $return==1 /goto :makering
/goto :waitforcombine

Sub Event_Succeed
  :waitforring
/if "$cursor()"=="NULL" /goto :waitforring
/delay 2
/autoinventory
/return 1

Sub Event_Fail
/delay 2
/return 1

your clear bag code should work, i just use something that left clicks every slot and destroys for mine, but that works

and...

the /delays are in tenths of seconds so /delay 20 = /delay 2s
i was just using /delay 2 so it would have small delay between things, can mess up if its going as fast as possible sometimes, depending on your pc and lag it may have problems having a command 1/10th of a second after it does /finditem, whats easier to do is after the /finditem have :

Code: Select all

/finditem "silver bar"
/delay 1
/if "$cursor()"=="NULL" /delay 5
this way it will take a little longer, waiting an additional half a second between /finditem and clicking on kit slot, but this will only happen if it cant get it in the 1/10th of a second

MrSmallie
a hill giant
a hill giant
Posts: 167
Joined: Fri Oct 11, 2002 11:18 am

Post by MrSmallie » Fri Feb 13, 2004 12:59 pm

Code: Select all

/for Counter 0 to 9 
      /press esc 
       /next Counter
can be replaced with:

Code: Select all

/cleanup
Me
[img]http://home.comcast.net/~mrsmallie/ches.JPG[/img]

yoda
orc pawn
orc pawn
Posts: 19
Joined: Thu Feb 12, 2004 6:44 pm

Post by yoda » Tue Feb 17, 2004 2:17 pm

Thanks for all the help so far, haven't had the chance to do a proper test of anything as I am still putting on the finishing touches, but I have a new question, now that the patching is over.

When I right click on my Jewelry Kit, it now opens the "new" bag type tradeskill thing, which you can't drop items into slots. But there is a button you can push on that window that takes you back to the normal Jewelry bag. Does anyone know a way around this?

either maybe a way to close that new tradeskill bag, so the regular "old" bag is up, or maybe a way to set it up so that the "new" one doesnt come up and the old way will when it is first "right-clicked"

Thanks

MrSmallie
a hill giant
a hill giant
Posts: 167
Joined: Fri Oct 11, 2002 11:18 am

Post by MrSmallie » Tue Feb 17, 2004 2:25 pm

There's a check box to disable ctrl-rick click, or you can just cntl-right click.
Me
[img]http://home.comcast.net/~mrsmallie/ches.JPG[/img]

yoda
orc pawn
orc pawn
Posts: 19
Joined: Thu Feb 12, 2004 6:44 pm

Post by yoda » Tue Feb 17, 2004 2:40 pm

thanks