Jump to content
UBot Underground

sk8rjess

Members
  • Content Count

    19
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by sk8rjess

  1. This doesn't work.

    Error: "The given key was not present in the dictionary" and has to do with: Start time > Set > $find regular expression > $now

    Maybe update your version of UBot? I'm on 5.9.17 and it's using all native functions. $now is a date function built into UBot.

     

     

    its working fine for me ! , Tested in on Ubot v 5.7.1

     

     

    
    
    

    Good deal!

     

     

     

     

     

    I was going to update this to show the days and months of time running but I didn't think anyone would honestly have a bot running that long anyways so I stopped pursuing that. 

  2. Was in the for sale sub-forum but decided to make this free since it's not very big. 
    It's just an execution timer for up to 24 hours - and as of right now(5/23/2016) it won't show the proper time overnight. Add the start function at the beginning of your script and the end timer at the end and you'll have variables of the hours, minutes, and seconds that the bot ran. 
    Works on all versions of UBot. 

    Put "Start Time()" at the beginning of your script and "End Time()" at the end. The alert is just to give you a visual. 

     

    post-27896-0-72761400-1463355604.png

    define Start Time {
            set(#timeStart,$find regular expression($now,"(\\d+:\\d+:\\d+)"),"Global")
            set(#startHour,$find regular expression(#timeStart,"^(\\d+)"),"Global")
            set(#startMin,$find regular expression($replace(#timeStart,"{#startHour}:",""),"^(\\d+)"),"Global")
            set(#startSec,$replace(#timeStart,"{#startHour}:{#startMin}:",""),"Global")
        }
    define End Time {
            set(#timeEnd,$find regular expression($now,"(\\d+:\\d+:\\d+)"),"Global")
            set(#endHour,$find regular expression(#timeEnd,"^(\\d+)"),"Global")
            set(#endMin,$find regular expression($replace(#timeEnd,"{#endHour}:",""),"^(\\d+)"),"Global")
            set(#endSec,$replace(#timeEnd,"{#endHour}:{#endMin}:",""),"Global")
            set(#totalHour,$subtract(#endHour,#startHour),"Global")
            set(#totalMin,$subtract(#endMin,#startMin),"Global")
            if($comparison(#totalMin,"< Less than",0)) {
                then {
                    set(#totalHour,$subtract(#totalHour,1),"Global")
                    set(#totalMin,$subtract($add(#endMin,60),#startMin),"Global")
                }
            }
            set(#totalSec,$subtract(#endSec,#startSec),"Global")
            if($comparison(#totalSec,"< Less than",0)) {
                then {
                    set(#totalMin,$subtract(#totalMin,1),"Global")
                    set(#totalSec,$subtract($add(#endSec,60),#startSec),"Global")
                }
            }
        }
    Start Time()
    End Time()
    alert("Run Time: {#totalHour} hours | {#totalMin} min | {#totalSec} sec")
    
    

     

  3. Anyone else constantly getting this? My subscription just ran out and my script runs for about a minute before this dialog pops up notifying me that the bot bank commands are for subscribers.. I don't use any bot bank commands so I don't really care but every time the dialog pops up it stops my script. 

    post-27896-0-89305600-1463629765_thumb.png

     

     

  4. Lately I've been working a lot with scraped and free proxies and have gotten annoyed by some of them working with UBot and some not - despite other proxy checkers saying they are good.

    Here's a simple script that will test a list of proxies(chosen by you) and will save the successful ones to the desktop under "successful proxies.txt".

    This has a good amount of idle while checking, this is because my UBot has a mind of its own at times and needs to catch up - so you can lower the wait times if you'd like. 

    ui stat monitor("<span style=\"font-size:30px;\">Proxy Checker</span>", "")
    ui open file("Proxy List to Check", #proxyFile)
    ui stat monitor("Proxy Being Checked:", "<b>{#currentProxy}</b>")
    ui stat monitor("Status:", #proxyStatus)
    set(#counter, 0, "Global")
    ui stat monitor("Position:", "{#counter} / {$list total(%Accounts)}")
    ui stat monitor("Valid Proxies:", "<span style=\"color:green;\">{$list total(%success)}</span>")
    ui stat monitor("Bad Proxies:", "<span style=\"color:red;\">{$list total(%failed)}</span>")
    set(#Postition, 0, "Global")
    add list to list(%Accounts, $list from file(#proxyFile), "Delete", "Global")
    loop($list total(%Accounts)) {
        increment(#counter)
        set(#Postition, $list item(%Accounts, $list position(%Accounts)), "Global")
        set(#proxyStatus, $nothing, "Global")
        set(#proxyStatus, "Clearing Cookies", "Global")
        clear cookies
        set(#proxyStatus, "Changing Proxy", "Global")
        set(#currentProxy, $list item(%Accounts, $list position(%Accounts)), "Global")
        change proxy($list item(%Accounts, $list position(%Accounts)))
        set(#proxyStatus, "Proxy Changed", "Global")
        wait(3)
        set(#proxyStatus, "Navigating", "Global")
        navigate("http://www.lagado.com/proxy-test", "Wait")
        wait for browser event("Everything Loaded", "")
        wait(3)
        set(#scrape, $scrape attribute($element offset(<tagname="h1">, 0), "innertext"), "Global")
        if(#scrape != "Proxy Test") {
            then {
                set(#proxyStatus, "<span style=\"color:red;font-weight:900;\">FAILED</span>", "Global")
                add item to list(%failed, $next list item(%Accounts), "Don\'t Delete", "Global")
            }
            else {
                set(#proxyStatus, "<span style=\"color:green;font-weight:900;\">SUCCESS</span>", "Global")
                add item to list(%success, $next list item(%Accounts), "Don\'t Delete", "Global")
                append to file("{$special folder("Desktop")}\\success_proxies.txt", "{#Postition}{$new line}", "End")
            }
        }
        wait(2)
        set(#proxyStatus, "Restarting", "Global")
    }
    set(#currentProxy, "", "Global")
    set(#proxyStatus, "<span style=\"color:blue\">Finished</span>", "Global")
    
    
    • Like 3
  5. Since I don't see a need in starting another thread for something semi related, I was writing an expression to grab the second word. Had it working successfully when I realized that no matter what I put in ubot, it constantly added a new line to my result. Does anyone see why? you can see I've stripped it down to a basic expression to grab anything. 

     

    add item to list(%guestInfo,$find regular expression(#middleName,".*"),"Don\'t Delete","Global")
    I can put a standard string in place of the expression finder and it works just fine. 
  6. I can't seem to get regex working properly in ubot with a statement i know for sure is correct. What am i doing wrong in ubot? 

     

    Let's say i'm trying to search the following:
     

    <tr><td class="gr" align="CENTER" valign="TOP" colspan="2"><font size="+2" class="plus2"><b>Ellison Shoji Onizuka</b></font></td></tr>
    

    My regex, which works outside of ubot is the following:
     

    class="plus2"><b>(\w+).*<\/b>
    

    In theory this will select only "Ellison". I'm using the "find regular expression" function. 

    Even thought the quotes may be throwing it off so I escaped those and still didn't work. 

    Am I missing something in ubot?

×
×
  • Create New...