Ok guys... downloaded the tradeskill bot posted by akan (i think it was him)... did all the stuff he said to correctly (i think)...but a) it doesnt start on its own... b) it only counters for heat spikes and stuff. Any one give me any tips as to get it to start on its own? and loop so it keeps going... ill paste my coding for it, can u tell me if anything is wrong? thanks
//Tradeskill Bot v.0.8.5
//Created by Ak'anon
// Special thanks to Tarball for his help. Without it, this macro would not be what it is.
//
//Precondition:
// * Hotbar 0 contains the recipes that you would like to make, in order. These must all use the same
// aparatus.
//
// Postcondition:
// * You should have performed a number of combines equal to CountTo * (LastRecipe-Recipe+1)
//
// CHANGELOG:
// 11/26/2004 - Fixed a bug in the alchemy.mac file that caused lockups on execution
// 12/05/2004 - Macro now closes all windows before beginning the next combine. This fixes an error caused
// when a dialog box would pop up over the 'Begin' button
// 01/07/2005 - Lots of updates! The bot now uses /useability to use the proper reactions rather than
// requireing the hotkeys to be set up properly. Removed repetitive checking for events that was causing
// problems on most (all?) machines. Streamlined code & based it upon the MacrossUI that is in the works.
// 01/23/2005 - Added 3 additional 500 ms delays in repeat to fix laggy mouse.
// 02/
Constants
AbilityFlags=0 //Used to randomly select an ability to use
MouseX=0
MouseY=0
ItemsMade=0 //Variable used to track how many times we've made a certain item
RepeatTimer = 0 //Used to track how long it's been since the last call to CheckForRepeat
ReuseTimer = 0
Skill = 0
RValue = 0
GValue = 0
BValue = 0
AbilityFile = Abilities.inc
LastSkill = 0
End
Constructs
AbilityList = List
End
INCLUDE Tradeskill.ini
INCLUDE EQ2Companion.mac //LocBot, HP, and PP functionality
ListLoad AbilityList, $AbilityFile
//SetActiveWindow EverQuest II*
KeyRate $KeyDelay
Delay 5000
Keys ~0
Keys $Recipe
Delay 1000
MousePos $RepeatX, $RepeatY
Delay 1000
LeftClick
Delay 1000
MousePos 750, 400
While 1=1
ProcessMessages
If $RepeatTimer >= $RestDelay
Call CheckForRepeat
End
Delay 500
End
Procedure RestUntilFull
While $CurHP < $MaxHP OR $CurPP < $MaxPP
Delay $RestDelay sec
End
End
//As checking for the repeat isnt really a time sensitive task, I have increased the amount of time between
//sampling for it to the full Rest delay.
Procedure CheckForRepeat //When $RepeatTimer >= $RestDelay
LoadRGB $RepeatX, $RepeatY
SetConst RValue = {RGBRED}
SetConst GValue = {RGBGREEN}
SetConst BValue = {RGBBLUE}
//Check to see if out of ingredients
While $BValue > 235 AND $Recipe <= $LastRecipe
TimeStamp Ran out of resources on recipe $Recipe after $ItemsMade combines. Moving on to the next...
COMPUTE Recipe = $Recipe + 1
SetConst ItemsMade = 0
Keys $Recipe
Delay 1000
LoadRGB $RepeatX, $RepeatY
SetConst RValue = {RGBRED}
SetConst GValue = {RGBGREEN}
SetConst BValue = {RGBBLUE}
End
//Check to see if the repeat or begin button is up
If $GValue > 225 AND $RValue < 30
COMPUTE ItemsMade = $ItemsMade + 1
Keys {ESC}{ESC}{ESC}{TAB}
//Close all open windows
Keys ~0
Delay 1000
If $ItemsMade >= $CountTo
TimeStamp Completed crafting $ItemsMade combines with recipe $Recipe
COMPUTE Recipe = $Recipe + 1
SetConst ItemsMade = 0
End
Call RestUntilFull
Keys $Recipe
Delay 1000
MousePos $RepeatX, $RepeatY
Delay 500
Delay 500
Delay 500
Delay 500
//Meant to compensate for strange delay times here - HACK, FIX
LeftClick
Delay 500
MousePos 750, 400
End
SetConst RepeatTimer = 0
If $Recipe > $LastRecipe
TimeStamp Macro finished sucessfully.
Keys {ESC}{ESC}{ESC}{ESC}
TimeStamp Now camping character. Please standby for 30 seconds...
Say /camp desktop
Delay 30 sec
Stop
//Camps character & ends macro
End
End
Procedure CheckForEvent every $DelayTime sec
//MUCH more streamlined than the previous version. Now only checks a specified number of times
//per second rather than spamming the screen for updates.
LoadRGB $EventX, $EventY
COMPUTE RValue = Trunc( {RGBRED} / 64)
COMPUTE GValue = Trunc( {RGBGREEN} / 64)
COMPUTE BValue = Trunc( {RGBBLUE} / 64)
COMPUTE Skill = ($RValue * 3) + ($GValue * 9) + $BValue - 12
//This is the way a computer actually stores a three-dimensional array in memory.
//We use this to transform the single-dimensional ACTool List into a 3-dimensional
//array that works best for our purposes.
//The -13 is to account for the fact that we never have a 0 condition at this point. This keeps us from
//having to store empty items in the array, since they will never be used.
If $Skill > 0
Say /useability AbilityList[$Skill]
SetConst LastSkill = $Skill
SetConst ReuseTimer = 0
Else
If $LastSkill > 0 AND $ReuseTimer >= 5
Say /useability AbilityList[$LastSkill]
SetConst ReuseTimer = 0
End
End
COMPUTE RepeatTimer = $RepeatTimer + $DelayTime
COMPUTE ReuseTimer = $ReuseTimer + $DelayTime
End
|