HotKeySet("=","Leave") ;script can START by pressing = HotKeySet("-", "Pause") ;script can be Pause by pressing - HotKeySet("x", "Stop") ;script can be Stopped by pressing x
$go = True $Leave = False
While $go if($Leave) Then $Pixel1 = PixelSearch(1482,20,1535,95,0xFFF000) ;searches top right screen for yellow of broken armor If Not @error Then Send("t") Sleep(8000) MouseClick("left", 1480, 281) ;begin movement towards merchant Sleep(1500) MouseClick("left", 1316, 206) ;moves to get merchant in screen Sleep(1500) MouseClick("left", 845, 225) ;NPC Merchant to the right of cain's home Sleep(1500) MouseClick("left", 521, 506) ;button to open up repair menu Sleep(1500) MouseClick("left", 260, 595) ;button to pay for repairs Sleep(2500) Send("{ESCAPE}") ;opens menu Sleep(1000) MouseClick("left", 956, 579) ;button to leave game Sleep(8000) MouseClick("left", 230, 416) ;button to resume game from main menu Sleep(8000) Else MouseClick("left", 587, 333) ;starts the run Sleep(1800) Send("2") MouseClick("left", 96, 383) Sleep(800) Send("1") Sleep(1500) MouseClick("left", 417, 422) ;middle of area outside of cellar Send("1") Sleep(2000) Send("3") Send("2") MouseMove(118, 224,1) ;moves cursor over to the cellar so the proper blue pixel becomes highlighted Sleep(2000) $Pixel2 = PixelSearch(0,0,1950,1120,0x3B62E3) ;searches for the specific blue pixel that only occurs when mouse hovers over open cellar If Not @error Then MouseClick("left",118,224) ;Entrance to cellar Sleep(1900) Send(2) Sleep(1800) MouseClick("left", 531, 769) Sleep(2000) MouseClick("left", 547, 490) ;moves to doorway leading to rare inside cellar Sleep(1500) MouseMove(579,209,1) ;hovers over the rare Sarkoth Send(4) Sleep(1000) Send("{SHIFTDOWN}") MouseDown("right") ;attack middle Sleep(4200) MouseMove(467,269,1) ;attack left, add more sleep time if you can't kill minion on left Sleep(2000) MouseMove(682,147,1) ;attack right Sleep(1000) MouseMove(579,209,1) ;move back to middle Sleep(1000) MouseUP("right") Sleep(300) Send("{SHIFTUP}") Sleep(500) MouseClick("left", 579, 209) ;location of sarkoth after death Sleep(2500) MouseClick("left", 866, 324) ;moves to right top corner for gold Sleep(1500) MouseClick("left", 902, 954) ;moves to bottom middle for gold Sleep(1500) MouseClick("left", 687, 413) ;moves to left top corner for gold Sleep(1500) Send("t") Sleep(8200) Send("{Escape}") ;menu MouseClick("left", 956, 579) ;button to leave game Sleep(13000) MouseClick("left", 230, 416) ;button to resume game from main menu Sleep(7000) Else MouseClick("left",900,900) ;moves down screen away from cellar in attempt for safety before teleporting back to town Sleep(1200) Send("t") Sleep(8200) Send("{ESCAPE}") ;menu MouseClick("left", 956, 579) ;button to leave game Sleep(13000) MouseClick("left", 230, 416) ;button to resume game from main menu Sleep(8000) EndIf EndIf EndIf WEnd
Func Pause() $Leave = False EndFunc
Func Stop() ;to allow the script to stop Exit EndFunc
Func Leave() $Leave = True EndFunc
mackus101 @ ownedcore wrote:
so this should -cross fingers- be usable by anybody who uses an aspect ratio of 16:9 since the amount
New code should work for the following1920x1080, 1600x900, 1366x768, 1360x768, 1280x720, 1176x664
While $go if($Leave) Then $Pixel1 = PixelSearch((1482 * $x_ratio),(20 * $y_ratio),(1535 * $x_ratio),(95 * $y_ratio),0xFFF000) ;searches top right screen for yellow of broken armor If Not @error Then Send("t") Sleep(8000) MouseClick("left", Round(1480 * $x_ratio),Round(281 * $y_ratio));begin movement towards merchant Sleep(1500) MouseClick("left", Round(1316 * $x_ratio),Round(206 * $y_ratio)) ;moves to get merchant in screen Sleep(1500) MouseClick("left", Round(845 * $x_ratio),Round(225 * $y_ratio)) ;NPC Merchant to the right of cain's home Sleep(1500) MouseClick("left", Round(521 * $x_ratio),Round(506 * $y_ratio)) ;button to open up repair menu Sleep(1500) MouseClick("left", Round(260 * $x_ratio),Round(595 * $y_ratio)) ;button to pay for repairs Sleep(2500) Send("{ESCAPE}") ;opens menu Sleep(1000) MouseClick("left", Round(956 * $x_ratio),Round(579 * $y_ratio)) ;button to leave game Sleep(8000) MouseClick("left", Round(230 * $x_ratio),Round(416 * $y_ratio)) ;button to resume game from main menu Sleep(8000) Else MouseClick("left", Round(587 * $x_ratio),Round(333 * $y_ratio)) ;starts the main run Sleep(1800) Send("2") MouseClick("left", Round(96 * $x_ratio),Round(383 * $y_ratio)) Sleep(800) Send("1") Sleep(1500) MouseClick("left", Round(417 * $x_ratio),Round(422 * $y_ratio)) ;middle of area outside of cellar Send("1") Sleep(2000) Send("3") Send("2") MouseMove(Round(115 * $x_ratio),Round(210 * $y_ratio),1) ;moves cursor over to the cellar so the proper blue pixel becomes highlighted Sleep(2000) $Pixel2 = PixelSearch(0,0,(960 * $x_ratio),(540 * $y_ratio),0x3B62E3,3) ;searches for the specific blue pixel that only occurs when mouse hovers over open cellar If Not @error Then MouseClick("left",Round(115 *$x_ratio),Round(210 * $y_ratio)) ;Entrance to cellar Sleep(1900) Send(2) Sleep(1800) MouseClick("left",Round(531 *$x_ratio),Round(769 * $y_ratio)) Sleep(2000) MouseClick("left",Round(547 *$x_ratio),Round(490 * $y_ratio)) ;moves to doorway leading to rare inside cellar Sleep(1500) MouseMove(Round(579 * $x_ratio),Round(209 * $y_ratio),1) ;hovers over the rare Sarkoth Send(4) Sleep(1000) Send("{SHIFTDOWN}") MouseDown("right") ;attack middle Sleep(3800) MouseMove(Round(467 * $x_ratio),Round(269 * $y_ratio),1) ;attack left, add more sleep time if you can't kill minion on left Sleep(3000) MouseMove(Round(682 * $x_ratio),Round(147 * $y_ratio),1) ;attack right Sleep(800) MouseMove(Round(579 * $x_ratio),Round(209 * $y_ratio),1) ;move back to middle Sleep(1000) MouseUP("right") Sleep(300) Send("{SHIFTUP}") Sleep(500) MouseClick("left",Round(579 *$x_ratio),Round(209 * $y_ratio)) ;location of sarkoth after death Sleep(2500) MouseClick("left",Round(866 *$x_ratio),Round(324 * $y_ratio)) ;moves to right top corner for gold Sleep(1500) MouseClick("left",Round(902 *$x_ratio),Round(954 * $y_ratio)) ;moves to bottom middle for gold Sleep(1500) MouseClick("left",Round(687 *$x_ratio),Round(413 * $y_ratio)) ;moves to left top corner for gold Sleep(1500) Send("t") Sleep(8200) Send("{Escape}") ;menu MouseClick("left",Round(956 *$x_ratio),Round(579 * $y_ratio)) ;button to leave game Sleep(13000) MouseClick("left",Round(230 *$x_ratio),Round(416 * $y_ratio)) ;button to resume game from main menu Sleep(7000) Else MouseClick("left",Round(900 *$x_ratio),Round(900 * $y_ratio)) ;moves down screen away from cellar in attempt for safety before teleporting back to town Sleep(1200) Send("t") Sleep(8200) Send("{ESCAPE}") ;menu MouseClick("left",Round(956 *$x_ratio),Round(579 * $y_ratio)) ;button to leave game Sleep(13000) MouseClick("left",Round(230 *$x_ratio),Round(416 * $y_ratio)) ;button to resume game from main menu Sleep(8000) EndIf EndIf EndIf WEnd
Func Pause() $Leave = False EndFunc
Func Stop() ;to allow the script to stop Exit EndFunc
Func Leave() $Leave = True EndFunc
In college I did HTML and a small bit of flash for a web design course. My degree was in computer graphics (animation specifically)...so I conceptually understand coding but using it the way I am now is a new thing and I believe a new hobby now
Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
Posted: Wed Jun 06, 2012 2:00 am
User
Joined: Tue Jun 28, 2005 2:38 am
You should indicate what graphics settings you were using when making this. There's a big difference for pixel detection between high/low textures.
Using Companion - Ferrets would make this simple because the ferrets would pick up the gold for you and all you'd have to do is pick up the blues/rares/etc.
As for picking up items, it's rather simple. You just have to pixel detect the colour of the names and then click on the coord for blue, yellow, green and orange/red.
Good work though! I'm going to try and get this working for me as a replacement for my d3a sarkoth.
Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
Posted: Wed Jun 06, 2012 2:13 am
Trial Moderator Gold
Joined: Thu Jan 21, 2010 1:02 am
Newest code updated, works with multiple resolutions (just for clarifaction sakes, I do not deserve credit for this. I am simply sharing, credits given in quote name)
_________________
Last edited by I Am Alpha on Wed Jun 06, 2012 3:46 am, edited 1 time in total.
Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
Posted: Wed Jun 06, 2012 2:46 am
User
Joined: Mon May 01, 2006 1:03 am
think you can change the bot to use the "move key" such as "m" to move as opposed to using the left click. At times it will click a zombie and attack it instead of moving the the location being blocked by the zombie. This usually happens at the very beginning of the run.
Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
Posted: Wed Jun 06, 2012 2:51 am
User
Joined: Thu Feb 09, 2006 1:53 am
$Pixel2 = PixelSearch(0,0,(960 * $x_ratio),(540 * $y_ratio),0x3B62E3,3) ;searches for the specific blue pixel that only occurs when mouse hovers over open cellar
Users browsing this forum: No registered users and 4 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum