Jump to content
UBot Underground

[HELP] How to make a multi-threaded account checker


Recommended Posts

Hey everyone,

 

I'm been trying to create this for the past couple of days and didn't get anywhere. I tried TJ's script but couldn't get it working. I'm trying to create a script that cycles through an accounts file and have them run in separate threads. The problem with my current script is that if I run 2 threads, it checks the first account on those two threads instead of checking two separate account on those 2 threads. Could somebody please help me? Here's my code:

ui open file("Accounts", #login)
clear table(&login)
create table from file(#login, &login)
set(#account position, 0, "Global")
ui drop down("Thread Count", "1,2,3,4,5,6,7,8,9,10", #num threads)
set(#num created, 0, "Global")
set(#used threads, 0, "Global")
loop($table total rows(&login)) {
    loop while($comparison(#used threads, ">=", #num threads)) {
        wait(1)
    }
    loop process()
}
define loop process {
    increment(#used threads)
    increment(#num created)
    registration procedure()
}
define registration procedure {
    thread {
        in new browser {
            registration code here()
            decrement(#used threads)
        }
    }
}
define registration code here {
    if($comparison(#num created, "<=", $table total rows(&login))) {
        then {
            navigate("http://youtube.com", "Wait")
            wait(5)
            click(<login button>, "Left Click", "No")
            wait(3)
            type text(<email field>, $table cell(&login, #account position, 0), "Standard")
            type text(<password field>, $table cell(&login, #account position, 1), "Standard")
            click(<login button>, "Left Click", "No")
            wait(5)
            increment(#account position)
        }
        else {
        }
    }
}

Link to post
Share on other sites

Try this, I think the problem is that you're increment the account position after it logs in so it is taking a lot of time for each thread and so the first thread doesn't finish before the second starts and therefore they both pickup the first account. Now it will grab the number and set it as a local variable (which means its unique to each thread) and then increment account position right away. So now it should work properly, unless the two threads start at the exact same time and even then I think it should still work.

ui open file("Accounts", #login)
clear table(&login)
create table from file(#login, &login)
set(#account position, 0, "Global")
ui drop down("Thread Count", "1,2,3,4,5,6,7,8,9,10", #num threads)
set(#num created, 0, "Global")
set(#used threads, 0, "Global")
loop($table total rows(&login)) {
    loop while($comparison(#used threads, ">=", #num threads)) {
        wait(1)
    }
    loop process()
}
define loop process {
    increment(#used threads)
    increment(#num created)
    registration procedure()
}
define registration procedure {
    thread {
        in new browser {
            registration code here()
            decrement(#used threads)
        }
    }
}
define registration code here {
    if($comparison(#num created, "<=", $table total rows(&login))) {
        then {
            set(#cur account position, #account position, "Local")
            increment(#account position)
            navigate("http://youtube.com", "Wait")
            wait(5)
            click(<login button>, "Left Click", "No")
            wait(3)
            type text(<email field>, $table cell(&login, #cur account position, 0), "Standard")
            type text(<password field>, $table cell(&login, #cur account position, 1), "Standard")
            click(<login button>, "Left Click", "No")
            wait(5)
        }
        else {
        }
    }
}

Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...