Combine.mac
Posted: Sun May 23, 2004 10:44 am
Assuming you have bought your materials, opened the appropriate container, and highlighted the correct recipie, it will combine that recipie until you run out of materials or reach [combines] if specified. It will then tell you how many combines succeeded and how many failed out of your total attempts, with percentages for both.
I have added a few variables to allow you to:
-stop combining when an item becomes trivial
-specify if you want the success report at the end
Once I figure out how to handle tools differently from the combined items, I also am planning to add support to:
-drop items if you dont wish to keep them (i.e. unfired pottery items)
-sell items to a vendor as you combine them
I will most likely be adding paramater support for these variables in the near future as well so you dont have to edit the variables each time.
I have added a few variables to allow you to:
-stop combining when an item becomes trivial
-specify if you want the success report at the end
Once I figure out how to handle tools differently from the combined items, I also am planning to add support to:
-drop items if you dont wish to keep them (i.e. unfired pottery items)
-sell items to a vendor as you combine them
I will most likely be adding paramater support for these variables in the near future as well so you dont have to edit the variables each time.
Code: Select all
| combine.mac : A Simple Combine macro
| Author : Chill
| Version : v1.2 23-Feb-2007 2:00AM EST
| Useage : /macro combine [combines] -- have tradeskill window open with recipie highlighted.
| /target yourself to pause the macro, target anything else (or nothing) to resume.
| Description : This macro will do the selected recipie until you run out of components or reach
[combines], pausing whenever you are targeted, and report success/fail rates when done.
#event done "Sorry, but you don't have everything you need for this recipe in your general inventory."
#event success "You have fashioned the items together to create something new:#*#"
#event failure "You lacked the skills to fashion the items together."
#event trivial "You can no longer advance your skill from making this item."
#event skillup "You have become better at#*#"
Sub Main(int max)
/declare triv int outer 0
/declare stats int outer 1
/declare dropit int outer 0
/declare sellit int outer 0
/declare skills int outer 0
/declare wins int outer 0
/declare fails int outer 0
/declare total int outer 0
/declare rate float outer 0
/doevents flush
:Loop
/if (${Target.ID}==${Me.ID}) {
/delay 60m ${Target.ID}!=${Me.ID}
}
/if (${Cursor.ID}) {
/if (${dropit}) /drop
/autoinventory
/goto :Loop
}
/if (${Defined[max]} && ${total} >= ${max}) /call Event_done
/nomodkey /notify TradeskillWnd CombineButton leftmouseup
/delay 2s ${Cursor.ID}
/doevents
/doevents trivial
/goto :Loop
/return
Sub ShowRate
/varcalc rate 100*${wins}/${total}
/echo (${wins}) of (${total}) combines succeeded (${rate}%).
/if (${fails}) {
/varcalc rate 100*${fails}/${total}
/echo (${fails}) of (${total}) combines failed (${rate}%).
}
/return
Sub Event_trivial
/if (${triv}) /call Event_done
/return
Sub Event_done
/if (${stats}) /call ShowRate
/endmacro
/return
Sub Event_success
/varcalc wins ${wins}+1
/varcalc total ${total}+1
/return
Sub Event_failure
/varcalc fails ${fails}+1
/varcalc total ${total}+1
/delay 5s
/return
Sub Event_skillup
/varcalc skills ${skills}+1
/return