Jump to content

Welcome to DreamBot!

Download for Free

Supercharge Your Bots

Run unlimited bots today using DreamBot's Covert Mode and
stay more protected.

Upgrade Now
Frequently Asked Questions
  • Are you not able to open the client? Make sure you have Java 8 installed
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox

Interested in advertising your business? Reach out today!

Download the DreamBot client today!
Sign in to follow this  
EJupiter

AutoHotKey 1 tick prayer flick toggle/loop

Recommended Posts

I'd like to preface by saying I am very new to Runescape so my mechanics are not yet polished, but this also has me a bit stumped.

 

I made an AHK toggle/loop that simply clicks once, waits ~500 ms, clicks again, waits the difference of ~600 ms (1 game tick?), then loops.  This works for 1 tick pray flicking for around 5-6 repetitions before it no longer syncs correctly and the prayer drops allowing me to get hit.  I have tried a lot of different timings and still get the same issue.

 

Any advice?

XButton1::

F3Run := !F3Run
   If (!F3Run)
      Return

   While (F3Run)
   {

MouseClick, left
Random, sleep1, 505, 515 ; prayer active
Sleep sleep1
Random, sleep2, 595, 605
sleep4 := sleep2 - sleep1 ; double click speed
MouseClick, left
Sleep sleep4
}
return

Share this post


Link to post
Share on other sites

 

I'd like to preface by saying I am very new to Runescape so my mechanics are not yet polished, but this also has me a bit stumped.

 

I made an AHK toggle/loop that simply clicks once, waits ~500 ms, clicks again, waits the difference of ~600 ms (1 game tick?), then loops.  This works for 1 tick pray flicking for around 5-6 repetitions before it no longer syncs correctly and the prayer drops allowing me to get hit.  I have tried a lot of different timings and still get the same issue.

 

Any advice?

XButton1::

F3Run := !F3Run
   If (!F3Run)
      Return

   While (F3Run)
   {

MouseClick, left
Random, sleep1, 505, 515 ; prayer active
Sleep sleep1
Random, sleep2, 595, 605
sleep4 := sleep2 - sleep1 ; double click speed
MouseClick, left
Sleep sleep4
}
return

It will always eventually outsynch with game ticks, you could learn to do it yourself. Turn on game sounds and activate the prayer, deactive it when the sound comes up again

Share this post


Link to post
Share on other sites

It will always eventually outsynch with game ticks, you could learn to do it yourself. Turn on game sounds and activate the prayer, deactive it when the sound comes up again

This is a bit odd to me - you're saying there's no way to script it?  How do game ticks unsynch?  That is confusing to think about for me.

 

I know how to do it manually - that's why I made a script.  It's quite strenuous/annoying.

 

I was researching if there was a way to start a script based on sounds as a workaround for this issue but couldn't find anything.

Share this post


Link to post
Share on other sites

This is a bit odd to me - you're saying there's no way to script it?  How do game ticks unsynch?  That is confusing to think about for me.

 

I know how to do it manually - that's why I made a script.  It's quite strenuous/annoying.

 

I was researching if there was a way to start a script based on sounds as a workaround for this issue but couldn't find anything.

Well considering you are sleeping a random amount of MS it will eventually lead to outsynch of the game tick you started it on lets say you start it right now

Tick is currently at 0.5/0.6ms, your random sleep has a range of 10 in both cases. Sooner or later the clicks wont be correct anymore to keep up the prayflick

Also sound based scripts are not a thing afaik and would be a pain to implement

Share this post


Link to post
Share on other sites

Well considering you are sleeping a random amount of MS it will eventually lead to outsynch of the game tick you started it on lets say you start it right now

Tick is currently at 0.5/0.6ms, your random sleep has a range of 10 in both cases. Sooner or later the clicks wont be correct anymore to keep up the prayflick

Also sound based scripts are not a thing afaik and would be a pain to implement

The variance is + or - .005 seconds from exactly 1 game tick.  I doubt this has any meaningful impact on the desynch.  I have tried exact values as well with the same issue, it is also always on the ~5th repetition regardless of values.  Perhaps my in game ping varying would have a bigger impact?

Edited by EJupiter

Share this post


Link to post
Share on other sites

The variance is + or - .005 seconds from exactly 1 game tick.  I doubt this has any meaningful impact on the desynch.  I have tried exact values as well with the same issue, it is also always on the ~5th repetition regardless of values.  Perhaps my in game ping varying would have a bigger impact?

the wait time is not .005 seconds.

Share this post


Link to post
Share on other sites

the wait time is not .005 seconds.

it subtracts a random value of 595 to 605 ms from the amount of time waited while the prayer is up so that each loop is roughly 600 ms.  Like I said previously I've also tried exact values.  It would help if you pointed out which part of the script you were referring to.

 

For example, 

   While (F3Run)
   {

MouseClick, left

Sleep 500

MouseClick, left

Sleep 100
}

This still produces the same desync after 5 repetitions.  Is there some mechanic in play that prevents 1 tick pray flicking from not being scripted or are my mechanics/script just wrong?

Edited by EJupiter

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...