Page 1 of 1

Vanilla TS with INI support for destroying crap

Posted: Tue May 18, 2004 12:59 pm
by demiourgos
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

Posted: Wed May 19, 2004 2:53 pm
by Space-Boy
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

Posted: Wed May 19, 2004 4:57 pm
by Amoro
TY Spaceboy. Just came on to look for that.

Awesome Product Site

Posted: Fri Aug 18, 2023 4:29 pm
by FrankJScott
Why don't you Google it! before you post

Top Rated Top Rated Product Tips Blog

Posted: Tue Sep 12, 2023 7:36 pm
by FrankJScott
Please use Google before posting New Awesome Product Advice Tips ec9a89a