Code:
// WoW Melee Bot Beta 1 // This version will use ranged attack to pull mobs // it will then look for the corpse if it is not // in the first most likely area SETActiveWindow World of Warcraft delay 5 sec //RESOLUTION: 1280x1024 // remap this script using object mapper if you need this // to run in 1024x768 resolution Constants StateTarget = 1 StateKill = 2 StateLoot = 3 StateMoveForward = 4 CurrentState = 1 // defaulted to 1 so the first action is to try target a mob Handled = 0 Skinner = 1 //change this to 0 if you are not a skinner, 1 if you are MobBarRed = 1 // MobHP used for temporary storage of color info MobBarGrn = 1 // MobHP used for temporary storage of color info MobBarBlu = 1 // MobHP used for temporary storage of color info LootBarRed = 1 //Loot window red (near X) //Mob COLORS// //MobAliveRed = 0 End //of constants Processmessages // make sure we get debug info in test log tab While 1=1 TimeStamp Debug: Resolving state - current state = $CurrentState Set $Handled = 0 //Handle state Target //Eventually we will want to add a State of Skinning but for time sake I am leaving it as is. If $CurrentState = $StateTarget Call Target1 Inc Handled End If $Handled = 0 And $CurrentState = $StateKill Call Kill Inc Handled End If $Handled = 0 And $CurrentState = $StateLoot Call Loot1 End If $Handled = 0 And $CurrentState = $StateMoveForward Call MoveForward Set $CurrentState = $StateTarget End End ///////////////////////////////////////////////// ///////////////////////////////////////////////// Procedure Target1 //SETActiveWindow World of Warcraft Set $MobBarRed = 1 // grab value of red in pixel to see if we have a mob hitpoint bar Keys {TAB} //Timestamp Debug: This is the start of Target Delay 500 Call IsMob If $MobBarRed = 0 //Timestamp Debug: We have a mob! Set $CurrentState = $StateKill Else Set $CurrentState = $StateMoveForward End // End if statement End // End Procedure Target1 Procedure IsMob LoadRGB 310, 60 // grab red, green and blue color value from this pixel Set $MobBarRed = {RGBRED} // grab value of red in pixel to see if we have a mob hitpoint bar End Procedure Kill iCount = 1 While $iCount = 1 //Timestamp Debug: We have a mob, here we go! Keys 1 // Fires ranged attack in hotkey 1 Delay 3000 // delay 3 seconds Call MoveBack // Moves character backwards incase of misalignment with foe Keys 2 // Fires special attack in hotkey 2 Delay 2500 Keys 2 // Fires special attack in hotkey 2 again Delay 2500 Keys 3 // Fires finishing attack in hotkey 3 Delay 2500 Keys 3 // Fires finishing attack in hotkey 3 again Delay 2000 Delay 500 Set $MobBarRed = 1 // MobHP used for temporary storage of color info Delay 1500 Call IsMob //TimeStamp Debug: Mobs bar color is $MobHP If $MobBarRed > 0 // If Mob HP Bar no longer exists then loot Set $iCount = 0 // Set Count to end the While Set $CurrentState = $StateLoot End // End If End // End While //Call Loot1 // loot section starts End // End Procedure Kill Procedure Loot1 //First corpse select MousePos 450, 625 // move mouse over first spot for a corpse RightClick // loot corpse Delay 1000 LoadRGB 210, 148 // grab red, green and blue color value from this pixel Set $LootBarRed = {RGBRED} // grab value of red in pixel to see if we have a mob hitpoint bar //TimeStamp Debug: Mobs bar color is $MobHP If $LootBarRed = 134 MousePos 50, 245 // move to and click first loot spot (top) LeftClick Delay 1000 MousePos 50, 290 // move to and click second loot spot (one down from top) LeftClick Delay 1000 MousePos 210, 155 // click on the X of loot window to close it LeftClick // if nothing was on corpse Delay 1000 Call Skin1 Else Set LootBarRed = 1 Call Loot2 End // End If End // End Procedure Loot1 Procedure Loot2 //Second corpse select MousePos 605, 625 // move mouse over most likely spot for a corpse RightClick // loot corpse Delay 1000 LoadRGB 210, 148 // grab red, green and blue color value from this pixel Set $LootBarRed = {RGBRED} // grab value of red in pixel to see if we have a mob loot bar //TimeStamp Debug: Mobs bar color is $MobHP If $LootBarRed = 134 MousePos 50, 245 // move to and click first loot spot (top) LeftClick Delay 1000 MousePos 50, 290 // move to and click second loot spot (one down from top) LeftClick Delay 1000 MousePos 210, 155 // click on the X of loot window to close it LeftClick // if nothing was on corpse Delay 1000 Call Skin2 Else Set LootBarRed = 1 Call Loot3 End // End If End // End Procedure Loot2 Procedure Loot3 //Second corpse select MousePos 750, 625 // move mouse over most likely spot for a corpse RightClick // loot corpse Delay 1000 LoadRGB 210, 148 // grab red, green and blue color value from this pixel Set $LootBarRed = {RGBRED} // grab value of red in pixel to see if we have a mob loot bar If $LootBarRed = 134 MousePos 50, 245 // move to and click first loot spot (top) LeftClick Delay 1000 MousePos 50, 290 // move to and click second loot spot (one down from top) LeftClick Delay 1000 MousePos 210, 155 // click on the X of loot window to close it LeftClick // if nothing was on corpse Delay 1000 Call Skin3 Else Set LootBarRed = 1 End // End If End // End Procedure Loot3 Procedure Skin1 If $Skinner = 1 MousePos 450, 625 // move back to corpse area and right click to skin RightClick Delay 5000 MousePos 50, 245 // click on anything that was skinned, put into bag LeftClick Delay 1000 End End Procedure Skin2 If $Skinner = 1 MousePos 605, 625 // move back to corpse area and right click to skin RightClick Delay 5000 MousePos 50, 245 // click on anything that was skinned, put into bag LeftClick Delay 1000 End End Procedure Skin3 If $Skinner = 1 MousePos 750, 625 // move back to corpse area and right click to skin RightClick Delay 5000 MousePos 50, 245 // click on anything that was skinned, put into bag LeftClick Delay 1000 End // End If End // End Procedure Skin3 Procedure MoveForward KeyDown W 2 sec End Procedure MoveBack KeyDown S 1 sec End Procedure StopOnSwitchedWindow On WindowChange // without a Stop in this procedure, you will continue running after tabbing back to ACTool Stop End