Eternium
Eternium

Announcement

Collapse
No announcement yet.

WORKING AHK Script to bind potions to keys - PC game play

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • WORKING AHK Script to bind potions to keys - PC game play

    This is very easy.. download auto hot key and copy past this into a script from: https://autohotkey.com/

    Site is secure and safe, only download from trusted sites.

    The X and Y locations here are Axis locations on your screen. 720x1080 as an example.

    When this script runs and you press F2 or
    F3 the mouse will move to the specificed location of X,Y, and click once, then return your mouse to it's location before you pressed it.
    This is the code

    Originally posted by adjacentengels View Post
    After adding in header lines recommended on some of the scripts I checked, I got this working to have F2 and F3 functions in one script.

    Originally posted by adjacentengels View Post
    Code:
    x_p := 999
    y_p := 999
    
    x_a := 999
    y_a := 999
    
    f2::
    {
    mousegetpos, start_x, start_y
    mouseclick, left, %x_p%, %y_p%, 1, 0
    mousemove, %start_x%, %start_y%, 0
    }
    return
    
    f3::
    {
    mousegetpos, start_x, start_y
    mouseclick, left, %x_a%, %y_a%, 1, 0
    mousemove, %start_x%, %start_y%, 0
    }
    return


    COPY AND PASTE ONLY THE BOLDED SECTION ABOVE - NOTHING ELSEAND ONLY CHANGE F2, F3, X, AND Y LOCATIONS BASED ON YOUR KEY PREFERENCE AND LOCATION ON YOUR PC. (note: you are changing the 999 NOT the Xand Y)

    If you need additional help installing AHK and editing the script please use the AHK forums and the manual (it's not super user friendly but it's VERY easy to set this up. If you're trying your best and you can't figure it out DM my inbox and I will help you.
    Last edited by strut v 900; 01-17-2018, 11:39 AM.
    KIFE NUJE WAFO 1716

    CLICK >>>
    HERE<<< FOR YOUTUBE CHANNEL FOR ETERNIUM PLAY/GUIDES


  • #2
    After adding in header lines recommended on some of the scripts I checked, I got this working to have F2 and F3 functions in one script.

    Code:
    x_p :=  30
    y_p := 800
    
    x_a := 110
    y_a := 800
    
    f2::
    {
       mousegetpos, start_x, start_y
       mouseclick, left, %x_p%, %y_p%, 1, 0
       mousemove, %start_x%, %start_y%, 0
    }
    return
    
    f3::
    {
       mousegetpos, start_x, start_y
       mouseclick, left, %x_a%, %y_a%, 1, 0
       mousemove, %start_x%, %start_y%, 0
    }
    return
    Last edited by adjacentengels; 01-16-2018, 10:19 PM.

    Comment


    • #3
      Depending on your AHK SendMode settings (and, by my curiosity, I'd like to know what others use - I'm with SendMode Event), you may want to encapsulate the click/move back with BlockInput On / BlockInput Off instructions. This will prevent your normal mouse activity from disturbing/conflicting the AHK activity.

      I also use:
      CoordMode, Mouse, Window

      So that the potion and apple coordinates don't change when/if I move the game window around (assuming you can play it in windowed mode).

      Comment


      • #4
        Nevermind...i figured this out but, is this cheating?

        how much rebinding keys can i do before dev's are mad?
        Last edited by Cultusfit; 05-10-2018, 10:23 AM.
        Lord Emperor of Bridge Navigational Systems Engineer for:
        Eternium 2: Rise of the bounty Hunters
        see post:https://forum.makingfun.com/forum/et...pply-for-a-job
        and https://forum.makingfun.com/forum/et...414-eternium-2

        Do NOT hire Xagan! He works for the enemy!!!

        Friend code: GEBA WABE WADI 4184

        If it's spelled bad. Horrible Grammar. Random words. No photo I was talking about. Or cut off mid sentence...
        It's my tablet, I'm sorry

        Comment


        • #5
          Originally posted by Cultusfit View Post
          Nevermind...i figured this out but, is this cheating?
          how much rebinding keys can i do before dev's are mad?
          It isn't cheating, if it was Travis wouldn't have made this a guide. You can't fully automate things.

          Comment


          • #6
            Cultusfit pressing one key to do three things probably isn't a good idea.

            Comment


            • #7
              Definitely not a good idea.

              Comment


              • #8
                Originally posted by ྿༻Travis༺྿ (Support Mgr.) View Post
                Definitely not a good idea.
                Originally posted by fredrik.petersson
                ...Also since it's 1-to-1 mapping, then by default you're also saying that using the keyboard shortcuts on the PC version is also cheating. LOL?
                Please keep up. I wasn't saying there's anything wrong with 1-to-1 mapping.
                Originally posted by Humus View Post
                Cultusfit pressing one key to do three things probably isn't a good idea.

                Comment


                • #9
                  Quick add.
                  since everyone might hae different screen resolutions if you run this script and have the caps lock on it gives the coordinates of your mouse.
                  This will let you figure you where the buttons are


                  #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.

                  #Warn ; Recommended for catching common errors.

                  SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

                  SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.



                  ; While CapsLock is toggled On

                  ; Script will display Mouse Position (coordinates) as a tooltip at Top-Left corner of screen.

                  ; Also allows to copy them (to clipboard) with a PrintScreen button.



                  #SingleInstance force ; only one instance of script can run



                  #Persistent ; to make it run indefinitely

                  settimer start1, 0 ; "0" to make it update position instantly

                  return



                  start1:

                  if !GetKeyState("capslock","T") ; whether capslock is on or off

                  {

                  tooltip ; if off, don't show tooltip at all.

                  }

                  else

                  { ; if on

                  CoordMode, ToolTip, Screen ; makes tooltip to appear at position, relative to screen.

                  CoordMode, Mouse, Screen ; makes mouse coordinates to be relative to screen.

                  MouseGetPos xx, yy ; get mouse x and y position, store as %xx% and %yy%

                  tooltip %xx% %yy%, 0, 0 ; display tooltip of %xx% %yy% at coordinates x0 y0.

                  PrintScreen:: ; assign new function to PrintScreen. If pressed...

                  clipboard == %xx% %yy% ; ...store %xx% %yy% to clipboard.

                  return

                  }

                  return
                  Lord Emperor of Bridge Navigational Systems Engineer for:
                  Eternium 2: Rise of the bounty Hunters
                  see post:https://forum.makingfun.com/forum/et...pply-for-a-job
                  and https://forum.makingfun.com/forum/et...414-eternium-2

                  Do NOT hire Xagan! He works for the enemy!!!

                  Friend code: GEBA WABE WADI 4184

                  If it's spelled bad. Horrible Grammar. Random words. No photo I was talking about. Or cut off mid sentence...
                  It's my tablet, I'm sorry

                  Comment


                  • #10
                    Originally posted by Cultusfit View Post
                    Quick add.
                    since everyone might hae different screen resolutions if you run this script and have the caps lock on it gives the coordinates of your mouse.
                    This will let you figure you where the buttons are...
                    In layman's terms.. uhm.. how can I apply this? I can only understand you guys can do something like making the script work (so that it won't suddenly affect current mouse movement). I want to know that if someone can help.. and also a suspend and remove suspend keys on the script if possible. Cheers!
                    Bounty Hunters: Aice Sang (Assault), Natalia (Stalker)

                    Mage: Seulgi (Exp), Suzybae (ANB 3 3rd & Live-LB 11th)

                    Warrior: Asuna

                    FIRU VARI WAFI 3808 (Mobile & PC)

                    Comment


                    • #11
                      Originally posted by Suzy.Bae View Post
                      In layman's terms.. uhm.. how can I apply this? I can only understand you guys can do something like making the script work (so that it won't suddenly affect current mouse movement). I want to know that if someone can help.. and also a suspend and remove suspend keys on the script if possible. Cheers!
                      When the script above it applied it works by:
                      you press the key desired and the mouse will move to the potion and click and move back. It happens in way that you never actually see the mouse move.

                      this part gets the mouses position when you press the key: mousegetpos, start_x, start_y
                      this part causes the mouse to click at the location that the potion or apple icon is located at : mouseclick, left, %x_p%, %y_p%, 1, 0
                      and this moves it back to where the mouse was was when it started: mousemove, %start_x%, %start_y%, 0

                      if you are something like a left handed player and wanted to do a ONE FOR ONE BINDING! so that you played with your right hand to press keys: you would do something like: p:: { send 1 } return which would cause pressing p to send the ability at 1.

                      Now you pop over to discord and start typing and say purple potato...it will come out as 1urple 1otato

                      to suspend them on your start bar there is an auto hotkey icon. Click on it and click suspend. Tada Any other questions? Here is the documentation. https://autohotkey.com/docs/AutoHotkey.htm Some of the things have special names, or characters you need in there to get it to recognize that its the key you want and not part of the script and such. They are listed in the documentation.

                      Dont forget only one to one, single press binding are okay. It's more of a disabiliy aid (you know, missing a finger, left handed like me etc) than something that's to be used for setting up multiple attacks, rotations etc.
                      Lord Emperor of Bridge Navigational Systems Engineer for:
                      Eternium 2: Rise of the bounty Hunters
                      see post:https://forum.makingfun.com/forum/et...pply-for-a-job
                      and https://forum.makingfun.com/forum/et...414-eternium-2

                      Do NOT hire Xagan! He works for the enemy!!!

                      Friend code: GEBA WABE WADI 4184

                      If it's spelled bad. Horrible Grammar. Random words. No photo I was talking about. Or cut off mid sentence...
                      It's my tablet, I'm sorry

                      Comment


                      • #12
                        Originally posted by Cultusfit View Post

                        When the script above it applied it works by:.....[/B]
                        TL;DR - It's too overwhelming for someone who doesn't do programming or even the basic of it, thanks though.. I figured out all I need to add is this.

                        `::Suspend

                        Then it basically allows me to suspend and unsuspend the hotkey, enabling me to type again with default keys on the keyboard.

                        I'm going to also find a way to make something like this click on certain parts of my inventory to auto convert roughs and common gemstones into higher ones by three's if that's allowed? (Travis)

                        Basically, what it will do, if done correctly, is convert all roughs and commons in group of 3 3rd tier gemstones.. (the tier after commons by 3 so I get radiants).
                        Bounty Hunters: Aice Sang (Assault), Natalia (Stalker)

                        Mage: Seulgi (Exp), Suzybae (ANB 3 3rd & Live-LB 11th)

                        Warrior: Asuna

                        FIRU VARI WAFI 3808 (Mobile & PC)

                        Comment


                        • #13
                          Originally posted by Suzy.Bae View Post

                          TL;DR - It's too overwhelming for someone who doesn't do programming or even the basic of it, thanks though.. I figured out all I need to add is this.

                          `::Suspend

                          Then it basically allows me to suspend and unsuspend the hotkey, enabling me to type again with default keys on the keyboard.

                          I'm going to also find a way to make something like this click on certain parts of my inventory to auto convert roughs and common gemstones into higher ones by three's if that's allowed? (Travis)

                          Basically, what it will do, if done correctly, is convert all roughs and commons in group of 3 3rd tier gemstones.. (the tier after commons by 3 so I get radiants).
                          It would be possible...
                          if you try to set it to auto and dont have the EXACT right number of stones it will end up doing weird stuff when it clicks and there isnt a fuse button....
                          But if you set up something like number pad 7 selects column 1 and clicks fuse it would be okay...then 4 does column 1 row 2....

                          I think you are pushing the NO GO zone there though. I asked about setting a delay to smoke screen. JUST FOR stat checking. You know go into the training round, i click attack and it starts attacking, delay 10 second smoke screen.
                          Figured I could get WAY more precise numbers. And I was told "you are playing with fire, setting a hot key to do more than one thing is against the rules" (uh paraphrased but the fire thing is right)

                          So i dont think they would actually like that
                          Lord Emperor of Bridge Navigational Systems Engineer for:
                          Eternium 2: Rise of the bounty Hunters
                          see post:https://forum.makingfun.com/forum/et...pply-for-a-job
                          and https://forum.makingfun.com/forum/et...414-eternium-2

                          Do NOT hire Xagan! He works for the enemy!!!

                          Friend code: GEBA WABE WADI 4184

                          If it's spelled bad. Horrible Grammar. Random words. No photo I was talking about. Or cut off mid sentence...
                          It's my tablet, I'm sorry

                          Comment


                          • #14
                            Originally posted by Cultusfit View Post

                            It would be possible...
                            if you try to set it to auto and dont have the EXACT right number of stones it will end up doing weird stuff when it clicks and there isnt a fuse button....
                            But if you set up something like number pad 7 selects column 1 and clicks fuse it would be okay...then 4 does column 1 row 2....

                            I think you are pushing the NO GO zone there though. I asked about setting a delay to smoke screen. JUST FOR stat checking. You know go into the training round, i click attack and it starts attacking, delay 10 second smoke screen.
                            Figured I could get WAY more precise numbers. And I was told "you are playing with fire, setting a hot key to do more than one thing is against the rules" (uh paraphrased but the fire thing is right)

                            So i dont think they would actually like that
                            Then no.
                            Bounty Hunters: Aice Sang (Assault), Natalia (Stalker)

                            Mage: Seulgi (Exp), Suzybae (ANB 3 3rd & Live-LB 11th)

                            Warrior: Asuna

                            FIRU VARI WAFI 3808 (Mobile & PC)

                            Comment


                            • #15
                              Mapping it to do more than one click is not ok, so mapping it to fuse Gemstones would not be ok. Only 1:1 mapping is acceptable.

                              Comment

                              Working...
                              X