Jump to content
UBot Underground

How to choose random list item and then delete each chosen item?


Recommended Posts

I'm using the random list item command to select and item from a list.

 

After this item has been selected randomly and used once I want it to be deleted so it cannot be randomly selected again.

 

How do I do this?

 

Thanks

Link to post
Share on other sites

Not really sure what your trying to accomplish and it took a little playing around with...

 

If you are trying to randomly use proxies and not use the same one twice this is it:

 

clear list(%list)
ui open file("Your List", #list)
add list to list(%list, $list from file(#list), "Delete", "Global")
set list position(%list, $rand(0, $list total(%list)))
change proxy($list position(%list))
comment("whatever else here before you need to delete the list item")
remove from list(%list, $list position(%list))

 

Or if you want to navigate to a random site and then remove it, this is it:

clear list(%list)
ui open file("Your List", #list)
add list to list(%list, $list from file(#list), "Delete", "Global")
set list position(%list, $rand(0, $list total(%list)))
navigate($list position(%list), "Wait")
comment("whatever else here before you need to delete the list item")
remove from list(%list, $list position(%list))

 

Not sure what you are trying to accomplish, but this should put you in the right direction...

 

Let me know if you need anymore help,

 

Justin

  • Like 6
Link to post
Share on other sites

Thank you.

 

I do what I can to help the community...

 

I know it is easier to see and play with working code, then to have to figure it all out on your own.

Link to post
Share on other sites

Hey buddy, i've tryed to get this working for me .. i m trying to use a proxy then remove it from list. I've runned your 1st example but seems that isn't working.

 

I'm getting an error on this step

change proxy($list position(%list))

: "Index was outside the bounds of the array". Any ideas what's wrong?

 

Not really sure what your trying to accomplish and it took a little playing around with...

 

If you are trying to randomly use proxies and not use the same one twice this is it:

 

clear list(%list)
ui open file("Your List", #list)
add list to list(%list, $list from file(#list), "Delete", "Global")
set list position(%list, $rand(0, $list total(%list)))
change proxy($list position(%list))
comment("whatever else here before you need to delete the list item")
remove from list(%list, $list position(%list))

 

Or if you want to navigate to a random site and then remove it, this is it:

clear list(%list)
ui open file("Your List", #list)
add list to list(%list, $list from file(#list), "Delete", "Global")
set list position(%list, $rand(0, $list total(%list)))
navigate($list position(%list), "Wait")
comment("whatever else here before you need to delete the list item")
remove from list(%list, $list position(%list))

 

Not sure what you are trying to accomplish, but this should put you in the right direction...

 

Let me know if you need anymore help,

 

Justin

Link to post
Share on other sites

Hey buddy, i've tryed to get this working for me .. i m trying to use a proxy then remove it from list. I've runned your 1st example but seems that isn't working.

 

I'm getting an error on this step

change proxy($list position(%list))

: "Index was outside the bounds of the array". Any ideas what's wrong?

 

 

I think the problem is the list item command needs to be in their. As the code is now the bot will change the proxy or try to navigate to the list position which is just a number. The code should be written to return the list item AT the list position. As follows:

clear list(%list)ui open file("Your List", #list)add list to list(%list, $list from file(#list), "Delete", "Global")set list position(%list, $rand(0, $list total(%list)))change proxy($List item (%List)$list position(%list))comment("whatever else here before you need to delete the list item")remove from list(%list, $list position(%list))

Or if you want to navigate to a random site and then remove it, this is it:
clear list(%list)ui open file("Your List", #list)add list to list(%list, $list from file(#list), "Delete", "Global")set list position(%list, $rand(0, $list total(%list)))navigate($List item (%List)$list position(%list), "Wait")comment("whatever else here before you need to delete the list item")remove from list(%list, $list position(%list

 

Since I only have a standard license I dont have code view, and I don't know how to make a cool HTTP box like a2mateit so I had to write out the additions manually. Hope I got the format right. The important thing is you must have it return the list item, in other words the text at the list position not just the position itself. This is whats working for me anyway. Thanks for this info as it helped me figure out exactly how to do what I needed to do.

Edited by RATPFINK
  • Like 1
Link to post
Share on other sites

i new with ubot...how can i delete a proxy on the first line after i use it and next loop the script get another proxy from the first line and delete it after i use it and so on....i already watch the tutorial videos and didn't find the answer.

Link to post
Share on other sites
  • 3 months later...

In any case, guys... don't forget to decrease the upper limit of the RAND command if you delete an element after using it... (if you're looping the list, that is...)

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