Welcome to the Rise of Agon Community

Create an account today to engage in discussions and community events on the Rise of Agon forums.

Enchanting Macro

Discussion in 'New Player Tips & Tricks' started by RabbleRabble, Aug 18, 2018.

  1. RabbleRabble

    RabbleRabble Deadeye
    Legend

    Joined:
    Oct 17, 2015
    Messages:
    160
    Likes Received:
    135
    Here is an enchanting macro for AHK:
    ctr+alt+ a starts it
    Hold F11 to stop

    to set each position Hold control then the appropriate F1-F12 key

    F1: middle of the enchanting box where you drag the item to enchant(set the position right in the middle)
    F2/F3/F4 are the posiitons you drag your enchant mats to in the UI
    F5 is the catalyst on the UI
    F6 is where you want the item to be drug back to after enchant
    F7 enchant button
    F8/F9/F10 are the enchanting mats in your bag
    F11 catalyst in your bag
    f12 item to enchant


    Code:
    Class Position {
        X := 0
        Y := 0
        __New(x, y) {
            this.X := x
            this.Y := y
        }
    }
     
    
    
    ;Ctr F1 sets position of Item Target
    ^F1::
    {
    
    MouseGetPos, xt, yt
    ItemTarget := new Position(xt,yt)
    }
    return
    
    ;Ctr F2 sets position of MatTaget1
    ^F2::
    {
    MouseGetPos, xt, yt
    MatTarget1 := new Position(xt,yt)
    }
    return
    
    ;Ctr F3 sets position of MatTaget2
    ^F3::
    {
    MouseGetPos, xt, yt
    MatTarget2 := new Position(xt,yt)
    }
    return
    
    ;Ctr F4 sets position of MatTarget3
    ^F4::
    {
    MouseGetPos, xt, yt
    MatTarget3 := new Position(xt,yt)
    }
    return
    
    
    ;Ctr F5 sets position of Catalyst
    ^F5::
    {
    MouseGetPos, xt, yt
    CatalystTarget := new Position(xt,yt)
    }
    return
    
    ;Ctr F6 sets position of ItemBackTarget
    ^F6::
    {
    MouseGetPos, xt, yt
    ItemBackTarget := new Position(xt,yt)
    }
    return
    
    ;Ctr F7 sets position of EnchantClick
    ^F7::
    {
    MouseGetPos, xt, yt
    EnchantClick := new Position(xt,yt)
    }
    return
    
    ;Ctr F8 sets position of Mat1
    ^F8::
    {
    MouseGetPos, xt, yt
    Mat1 := new Position(xt,yt)
    }
    return
    
    ;Ctr F9 sets position of Mat2
    ^F9::
    {
    MouseGetPos, xt, yt
    Mat2 := new Position(xt,yt)
    }
    return
    
    ;Ctr F10 sets position of Mat3
    ^F10::
    {
    MouseGetPos, xt, yt
    Mat3 := new Position(xt,yt)
    }
    return
    
    ;Ctr F11 sets position of Catalyst
    ^F11::
    {
    MouseGetPos, xt, yt
    Catalyst := new Position(xt,yt)
    }
    return
    
    ;Ctr F12 sets position of Item to enchant
    ^F12::
    {
    MouseGetPos, xt, yt
    Item1 := new Position(xt,yt)
    }
    return
    
    
    
    
    
     
    ;Show positions
    ^!q::
    {
        showPosition(ItemTarget)
        if GetKeyState("F11", "P") {
            return
        }
        showPosition(MatTarget1)
        if GetKeyState("F11", "P")
            return
        showPosition(MatTarget2)
        if GetKeyState("F11", "P")
            return
        showPosition(MatTarget3)
        if GetKeyState("F11", "P")
            return
        showPosition(CatalystTarget)
        if GetKeyState("F11", "P")
            return
        showPosition(EnchantClick)
        if GetKeyState("F11", "P")
            return
        showPosition(Mat1)
        if GetKeyState("F11", "P")
            return
        showPosition(Mat2)
        if GetKeyState("F11", "P")
            return
        showPosition(Mat3)
        if GetKeyState("F11", "P")
            return
        showPosition(Catalyst)
        if GetKeyState("F11", "P")
            return
        showPosition(Item1)
        if GetKeyState("F11", "P")
            return
        showPosition(ItemBackTarget)
    }
    return
     
    ^!w::
    {
        MouseGetPos, mouseX, mouseY
        MsgBox First co-ordinate is  %mouseX%, %mouseY%
    }
    return
     
     
    showPosition(obj1) {
        MouseMove, obj1.X, obj1.Y, 10
        Sleep, 500
    }
     
    ;Enchant 1st row
    ^!a::
    Loop 180
    {
        if GetKeyState("F11", "P") {
            Break
        }
     
        grabObject(Item1, ItemTarget)
        shiftGrabObject(Catalyst, CatalystTarget, 1)
        shiftGrabObject(Mat1, MatTarget1, 5)
        shiftGrabObject(Mat2, MatTarget2, 5)
        shiftGrabobject(Mat3, MatTarget3, 5)
     
        Sleep, 100
        enchant(EnchantClick)
        Loop 152 {
            if GetKeyState("F11", "P") {
                Break
            }
           
        }
       
        grabObject(ItemTarget, ItemBackTarget)
     
    }
    return
     
    grabObject(obj1, obj2) {
        MouseClickDrag, L, obj1.X, obj1.Y, obj2.X, obj2.Y, 5  
        Sleep, 20
    }
     
    shiftGrabObject(obj1, obj2, key)
    {
        Send, {shift down}
        Sleep, 20
        MouseClickDrag, L, obj1.X, obj1.Y, obj2.X, obj2.Y, 5  
        Sleep, 20
        Send, {shift up}
        Sleep, 20
        Send, {%key%}
        Sleep, 20
        Send, {ENTER}
        Sleep, 10
    }
     
    enchant(obj) {
        x := obj.X
        y := obj.Y
        Click %x%, %y%
        Sleep, 2000
    }
     
    #1 RabbleRabble, Aug 18, 2018
    Last edited: Aug 18, 2018
    onslaught, Kantor and Blaze like this.
  2. Sero

    Sero Forest Golem
    Legend

    Joined:
    Apr 8, 2016
    Messages:
    4,647
    Likes Received:
    5,645
    Back in my day, you used to have to do this for DAYS. x.x
     
    Collapse Signature Expand Signature
    Cudelr and AbyssWalker like this.
  3. Leafcrawl

    Leafcrawl Goblin Warlord

    Joined:
    May 2, 2017
    Messages:
    79
    Likes Received:
    313
    The entire Enchantment UI needs to be improved imo.
     
    HeganHatsumo and onslaught like this.
  4. Flux D

    Flux D Deadeye
    Legend

    Joined:
    Feb 24, 2016
    Messages:
    171
    Likes Received:
    119
    A super easy and significant improvement to make would be the ability to drag stacks of gems and stacks of mats without having to change anything UI...
     
    Collapse Signature Expand Signature
  5. Void

    Void Celestial
    Loyal Legend

    Joined:
    Apr 11, 2016
    Messages:
    626
    Likes Received:
    384
    this would be 100 times better then the current
     
  6. Flux D

    Flux D Deadeye
    Legend

    Joined:
    Feb 24, 2016
    Messages:
    171
    Likes Received:
    119
    technically, you can already drag stacks of mats...but only enough for 1 enchant lol.

    enabling a stack of mats and gems to be applied all to the same enchant shouldn't be that much more of a difficult endeavor and also remove fail loss...
     
    Collapse Signature Expand Signature
  7. Dixie Normus

    Dixie Normus Black Knight
    Legend

    Joined:
    Sep 14, 2015
    Messages:
    1,179
    Likes Received:
    1,176
    Should be a drop down menu of enchants that you can pick that automatically grabs the requisite mats out of your bag.

    Can be greyed our if you are missing some mats.
     
    Collapse Signature Expand Signature
    Andrew likes this.
  8. streaml1ne

    streaml1ne Windlord
    Legend

    Joined:
    Nov 9, 2015
    Messages:
    279
    Likes Received:
    209
    Keep the last selected entry in the drop down and accept a bag with the items you want to enchant and that'd work. This way if you want to enchant a few swords, select what you want, drag the weapon in, click go, drag a new weapon in click go. Otherwise if you want to bulk enchant drop a bag of swords and click go once. Convenience no matter which way you slice it.
     
    Dixie Normus likes this.
  9. Methodico

    Methodico Gravelord

    Joined:
    Apr 14, 2016
    Messages:
    226
    Likes Received:
    181
    We need a better UI with recipes and the possibility to stacks items....like 10 x swords r60 keen q4--> start
     
  10. Andrew

    Andrew Obsidian Golem
    Staff Member BPG Representative

    Joined:
    Aug 25, 2015
    Messages:
    1,801
    Likes Received:
    4,188
    I think the best method is likely to simply have enchanting of gems only and allow it to be a selection instead of the discovery method with a queue. While it was an interesting concept a decade ago it is more tedious than valuable and shortly lived before all the recipes get out publicly.
     
    Collapse Signature Expand Signature
    #10 Andrew, Oct 10, 2018
    Last edited: Oct 10, 2018
    Magos and Void like this.
  11. Thrill Kill

    Thrill Kill Goblin Warrior
    Supporter

    Joined:
    Apr 16, 2016
    Messages:
    26
    Likes Received:
    19
    Generally, I am all for working to a goal and not feeding the entitled mentality. But damn is enchanting a PITA
     
  12. Methodico

    Methodico Gravelord

    Joined:
    Apr 14, 2016
    Messages:
    226
    Likes Received:
    181
    Enchanting make this game unbalanced and force people to follow only one direction. It's tedious and increases the difference between vets and non vets.
     
    Blaze and Thrill Kill like this.
  13. Void

    Void Celestial
    Loyal Legend

    Joined:
    Apr 11, 2016
    Messages:
    626
    Likes Received:
    384
    With no self buffs protection jewelry is op
     
  14. Methodico

    Methodico Gravelord

    Joined:
    Apr 14, 2016
    Messages:
    226
    Likes Received:
    181
    The difficulty of this game is the combat so people have to train for increase their personal skill, so we didn't need other difficult thing to think like enchanting that make this game slow boring and tedious.