for me 2.1 is only clicking escape
for me 2.1 is only clicking escape
2.1g runs fine, but in the end it goes: Esc - Click portal - Esc - Click portal...![]()
$default_resolutionX = 1920
$default_resolutionY = 1080
$x_ratio = .875
$y_ratio = .972
1680/1920 =.875
1050/1080=.972
I changed all those in the script but it didnt change the click locations. Did i miss something for 1680/1050 16:10 ratio?
the new script actually seems slower on my system. it waits around too long
i get the leave game loop for i removed line 288 (pixelsearch)
but the game clicks resume and waits some 10 seconds the first time.
from the second run it clicks resume and starts the running script in 1 second, giving no time to load
edit: nvm i got it working myself
Last edited by yamahacore; 06-26-2012 at 05:16 PM. Reason: fixed
Replace that and you should be good to go on widescreen. It's working for me because I can't get fullscreen windowed to work.
Func RestartRun()
While $go
if($Leave) Then
$i = 0
Sleep(800) ;had to add this since the icon doesn't show up RIGHT away in game
Call("CheckDead")
Call("CheckRepair")
If $Window Then
MouseClick("left", Round(230*$x_ratio),Round(416*$y_ratio)) ;button to resume game from main menu
Sleep($loadtime)
$Window = False
ExitLoop
ElseIf $Dead or $Logout Then
ExitLoop
EndIf
MouseClick("middle", Round(500*$x_ratio), Round(250*$y_ratio)) ;starts the run [waypoint 1]
Sleep(900)
Send("2")
Sleep(250)
MouseClick("middle", 1, Round(370*$y_ratio)) ;waits ~1 second then [waypoint 2]
Sleep(1500)
MouseClick("middle", Round(400*$x_ratio), Round(600*$y_ratio)) ;middle of courtyard [waypoint 3]
Sleep(40)
Send("2")
Sleep(20)
Send("3")
Sleep(600)
Send("1")
Sleep(300)
MouseMove(Round(240*$x_ratio),Round(70*$y_ratio),1) ;moves cursor over to the cellar so the proper blue pixel becomes highlighted
Sleep(850)
Call("CheckDead")
If $Window Then
MouseClick("left", Round(250*$x_ratio),Round(416*$y_ratio)) ;button to resume game from main menu
Sleep($loadtime)
$Window = False
ExitLoop
ElseIf $Dead or $Logout Then
ExitLoop
EndIf
$Pixel2 = PixelSearch(0,0, Round(600*$x_ratio), Round(600*$y_ratio),0x334FB7,4) ;checks for open cellar (in a 600x400 box from the top left - where it should always be)
If Not @error Then
MouseClick("left",Round(240*$x_ratio),Round(70*$y_ratio)) ;Entrance to cellar
Sleep(300)
Send("2")
Sleep($walktime)
MouseClick("middle",Round(110*$x_ratio),Round(1000*$y_ratio)) ;moves to doorway leading to rare inside cellar
Sleep(2500)
MouseMove(Round(440*$x_ratio),Round(80*$y_ratio),1) ;hovers over the rare Sarkoth
Sleep(10)
Send("{SHIFTDOWN}")
MouseDown("right") ;attack middle
Sleep(1200)
Send("4")
Sleep(3000)
MouseUp("right")
MouseClick("left",Round(440*$x_ratio),Round(80*$y_ratio),2)
MouseMove(Round(240*$x_ratio),Round(75*$y_ratio),1) ;attack left
Sleep(40)
MouseDown("right")
Sleep(2800)
MouseUp("right")
MouseMove(Round(590*$x_ratio),Round(50*$y_ratio),1) ;attack right
MouseDown("right")
Sleep(1800)
MouseUp("right")
MouseDown("left")
MouseMove(Round(Random(240,260)*$x_ratio),Round(75*$y_ratio),1) ;attack left
Sleep(1200)
MouseMove(Round(Random(560,600)*$x_ratio),Round(50*$y_ratio),1) ;attack right
Sleep(1200)
MouseUP("left")
Sleep(10)
MouseClick("right",Round(620*$x_ratio),Round(20*$y_ratio),2) ;break the table & chair
Sleep(10)
Send("{SHIFTUP}")
Sleep(400)
MouseClick("middle",Round(530*$x_ratio),Round(170*$y_ratio)) ;location of sarkoth after death
Sleep(2100)
MouseClick("middle",Round(580*$x_ratio),Round(460*$y_ratio)) ;move to left top corner for gold
Sleep(1100)
MouseClick("middle",Round(1330*$x_ratio),Round(330*$y_ratio)) ;move to right top corner for gold
Sleep(1100)
Send("4")
MouseClick("middle",Round(1010*$x_ratio),Round(940*$y_ratio)) ;move to middle before looting
Call("CheckLoot")
Send("t")
Sleep($tptime)
Call("CheckDead")
If Not $Logout And Not $Dead And Not $Window Then
Sleep(300)
Send("{ESCAPE}") ;menu
Sleep(200)
MouseClick("left", Round(956*$x_ratio),Round(579*$y_ratio)) ;button to leave game
Sleep($loadtime)
Call("CheckDead")
If Not $Logout Then
MouseClick("left", Round(230*$x_ratio),Round(416*$y_ratio)) ;button to resume game from main menu
Sleep($loadtime)
EndIf
Else
MouseClick("left", Round(230*$x_ratio),Round(416*$y_ratio)) ;button to resume game from main menu
Sleep($loadtime)
$Window = False ; reset the flag so it doesn't think a window is always up
EndIf
Else
Sleep(10)
MouseClick("middle",Round(1100*$x_ratio),Round(600*$y_ratio)) ;moves between caltrops for safety before teleporting back to town
Sleep(200)
Send("1")
Sleep(620)
Send("2")
Sleep(40)
Send("t")
Sleep($tptime)
Call("CheckDead")
If Not $Logout And Not $Dead And Not $Window Then
Sleep(300)
Send("{ESCAPE}") ;menu
Sleep(200)
MouseClick("left", Round(956*$x_ratio),Round(579*$y_ratio)) ;button to leave game
Sleep($loadtime)
Call("CheckDead")
If Not $Logout Then
MouseClick("left", Round(230*$x_ratio),Round(416*$y_ratio)) ;button to resume game from main menu
Sleep($loadtime)
EndIf
Else
MouseClick("left", Round(230*$x_ratio),Round(416*$y_ratio)) ;button to resume game from main menu
Sleep($loadtime)
$Window = False ; reset the flag so it doesn't think a window is always up
EndIf
EndIf
EndIf
WEnd
Call("RestartRun")
EndFunc
The ratio's, as they are set in the default code, will automatically pull your desktop width and height and set these numbers. You don't have to do it by hand. That being said, much of the code I put in here I didn't bother making it ratio compatible. Basically all the code except for the walking part is 1920x1080 hard coded.
Your pixelsearch isn't working right. If it was, your sleep timers would automatically adjust themselves to your systems load time. The "long" timer you're getting is the "backup" kicking in just in case it fails to detect during the pixelsearching functions.
I would appreciate it if the code being posted in this thread were compatible with or related to my script. What he posted is in no way related to my script, nor a modification of it for compatibility. Putting this stuff in here is going to cause confusion for people trying to use my script.
----------------------------------------------------------------------------
2.2 is up. Insanely stable and fast on my system.
Last edited by jakesmurf; 06-10-2012 at 12:54 AM.
why all the pixelsearch not work for me ? he wont check potion,so he direct click when im still loading,so it make the script click everyway...
running 2.2 and same deal.. esc portal esc portal.. removing that line mentioned above makes it worse.. it does move my character
Don't use the line they mentioned above. Go back to the main post and use the workaround posted there.
Sometimes pixelsearch doesn't work for everyone because all colors were used the way that my PC displays them. Not all PCs will display them exactly the same because you have a different video card, drivers, color settings, etc. If pixelsearch doesn't work, fix the colors or don't use the script at all. I can't make it work for everyone out of the box.
Last edited by jakesmurf; 06-10-2012 at 02:32 AM.
Works great after that little fix although how can I increase the wait time before starting again.. my game doesn't load quick enough when it restarts the game.
yeah,i gonna customize the color ,what tool can grab the color? your script is almost perfect d. im just need to figure out the pixelsearch
Autoit comes with a program called window info that can grab color.
I suggest using 1.1d if your knowledge of basic programming won't allow you to modify the script to function properly in 2.x series. 2.2 is like an advanced users version, basically.
Last edited by jakesmurf; 06-10-2012 at 08:10 AM.