Yesterday I began doing some jewelcrafting, and was switching combines a lot, and I wrote this while I was doing it to help me. Hopefully I've got all the bugs out of it. =P
Its not the prettiest code. I'm a programmer, and if I werent lazy I'd make it look a little nicer, and probably do some things different. Oh fricken well =P
Hopefully you guys will like it. I use it a lot now, personally =)
trackts.mac -
Code: Select all
|trackts.mac
|By rkinasz
|October 30, 2006
|Version 1.0 - Has had many minor revisions/additions throughout the day, but it is pretty much complete.
|
|Objective: Track number of successes, failures, salvages, and skill ups while tradeskilling.
| Help with tradeskilling in general.
|
|Commands:
| /docombines - does the currently selected combine until you are out of components.
| /showprogress - displays the current number of successes, failures, salvages, and skill ups
| and the rate they are happening at (averaged out since you started).
| /reset - resets current progress.
|
| If you want to make it autodestroy your results, do a /varset destroy 1. There is no command
| to do this for you. I'd rather it only get set when you really want it set =).
|
|Notes: This macro does not account for skill ups in things other than the tradeskill
| you are working on. If you are working on pottery, and have this running, and
| get a skill up in swimming (hey, im sure it happens!) it will add to your skill
| up total. Oh well.
|
| The variables are global. If you start the macro, and do some combines, then /endm and
| restart it, the progress will be where you left off. /reset if you want.
#event Success "You have fashioned the items#*#"
#event Failure "You lacked the skills#*#"
#event Skillup "You have become better at#*#"
#event Salvage "You failed the combine, but you managed#*#"
#event OutOfStuff "Sorry, but you don't have everything#*#"
#turbo
Sub Main
/if (${Defined[showprog]}==0) {
/declare showprog int global 0
/declare successes int global
/declare failures int global
/declare skillups int global
/declare salvages int global
/declare destroy int global 0
/declare reset int global 0
/declare docombines int global 0
}
/alias /docombines /varset docombines 1
/alias /showprogress /varset showprog 1
/alias /reset /varset reset 1
/varset showprog 0
/echo rkinasz's tradeskill tracker has started.
:loop
/doevents
/if ((${showprog}==1) && (${Math.Calc[${successes}+${failures}]}>0)) {
/echo Current Tradeskill Progress
/echo Total combines: ${Math.Calc[${successes}+${failures}]}
/echo Successes: ${successes} at ${Math.Calc[(${successes}/(${successes}+${failures}))*100]}%
/echo Failures: ${failures} at ${Math.Calc[(${failures}/(${successes}+${failures}))*100]}%
/echo Skillups: ${skillups} at ${Math.Calc[(${skillups}/(${successes}+${failures}))*100]}%
/if (${failures}==0) {
/echo Salvages: ${salvages} at 0.00%
} else {
/echo Salvages: ${salvages} at ${Math.Calc[(${salvages}/${failures})*100]}%
}
/varset showprog 0
}
/if (${docombines}==1) {
/if (${Cursor.ID}) {
/autoinventory
/goto :ClearCursor
}
/notify TradeskillWnd CombineButton leftmouseup
/doevents
/delay 2
/notify TradeskillWnd AutoInvButton leftmouseup
}
/if (${reset}==1) {
/varset successes 0
/varset failures 0
/varset salvages 0
/varset skillups 0
/varset reset 0
}
/goto :loop
/return
Sub Event_OutOfStuff
/varset docombines 0
/return
Sub Event_Success
/varset successes ${Math.Calc[${successes}+1]}
/delay 5
/if (${destroy}==1) /destroy
/autoinv
/return
Sub Event_Failure
/varset failures ${Math.Calc[${failures}+1]}
/return
Sub Event_Skillup
/varset skillups ${Math.Calc[${skillups}+1]}
/return
Sub Event_Salvage
/varset salvages ${Math.Calc[${salvages}+1]}
/return

