xNeox Posted September 6, 2010 Share Posted September 6, 2010 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!"); }); Quote Link to comment Share on other sites More sharing options...
Adam Posted September 6, 2010 Share Posted September 6, 2010 That function simply disables a button, changes the value, then reverts it back after 1.75 seconds (just 'oneTime'). Do you want it to do that 15 times? :s Quote Link to comment Share on other sites More sharing options...
xNeox Posted September 6, 2010 Author Share Posted September 6, 2010 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. Quote Link to comment Share on other sites More sharing options...
xNeox Posted September 6, 2010 Author Share Posted September 6, 2010 Or if anyone has a completely different code that will do want i need it to that would be great too. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.