Author Topic: Broken Script?  (Read 1474 times)

Today, I attempted to make a Rapid-clicking script to fire my mouse for me instead of simply holding it down like mousefire(1); does.
I figured the easiest way to do this would be editing the Rapidfire script.
However, when I tried it, it showed up as a different file, but seemed to work exactly the same.
I'm new to scripting, but here's the oringinal:
Quote
$remapDivision[$remapCount]   = "Rapid Fire";
$remapName[$remapCount]      = "Hold to use";
$remapCmd[$remapCount]      = "toggleSpam";
$remapCount++;
function toggleSpam(%value)
{
   if(%value)
   {
      lol();
   }
   else
   {
      cancel($Lol::Schedule);
   }
}

function lol()
{
  scrollTools(1);
  scrollTools(-1);
  $Lol::Schedule = schedule(33,0,lol);
}
And here's the new one:
Quote
$remapDivision[$remapCount]   = "Rapid Clicker";
$remapName[$remapCount]      = "Hold to use";
$remapCmd[$remapCount]      = "toggleSpam";
$remapCount++;
function toggleSpam(%value)
{
   if(%value)
   {
      lol();
   }
   else
   {
      cancel($Lol::Schedule);
   }
}

function lol()
{
  mousefire(1);
  mousefire(0);
  $Lol::Schedule = schedule(33,0,lol);
}
I remapped it differently and everything. I was just wondering how I messed up.
Thanks in advance.

you didn't change what i said before, if you're not going to listen to help, then why make a topic about it?

the lol() function is still called the same.
lol();

that too, try not to use the same function names i guess

that too, try not to use the same function names i guess
You bet your ass you shouldn't.

Code: [Select]
$remapDivision[$remapCount]   = "Rapid Clicker";
$remapName[$remapCount]      = "Hold to use";
$remapCmd[$remapCount]      = "toggleAutoclick";
$remapCount++;
function toggleAutoclick(%value)
{
   if(%value)
   {
      autoclick();
   }
   else
   {
      cancel($Autoclick::Schedule);
   }
}

function autoclick()
{
  mousefire(1);
  schedule(33,0,mousefire,0);
  $Autoclick::Schedule = schedule(66,0,autoclick);
}


Thank you, Bauklotz.
It solved the problem.