Updating AHK Script for v1.0

Posts 110 of 10 · Page 1 of 1
Updating AHK Script for v1.0
Hi,

Could someone please help me update the AHK script i use?

For some reason since the 124 patch it wont move the items. However, the action still happens if you get what i mean. Let me know if i need to paste the code..

Thanks
It's a known issue and I've been looking into it. Admittedly, I haven't spent a great deal of time looking at it. Assuming you're talking about my script, that is.
i think i use a different one to you but same principle..

the only reason i want to update it is so that i can go on a duping binge and see if the rumours that its just harder to do are correct..

chances are though that duping is fixed..
Havent tried it, but maybe just changing the sleeping time after the Click D, Click u and MouseMove for greater values will do the trick.
For example, in the following code you should change the numbers after Sleep:
MouseMove, sxn, syt
Sleep, 75
Click D
Sleep, 75
MouseMove, sxn, sy
Sleep, 75
Click U
Sleep, 100

EDIT: The bigger the numbers, the slower the script will be.
Metal - that is the script i use... do you think the script is just running too quick for this patch?

i dont think thats the issue... i think its the actual mousemove command.. i mean, it still does the movements.. it just doesnt drag the items..

im just confused where to start with this..
SetDefaultMouseSpeed 5 -- Vault to inventory will work. You don't need sleep commands anymore.

Inventory to vault won't work with just that though. Need to add a small "random" movement.

MouseMove x1, y1
Click down
MouseMove x1+10, y1+10
MouseMove x2, y2
Click up
Quote Originally Posted by Nisuxen View Post
SetDefaultMouseSpeed 5 -- Vault to inventory will work. You don't need sleep commands anymore.

Inventory to vault won't work with just that though. Need to add a small "random" movement.

MouseMove x1, y1
Click down
MouseMove x1+10, y1+10
MouseMove x2, y2
Click up
Giving SetDefaultMouseSpeed a bigger number works. The problem I think is that the game is retrieving the mouse move for the inv too slowly and is working like a sh*t. Hope they repair it soon.

---------- Post added at 12:49 PM ---------- Previous post was at 12:44 PM ----------

Quote Originally Posted by MateyB View Post
do you mean it should be like..

MouseClickDrag, left, sxn, syt, sxn, sy, 15
Sleep, 75
Click D
Sleep, 75
MouseClickDrag, left, sxn, syt, sxn, sy, 15
Sleep, 75
Click U
Sleep, 100

slightly confused..
No, it should be just :
MouseClickDrag, left, sxn, syt, sxn, sy, 15

It replaces all the lines with:
Sleep
Click
Mousemove

Just make sure you put the right values. If the first mousemove is "MouseMove, firstvalue, secondvalue" and the second is "MouseMove, thirdvalue, fourthvalue" then you get those values and make the MouseClickDrag:
MouseClickDrag, left, firstvalue, secondvalue, thirdvalue, fourthvalue, 15

See the example I used above.

---------- Post added at 12:56 PM ---------- Previous post was at 12:49 PM ----------

This is the flamewind script with the small modification:
Code:
;;                    //-- INSTRUCTIONS --//                                                    ;;
;;                                                                                              ;;
;;  Client must be set to default size (Also, don't use the webclient)                          ;;
;;                                                                                              ;;
;;  All keys to use are the arrow keys (Bar Shift+RightClick to debug and F12 to close script)  ;;
;;   Down  - Drags all items into chest from invent                                             ;;
;;   Up    - Drags all items into invent from chest but hanging on the last one                 ;;
;;   Right - Drops the item held from 'Up' and presses Alt+F4                                   ;;
;;   Left  - Would not recommend using (See bottom of script for how to use)                    ;;
;;                                                                                              ;;
;;                    //-~-~-~-~-~-~-~-~-//    Script by -Flamewind-                            ;;
 
 
#SingleInstance force  ;The below co-ords are for the first slot in you're invent/chest
sx=645    ;Slot X (You can change these co-ordinates if you're not using the default size)
syt=475   ;Slot Y - Invent
sy=580    ;Slot Y - Chest
sytn=520
syn=625
li=false
 
cmx=11
cmy=636
Return
 
;;--  Start of dragging all items out of invent, into chest script --;;
 
Down::
CoordMode, Mouse, Relative
j=0
k=0
While j < 8
{
        If j < 4
        {
                sxn:=sx+(45*j)
				MouseClickDrag, left, sxn, syt, sxn, sy, 15
        }
        Else
        {
                sxn:=sx+(45*k)
				MouseClickDrag, left, sxn, sytn, sxn, syn, 15
                k++
        }
        j++
}
Return
 
;;--  End of invent -> chest script  --;;
;;--  Start of dragging all items out of chest, into invent and hanging on the last item  --;;
 
Up::
CoordMode, Mouse, Relative
j=0
k=0
While j < 7
{
        If j < 4
        {
                sxn:=sx+(45*j)
				MouseClickDrag, left, sxn, sy, sxn, syt, 15
        }
        Else
        {
                sxn:=sx+(45*k)
				MouseClickDrag, left, sxn, syn, sxn, sytn, 15
                k++
        }
        j++
}
If j = 7
{
        sxn:=sx+(45*k)
        MouseMove, sxn, syn
        Sleep, 75
        Click D
        Sleep, 75
        MouseMove, sxn, sytn
        li=true
}
Return
 
;;--  End of chest -> invent script  --;;
 
Right::          ; <-- This is a shortcut for letting go of the item and using Alt+F4 after using the Up key (See above code)
If li = true
{
        Click U
        Sleep, 75
        Send, !{F4}
        li=false
}
Return
 
;--  Start of something I made to see if I could get AHK to detect the connect messages and do the timing for me ^_^  --;
 
+Left::
CoordMode, Mouse, Screen
MouseGetPos, cmx, cmy
Return
 
~Left::
CoordMode, Pixel, Screen
If li = true
{
        While GetKeyState("Left")
        {
                If li = true
                {
                        PixelGetColor, cmc, %cmx%, %cmy%
                        If cmc = 0xFE0000
                        {
                                Sleep, 75       ; <-- If you're going to use this part of the script you may want to tweak the timings a bit
                                Click U
                                Sleep, 75
                                Send, !{F4}
                                li=false
                        }
                }
        }
}
Return
 
;--  End of connection message detect  --;
 
+RButton::                               ;  <-- This is just for debugging purposes (After you use Shift+Left to show the position of the
CoordMode, Pixel, Screen                 ;       connection messages to the script, you need to make sure that the script is detecting
PixelGetColor, cmc, %cmx%, %cmy%         ;       the exact colours 0xFE0000, for blue and 0x0000FE for red.)
MsgBox, , , CMC %cmc%, CMX/Y %cmx% %cmy%
Return
 
F12::
ExitApp
Quote Originally Posted by MateyB View Post
l mousemove command.. i mean, it still does the movements.. it just doesnt drag the items..
Then its still dragging the items from the inv (but not taking them) or is it that the cursor is dragging from a different position?

EDIT: ok. Have tried the script and saw the problem

Try with MouseClickDrag instead of "click D" and "mousemove".

It works.

EDIT 2:

For example, where it says

Code:
                MouseMove, sxn, syt
                Sleep, 75
                Click D
                Sleep, 75
                MouseMove, sxn, sy
                Sleep, 75
                Click U
                Sleep, 100
you should place
Code:
MouseClickDrag, left, sxn, syt, sxn, sy, 15
do you mean it should be like..

MouseClickDrag, left, sxn, syt, sxn, sy, 15
Sleep, 75
Click D
Sleep, 75
MouseClickDrag, left, sxn, syt, sxn, sy, 15
Sleep, 75
Click U
Sleep, 100

slightly confused..
Well what do you mean? The MouseClickDrag method doesnt work anymore? or sth else?
just paste the code of the relevant part. i think i can help you

---------- Post added at 04:51 PM ---------- Previous post was at 04:45 PM ----------

Quote Originally Posted by MetalRocks View Post
Giving SetDefaultMouseSpeed a bigger number works. The problem I think is that the game is retrieving the mouse move for the inv too slowly and is working like a sh*t. Hope they repair it soon.

---------- Post added at 12:49 PM ---------- Previous post was at 12:44 PM ----------



No, it should be just :
MouseClickDrag, left, sxn, syt, sxn, sy, 15

It replaces all the lines with:
Sleep
Click
Mousemove

Just make sure you put the right values. If the first mousemove is "MouseMove, firstvalue, secondvalue" and the second is "MouseMove, thirdvalue, fourthvalue" then you get those values and make the MouseClickDrag:
MouseClickDrag, left, firstvalue, secondvalue, thirdvalue, fourthvalue, 15

See the example I used above.

---------- Post added at 12:56 PM ---------- Previous post was at 12:49 PM ----------

This is the flamewind script with the small modification:
Code:
;;                    //-- INSTRUCTIONS --//                                                    ;;
;;                                                                                              ;;
;;  Client must be set to default size (Also, don't use the webclient)                          ;;
;;                                                                                              ;;
;;  All keys to use are the arrow keys (Bar Shift+RightClick to debug and F12 to close script)  ;;
;;   Down  - Drags all items into chest from invent                                             ;;
;;   Up    - Drags all items into invent from chest but hanging on the last one                 ;;
;;   Right - Drops the item held from 'Up' and presses Alt+F4                                   ;;
;;   Left  - Would not recommend using (See bottom of script for how to use)                    ;;
;;                                                                                              ;;
;;                    //-~-~-~-~-~-~-~-~-//    Script by -Flamewind-                            ;;
 
 
#SingleInstance force  ;The below co-ords are for the first slot in you're invent/chest
sx=645    ;Slot X (You can change these co-ordinates if you're not using the default size)
syt=475   ;Slot Y - Invent
sy=580    ;Slot Y - Chest
sytn=520
syn=625
li=false
 
cmx=11
cmy=636
Return
 
;;--  Start of dragging all items out of invent, into chest script --;;
 
Down::
CoordMode, Mouse, Relative
j=0
k=0
While j < 8
{
        If j < 4
        {
                sxn:=sx+(45*j)
				MouseClickDrag, left, sxn, syt, sxn, sy, 15
        }
        Else
        {
                sxn:=sx+(45*k)
				MouseClickDrag, left, sxn, sytn, sxn, syn, 15
                k++
        }
        j++
}
Return
 
;;--  End of invent -> chest script  --;;
;;--  Start of dragging all items out of chest, into invent and hanging on the last item  --;;
 
Up::
CoordMode, Mouse, Relative
j=0
k=0
While j < 7
{
        If j < 4
        {
                sxn:=sx+(45*j)
				MouseClickDrag, left, sxn, sy, sxn, syt, 15
        }
        Else
        {
                sxn:=sx+(45*k)
				MouseClickDrag, left, sxn, syn, sxn, sytn, 15
                k++
        }
        j++
}
If j = 7
{
        sxn:=sx+(45*k)
        MouseMove, sxn, syn
        Sleep, 75
        Click D
        Sleep, 75
        MouseMove, sxn, sytn
        li=true
}
Return
 
;;--  End of chest -> invent script  --;;
 
Right::          ; <-- This is a shortcut for letting go of the item and using Alt+F4 after using the Up key (See above code)
If li = true
{
        Click U
        Sleep, 75
        Send, !{F4}
        li=false
}
Return
 
;--  Start of something I made to see if I could get AHK to detect the connect messages and do the timing for me ^_^  --;
 
+Left::
CoordMode, Mouse, Screen
MouseGetPos, cmx, cmy
Return
 
~Left::
CoordMode, Pixel, Screen
If li = true
{
        While GetKeyState("Left")
        {
                If li = true
                {
                        PixelGetColor, cmc, %cmx%, %cmy%
                        If cmc = 0xFE0000
                        {
                                Sleep, 75       ; <-- If you're going to use this part of the script you may want to tweak the timings a bit
                                Click U
                                Sleep, 75
                                Send, !{F4}
                                li=false
                        }
                }
        }
}
Return
 
;--  End of connection message detect  --;
 
+RButton::                               ;  <-- This is just for debugging purposes (After you use Shift+Left to show the position of the
CoordMode, Pixel, Screen                 ;       connection messages to the script, you need to make sure that the script is detecting
PixelGetColor, cmc, %cmx%, %cmy%         ;       the exact colours 0xFE0000, for blue and 0x0000FE for red.)
MsgBox, , , CMC %cmc%, CMX/Y %cmx% %cmy%
Return
 
F12::
ExitApp
Why are you all using PixelGetColor???
That s creepy... lol
I use PixelSearch and mainly ImageSearch. and i randomized my timing. So when is the best time to exit? you got any idea. cause it never worked for me... my skript is autostarting etc crashing vaultconnection and everything... so i had already about 150 attempts and randomized ms values after Connection Failed, Connecting To Vault and Connected messages... from 0 - 1000 never worked... i ve got no idea why..
Posts 110 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?