Author Topic: Fast Clicking script  (Read 2148 times)

Im making a / script for me and my friend, like When i activate it it will do something and when i de-activate it it will stop.
OK i got the Bindings to work, Now i need help with this part
Code: [Select]
//+-------------------------+
//|Made by ChocoboPah, |
//|Help from other people, |
//|Released by ChocoboPah, |
//|BL_ID: 12247 |
//+-------------------------+
if (!$FastClickBindings)
{
$remapDivision[$remapCount] = "Fastclick";
$remapName[$remapCount] = "Toggle";
$remapCmd[$remapCount] = "FastClickToggle";
$remapCount++;
$FastClickBindings=true;
}
function FastClickToggle()
{
if($FastClicking==0)
{
$FastClicking=1;
FastClickingMenu();
}
else  if($FastClicking==1)
{
$fastClicking=0;
cancel($ABClick);
clientcmdupdateprefs();
}
}
function FastClickingMenu()
{
scrolltools("1");
scrolltools("-1");
$ABClick=schedule(%Amt,0,FastClickingMenu);
}
function Timing(%a)
{
%Amt=%a;
}
Edit: Found an error!
Edit again: Updated, it wont loop!
« Last Edit: October 02, 2009, 09:49:43 PM by Pah1023 »

Don't do slash commands for client sided scripts. We have keybinds for those.

How can i make a keybind for it then?

To the client sided /command question:
Use (Randy's? Truce's?) clCmd resource.


To the keybind question:
Do your homework, we are not here to feed you information if you are just too lazy to find it yourself.

Just have a look at any of the many scripts that add keybinds.

Code: [Select]
$remapDivision[$remapCount] = "This is the group your keybinds are in.";
$remapName[$remapCount] = "This is the name shown in the controls GUI.";
$remapCmd[$remapCount] = "thCIATheFunctionCalledWhenTheBoundKeyIsPressed";
$remapCount++;
« Last Edit: September 28, 2009, 09:57:23 PM by BobAndRob »

Oh sorry, i got it.
Locking



For your if statements you can't do, if($Var=1)
It has to be if($Var==1)
Or else it won't work.

Can you NOT make this public, thanks.

I'm not quite sure what you're trying to do. If you want to use a tool/weapon really fast, you could use something like this:

Code: [Select]
function fastClickToggle(%v)
{
   if(%v)
   {
      doFastClick();
   }
   else
   {
      cancel($FastClick::Schedule);
   }
}

function doFastClick()
{
   useTools(1);
   useTools(1);
   mouseFire(1);
   mouseFire(1);

   $FastClick::Schedule = schedule(100,0,"doFastClick");
}

That'd roughly accomplish it.

I am trying to make it so you can type "Timing(time);" in console so you can choose what ever time you want
Can you NOT make this public, thanks.
Theres a whole topic this this code in
Topic
with you just do f(); and it works.

Code: [Select]
function FastClickingMenu()
{
scrolltools("1");
scrolltools("-1");
$ABClick=schedule(%Amt,0,FastClickingMenu);
}
function Timing(%a)
{
%Amt=%a;
}
Local variables don't transfer from function to function. In your Timing function, you're just setting a local variable to the 1st argument, which is completely pointless.
I am trying to make it so you can type "Timing(time);" in console so you can choose what ever time you want
Then you would need to change the above functions to this:
Code: [Select]
function FastClickingMenu(%Amt)
{
scrolltools(-1);
scrolltools(1);
$ABClick=schedule(%Amt,0,FastClickingMenu,%Amt);
}
function Timing(%a)
{
FastClickingMenu(%a);
}
« Last Edit: October 04, 2009, 11:10:45 PM by lilboarder32 »

Can you NOT make this public, thanks.
I don't see the problem? Guns have a reload time so it can't go superfast anyway. What you DON'T want is a qq script.

I don't see the problem? Guns have a reload time so it can't go superfast anyway. What you DON'T want is a qq script.
Because then we have more auto-clickers and rapid-fire printers.

Because then we have more auto-clickers and rapid-fire printers.

Oh no, then you won't be special anymore.  :panda: