To be used for archiving purposes only. No new posts will be made. View Scope's Farewell Message
Public Function CheckProduct() As BooleanIf Username = vbNullString Then AddChat "You must enter a username.": Exit FunctionIf Password = vbNullString Then AddChat "You must enter a password.": Exit Function If Product <> "RATS" And Product <> "PXES" And Product <> "NB2W" And Product <> "VD2D" And Product <> "PX2D" And Product <> "3RAW" And Product <> "PX3W" Then AddChat "You have not entered a valid product." AddChat "Valid products: RATS, PXES, NB2W, VD2D, PX2D, 3RAW, PX3W" Exit Function End If If (Product = "RATS" Or Product = "PXES") And (Len(cdkey) <> 13) Then AddChat "You have not entered a valid cd-key for this product.": Exit Function If (Product = "NB2W" Or Product = "VD2D") And (Len(cdkey) <> 16) Then AddChat "You have not entered a valid cd-key for this product.": Exit Function If Product = "PX2D" And (Len(cdkey) <> 16 Or Len(XPCdKey) <> 16) Then AddChat "You have not entered a valid cd-key for this product.": Exit Function If Product = "3RAW" And Len(cdkey) <> 26 Then AddChat "You have not entered a valid cd-key for this product.": Exit Function If Product = "PX3W" And (Len(cdkey) <> 26 Or Len(XPCdKey) <> 26) Then AddChat "You have not entered a valid cd-key for this product.": Exit Function CheckProduct = TrueEnd Function
Public Function GetStuff(Section As String, Key As String) As StringDim S As StringS = Space(128)GetPrivateProfileStringA Section, Key, vbNullString, S, Len(S), App.Path & "\Config.ini"GetStuff = KillNull(S)End FunctionPublic Function WriteStuff(Section As String, Key As String, sString As String)WritePrivateProfileStringA Section, Key, sString, App.Path & "\Config.ini"End Function
Public Sub mnuConnect_Click()On Local Error GoTo w_ErrorUsername = GetStuff("Edited", "Username")Password = LCase(GetStuff("Edited", "Password"))cdkey = UCase(GetStuff("Edited", "Cd-Key"))XPCdKey = UCase(GetStuff("Edited", "XPCd-Key"))Product = UCase(GetStuff("Edited", "Client"))Server = LCase(GetStuff("Edited", "Server"))Home = GetStuff("Edited", "Home Channel")varProxy = GetStuff("Advanced", "Proxy")If GetStuff("Misc", "Auto Detect Loads") = "Y" Then ald = TrueAddChat "Checking hash files..."If Not CheckHashes Then Exit SubAddChat "All hashes found."AddChat "Checking Product..."If Not CheckProduct Then Exit SubAddChat "Product Verified."
Public Function CheckProduct() As BooleanAddC Username & ";" & Password & ";" & Product & ";" & Len(CDKey) & ";" & Len(XPCdKey)If Username = vbNullString Then AddChat "You must enter a username.": Exit FunctionIf Password = vbNullString Then AddChat "You must enter a password.": Exit Function If Product <> "RATS" And Product <> "PXES" And Product <> "NB2W" And Product <> "VD2D" And Product <> "PX2D" And Product <> "3RAW" And Product <> "PX3W" Then AddChat "You have not entered a valid product." AddChat "Valid products: RATS, PXES, NB2W, VD2D, PX2D, 3RAW, PX3W" Exit Function End If If (Product = "RATS" Or Product = "PXES") And (Len(cdkey) <> 13) Then AddChat "You have not entered a valid cd-key for this product.": Exit Function If (Product = "NB2W" Or Product = "VD2D") And (Len(cdkey) <> 16) Then AddChat "You have not entered a valid cd-key for this product.": Exit Function If Product = "PX2D" And (Len(cdkey) <> 16 Or Len(XPCdKey) <> 16) Then AddChat "You have not entered a valid cd-key for this product.": Exit Function If Product = "3RAW" And Len(cdkey) <> 26 Then AddChat "You have not entered a valid cd-key for this product.": Exit Function If Product = "PX3W" And (Len(cdkey) <> 26 Or Len(XPCdKey) <> 26) Then AddChat "You have not entered a valid cd-key for this product.": Exit Function CheckProduct = TrueEnd Function
[Edited]Username=WardenPassword=fagsCd-Key=0000000000000Client=3RAWetc....
eX.Pro, shut the fuck up, I'm removing your posts for a reason.
Debug it line by line bro. Like a programmer would do.
@Helm - Im assuming the first AddC line is suppose to output the Username & Password on screen, but all its outputting is the ;'s So this code = fail, somewhere thats what I get for trying to avoid BNCSUtil.dll
Quote from: Loud on November 22, 2010, 04:21:20 pmDebug it line by line bro. Like a programmer would do.That's what we call a last ditch effort, which is only used when your programming world breaks down. It's a time consuming anger filled attempt usually ending in a facepalm. Quote from: Warden on November 22, 2010, 04:31:35 pm@Helm - Im assuming the first AddC line is suppose to output the Username & Password on screen, but all its outputting is the ;'s So this code = fail, somewhere thats what I get for trying to avoid BNCSUtil.dll Make sure you have your config in the right place: App.Path & "\Config.ini"In other words, the same place as the compiled exe.
Username = GetStuff("Edited", "Username")Password = LCase(GetStuff("Edited", "Password"))cdkey = UCase(GetStuff("Edited", "Cd-Key"))XPCdKey = UCase(GetStuff("Edited", "XPCd-Key"))Product = UCase(GetStuff("Edited", "Client"))Server = LCase(GetStuff("Edited", "Server"))Home = GetStuff("Edited", "Home Channel")
The problem is with the following code:Code: [Select]Username = GetStuff("Edited", "Username")Password = LCase(GetStuff("Edited", "Password"))cdkey = UCase(GetStuff("Edited", "Cd-Key"))XPCdKey = UCase(GetStuff("Edited", "XPCd-Key"))Product = UCase(GetStuff("Edited", "Client"))Server = LCase(GetStuff("Edited", "Server"))Home = GetStuff("Edited", "Home Channel")The code is looking in a different section than your config uses. In other words, It's looking for "Edited", but you need "MAIN".do a search for [[ GetStuff(" ]] and make sure they are all go [[ GetStuff("MAIN", ]]
Apparently the Source was setup weirdly for single profile use.
Solution: don't steal old vb6 code.
I don't think it counts as stealing since:1) The source is public.2) He mentioned what bot it's from and what he is trying to do (Giving credit)I do however think it's foolish to even bother to update an old ruthless source especially since your having trouble with the simplest part -.- If you are just trying to learn it's fine but if you have the inclination to actually use what your coding to moderate a channel i'd have to say the end result won't be anywhere near what the newest build of ruthless ops offers in terms of performance.
Just note that the 2.00e source is from the time when I was learning how to code (more than 5 years ago). I greatly discourage you using it as a base for any serious project. It is inefficient, slow, and shows very childish coding style. That being said, I do encourage you to learn from it, and I hope you succeed in your endeavors. Once you feel comfortable, you definitely should think about starting your own bot from scratch. l2uthless v2.1x does not use any of < v2.1 code. I completely rewrote it.