Blizzhackers

Return of the Jedi

* Login   * Register    * FAQ    * Search

Join us on IRC: #bh@irc.synirc.net (or Mibbit Web IRC)


MuleFactory


It is currently Sat May 18, 2013 5:39 pm


All times are UTC [ DST ]





Post new topic Reply to topic  [ 297 posts ]  Go to page 1, 2, 3, 4, 5 ... 20  Next
Author Message
 Post subject: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script] [1
PostPosted: Wed Jun 06, 2012 1:02 am 
 
Trial Moderator Gold
Trial Moderator Gold
User avatar

Joined: Thu Jan 21, 2010 1:02 am
mackus101 @ ownedcore wrote:
Image

Global $Paused

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

Global $Paused

HotKeySet("=","Leave")
HotKeySet("-", "Pause")
HotKeySet("x", "Stop")

$default_resolutionX = 1920
$default_resolutionY = 1080
$x_ratio = @Desktopwidth / $default_resolutionX
$y_ratio = @Desktopheight / $default_resolutionY

$go = True
$Leave = False

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


mackus101 @ ownedcore wrote:

_________________
Image
Image
Image


Last edited by I Am Alpha on Wed Jun 06, 2012 3:44 am, edited 5 times in total.
Top
 Profile  
 Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
PostPosted: Wed Jun 06, 2012 1:46 am 
 
User
User

Joined: Fri Jun 01, 2012 4:55 am
decided to test this out

EDIT: My fault, it works wonderfully and very fast.


Last edited by Nookscranny on Wed Jun 06, 2012 2:02 am, edited 1 time in total.
Top
 Profile  
 Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
PostPosted: Wed Jun 06, 2012 2:00 am 
 
User
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.

Top
 Profile  
 Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
PostPosted: Wed Jun 06, 2012 2:04 am 
 
User Gold
User Gold

Joined: Mon Nov 10, 2008 6:36 pm
1.7 mil in 9 hours? That's 3k gold per minute... brb, writing royal crypts script.

Top
 Profile  
 Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
PostPosted: Wed Jun 06, 2012 2:08 am 
 
User
User

Joined: Thu Sep 02, 2010 12:47 am
if we're on other resolution, what do we do?

Top
 Profile  
 Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
PostPosted: Wed Jun 06, 2012 2:12 am 
 
User
User

Joined: Tue Jun 05, 2012 2:41 pm
Without a bot, i'm farming 660k/hour in royal crypts on my DH...Please, someone, upload a script for royal crypts :)

Top
 Profile  
 Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
PostPosted: Wed Jun 06, 2012 2:13 am 
 
Trial Moderator Gold
Trial Moderator Gold
User avatar

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)

_________________
Image
Image
Image


Last edited by I Am Alpha on Wed Jun 06, 2012 3:46 am, edited 1 time in total.
Top
 Profile  
 Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
PostPosted: Wed Jun 06, 2012 2:21 am 
 
User
User

Joined: Thu Feb 09, 2006 1:53 am
When my check at the cellar door. It doesn't detect that blue color from the cellar door so instead, it left the game. Can you help me?

Top
 Profile  
 Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
PostPosted: Wed Jun 06, 2012 2:23 am 
 
User
User

Joined: Thu Sep 02, 2010 12:47 am
ur amazing alpha~!!!!

Top
 Profile  
 Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
PostPosted: Wed Jun 06, 2012 2:25 am 
 
User
User

Joined: Thu Feb 09, 2006 1:53 am
I also get line 45 error when trying the updated script.

Top
 Profile  
 Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
PostPosted: Wed Jun 06, 2012 2:37 am 
 
User
User

Joined: Thu Sep 02, 2010 12:47 am
change it to ;middle of area outside of cellar

it was a typo of : instead of ;

Top
 Profile  
 Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
PostPosted: Wed Jun 06, 2012 2:46 am 
 
User
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.

Top
 Profile  
 Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
PostPosted: Wed Jun 06, 2012 2:51 am 
 
User
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

Why does it does not detect blue pixel for me?

Top
 Profile  
 Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
PostPosted: Wed Jun 06, 2012 3:38 am 
 
User
User

Joined: Sat Feb 11, 2006 6:30 pm
i can say with some certainty that the new code does not work with 1600x900 or 1366x768.
Tried both and both had incorrect clicking coordinates.

If somebody can refute this please let me know how you got it to work.

Yes I did windowed fullscreen.
Yes I changed the code to reflect 1600x900 and 1366x768 resolutions.

Top
 Profile  
 Post subject: Re: [Goldfarming] AFK 150k-200k Gold Per Hour [AutoIT Script
PostPosted: Wed Jun 06, 2012 3:40 am 
 
User
User

Joined: Sat Mar 17, 2012 5:39 pm
You should do a more generic resolution, like 800x600 or 1024x768.

Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 297 posts ]  Go to page 1, 2, 3, 4, 5 ... 20  Next

All times are UTC [ DST ]


Who is online

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

Search for:
Jump to:  
cron