Quantcast

Jump to content


Photo

NQ1 Script Question


  • Please log in to reply
17 replies to this topic

#1 L20

L20
  • 31 posts

Posted 12 March 2012 - 06:04 PM

Can you add delay times to a script, because the NQ1 attacker script I am using has 0 delay and I want to be on the safe side.:thumbsup:

#2 Adam

Adam
  • Coffee God


  • 4769 posts


Users Awards

Posted 12 March 2012 - 06:10 PM

Care to post an example of your script in which you want to add a delay?

#3 Neoquest

Neoquest
  • 1760 posts


Users Awards

Posted 12 March 2012 - 06:18 PM

It would be nice to see the script you're talking about, but I see no reason whatsoever why delays couldn't be added.

#4 L20

L20
  • 31 posts

Posted 12 March 2012 - 06:32 PM

It would be nice to see the script you're talking about, but I see no reason whatsoever why delays couldn't be added.


Sorry, here it is: http://userscripts.o...ipts/show/70446

It would be awesome, because I think it needs delays even though I haven't heard anyone being iced YET. It's just too fast and monotonous. Also can you vary the delay times?

#5 Neoquest

Neoquest
  • 1760 posts


Users Awards

Posted 12 March 2012 - 06:50 PM

I know absolutely nothing about browser scripting, but I'm pretty sure it would be fairly easy to do, just grab a random wait delay from an old autobuyer script.

EDIT: Found a random wait delay
var x = Math.floor(((2-0)*Math.random()+ 1)*1000); //return delay rate 1-2 secs

This is how it would be implemented in reloading a page:
 else { window.setTimeout(function(){window.location.reload() ;},x) ;}return;

Edited by Neoquest, 12 March 2012 - 06:52 PM.


#6 L20

L20
  • 31 posts

Posted 12 March 2012 - 07:00 PM

I know absolutely nothing about browser scripting, but I'm pretty sure it would be fairly easy to do, just grab a random wait delay from an old autobuyer script.

EDIT: Found a random wait delay

var x = Math.floor(((2-0)*Math.random()+ 1)*1000); //return delay rate 1-2 secs

This is how it would be implemented in reloading a page:
 else { window.setTimeout(function(){window.location.reload() ;},x) ;}return;


Thanks, though how do I edit the script?O_o

Thanks

#7 Neoquest

Neoquest
  • 1760 posts


Users Awards

Posted 12 March 2012 - 07:02 PM

Thanks, though how do I edit the script?O_o

Thanks


Just open the Add-ons manager > User Scripts > Right Click the script > Edit.

Edited by Neoquest, 12 March 2012 - 07:02 PM.


#8 L20

L20
  • 31 posts

Posted 12 March 2012 - 07:08 PM

Just open the Add-ons manager > User Scripts > Right Click the script > Edit.


So do I just add this anywhere in the script? :
var x = Math.floor(((2-0)*Math.random()+ 1)*1000); //return delay rate 1-2 secs

Sorry I'm just a bit confused how to add this.,.


#9 Neoquest

Neoquest
  • 1760 posts


Users Awards

Posted 12 March 2012 - 07:18 PM

The first bit sets the variable x to a random delay between 1 and 2 seconds. The second bit is showing how the delay would be used if your goal was to wait two seconds, and reload the page. I'm sure you can find it used the way you want it in one of the other userscripts and just copy and paste that directly, or ask one of the programmers here that can write in Javascript.

#10 L20

L20
  • 31 posts

Posted 12 March 2012 - 07:30 PM

I can't seem to get a grip on these things.

If anyone would be kind enough to attach the script with delay times that vary or paste the scipt here so I can just copy and paste it, I would be very thankful

#11 Inkheart

Inkheart
  • 268 posts

Posted 12 March 2012 - 09:01 PM

Should be as simple as adding the timeout around the entire script, like this.

#12 L20

L20
  • 31 posts

Posted 12 March 2012 - 10:04 PM

Should be as simple as adding the timeout around the entire script, like this.


}, Math.random() * 1000 + 1000);

Thanks! Though does the delay times vary from say 1-3 secs?


#13 Inkheart

Inkheart
  • 268 posts

Posted 12 March 2012 - 10:06 PM

}, Math.random() * 1000 + 1000);

Thanks! Though does the delay times vary from say 1-3 secs?


Sure thing. Currently, it varies between 1 and 2, just change the first 1000 to 2000 to vary between 1 and 3.

#14 L20

L20
  • 31 posts

Posted 12 March 2012 - 10:07 PM

Sure thing. Currently, it varies between 1 and 2, just change the first 1000 to 2000 to vary between 1 and 3.


Absolutley great! :x3:

#15 Inkheart

Inkheart
  • 268 posts

Posted 12 March 2012 - 10:08 PM

Huzzah! : )

#16 Jun

Jun
  • 907 posts

Posted 13 March 2012 - 01:35 AM

Neoquest, why don't you program us a NQ1 AP as well, like you did for NQ2? :p I really loved the NQ2 AP and since NQ1 is less enjoyable (at least for me) I would love to use an AP like your NQ2 one. :shifty:

#17 NaMasTe

NaMasTe
  • 74 posts

Posted 13 March 2012 - 07:32 AM

I think most of us want to do the NQ1 for the trophy??

#18 Jun

Jun
  • 907 posts

Posted 13 March 2012 - 10:49 AM

I think most of us want to do the NQ1 for the trophy??


I failed NQI just before finishing the insane mode (stupid me), and i don't want to play it all over. I just want the trophy that's it.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users