QuickCombineV2.mac

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

Moderator: MacroQuest Developers

Gnits
a snow griffon
a snow griffon
Posts: 371
Joined: Fri Jun 03, 2005 7:56 pm

QuickCombineV2.mac

Post by Gnits » Sat Aug 07, 2010 11:08 am

I have worked with the original QuickCombine.mac to make it a little more informational. In the end, it does the exact same thing but it provides more information.

For those that are trying to skill up, I added a beep so you can keep up with the skill ups. For those making costly tradeskill items in quantity, i have created a section that tracks how much you recover via salvage. This is very useful when trying to determine cost and sale value.

Code: Select all


#event OutOfStuff 	"Sorry, but you don't have everything you need for this recipe in your general inventory." 
#event Com_Succeed	"You have fashioned the items together to create something new:#*#"
#event Com_Fail		"You lacked the skills to fashion the items together."
#event Com_Salvage	"#*#but you managed to recover #1#.#*#"
#event Com_Skillups	"You have become better at#*#"

Sub Main 
   /declare CombineAttempts int outer 0
   /declare CombineSkillups int outer 0
   /declare CombineSuccess int outer 0
   /declare CombineFails int outer 0
   /declare Salv[10] int outer 0
   /declare SalvItem[10] string outer 0
   /declare SalvItemCount[10] int outer 0
   /declare MultiCombine int outer 0

   /varset CombineAttempts 0
 
   /if (!${Defined[Param0]}) /return
   /echo Will make ${Param0} combine attempts!

  :Loop 

      /notify COMBW_CombineArea CombineButton leftmouseup
      /varset MultiCombine 0
      :WaitforCombineDone
      /if (!${Window[COMBW_CombineArea].Child[CombineButton].Enabled}) { 
         :ClearCursor 
         /if (${Cursor.ID}) { 
           /autoinventory
	   /doevents
           /goto :ClearCursor 
	   }
	 /doevents 
         /goto :WaitforCombineDone
      }
      /doevents
      /if (${Param0}==${CombineAttempts}) /call Event_OutofStuff
      /goto :Loop 

/return 

Sub Event_OutOfStuff
	/delay 2s
	/doevents
	/declare iLoop int 0
	/echo You have run out of a critical supply. Ending the macro.
	/echo -   You skilled up ${CombineSkillups} time(s).
	/echo -   Succeeded ${CombineSuccess} time(s) out of ${CombineAttempts} attempt(s).
	/for iLoop 1 to 10
		/if (${Salv[${iLoop}]}==1) {
			/echo -       You recovered ${SalvItemCount[${iLoop}]} of ${SalvItem[${iLoop}]}
			}
	/next iLoop
   	/endmacro 
	/return 

Sub Event_Com_Succeed
	/varcalc MultiCombine ${MultiCombine}+1
	/if (${MultiCombine}>1) /return
        /varcalc CombineAttempts ${CombineAttempts}+1
        /echo Attempt #${CombineAttempts}
	/ECHO Success!
	/varcalc CombineSuccess ${CombineSuccess}+1
	/return

Sub Event_Com_Fail
	/echo Fail!
        /varcalc CombineAttempts ${CombineAttempts}+1
        /echo Attempt #${CombineAttempts}
	/varcalc CombineFails ${CombineFails}+1
	/return

Sub Event_Com_Salvage(Junk,RecoveredItem)
	/declare iLoop int 0
	/for iLoop 1 to 10
		/if (${Salv[${iLoop}]}==1) {
			/if (${SalvItem[${iLoop}].Equal[${RecoveredItem}]}) {
				/varcalc SalvItemCount[${iLoop}] ${SalvItemCount[${iLoop}]}+1
				/echo Recovered another ${RecoveredItem}.
				/return
				}
			}

	/next iLoop
	/for iLoop 1 to 10
		/if (${Salv[${iLoop}]}==0) {
			/varcalc SalvItemCount[${iLoop}] ${SalvItemCount[${iLoop}]}+1
			/varset Salv[${iLoop}] 1
			/varset SalvItem[${iLoop}] ${RecoveredItem}
			/echo Recovered ${RecoveredItem}.
			/return
			}
	/next iLoop
	/return

Sub Event_Com_Skillups
	/echo Skillup!
	/beep
	/varcalc CombineSkillups ${CombineSkillups}+1
	/return

bardrogue
a lesser mummy
a lesser mummy
Posts: 58
Joined: Thu Oct 28, 2010 10:02 pm

Re: QuickCombineV2.mac

Post by bardrogue » Sat Oct 30, 2010 1:40 pm

Is there a way to get this to drop items on the ground if inventory is full?

User avatar
pms
a grimling bloodguard
a grimling bloodguard
Posts: 663
Joined: Mon Jan 31, 2005 5:20 pm
Location: Internet, Earth
Contact:

Re: QuickCombineV2.mac

Post by pms » Sat Oct 30, 2010 3:03 pm

Did you read the HoT patch notes?

bardrogue
a lesser mummy
a lesser mummy
Posts: 58
Joined: Thu Oct 28, 2010 10:02 pm

Re: QuickCombineV2.mac

Post by bardrogue » Sat Nov 06, 2010 8:49 pm

Not sure if you're referring to the EQ patch notes or MQ patch notes, but I guess the answer is no either way. (I only started eq back up after HoT release). I added my own event to stop attempting combines when the chat message appears about having no space in my inventory. I don't know how to do anything more with it, but at the time I was skilling up pottery and wanted to drop the stupid unstackable items rather than having to stop and sell every minute or so.

This macro is working fine otherwise with my change. I use it all the time if I have to click combine more than 5 times to save my wrists. :)

Code: Select all

#event FullOfStuff   "There are no open slots for the held item in your inventory."

Sub Event_FullOfStuff
   /echo Inventory is full!
   /endmac

bardrogue
a lesser mummy
a lesser mummy
Posts: 58
Joined: Thu Oct 28, 2010 10:02 pm

Re: QuickCombineV2.mac

Post by bardrogue » Thu Dec 09, 2010 3:11 pm

Today is the first time I tried this macro since latest zip and it seems that it no longer puts items inventory when they appear on the cursor. Any quick fix to this or do I need to get that cursor plugin going?