Vanilla TS with INI support for destroying crap

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

Moderator: MacroQuest Developers

demiourgos
orc pawn
orc pawn
Posts: 11
Joined: Tue May 18, 2004 12:48 pm

Vanilla TS with INI support for destroying crap

Post by demiourgos » Tue May 18, 2004 12:59 pm

Very first post and I want to say at the outset: I take absolutely no credit for this, I just cut and pasted Meatball's Vanilla TS macro and sections of game_slave's Forager w/ INI support macro.

If you are a PLer with the tradeskills and you are tired of clicking combine and tired of all that shit you are making and their byproducts filling up your inv, then this is for you. All it does is click combine, then on a success it checks the ini file for information on whether or not to destroy the item or inventory, rinse and repeat. The INI support is completely to the credit of game_slave, it will automatically list everything that appears on your cursor and add a -1 for safekeeping. If you want it to be destroyed, open up the trade.ini and change the -1 to 0.

I want to stress again, this is not my work, only pasted elements from Meatball and game_slave. I am only posting it cause i have found it so very useful.

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}) /call itemsort
      


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


 sub ItemSort 
  /delay 5 

  /if (!${Ini[trade.ini,TradeList,${Cursor.Name}].Length}) { 
    /ini "trade.ini" "TradeList" "${Cursor.Name}" "-1" 
  } else { 
    /if (${Ini[trade.ini,TradeList,${Cursor.Name}]}) { 
      /if (${FindItemCount["=${Cursor.Name}"]}>=${Ini[trade.ini,TradeList,${Cursor.Name}]} && ${Ini[trade.ini,TradeList,${Cursor.Name}]}!=-1) /goto :Destroy 
    } else { 
      :Destroy 
      /echo Destroying ${Cursor.Name} 
      /destroy 
      /return 
  } 
   } 
  :LootIt 
     /echo Keeping ${Cursor.Name} 
    /autoinventory 
    /delay 5 
    /if (${Cursor.ID}) /goto :LootIt 
/return      


Sub Event_OutOfStuff 
   /endmacro 
/return


EDIT: careful with this. I've just noticed a problem with similar names. I set it up to save Unfired Poison Vials and destroy Unfired Medium Bowls and ended up destroying both. It is still useful with dissimilar names, but if one of you coding wizards could explain why this is happening, i would be very appreciative.

EDIT: Further testing reveals that when a combine returns multiple items the macro will only process the first item on the cursor and just autoinv the rest. Which pretty much makes it completely ineffective for complex recipes. Any help with this?

EDIT: Added changes recommended by Space Boy
Last edited by demiourgos on Thu May 20, 2004 1:06 am, edited 1 time in total.

Space-Boy
a hill giant
a hill giant
Posts: 242
Joined: Wed Dec 04, 2002 12:53 pm
Contact:

Post by Space-Boy » Wed May 19, 2004 2:53 pm

new syntax on the combine it seems

Code: Select all

/notify TradeskillWnd CombineButton leftmouseup
no longer works

this does though =)

Code: Select all

/notify COMBW_CombineArea CombineButton leftmouseup 
happy combining
You have gotten better at Carpal Tunnel! (247)

Amoro
decaying skeleton
decaying skeleton
Posts: 3
Joined: Tue May 11, 2004 3:10 pm

Post by Amoro » Wed May 19, 2004 4:57 pm

TY Spaceboy. Just came on to look for that.

FrankJScott
naggy
naggy
Posts: 2365
Joined: Sun Feb 19, 2023 7:11 am

Awesome Product Site

Post by FrankJScott » Fri Aug 18, 2023 4:29 pm

Why don't you Google it! before you post

FrankJScott
naggy
naggy
Posts: 2365
Joined: Sun Feb 19, 2023 7:11 am

Top Rated Top Rated Product Tips Blog

Post by FrankJScott » Tue Sep 12, 2023 7:36 pm

Please use Google before posting New Awesome Product Advice Tips ec9a89a