Jump to content
UBot Underground

Recommended Posts

I've struggled for probably the last hour or so trying to get this to work and I'm all but ready to throw in the towel.

 

I'm attempting to create a counting bot that attaches a string to the front of the scrapped information prior to saving it to a .txt file, it works o.k. except for the fact that if my computer lags in the slightest it skips numbers and ends up with duplicates of the same file where the next number should be.

 

It sounds a bit complicated so I've inclosed my work thus far along with a sample of the .txt created.

 

You'll run into duplicates as early as 46 in the .txt file if that helps at all. (Just trying to make it as easy as possible for you gentlemen to render aid. :P)

very rough string counting bot.ubot

noski.txt

Link to post
Share on other sites

Less nodes, not as many things as you had in there. but a better, more efficient result.

 

That works perfectly, I appreciate it man.

 

I think this is what you are trying to do.

 

Two things I did. Added a 1 sec delay (it needed to slow down). And I changed your Add to list for your scrape to a variable. You did not need a list for that.

 

Thanks for your help as well ubotbuddy, I originally figured out that a one second delay would make the scrip work correctly but I plan on looping the program well over a million times so it's just not feasible. But once again I do appreciate the time you put into helping me.

Link to post
Share on other sites
  • 4 weeks later...
  • 11 months later...

How do I do this in v4?

 

I am collecting a list of numbers, and I want to add them up in a stat monitor to show the total.

 

i.e. List looks like this:

1

2

3

4

5

6

 

and in the stat monitor I want it to display the total of all the numbers.

 

i.e.- 21

 

Thanks in advance guys.

 

Justin

Link to post
Share on other sites

i.e.- 21

 

Thanks in advance guys.

 

Justin

 

Try this

ui stat monitor("Total", #List Total)
clear list(%List)
add list to list(%List, $list from text("1
2
3
4
5
6", $new line), "Don\'t Delete", "Global")
set(#List Total, 0, "Global")
loop($list total(%List)) {
   set(#List Total, $add(#List Total, $next list item(%List)), "Global")
}

  • Like 1
Link to post
Share on other sites

Try this

ui stat monitor("Total", #List Total)
clear list(%List)
add list to list(%List, $list from text("1
2
3
4
5
6", $new line), "Don\'t Delete", "Global")
set(#List Total, 0, "Global")
loop($list total(%List)) {
   set(#List Total, $add(#List Total, $next list item(%List)), "Global")
}

 

Thanks Odeesuba,

 

I was able to modify the code you submitted to work for me.

 

One question though, were in the heck are the math functions. I couldn't find them anywhere... :blink: Under Math, all I see is $eval and $rand

 

Thanks again,

Justin

Link to post
Share on other sites

Thanks Odeesuba,

 

I was able to modify the code you submitted to work for me.

 

One question though, were in the heck are the math functions. I couldn't find them anywhere... :blink: Under Math, all I see is $eval and $rand

 

Thanks again,

Justin

 

Great that it worked for you.

 

For math just put the math sign you need between the variables and it will change. For example + will change to add

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...