Jump to content
UBot Underground

julius

Fellow UBotter
  • Content Count

    13
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by julius

  1. Following TJ's multithreading process, I came up with this...

    ui html panel("<!doctype html>
    <html>
    <head>
    	<meta charset=utf-8>
    	<title></title>
    	<style>
    		progress \{ height: 50px; width: 300px; \}
    		span \{ position: absolute; margin-left: 130px; margin-top: 12px; \}
    	</style>
    </head>
    <body>
    	<form>
    		<span><b variable=\"#prog\" fillwith=\"innertext\"></b> %</span>
    		<progress min=\"0\" max=\"100\" value=\"0\" variable=\"#prog\" fillwith=\"value\"></progress>
    	</form>
    </body>
    </html>", 150)
    set(#prog, 0, "Global")
    set(#num threads, 17, "Global")
    set(#number accounts, 87, "Global")
    set(#num created, 0, "Global")
    set(#used threads, 0, "Global")
    loop(#number accounts) {
        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 {
            set(#prog, $eval("var worknum =  {$multiply($divide(#num created, #number accounts), 100)}; worknumrnd = Math.floor(worknum);
    worknumrnd"), "Global")
            decrement(#used threads)
            wait(1)
        }
    }
    
    
    • Like 2
×
×
  • Create New...