okuma31 0 Posted July 4, 2011 Report Share Posted July 4, 2011 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. )very rough string counting bot.ubotnoski.txt Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 4, 2011 Report Share Posted July 4, 2011 Less nodes, not as many things as you had in there. but a better, more efficient result.counting-lowridertj.ubot Quote Link to post Share on other sites
UBotBuddy 331 Posted July 4, 2011 Report Share Posted July 4, 2011 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.buddys-version.ubot Quote Link to post Share on other sites
okuma31 0 Posted July 4, 2011 Author Report Share Posted July 4, 2011 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. Quote Link to post Share on other sites
warriorfullights 0 Posted July 29, 2011 Report Share Posted July 29, 2011 Same thing I have encountered and this has given me an idea to work on it myself. Balance nodes always works on certain occasions. Testing results always give you a lot of things in mind. Quote Link to post Share on other sites
a2mateit 395 Posted July 10, 2012 Report Share Posted July 10, 2012 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:123456 and in the stat monitor I want it to display the total of all the numbers. i.e.- 21 Thanks in advance guys. Justin Quote Link to post Share on other sites
odeesuba 24 Posted July 10, 2012 Report Share Posted July 10, 2012 i.e.- 21 Thanks in advance guys. Justin Try thisui 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") } 1 Quote Link to post Share on other sites
a2mateit 395 Posted July 10, 2012 Report Share Posted July 10, 2012 Try thisui 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... Under Math, all I see is $eval and $rand Thanks again,Justin Quote Link to post Share on other sites
odeesuba 24 Posted July 11, 2012 Report Share Posted July 11, 2012 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... 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 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.