Macro's

Ask, answer and discuss any and all topics about the hows, whys, wheres and whens of playing Haven & Hearth.
User avatar
DigDog
Posts: 711
Joined: Mon Jul 19, 2010 1:52 am
Location: Germany

Re: Macro's

Post by DigDog »

serpentyngallery wrote:
Dusk wrote:Jorb and Loftar don't ban people for using macro's. Otherwise the population of haven and hearth would decrease significantly!
I'd actually be interested to see that, I somehow doubt the population would decrease as much as you think.
It would actually be positive since it reduces serverload caused by the macroers.
burgingham wrote:You call that beer?
User avatar
DatOneGuy
Posts: 5553
Joined: Sun Apr 18, 2010 7:50 am
Location: I'm in Miami, trick.

Re: Macro's

Post by DatOneGuy »

More than half the significant people would be gone, just about everyone worth their weight in salt used macros at some point.


Also, there can be very different macros, there can be for example macros to unload smelters, there could also however be macros to grind LP.

It's a lot better to edit these into the game client as part of it, but it's also significantly harder to learn Java than it is to learn AutoHotKey. If I knew how to set something like an empty smelters button in a client I'd try my hardest to do it, but I'm stuck with a crappy AHK script instead.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .Hi. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
User avatar
ElGato
Posts: 1945
Joined: Tue Nov 10, 2009 2:10 am

Re: Macro's

Post by ElGato »

Code: Select all

    $LAlt::
    while GetKeyState("LAlt", "P")
    {
        Click
        sleep, 4000
    }
    return


    $RAlt::
    while GetKeyState("RAlt", "P")
    {
        Click Right
        sleep, 1200
    }
    return
here you go :lol:
burgingham wrote:We are all Gato, and Gato is Delamore of course. Goons blablabla...
Caradon wrote:Gato, the anti-ghandi
Sabinati wrote:yeah we're gonna kill you gato!!!
User avatar
Granger
Posts: 9255
Joined: Mon Mar 22, 2010 2:00 pm

Re: Macro's

Post by Granger »

Sorry guys, AutoHotkey is nice when you want to code a MACRO, but it sucks when it comes to create a ROBOT (which does the really cool stuff by itself)..
⁎ Mon Mar 22, 2010 ✝ Thu Jan 23, 2020
User avatar
BoobyJo
Posts: 43
Joined: Sat Jul 24, 2010 4:32 am

Re: Macro's

Post by BoobyJo »

Granger wrote:Sorry guys, AutoHotkey is nice when you want to code a MACRO, but it sucks when it comes to create a ROBOT (which does the really cool stuff by itself)..
Like... silk?
"Nothing is too early nor too late, which is in due time for thee, O Universe."
User avatar
sabinati
Posts: 15527
Joined: Mon Jul 13, 2009 4:25 am
Location: View active topics

Re: Macro's

Post by sabinati »

yeah but this thread is about macro's [sic]
notalbanian
Posts: 95
Joined: Wed Aug 18, 2010 3:25 pm

Re: Macro's

Post by notalbanian »

DatOneGuy wrote:More than half the significant people would be gone, just about everyone worth their weight in salt used macros at some point.


Also, there can be very different macros, there can be for example macros to unload smelters, there could also however be macros to grind LP.

It's a lot better to edit these into the game client as part of it, but it's also significantly harder to learn Java than it is to learn AutoHotKey. If I knew how to set something like an empty smelters button in a client I'd try my hardest to do it, but I'm stuck with a crappy AHK script instead.
It would be nice if there was a bulk load/unload container option in the game.
aso11 wrote:
NaoWhut wrote:Our grasslands will block out the sun.
Wait... grassland doesn't fly. Dude, you've been playing too much Minecraft.
User avatar
ewlol
Posts: 775
Joined: Mon Mar 29, 2010 2:40 pm

Re: Macro's

Post by ewlol »

notalbanian wrote:
DatOneGuy wrote:More than half the significant people would be gone, just about everyone worth their weight in salt used macros at some point.


Also, there can be very different macros, there can be for example macros to unload smelters, there could also however be macros to grind LP.

It's a lot better to edit these into the game client as part of it, but it's also significantly harder to learn Java than it is to learn AutoHotKey. If I knew how to set something like an empty smelters button in a client I'd try my hardest to do it, but I'm stuck with a crappy AHK script instead.
It would be nice if there was a bulk load/unload container option in the game.

Shift + mouse-scroll (to take/out dump extremely fast)

Shift + ctrl + mouse-scroll (to dump/take out by ql)
User avatar
Sarchi
Posts: 2517
Joined: Sat Jun 12, 2010 1:14 am
Location: 109, -37

Re: Macro's

Post by Sarchi »

Well, it's easy to create a simple macro, but the good ones are hard to make.

Of course, I don't use macros anyway. Those are for cheaters.
User avatar
DatOneGuy
Posts: 5553
Joined: Sun Apr 18, 2010 7:50 am
Location: I'm in Miami, trick.

Re: Macro's

Post by DatOneGuy »

ewlol wrote:
notalbanian wrote:
DatOneGuy wrote:More than half the significant people would be gone, just about everyone worth their weight in salt used macros at some point.


Also, there can be very different macros, there can be for example macros to unload smelters, there could also however be macros to grind LP.

It's a lot better to edit these into the game client as part of it, but it's also significantly harder to learn Java than it is to learn AutoHotKey. If I knew how to set something like an empty smelters button in a client I'd try my hardest to do it, but I'm stuck with a crappy AHK script instead.
It would be nice if there was a bulk load/unload container option in the game.

Shift + mouse-scroll (to take/out dump extremely fast)

Shift + ctrl + mouse-scroll (to dump/take out by ql)
That's to dump to inventory, not to floor. The idea is to take out the bars and then dump the stones. My current method uses image correction (to ensure that they are all dumped without a problem), it relies on images and the code is ugly and bloated, but:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


F3::SetTimer, Sendit, -500

^#z::SetTimer, Sendit, off

sendit:
WinWait, Haven and Hearth, 
IfWinNotActive, Haven and Hearth, , WinActivate, Haven and Hearth, 
WinWaitActive, Haven and Hearth, 

ImageSearch, SmeltX, SmeltY, 0,0,%A_ScreenWidth%, %A_ScreenHeight%, *40 *TransWhite images\Smeltertext.png
if ErrorLevel = 1
 Msgbox No open Smelter
if ErrorLevel = 0
  {
   SmeltX1:= SmeltX - 60
   SmeltX2:= SmeltX + 110
   SmeltY1:= SmeltY + 10
   SmeltY2:= SmeltY + 190

 Loop 
   {
   ImageSearch, FoundX, FoundY, %SmeltX1%, %SmeltY1%, %SmeltX2%, %SmeltY2%, *40 *Transff00c0 images\Cast.png
    if ErrorLevel = 1
	break
    if ErrorLevel = 0
       {
       FoundX+=16
       FoundY+=16
       Send, {Shiftdown}
       Sleep, 50
       MouseClick, left, %FoundX%, %FoundY%
       Sleep, 50
       Send, {Shiftup}
       MouseMove,200,30,,R
       }
   }

  Loop
   {
    ImageSearch, StoneX, StoneY, %SmeltX1%, %SmeltY1%, %SmeltX2%, %SmeltY2%, *40 *Transff00c0 images\Stone.png
    if ErrorLevel = 1
	break
    if ErrorLevel = 0
       {
       StoneX+=9
       StoneY+=5
       Send, {Ctrldown}
       Sleep, 50
       MouseClick, left, %StoneX%, %StoneY%
       Sleep, 50
       Send, {Ctrlup}
       MouseMove,200,30,,R
       }  
   }
   
  }
return

#^a::Pause
As Granger said though bots (I guess you can call them robots, but I always just call them bots) are best done in Java, you really just `can't` make them in AHK, it won't work, it'll be way too big, AHK is best for small scripts at most a 'stupid macro', for example easily repetition, very light decision making, never factoring into account more than one thing. Bad for long amounts of time too.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .Hi. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Return to “How do I?”