My Tradeskill Combine Mac (Working)

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

My Tradeskill Combine Mac (Working)

Post by Fuergrissa » Sun May 02, 2004 12:04 pm

enjoy, you have to open your container and pick your recipe first.
If you want it to carry on after you trivial on something delete the event -

Code: Select all

#Event SkillTrivial "#*#You can no longer advance your skill from making this item#*#"

Code: Select all

|===========================================|
| V2.1                                      |
|___________________________________________|
|fletch.mac MQ2Data Compliant by Fuergrissa |
|#Events updated 12-05-04                   |
|___________________________________________|

#Event SkillUp "You have become better at #1#! (#2#)" 
#Event nocomp "#*#You are missing#*#"
#Event SkillTrivial "#*#You can no longer advance your skill from making this item#*#"
#Event FullInventory "#*#There was no place to put that#*#" 
#Event SkillFailure "#*#You lacked the skills#*#" 
#Event SkillSuccess "#*#You have fashioned the items together to create something new#*#" 

Sub Main

      /declare SkillFailCounter int outer
      /declare SkillSuccessCounter int outer
      /declare SuccessRate int outer 
      /declare TotalAttempts int outer 
      
      /varset SkillFailCounter 0 
      /varset SkillSuccessCounter 0
      /varset SuccessRate 0 
      /varset TotalAttempts 0 

   :mainloop
      /doevents
      /call Combine
      /goto :mainloop
      /end

Sub Combine
      /notify COMBW_CombineArea CombineButton leftmouseup
      /delay 2
      /if (${Cursor.ID}) /autoinv
      /return

Sub DisplayStats 


      /echo Combine Statistics - Successes: ${SkillSuccessCounter}, Failures: ${SkillFailCounter}
      /varcalc TotalAttempts ${SkillFailCounter} + ${SkillSuccessCounter} 
      /varcalc SuccessRate ${SkillSuccessCounter} / ${TotalAttempts} * 100 
      /echo Success Rate: ${SuccessRate} % out of ${TotalAttempts} attempts
      /return 

Sub Event_SkillUp(SkillUpText,TheSkill,int Amount)
      /popup ${TheSkill} increased - ${Amount}
      /echo ${TheSkill} increased - ${Amount}
      /return 
      
Sub Event_nocomp
      /echo "You have run out of Componants. ((Ending Macro)) "
      /popup You have run out of Componants. ((Ending Macro))   
      /if (${Cursor.ID}) /autoinv
      /call DisplayStats
      /end

Sub Event_SkillTrivial
      /echo "You can no longer advance your skill from making this item. ((Ending Macro))"
      /popup You can no longer advance your skill from making this item. ((Ending Macro))   
      /if (${Cursor.ID}) /autoinv
      /call DisplayStats
      /end

Sub Event_FullInventory 
      /echo "Your inventory is full, ((( Ending Macro ))) "
      /popup Your inventory is full, ((( Ending Macro )))
      /call DisplayStats 
      /end 

Sub Event_SkillFailure
      /varcalc SkillFailCounter ${SkillFailCounter}+1
      /return 

Sub Event_SkillSuccess  
      /varcalc SkillSuccessCounter ${SkillSuccessCounter}+1
      /return 
Last edited by Fuergrissa on Thu May 20, 2004 4:12 am, edited 6 times in total.

DumbStruck
a ghoul
a ghoul
Posts: 125
Joined: Fri Apr 30, 2004 8:46 am

hmmm

Post by DumbStruck » Sun May 02, 2004 11:51 pm

I got error subroutine main not found . i dont see it stating anything about the enviro container etc ?

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Mon May 03, 2004 4:15 am

i missed a line in the instructions at the top, you have to open your container and choose your recipe first. then run the macro.
this mac will report skill ups and give you a small report on stats.

DumbStruck
a ghoul
a ghoul
Posts: 125
Joined: Fri Apr 30, 2004 8:46 am

hmm

Post by DumbStruck » Mon May 03, 2004 11:09 am

I did have the window opened and had the receipe highllighted have u tested it ?

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Mon May 03, 2004 11:35 am

i use it all the time, it works perfectly.
I stand infront of the fletching merchant, open my planar fletching kit, choose recipe, buy 100 of each item then type
/macro fletch

wait untill it ends.

DumbStruck
a ghoul
a ghoul
Posts: 125
Joined: Fri Apr 30, 2004 8:46 am

ahhh see

Post by DumbStruck » Mon May 03, 2004 1:04 pm

there inlies the problem .

U say a generic ts macro . when in fact its for fletching . i was trying to use it for a brewing combine . so i guess some where it would need to know it was an enviro windo rather then a pack window .

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Mon May 03, 2004 1:37 pm

my apoligies, post heading corrected.

Joeur
decaying skeleton
decaying skeleton
Posts: 3
Joined: Mon Jan 05, 2004 1:00 am

Post by Joeur » Sat May 08, 2004 5:06 pm

works perfectly for me, with any tradeskill UI window.

Only problem is if MQ is loaded after the character is,
then you'll get a error message about "cannot send notification
to COMBW_CombineArea CombineButton" and the macro will
loop without doing anything.

Just wanted to point that out, so if anybody else gets that error, they just need to camp out & back in, and it will work.

DumbStruck
a ghoul
a ghoul
Posts: 125
Joined: Fri Apr 30, 2004 8:46 am

Post by DumbStruck » Sun May 09, 2004 1:31 pm

My bad .. This macro works great i finally realised im a noob . and was saving file under wrong format .. wasnt using ansi .

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Sun May 09, 2004 1:34 pm

as long as it works and people can get some use out of it, im a happy chappy.

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Fri May 14, 2004 2:36 pm

updated events

Mano
decaying skeleton
decaying skeleton
Posts: 2
Joined: Mon Jul 18, 2005 2:30 am

Post by Mano » Sat Oct 22, 2005 10:53 pm

your a god rocking my domain :wink:

Davef139
orc pawn
orc pawn
Posts: 15
Joined: Sun Sep 29, 2002 6:08 pm

Post by Davef139 » Wed Nov 09, 2005 11:15 pm

heres a general TS macro that you just run once selected item.
Downloaded this ages ago..

Code: Select all

#event OutOfStuff "Sorry, but you don't have everything you need for this recipe in your general inventory." 

Sub Main 
   :Loop 

      :ClearCursor 
      /if (${Cursor.ID}) { 
         /autoinventory 
         /goto :ClearCursor 
      } 

      /notify TradeskillWnd CombineButton leftmouseup 
      /doevents 
      /goto :Loop 
/return 

Sub Event_OutOfStuff 
   /endmacro 
/return
[/code]

inspiron
a lesser mummy
a lesser mummy
Posts: 44
Joined: Wed Feb 01, 2006 11:15 am

Post by inspiron » Tue Mar 21, 2006 4:39 pm

This macro no longer works for me any ideas whats wrong with the code? Just ends the macro soon as I start it.

Slackro
a lesser mummy
a lesser mummy
Posts: 46
Joined: Sun Apr 17, 2005 2:30 pm

Post by Slackro » Fri Mar 24, 2006 2:11 am

Replacing

Code: Select all

/notify COMBW_CombineArea CombineButton leftmouseup
with

Code: Select all

/notify TradeskillWnd CombineButton leftmouseup
(in sub combine) fixed Fuergrissa's .mac for me.