;----------------------------------------------------------------------------------------------------
;
; Left to stop script, right to start script
;
;You need to start the script when you click roll (doesnt have to be perfect
;but dont click the ok button while you roll.. thats where it starts.
;Resulution 1920 x 1080, no AA (antialiasing)(Dunno if aa matters)
;Running windowed, could probebly work fullscreen too (my desktop is
;running 2560x1440.. in anycase im sure you guys can modify this script
;to whatever, ill point out where you need to find your colors and cords.
;
;----------------------------------------------------------------------------------------------------
left::
endingness = 1
return
;----------------------------------------------------------------------------------------------------
right::
endingness = 0
;Important color = the color behind (example) where you press to add strength
;why its important is because, after youv added all your stat point to your character
;the button disappears (if your out of points that is), and my script works
;by counting how many stat points it can assign to your character before the
;button disappears.
;Basicly what im saying is, do a random roll for any number, SPEND all
;the stat points til your out, then you will notice the button for pressing up
;is gone, and then you wana use the window spy button to look what color it is
;noteably the background is texture so there maybe alot of colors
;so aim carefully.
;I decided to use those buttons as aim for my check how many points you got
;because if i were to aim at the white numberes, there seem to be bit too many
;artifcats and distance onec 2nd digit appear thay may be subject to randomness
;So thats why i figured since the buttons disappear onec youv run out of stat points
;why not just aim for the color that is behind them
and then make a simple click
;loop to spend points.
Color = 0x101D23
;now the second color has to be bit more accurate as its the color of the
;alloting bonus points " O K " button
more spesificly the white part
;that is exacly FFFFFF, i use that to check when the button is clickable
;seeing as its Greyed out (including the ok part) when its not
;so simply find the cords for the white part of ok, and set them correctly
;if my script doesnt hit directly on first go in 1920x1080.
Color2 = 0xFFFFFF
Loop
{
;----------------------------------------------------------------------------------------------------
loop
{
PixelSearch, Px, Py, 965, 598, 965, 598, Color2, 0, fast
;this is where it searches for the white part.
sleep 20 ;Pause
if ErrorLevel = 0
break
}
;----------------------------------------------------------------------------------------------------
if endingness = 1
return
;this is where script stops if you press left, i figured it was the best place
;due you can see yourself the visual alloting points, regardless of reson
;for stopping.
click 960, 600, 5 ;OK Button for confirm bonus (COLOR2) location
;if cordinates misses here on the ok button, just set it to what you set the white
;part of " O K " button for color2 to
SetEnv, counting, 0 ;set counting as variable and value 0
;and this is my simple counter, as its not perfect is irrelevant
;and it has to be here to reset the counter when next loop too
;----------------------------------------------------------------------------------------------------
loop
{
if counting < 10
{
;sleep 7 ;Pause
click down 155, 345, 1 ;
sleep 7 ;Pause
click up 155, 345, 1 ;1 point
sleep 7 ;Pause
}
else
{
;sleep 7 ;Pause
click down 155, 365, 1 ;
sleep 7 ;Pause
click up 155, 365, 1 ;1 point
sleep 7 ;Pause
}
;the if counting < 10 means if counting is above 10
;this is important as it will tell script you cant add more points
;into strength.
;the cords 155, 345 is exacly where the strenght + button is, aka to add 1 to strength
;i use the click down and click up to delay the click itself, i found that just useing
;the click 155, 345 is inaccurate and if you use multiclick then its breaking the script
;so its best to simulate a click down and click up (noteably this script adds safety to you
;aswell as it will make "random"(sorta) delay for your rolls seeing its actualy adding all
;the stat points (as they vary everytime) before looping script
makes you seem human
;noteably 155, 365 cords are for the vitality stat, this will add 1 point into vit
;also very important, this makes my script accurate til 20.
;for added accurasy, just find the dex's add button ( on my screen thats 155, 380 )
;the above "click part of script" you can change around alot to how many
;stat points you wana set wich basicly means how far the script will be able to go
;i stop at 15+ in this script, but as the script is currently, you can set it up to 20
;where script will stop, to go byond, like i said, you need to add the dex button to the
;click loop to add points there, the counter will keep counting then.
PixelSearch, Px, Py, 155, 345, 155, 345, Color, 0, fast
;this pixel search is "behind" the add strength button.
;like i said before this is the important part, onec your out of bonus points
;the button will be gone, and you will be able to see the color behind it
;and then script breaks the loop.
sleep 25
if ErrorLevel = 0
break
else
counting = % counting + 1
}
;----------------------------------------------------------------------------------------------------
; This is what you can change from 15 to 20(max of my script unless you add dex
; to button loop and make an additional if counting > 20 then press dex button
;----------------------------------------------------------------------------------------------------
if counting > 15
{
msgbox more than 15
break
}
;----------------------------------------------------------------------------------------------------
;rest of the buttons, is just cancle cus script didnt count more than 15points
; reclick elf or gnome (you CAN find your own cords if you use other races)
;then basicly clicks ok, and roll starts again, and script loops.
;----------------------------------------------------------------------------------------------------
;sleep 60 ;P
click 1024, 1065, 5 ;Cancle Button
;sleep 60 ;P
;click 885,995, 5 ;elf
click 1050,995, 5 ;Gnome
;sleep 60 ;P
click 885, 1065, 5 ;OK Button
Sleep 2000 ;P - long
}
return