Results 1 to 8 of 8

Thread: Speed

  1. #1
    Banned
    tjwells28 is offline

    Posts
    177

    Speed

    OK so i'm sort of trying to find a solution to the problems of the recent detection. Something which im not even sure is possible which would help is this:

    I need to be able to make an integer value change after a time period while it is being used by something. This is for the mouse movement speed. I want to make the speed fluctuate up and down however I really don't know if its possible to do such a thing.

  2. #2
    Senior Member
    wastedbro is offline

    Posts
    527
    I'm not sure if this is the best way to do this but here goes....

    Try creating an integer instance variable. Also create a new thread. In that thread, run one looping method that changes the instance variable to a random (within limits) value at a random (within limits) time. Use this instance variable in whatever you need it for in your other thread(s)
    Skype - wastedbro

  3. #3
    Bot Coder
    flashbang is offline

    Posts
    584
    Quote Originally Posted by tjwells28 View Post
    OK so i'm sort of trying to find a solution to the problems of the recent detection. Something which im not even sure is possible which would help is this:

    I need to be able to make an integer value change after a time period while it is being used by something. This is for the mouse movement speed. I want to make the speed fluctuate up and down however I really don't know if its possible to do such a thing.
    The mouse speed in the HMM is already random, also just use a random value... you don't need to change anything.

    //siggy by Poseidon

  4. #4
    Banned
    tjwells28 is offline

    Posts
    177
    Although the mouse speed is random isn't it going at a constant speed throughout each move?

  5. #5
    Bot Coder
    flashbang is offline

    Posts
    584
    Quote Originally Posted by tjwells28 View Post
    Although the mouse speed is random isn't it going at a constant speed throughout each move?
    Nope. Actually each pixel it moves with a different, pseudo-random wait-time (the "speed").

    //siggy by Poseidon

  6. #6
    Senior Member
    wastedbro is offline

    Posts
    527
    Oh your using it with existing mouse movement. Yeah it's not really necessary.

    But for future references, just do this


    public int randomNum()
    {
    .....Code to generate random number
    ..... Return the value you generated
    }

    method that runs()
    {
    ....code that needs a random number (randomNum());
    }


    The point is to make your program run code that generates a random number (within set parameters) every single time you need one, which is where the convenience of methods comes. My previous post of multi-threading it was sort of ridiculous.
    Skype - wastedbro

  7. #7
    Server Admin
    Sticky is offline

    Posts
    966
    Quote Originally Posted by wastedbro View Post
    public int randomNum()
    {
    .....Code to generate random number
    ..... Return the value you generated
    }
    Or just get the .NET Framework to do the work for you: Random.Next Method (Int32) (System)

  8. #8
    Banned
    tjwells28 is offline

    Posts
    177
    Quote Originally Posted by Sticky View Post
    Or just get the .NET Framework to do the work for you: Random.Next Method (Int32) (System)
    I'm using this anyway but its more complicated. I wanted to speed to change over time during 1 mouse movement but its not possible with the current setup of the hmm i'm using I dont think. I know you guys have already done it for the movement of the bilge bot though.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •