Created
June 1, 2012 20:22
-
-
Save anonymous/2854918 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SingleInstance force | |
Set_Resolution() | |
{ | |
global | |
WinGetPos,,, Width, Height, Diablo III | |
;Skill slots | |
Skill_1 := [Width * 0.4,Height * 0.25] | |
Skill_2 := [Width * 0.6,Height * 0.25] | |
Skill_3 := [Width * 0.4,Height * 0.35] | |
Skill_4 := [Width * 0.6,Height * 0.35] | |
Skill_5 := [Width * 0.4,Height * 0.5] | |
Skill_6 := [Width * 0.6,Height * 0.5] | |
;left/right arrow button + Accept | |
Left_button := [Width * 0.27,Height * 0.19] | |
Right_button := [Width * 0.73,Height * 0.19] | |
Accept_button := [Width * 0.44,Height * 0.756] | |
;When you have 3 ability in the category | |
Ability3_1 := [Width * 0.42,Height * 0.188] | |
Ability3_2 := [Width * 0.5,Height * 0.188] | |
Ability3_3 := [Width * 0.587,Height * 0.188] | |
;When you have 4 ability in the category | |
Ability4_1 := [Width * 0.376,Height * 0.188] | |
Ability4_2 := [Width * 0.46,Height * 0.188] | |
Ability4_3 := [Width * 0.54,Height * 0.188] | |
Ability4_4 := [Width * 0.63,Height * 0.188] | |
;When you have 5 ability in the category (Wizard only) | |
Ability5_1 := [Width * 0.335,Height * 0.188] | |
Ability5_2 := [Width * 0.42,Height * 0.188] | |
Ability5_3 := [Width * 0.50,Height * 0.188] | |
Ability5_4 := [Width * 0.585,Height * 0.188] | |
Ability5_5 := [Width * 0.668,Height * 0.188] | |
;Passive skill slots | |
PSkill_1 := [Width * 0.4,Height * 0.64] | |
PSkill_2 := [Width * 0.5,Height * 0.64] | |
PSkill_3 := [Width * 0.6,Height * 0.64] | |
;Passive abilities | |
PassiveAb_1 := [Width * 0.274,Height * 0.39] | |
PassiveAb_2 := [Width * 0.4,Height * 0.39] | |
PassiveAb_3 := [Width * 0.527,Height * 0.39] | |
PassiveAb_4 := [Width * 0.652,Height * 0.39] | |
PassiveAb_5 := [Width * 0.274,Height * 0.483] | |
PassiveAb_6 := [Width * 0.4,Height * 0.483] | |
PassiveAb_7 := [Width * 0.527,Height * 0.483] | |
PassiveAb_8 := [Width * 0.652,Height * 0.483] | |
PassiveAb_9 := [Width * 0.274,Height * 0.576] | |
PassiveAb_10 := [Width * 0.4,Height * 0.576] | |
PassiveAb_11 := [Width * 0.527,Height * 0.576] | |
PassiveAb_12 := [Width * 0.652,Height * 0.576] | |
PassiveAb_13 := [Width * 0.338,Height * 0.672] | |
PassiveAb_14 := [Width * 0.463,Height * 0.672] | |
PassiveAb_15 := [Width * 0.59,Height * 0.672] | |
;Passive abilities (Barb specific) | |
PassiveAbBarb_13 := [Width * 0.274,Height * 0.672] | |
PassiveAbBarb_14 := [Width * 0.4,Height * 0.672] | |
PassiveAbBarb_15 := [Width * 0.527,Height * 0.672] | |
PassiveAbBarb_16 := [Width * 0.652,Height * 0.672] | |
;Passive abilities (Monk specific) | |
PassiveAbMonk_13 := [Width * 0.4,Height * 0.672] | |
PassiveAbMonk_14 := [Width * 0.527,Height * 0.672] | |
;Runes | |
Rune_1 := [Width * 0.29,Height * 0.4] | |
Rune_2 := [Width * 0.376,Height * 0.4] | |
Rune_3 := [Width * 0.46,Height * 0.4] | |
Rune_4 := [Width * 0.54,Height * 0.4] | |
Rune_5 := [Width * 0.63,Height * 0.4] | |
Rune_6 := [Width * 0.71,Height * 0.4] | |
} | |
Switch_Skill(target_skill_slot,category,skill,rune) | |
{ | |
global | |
click(target_skill_slot,1,delay) | |
Sleep, 100 | |
original_category := Which_Skil_Category(width,height) | |
if (category-original_category) > 0 | |
click(Right_button,category-original_category,delay) | |
Else if (category-original_category) < 0 | |
click(Left_button,abs(category-original_category),delay) | |
Else if (category-original_category) = 0 | |
Sleep 1 | |
Click(skill,1,delay) | |
Click(rune,1,delay) | |
Click(Accept_button,1,delay) | |
} | |
Switch_Passive(target_skill_slot,skill) | |
{ | |
global | |
click(target_skill_slot,1,delay) | |
Sleep, 100 | |
Click(skill,1,delay) | |
Click(Accept_button,1,delay) | |
} | |
;clicks on a specified skill slot | |
click(input,count,delay) | |
{ | |
x_var := input[1] | |
y_var := input[2] | |
Sleep, %delay% | |
ControlClick, x%x_var% y%y_var%, Diablo III,,,%count% | |
} | |
;gets which skill category is on the screen | |
Which_Skil_Category(width,height) | |
{ | |
X1 := width * 0.431, Y1 := height * 0.09, X2 := width * 0.6, Y2 := height * 0.17 | |
ImageSearch, fPrimary, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\primary.bmp | |
ImageSearch, fSecondary, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\secondary.bmp | |
ImageSearch, fDefensive, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\defensive.bmp | |
ImageSearch, fHunting, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\hunting.bmp | |
ImageSearch, fDevices, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\devices.bmp | |
ImageSearch, fArchery, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\archery.bmp | |
ImageSearch, fTechniques, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\Techniques.bmp | |
ImageSearch, fFocus, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\Focus.bmp | |
ImageSearch, fMantras, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\Mantras.bmp | |
ImageSearch, fForce, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\Force.bmp | |
ImageSearch, fConjuration, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\Conjuration.bmp | |
ImageSearch, fMastery, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\Mastery.bmp | |
ImageSearch, fMight, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\Might.bmp | |
ImageSearch, fTactics, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\Tactics.bmp | |
ImageSearch, fRage, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\Rage.bmp | |
ImageSearch, fTerror, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\terror.bmp | |
ImageSearch, fDecay, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\decay.bmp | |
ImageSearch, fVoodoo, , %X1%, %Y1%, %X2%, %Y2%, %A_ScriptDir%\imagesearch\%Width%x%Height%\voodoo.bmp | |
found := fPrimary ? "1" : found, found := fSecondary ? "2" : found, found := fDefensive ? "3" : found | |
found := fMight ? "4" : found, found := fTactics ? "5" : found, found := fRage ? "6" : found | |
found := fHunting ? "4" : found, found := fDevices ? "5" : found, found := fArchery ? "6" : found | |
found := fTechniques ? "4" : found, found := fFocus ? "5" : found, found := fMantras ? "6" : found | |
found := fForce ? "4" : found, found := fConjuration ? "5" : found, found := fMastery ? "6" : found | |
found := fTerror ? "4" : found, found := fDecay ? "5" : found, found := fVoodoo ? "6" : found | |
return, found | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment