Page 1 of 6

Jar of Clockwork Grease

Posted: Sun Mar 13, 2005 2:46 pm
by dedpoet
I have gotten frustrated trying to make a macro makes a Jar of Clockwork Grease. There was some discussion of it here, but it seems to have died. I find that I just don't know my way around the notify and window commands to get this working properly, as all of my experience is in bot scripting, not working with the UI. I've been trying to sort through all of the tradeskill macros and have just found myself confused. Any help is appreciated - here is what I have. Don't laugh too hard. I know the "/itemnotify enviro" commands are wrong to begin with.

Wiki page is started for this macro [[Clockwork Grease Maker|here]].

Code: Select all

| Grease.mac - attempts to make a Jar of Clockwork Grease until out of components.
| Assumes the first container will go into your first inventory slot for the next step.
| Stand between the pottery wheel and the kiln and run grease.mac

#turbo

Sub Main

| Let's make an Unfired Small Container
	:GreaseLoop

	/itemtarget Pottery Wheel
	/face item
	/nomodkey /click left item
	/delay 2s
	/nomodkey /notify TradeskillWnd ExperimentButton leftmouseup
	/delay 25
	
	/if (!${FindItem[Water Flask].ID}) /goto :Done
	/nomodkey /ctrl /itemnotify ${FindItem[Water Flask].ID}
	/itemnotify enviro leftmouseup
      	
	/if (!${FindItem[Block of Clay].ID}) /goto :Done
	/nomodkey /ctrl /itemnotify ${FindItem[Block of Clay].ID}
	/itemnotify enviro leftmouseup
   
	/if (!${FindItem[Small Jar Sketch].ID}) /goto :Done
	/nomodkey /ctrl /itemnotify ${FindItem[Small Jar Sketch].ID}
	/itemnotify enviro leftmouseup

	/doevents flush
	/itemnotify enviro leftmouseup combine
      
	/call ClearCursor
	/delay 10
	/itemnotify enviro leftmouseup close
	/delay 10

| Let's make it into a Small Clay Jar

	/itemtarget Kiln
	/face item
	/nomodkey /click left item
	/delay 2s
	/nomodkey /notify TradeskillWnd ExperimentButton leftmouseup
	/delay 25

	/if (!${FindItem[Unfired Small Container].ID}) /goto :Done
	/nomodkey /ctrl /itemnotify ${FindItem[Unfired Small Container].ID}
	/itemnotify enviro leftmouseup
  	
	/if (!${FindItem[Quality Firing Sheet].ID}) /goto :Done
	/nomodkey /ctrl /itemnotify ${FindItem[Qualtiy Firing Sheet].ID}
	/itemnotify enviro leftmouseup

	/doevents flush
	/itemnotify enviro leftmouseup combine
      
	/call ClearCursor
	/delay 10
	/itemnotify enviro leftmouseup close
	/delay 30
   
| Open our new jar and put 2 greases in it
   
	/itemnotify pack1 rightmouseup
	/delay 20
   
	/if (!${FindItem[Clockwork Grease].ID}) /goto :Done
	/nomodkey /ctrl /itemnotify ${FindItem[Clockwork Grease].ID}
	/itemnotify enviro leftmouseup

	/if (!${FindItem[Clockwork Grease].ID}) /goto :Done
	/nomodkey /ctrl /itemnotify ${FindItem[Clockwork Grease].ID}
	/itemnotify enviro leftmouseup
  	
	/doevents flush
	/itemnotify enviro leftmouseup combine

	/call ClearCursor
	/delay 10
	/itemnotify enviro leftmouseup close
	/delay 30

| We should have a grease.  Let's start over.
	/goto :GreaseLoop

| When we run out of components.
	:Done
	/echo We're out of components.  Ending macro.
	/beep
	/end
   
/return



sub ClearCursor 
	:Loop 
		/if (!${Cursor.ID}) /return 
		/autoinv 
		/delay 5 
		/doevents 
		/goto :Loop
/return

Posted: Sun Mar 13, 2005 3:24 pm
by JJ
One thing that will help is doing a leftmouseup on your

Code: Select all

/nomodkey /ctrl /itemnotify ${FindItem[].ID}
lines.

You'll also want to find the name of your window to work with the close and combine buttons.

One of those you might be looking for is

Code: Select all

/notify TradeSkillWnd COMBW_ExperimentButton leftmouseup
The way you can figure these things out is just type /window and look at all the available windows. Then do a /window again on any of the sub windows to find the buttons associated with each window.

Posted: Sun Mar 13, 2005 4:37 pm
by dedpoet
Thanks, JJ. That's the push I may need to get this working. Will update the code and the wiki page when I get it.

Posted: Tue Mar 22, 2005 1:03 am
by dedpoet
I realize that this seems trivial, but all of the tradeskill macros already out there either use the new UI window or are very generic and are completely burying me in variables and subroutines. It drives me insane that I can write a shaman bot that can run for hours on end in my group, but I can't close a damned environmental container...

Here is where I'm at. It's just the first step, since the others are more or less the same:

Code: Select all

| Let's make an Unfired Small Container
    /call OpenPacks
    /delay 2s

	:GreaseLoop

	/itemtarget Pottery Wheel
	/face item
	/nomodkey /click left item
	/delay 2s
	/nomodkey /notify TradeSkillWnd COMBW_ExperimentButton leftmouseup
	/delay 25
	
	/if (!${FindItem[Water Flask].InvSlot}) /goto :Done
	/nomodkey /ctrl /itemnotify ${FindItem[Water Flask].InvSlot} leftmouseup
	/nomodkey /itemnotify enviro1 leftmouseup
	
	/if (!${FindItem[Block of Clay].InvSlot}) /goto :Done
	/nomodkey /ctrl /itemnotify ${FindItem[Block of Clay].InvSlot} leftmouseup
	/nomodkey /itemnotify enviro2 leftmouseup
   
	/if (!${FindItem[Small Jar Sketch].InvSlot}) /goto :Done
	/nomodkey /ctrl /itemnotify ${FindItem[Small Jar Sketch].InvSlot} leftmouseup
	/nomodkey /itemnotify enviro3 leftmouseup

	/doevents flush
	/combine enviro
	/delay 10
      
	/call ClearCursor
	/delay 10
	[color=#FFFF00][b]/notify TradeSkillWnd COMBW_DoneButton leftmouseup[/b][/color]
	/delay 10
This is opening all my packs, opening the pottery wheel, hitting the experiment button, putting the 3 ingrediants into the wheel, combining them, and putting the finished product in my inventory. Yay me. My problem is that it's not closing the pottery wheel when it's done. Even worse, the pottery wheel is outright disappearing on me after this. I can't see it, can't target it, can't interact with it. If I zone out and in, it comes back. It's making me nervous.

The line in bold isn't right. I've tried /window on everything that looks like a tradeskill window, and it all looks related to the new TS windows to me. Searches of these boards find plenty of hits on DoneButton, but mostly in MerchantWnd or LootWnd. Any words of wisdom? How does my horrible hacking look otherwise?

Posted: Tue Mar 22, 2005 4:26 am
by JJ
Are you sure it's still a tradeskill window? After you hit the experiment button, the tradeskill window closes and the "other" window opens. Brew Barrel, Mixing Bowl, etc. I'm looking to see what window is in control, but I can tell you that once you hit experiment, you are no longer working with TradeSkillWnd so don't even bother.

Is it feasable for you to move out of range to let it automatically close the window?

EDIT: Better yet, how about /nomodkey /keypress esc

Posted: Tue Mar 22, 2005 3:31 pm
by sloth
here is what i had to do to make jar of clockwork grease, first get all the stuff you need then head over to the potterywheel and run this macro

Code: Select all

unitrade.mac 

Sub Main 
:endlessloop 
/if (${Window[TradeSkillWnd].Open}) { 
/delay 1 
/notify COMBW_CombineArea COMBW_CombineButton leftmouseup 
:clearmore 
/if (${Cursor.ID}) { 
/autoinv 
/delay 1 
/goto :clearmore 
} 
} 
/goto :endlessloop 
/return
then run over to the kiln and run this macro(this isthe one i edited out to work). No its not the best and no it dont' stop on its own nor does it run to good, but it works for me. i'm sorry but i can't help you if it dont' work cuz i dont' know much about macros.

Code: Select all

#event OutOfStuff "Sorry, but you don't have everything you need for this recipe in your general inventory." 
#event Out "Couldn't find a" 
#event empty "Your hands must be empty to find an item." 
#event NoRoom "There was no place to put that! The item has dropped to the ground!" 

Sub Main 
   :mainLoop 

      :ClearCursor 
      /if (${Cursor.ID}) { 
         /autoinventory 
         /goto :ClearCursor 
      } 
       /notify COMBW_CombineArea CombineButton leftmouseup 
	/delay 2s
 	/autoinventory 
   /call openpacks
       /delay 3s
   
      /ctrl /itemnotify ${FindItem[=clockwork grease].InvSlot} leftmouseup 
	/delay 2
      /itemnotify in pack8 1 leftmouseup
        /delay 2
      /ctrl /itemnotify ${FindItem[=clockwork grease].InvSlot} leftmouseup
        /delay 2
      /itemnotify in pack8 2 leftmouseup    
        /delay 2 
       /combine pack 8
       /delay 2
       /autoinv

      
      /goto :mainLoop   
/return 




Sub Event_OutOfStuff 
   /endmacro 
/return

Sub Event_out
   /endmacro 
/return

Sub Event_empty
   /endmacro 
/return

Sub Event_noroom
   /endmacro 
/return

Sub OpenPacks 
   /declare bag int local 0 

   /newif (!${Window[InventoryWindow].Open}) /keypress inventory 
   /delay 1 
   /for bag 1 to 8 step 1 
      /newif (!${Window[pack${bag}].Open}) /itemnotify pack${bag} rightmouseup 
   /next bag 
   /delay 1 
/return 



Sub ClosePacks 
   /declare bag int local 0 

   /newif (!${Window[InventoryWindow].Open}} /keypress inventory 
   /delay 1 
   /for bag 1 to 8 step 1 
      /newif (${Window[pack${bag}].Open}) /itemnotify pack${bag} rightmouseup 
   /next bag 
   /delay 1 
/return 

Posted: Tue Mar 22, 2005 3:35 pm
by sloth
forgot to mention for this to work, you need to have pack number 8 empty

Posted: Tue Mar 22, 2005 4:28 pm
by dedpoet
Sloth, you probably beat me by just a few hours in posting my own. I have everything working except the final combine of the two greases, and I believe I just solved that a couple of minutes ago. I'll test tonight and post my version if it works, as well.

Posted: Tue Mar 22, 2005 8:34 pm
by dedpoet
Posted my version to the macro depot. Thanks again, JJ and Override.

Re: Jar of Clockwork Grease

Posted: Wed Apr 30, 2025 10:24 pm
by xyilla

Re: Jar of Clockwork Grease

Posted: Wed Apr 30, 2025 11:01 pm
by xyilla

Re: Jar of Clockwork Grease

Posted: Wed Apr 30, 2025 11:02 pm
by xyilla

Re: Jar of Clockwork Grease

Posted: Wed Apr 30, 2025 11:03 pm
by xyilla

Re: Jar of Clockwork Grease

Posted: Wed Apr 30, 2025 11:04 pm
by xyilla

Re: Jar of Clockwork Grease

Posted: Wed Apr 30, 2025 11:05 pm
by xyilla