Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

D3 AHK potion/gold farm bot


  • Please log in to reply
66 replies to this topic
FFSmasher
  • Members
  • 3 posts
  • Last active: Jun 05 2012 02:51 PM
  • Joined: 05 Jun 2012
The fire was the problem :)

Another thing i'm having a problem with, if the first chest drops white items and gold, sometimes my character won't pickup the gold because he doesn't have to move the grab the items and just checks for the 2nd chest and leaves the game. How can I set it so it walks out some in front of the chest to grab the gold prior to checking location 2 \ leaving

LVieira
  • Members
  • 12 posts
  • Last active: Jun 06 2012 07:15 AM
  • Joined: 06 Jun 2012
If you use my code, it does that.

FFSmasher
  • Members
  • 3 posts
  • Last active: Jun 05 2012 02:51 PM
  • Joined: 05 Jun 2012
Unfortunately i'm @ 1680x1050

LVieira
  • Members
  • 12 posts
  • Last active: Jun 06 2012 07:15 AM
  • Joined: 06 Jun 2012
hmm, too bad ;/

girlgamer
  • Moderators
  • 3263 posts
  • Last active: Feb 01 2015 09:49 AM
  • Joined: 04 Jun 2010
@ffsmasher
most games use the WASD keys to move around. if you could put some kind of pause in the script where you feel you need to for picking up loot, you could move nearer to the item, re-enable the script, and pick up the loot. alternatively you could move your character to the middle of the screen first. then pick up what drops there are.

The universe is a wondrous place! The faster you create unbreakable code, the faster the universe creates people that can break it. All scripting follows the rule Rule Of Twos -- 1) Good, 2) Fast 3) Cheap -- pick any Two.
I guarantee absolutely nothing about any code I provide except that it works in my machine. ●
MMO Fighter   KeyLooperDemo   Key Spammer   TinyClickRecorder  GGs Password Generator.ahk
For the newest version of AutoHotkey and some killer scripts go here.
Rock-on%20kitten.gif


randallf
  • Members
  • 711 posts
  • Last active: Jan 07 2014 11:45 PM
  • Joined: 06 Jul 2009

The fire was the problem :)

Another thing i'm having a problem with, if the first chest drops white items and gold, sometimes my character won't pickup the gold because he doesn't have to move the grab the items and just checks for the 2nd chest and leaves the game. How can I set it so it walks out some in front of the chest to grab the gold prior to checking location 2 \ leaving


I was equipping about 20 yards of gold pickup gear when I was doing this so it wasn't a problem. You just need to add in another coordinate set to move to, it should be relatively obvious in the code where it needs to go however the problem will be that all the coordinates after this for the second chest will change and also need to be fixed.

  • Guests
  • Last active:
  • Joined: --
LVieria,

complete noob here trying to use your "glow" trick on another script I have. I have a question regarding implementing this code thought and hope you or anyone else can chime in and lend a hand.

For my problem, there's a random gate that spawns from time to time and needs to be clicked to open. my current script clicks the location of the gate every time. whenever it's there, is no problem because it's function like expected. but when it is not there, it throws the entire thing off course because it'll click on an empty spot.

i love the idea of if it glows, click, if not, don't click idea behind your script. Can you advise if this is what I should be adding to my current script?

MouseMove, coordinate of gate ;Position to check gate

      Click

      Sleep, 1500



      Global ChestFound

      Global ItemFound



      CheckIfChestExists(my own coordinates here)

      If ChestFound = 0       

      {

         CheckIfChestExists(own coordinates here)

      } 



      If ChestFound = 1

      {

            ;Checks for Items on the ground 

           Loop, 5


Do I have to add this to the end and change anything? 

CheckIfChestExists(x, y, varX, varY, varC)

{

   x1 = 0

   x2 = 0

   y1 = 0

   y2 = 0



   If x < varX + 1 

   {

      x1 = 1

      x2 := x + varX

   }

   Else 

   {

      If x > 1919 - varX

      {

         x1 := x - varX

         x2 = 1919

      }

      Else 

      {

         x1 := x - varX

         x2 := x + varX

      }

   }



   If y < varY + 1 

   {

      y1 = 1

      y2 := y + varY

   }

   Else 

   {

      If y > 1079 - vary

      {

         y1 := y - varY   

         y2 = 1079

      }

      Else 

      {

         y1 := y - varY

         y2 := y + varY

      }

   }



   Global ChestFound

   MouseMove, %x%, %y%

   Sleep 300

   PixelSearch, xloc, yloc, x1, y1, x2, y2, 0xA37758, varC, Fast

   If !ErrorLevel

   {

      ChestFound := 1

      Click

      Sleep, 3000

   }

}


LVieira
  • Members
  • 12 posts
  • Last active: Jun 06 2012 07:15 AM
  • Joined: 06 Jun 2012
I dont know where are you trying to do this with the game, is It the Royal crypts? (Cause I'm trying the same thing)
But whatever... As you have a gate you will only need to check if its click on it, and if it's not click on other place to make your script work, with or without it.
Just need the checkifchestexists(gateposition)

If chestfound bla bla
click here
Else
Click there.

Wingfat
  • Members
  • 937 posts
  • Last active: Oct 14 2015 04:20 PM
  • Joined: 23 Aug 2004
i'm also running "Unfortunately @ 1680x1050"
I would LOVE to be able to get it to work eventually. I just got to Hell with my guy though. cant wait for Inferno.
thanks again for posting it up though. and thanks GirlGamer for your help and comments too.
----------------------------
Wingfool you fat! I mean, Wingfat you fool!
Line from Woody Allen's movie "What's Up Tiger Lilly?"
-----------------------------

baldbrah
  • Members
  • 1 posts
  • Last active: Jun 05 2012 04:58 PM
  • Joined: 05 Jun 2012

I dont know where are you trying to do this with the game, is It the Royal crypts? (Cause I'm trying the same thing)
But whatever... As you have a gate you will only need to check if its click on it, and if it's not click on other place to make your script work, with or without it.
Just need the checkifchestexists(gateposition)

If chestfound bla bla
click here
Else
Click there.



ohhh great, yea its the royal crypts. that damn gate is annoying! thanks for the help!!

is your script running smoothly, assuming you have one for the royal crypts? thanks!!

girlgamer
  • Moderators
  • 3263 posts
  • Last active: Feb 01 2015 09:49 AM
  • Joined: 04 Jun 2010
Two of the programming concepts that newer people on the AutoHotkey forums seem to have difficulty with are
[*:2af0jhg8]Dependency
Dependency is the idea that some certain code pieces (and entire programs in some cases) have to run in specific environments or under certain conditions or with certain specialized pieces of code in order to work at all. Dependency in many autohotkey game scripts especially when dealing with screen locations, clicking on items, etc involves a given screen resolution and sometimes even the colors and sizes of things themselves. Custom code scripts are exactly that custom. They only work properly when the conditions they were built under are replicated exactly in any given target machine. You're seeing part of those dependency issues right now. This is the reason it's important to know scripting sufficiently well enough to be able to modify someone else's custom code to fit your own machine's configuration.


[*:2af0jhg8]Factoring and Modularization
Factoring is the breaking of code into sections that have similar functionality and extracting the essentials of that code so that a new section can be built that uses that functionality to generalize the code for more diverse applications. An example of factoring is taking 5 locations on the screen where you may have to scan or click on an item and creating a single subroutine or function that accepts a location as an argument and uses that data to click on the screen at the location specified. By giving the factored routine new xy coordinates each time the routine can be generalized to click anywhere on the screen not just the original 5 locations. To do this a programmer has to be able to look at the details of the original code as separate from it's implementation and extract just the core of the method, then build that method so it can be used even in a program the programmer hasn't even conceived of yet. Factoring is a form of modularization that generally tries to avoid dependency issues.

Modularization is the breaking of a program or script into pieces that can work relatively independently of the rest of the code and can be called or run without reference to the code that originally spawned it. An example of this is a fight routine that uses a StartFight section and a main fight melee section. The start fight section may use ranged skill abilites to drag or pull an opponent into the range of your melee weapons first then the main melee routine can be called to finish the fight. Modularization is a specialized form of factoring that may or may not rely on some form of dependency
The upshot of all this theoretical BS is that if you get code from someone else that is unfactored, unmodularized, and dependent on the original programmer's machine configuration, you'd better be able tweak it so it runs on your machine or you'll be seriously disappointed in the code's ability to do what you want it to do. And you'll experience a lot of frustration in the process. This, above all, is the bottom line of why the posters here stress so often the need to learn AutoHotkey and the techniques needed to make your own scripts and modify scripts of other people.

The universe is a wondrous place! The faster you create unbreakable code, the faster the universe creates people that can break it. All scripting follows the rule Rule Of Twos -- 1) Good, 2) Fast 3) Cheap -- pick any Two.
I guarantee absolutely nothing about any code I provide except that it works in my machine. ●
MMO Fighter   KeyLooperDemo   Key Spammer   TinyClickRecorder  GGs Password Generator.ahk
For the newest version of AutoHotkey and some killer scripts go here.
Rock-on%20kitten.gif


LVieira
  • Members
  • 12 posts
  • Last active: Jun 06 2012 07:15 AM
  • Joined: 06 Jun 2012
I think It's pretty much imposible to make a perfect code for the Royal Crypts, because there are so many variables, the stones on the floor, the bodies, the door, the skeletons walking around, and they are all random, so your code can always click on one of these stuff and mess up your run, Mine goes ok until half the run, then I'm still working on it, but it's a lot of trouble.

shadowchao
  • Members
  • 9 posts
  • Last active: Jun 05 2012 04:57 PM
  • Joined: 05 Jun 2012
Lvieira, I started using AHK all of two days ago and saw this post. I took his code and adapted the ideas in it to make a running loop to just run around and pick up the gold. I don't think it would be worthwhile to try to both with pots or tomes of secrets since it'll take you off the path quite a bit and also slow down your runs by stopping and look at each crypt. However adding in a .3sec delay and clicking on each chest location would be easily implemented, however I don't think the little amount of gold per chest will make up for the 30 sec delay or so in each run.

I don't uses click to move around but mousemove and the d3 move key (I also use f12 for this) and use teleport to go through the gate. I only use click to start the game and use the waypoint. I've been running my script for 3 nights now and while I'm at work (like 9 hrs so far) and have made about 12m. I also cast diamond armor with the enduring rune and the slow time spells right before I exit so I usually only get hit once per every 5-6 runs.

Also remember to go to town and repair every 100 runs or so or your gear will break and you wont have any GF or radius pickup.

LVieira
  • Members
  • 12 posts
  • Last active: Jun 06 2012 07:15 AM
  • Joined: 06 Jun 2012
Can u post your code so I could take a look at it? I dont know what u mean by move key, I only use the mouse to move on diablo.

Edit: Nevermind found it, that's so cool, thanks for pointing it out!

shadowchao
  • Members
  • 9 posts
  • Last active: Jun 05 2012 04:57 PM
  • Joined: 05 Jun 2012
No worries remember to use teleport to go through the gate.