Hagen 0 Posted March 12, 2014 Report Share Posted March 12, 2014 right now $spin produces same pattern sequence with every bot-start. how do I code it to have a truly random result every time? Quote Link to post Share on other sites
UBotDev 276 Posted March 12, 2014 Report Share Posted March 12, 2014 If you prepare a string with decent spintax it should produce a random output every time you run it, so I guess your problem is there... Quote Link to post Share on other sites
Hagen 0 Posted March 12, 2014 Author Report Share Posted March 12, 2014 (edited) Don't think so. Restart UBOT and you will get the same sequence of results everytime - see: clear list(%test)loop(10) { set(#plz, $spin("\{01*|02*|03*|04*|05*|06*|07*|08*|09*|10*|11*|12*|13*|14*|15*|16*|17*|18*|19*|20*|21*|22*|23*|24*|25*|26*|27*|28*|29*|30*|31*|32*|33*|34*|35*|36*|37*|38*|39*|40*|41*|42*|43*|44*|45*|46*|47*|48*|49*|50*|51*|52*|53*|54*|55*|56*|57*|58*|59*|60*|61*|62*|63*|64*|65*|66*|67*|68*|69*|70*|71*|72*|73*|74*|75*|76*|77*|78*|79*|80*|81*|82*|83*|84*|85*|86*|87*|88*|89*|90*|91*|92*|93*|94*|95*|96*|97*|98*|99*\}"), "Global") add item to list(%test, #plz, "Delete", "Global")}load html(%test) In my case it's: 81* 14* 90* 83* 13* 96* 91* 22* 63* 31* (Actually you don't have to restart UBOT ... just unload and reload BOT-Script) Edited March 12, 2014 by Hagen Quote Link to post Share on other sites
brusacco 20 Posted March 12, 2014 Report Share Posted March 12, 2014 I guess the "spin" command needs a seed ... Quote Link to post Share on other sites
UBotDev 276 Posted March 12, 2014 Report Share Posted March 12, 2014 I tried to run that with v4 and it works ok here, I get a random sequence: http://screencast.com/t/RqfGqjzvxnW Are you using v5? If so I suggest you post an issue here: http://tracker.ubotstudio.com/ 1 Quote Link to post Share on other sites
Hagen 0 Posted March 16, 2014 Author Report Share Posted March 16, 2014 v5 dev ... right ... anybody followed up on this? Quote Link to post Share on other sites
Hagen 0 Posted March 16, 2014 Author Report Share Posted March 16, 2014 (edited) No ... sorry ... thought this would work ... but same problem ... everytime you restart UBOT: clear list(%tttest)add list to list(%setplz, $list from text("01*,02*,03*,04*,05*,06*,07*,08*,09*,10*,11*,12*,13*,14*,15*,16*,17*,18*,19*,20*,21*,22*,23*,24*,25*,26*,27*,28*,29*,30*,31*,32*,33*,34*,35*,36*,37*,38*,39*,40*,41*,42*,43*,44*,45*,46*,47*,48*,49*,50*,51*,52*,53*,54*,55*,56*,57*,58*,59*,60*,61*,62*,63*,64*,65*,66*,67*,68*,69*,70*,71*,72*,73*,74*,75*,76*,77*,78*,79*,80*,81*,82*,83*,84*,85*,86*,87*,88*,89*,90*,91*,92*,93*,94*,95*,96*,97*,98*,99*", ","), "Delete", "Global")loop(100) { add item to list(%tttest, $random list item(%setplz), "Delete", "Global")}load html(%tttest) Same Result after RESTART:81* 14* 90* 83* 13* 96* 91* 22* 63* 31* 10* 55* 28* 19* 99* 95* 16* 72* 97* 98* 11* 49* 80* 30* 15* 01* 42* 12* 64* 79* 87* 50* 65* 04* 36* 85* 21* 93* 68* 40* 76* 74* 48* 39* 18* 17* 70* 32* 05* 82* 69* 66* 44* 38* 06* 41* 46* 45* 71* 92* 75* Edited March 16, 2014 by Hagen Quote Link to post Share on other sites
Hagen 0 Posted March 16, 2014 Author Report Share Posted March 16, 2014 OK ... seems like every random-function ist affected - same problem with a variation like this: clear list(%tttest)add list to list(%setplz, $list from text("01*,02*,03*,04*,05*,06*,07*,08*,09*,10*,11*,12*,13*,14*,15*,16*,17*,18*,19*,20*,21*,22*,23*,24*,25*,26*,27*,28*,29*,30*,31*,32*,33*,34*,35*,36*,37*,38*,39*,40*,41*,42*,43*,44*,45*,46*,47*,48*,49*,50*,51*,52*,53*,54*,55*,56*,57*,58*,59*,60*,61*,62*,63*,64*,65*,66*,67*,68*,69*,70*,71*,72*,73*,74*,75*,76*,77*,78*,79*,80*,81*,82*,83*,84*,85*,86*,87*,88*,89*,90*,91*,92*,93*,94*,95*,96*,97*,98*,99*", ","), "Delete", "Global")loop(100) { set(#hsrnd, $rand(0, 98), "Global") add item to list(%tttest, $list item(%setplz, #hsrnd), "Delete", "Global")}load html(%tttest) Quote Link to post Share on other sites
Hagen 0 Posted March 16, 2014 Author Report Share Posted March 16, 2014 (edited) So finally I helped myself by creating a PHP-File on our webserver, producing a random list and reading it with LIST-FROM-FILE. Hope this issue will be solved soon. Edited March 16, 2014 by Hagen Quote Link to post Share on other sites
affilategod 0 Posted March 18, 2014 Report Share Posted March 18, 2014 I'm having the same problem with $random list item. Quote Link to post Share on other sites
Hagen 0 Posted March 19, 2014 Author Report Share Posted March 19, 2014 Are there any UBOT-admins following here? No "official" comments? Quote Link to post Share on other sites
brusacco 20 Posted March 19, 2014 Report Share Posted March 19, 2014 You will have the "submit a ticket" response for sure ... Quote Link to post Share on other sites
MiriamMB 63 Posted March 19, 2014 Report Share Posted March 19, 2014 Are there any UBOT-admins following here? No "official" comments? If you have any questions for UBot staff in the future, please don't hesitate to open a ticket with us at support.ubotstudio.com The same behavior is present in the rand function, and so the two issues are related. Your issue has been submitted separately to our tracker: http://tracker.ubotstudio.com/issues/358 We will update the issue once it is scheduled for an update. Quote Link to post Share on other sites
brusacco 20 Posted March 21, 2014 Report Share Posted March 21, 2014 I guess he means, like in any other product user forums, if there are any friendly admins, that can communicate to the community some insight, or some solutions that are in progress. Are there any UBOT-admins following here? No "official" comments? Quote Link to post Share on other sites
jomark3 25 Posted March 22, 2014 Report Share Posted March 22, 2014 right now $spin produces same pattern sequence with every bot-start. how do I code it to have a truly random result every time?Possible workaround... Add an onload command that includes a loop that spins your text. Then stop the loop when the user initiates the program by clicking start, or run. (The difference in time that each user takes to start the bot will randomize their results.) Quote Link to post Share on other sites
UBotDev 276 Posted March 22, 2014 Report Share Posted March 22, 2014 Possible workaround... Add an onload command that includes a loop that spins your text. Then stop the loop when the user initiates the program by clicking start, or run. (The difference in time that each user takes to start the bot will randomize their results.) Or just use v4 until v5 is fixed? Quote Link to post Share on other sites
Hagen 0 Posted March 22, 2014 Author Report Share Posted March 22, 2014 thx everybody Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted March 26, 2014 Report Share Posted March 26, 2014 Save yourself mounds of asprin (for headaches) and use V4.... have you tried $rand ? 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.