Jump to content
UBot Underground

List Comparision ( What I'm Doing Wrong)


Recommended Posts

I have problem with comparision. List dosen't comparision correct

 

random.txt - have numbers 2,3 DON"T HAVE 1

 

My plan is :

2,3 number going to (exist on the list)

number going to "NOT exist on the list"

 

PROBLEM IS : always going to exist on the list ;/ even when pickup 1 

What is wrong ? Why when random 1 not going "NOT exist on the list"

 

 

 

 

 

ui stat monitor("Number:"#number)
loop(10) {
    clear list(%random)
    add list to list(%random$list from file("{$special folder("Application")}\\random.txt"), "Delete""Global")
    set(#number$rand(1, 3), "Global")
    if($comparison(#number"!="%random)) {
        then {
            alert("exist on the list")
        }
        else {
            alert("NOT exist on the list")
        }
    }
}

 

 

this is a part of my bot which dosen't work

Link to post
Share on other sites

try this instead

 

 

ui stat monitor("Number:"#number)
loop(10) {
    set(#number$rand(1, 3), "Global")
    set(#list"2
3""Global")
    if($contains(#list#number)) {
        then {
            alert({#number}    exist on the list")
        }
        else {
            alert("{#number}    NOT exist on the list")
        }
    }
}

Link to post
Share on other sites

thy Code 4repley .... you way is working but my bot have to take list from file and comparise 

 

 

I use HMA to change ip after that i write used IP to .txt

If i random this same ip i would like to skip this used IP

 

 

This is very importent please help ;]

Edited by dahid84
Link to post
Share on other sites

I mashed your codes together to get what I think it is you want:

ui stat monitor("Number:", #number)
clear list(%random)
add list to list(%random, $list from file("{$special folder("Application")}\\random.txt"), "Delete", "Global")
loop(10) {
    set(#number, $rand(1, 3), "Global")
    if($plugin function("File Management.dll", "$exists in list", %random, #number)) {
        then {
            alert("{#number} exist on the list")
        }
        else {
            alert("{#number} NOT exist on the list")
        }
    }
}

Link to post
Share on other sites

Do you have the file management plugin installed and activated?

 

Edit: I didn't realize that wasn't in the code before, you can either grab it here: http://www.ubotstudio.com/forum/index.php?/topic/13237-free-file-management-plugin-multiple-commands-and-functions/

 

Or use $contains instead

 

Edit: I'm not sure why the image changed but this post was meant for your original error image.

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