Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Help with Button Spam


  • Please log in to reply
4 replies to this topic
Stormseek
  • Members
  • 10 posts
  • Last active: May 31 2014 07:30 AM
  • Joined: 25 Jun 2013

ok i made this script its for a MMO game.. it might be horrible looking for someone whois good at coding these.. but pretty much i hold F4 and it spams my healing item.. but i would like it to be faster if possible

 

 

$F4::
loop, 5
{
send, {Enter}
sleep, 0
}
return

 

Mistake its supposed to be

 

$F4::
loop, 5
{
send, {F4}
sleep, 0
}



HotKeyIt
  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008
SetKeyDelay,-1
$F4:: Send, {Enter 5}


Stormseek
  • Members
  • 10 posts
  • Last active: May 31 2014 07:30 AM
  • Joined: 25 Jun 2013
SetKeyDelay,-1
$F4:: Send, {Enter 5}

 

I made a mistake on my script i had ENTER there sorry.

 

So is this how it should look?

 

$F4::
{
send, {F4 5}
sleep, 0
SetKeyDelay,-1
}



HotKeyIt
  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008
SetKeyDelay,-1
$F4:: Send, {F4 5}

SetKeyDelay must be set before HotKey is pressed!



JadeDragon
  • Members
  • 935 posts
  • Last active: Jun 07 2014 07:40 AM
  • Joined: 18 Jan 2013

Please try to keep in mind that sometimes going faster in a script is actually counterproductive. It can cause your script to react more slowly. The reason for this is in the way the game you're trying to control handles input from the keyboard. Every game ever made takes a finite length of time to get a keypress from the keyboard. process it. find the action that key is supposed to link to. perform that action and return to the keyboard to look for another key. And all at the same time update the video screen. move mobs around. figure out what the mobs are going to do next, make them do it, and display all the other movements of other characters and actions going on around you. By actually sending faster you cause the game to throw some of your keystrokes away because it can't pay attention to you and do all that other stuff as fast as it needs to without causing massive lag on the screen. So actually slowing down your key sends can actually make your script more responsive not less.


Never assume evil intent when simple ignorance will suffice. Ignorance is an eventually curable condition with the right education. Evil intent, however, is another matter entirely. Scripts are much like children. Simple to conceive. Difficult, expensive, and time-consuming to raise. Often do the opposite of what you expect them to. Require frequent  "correction". And once they leave home you can't control them anymore. But you love them anyway.