Jump to content

Javascript for loop, to click 2 buttons


xNeox

Recommended Posts

I am making a mmorpg, and am addind a auto attack button that i want to attack 15 times at 1.75 second intervals then stop, i already have it set up to when you click auto attack it waits the 1.75 second but it doesnt click the next button here is the code

 

 

function fightDisable()

{

$('#Fight').attr("disabled","disabled");

$('#Fight').blur();

$("#Fight").val("-=Wait=-");

  $('#Fight').oneTime(1750, function() {

    $('#Fight').removeAttr("disabled");

        $("#Fight").val("Fight again!");

  });

Link to comment
Share on other sites

There is a attack button and a fight again button, once you click the attack button i want it to wait 1.75 second then click the fight again button and i want it to do that 15 times, i hope that makes more sense, thanks for the help.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.