Sharpened Threads



  • I've been messing around to add human logic to my bots. Things like, Post 200 comments per hour simulated like a human. A single thread can not post that many comments by its self. So I had to come up with a couple of algorithms to determine thread count for that hour, how long each thread would have to wait between comments if RPH (Rate Per Hour) is over the limit or increasing the thread count if RPH is under the limit by a certain degree.
    Another was, having one thread complete XX Tasks while another does XX. This works with having an IF statement.
    If (ThreadIndex == 1)
    Do this
    If (ThreadIndex == 2)
    Do These
    Once you go deeper into the threads, this gets really confusing and can not be done if you want dynamic thread count.

    This lead me to the solution having the Call function in several threads beable to continue the master thread instead of waiting for those threads to be completed. Also having a kill switch for the threads created by the Call function in several threads with also allowing the thread count to be dynamic. Like I said before, if the RPH < 200 increase or if the RPH > 200 decrease the threads. Increasing/Decreasing [X] threads instead of restarting the call function entirely (which currently crashes the bot if you put the call function inside a loop to change the thread count, using fail to end the function)

    Regards,
    Allister ☯


  • administrators

    @Allister I think, that your this logic can be implemented in easier way with "Call function in several threads" action.
    Let the main script have 1 thread and 1 success and 1 fail number count, and than main thread will calculate RPH and use "Call function in several threads" according to that calculations.

    In fact this action may change thread number inside script in easy way.
    See this video for explanations
    https://www.youtube.com/watch?v=vgzMX3F-EQI

    So the algorithm is following.

    function DoPosting
       if(work more than hour)
            Success
       Load url
       Type text
       etc...
    
    while true
        Calculate posts number, thread number
        Call function in several threads DoPosting
    
    


  • @support I meant to update this yesterday but just got internet back. That's exactly what I ended up doing with the script. Along with some extra JS code. I just couldn't think of the logic, still getting use to it ha. Coming from 5 years of Ubot. I still think it would be great if you added a option to wait/continue on the Call function in several threads. Other then that, it just took out of my box thinking. :) Thanks again for the great work!


  • administrators

    @Allister said in Sharpened Threads:

    I still think it would be great if you added a option to wait/continue on the Call function in several threads.

    Yes, I probably will add something like this.


Log in to reply
 

Looks like your connection to Bablosoft was lost, please wait while we try to reconnect.