Sign in to follow this  
Followers 0
Sirgijoe

Script for "Risk your life" game

4 posts in this topic

Hello,, been working on this for a bit, maybe someone can shed some light on what I am missing here.

the script is for spamming the E key to automatically pick up items for me in RYL game, so I don't get carpal tunnel. <have to spam it a lot>

The problem I am having is that, while the script is running, it makes my mouse move rapidly to the center of the screen, and back to whatever position I had it in before, I thought at first it was the tool tips causing the issue but it did it even when I took them out of the code.

Another thing it makes my character do is move very slow, and I am having trouble using any other buttons while script is running.

If I spam the E key in game myself,, none of these issues happen,

Please help if you can! I haven't done to many Autoit scripts, But I'm trying to Learn the best I can!

Global $Paused
HotKeySet("{INSERT}", "Pause")
HotKeySet("{ESC}", "Terminate")

While 1
    ToolTip("ON",0,0)
    Send("E")
    Sleep(10)
WEnd

Func Pause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        ToolTip("OFF",0,0)
    WEnd
EndFunc

Func Terminate()
    Exit
EndFunc

The only dumb question is the one not asked!

Share this post


Link to post
Share on other sites



What you are doing now is sending the E key 100 times per second. IIRC that is far more than a human is able to do so you spamming the key and not having any lag-issues is not applicable in this case. Try setting the sleep to 100 for 10 times per second or some other way that works for you.


[right]~What can I say, I'm a Simplistic person[/right]

Share this post


Link to post
Share on other sites

What you are doing now is sending the E key 100 times per second. IIRC that is far more than a human is able to do so you spamming the key and not having any lag-issues is not applicable in this case. Try setting the sleep to 100 for 10 times per second or some other way that works for you.

Yeah I also thought about this to, tried it with sleep(100) and the issue still persisted. And I also tried it at (1000), the longer I let it "sleep" the less the issue happens, but it still happens 8(. I'll up the sleep time again, and leave it up at about 100 or 200.

<Also, thank you so much for the fast reply toonboon, I really do appreciate it a lot.

if I may ask, is there a way for me to change the color or the text in tooltips by any chance? I was trying to make the OFF tooltip bright red so that I could easily spot if I accidentally bumped it during game play.


The only dumb question is the one not asked!

Share this post


Link to post
Share on other sites

Well,, I finally figured it out. my problem was not the delay, it was the capitalized E in the script, it needed to be an e.

works awesome in game, I completed took out the sleep function while not paused as to make it pick the items up as fast as possible. and under normal conditions your not going to be running for long periods of time, but if you find that it is starting to "eat" cpu, you can add in the Sleep(10) line as to break it up a bit but I find for me at least, I don't need it <yet!>

anyways here is the finished code, enjoy!

Global $Paused
HotKeySet("{INSERT}", "Pause")
HotKeySet("{ESC}", "Terminate")

While 1
    ToolTip("JOE'S PRO PICKER IS OFF",0,0)
    Sleep(1000)
WEnd

Func Pause()
    $Paused = Not $Paused
    While $Paused
        Send("e")
        ToolTip("JOE'S PRO PICKER IS ON",0,0)
    WEnd
EndFunc

Func Terminate()
    Exit
EndFunc

The only dumb question is the one not asked!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0