• Log in or sign up for an account here: https://www.sythe.org/login

C++ My first script (Loginprompt)

Frt

Newcomer
Joined
Oct 14, 2007
Sythe Gold
0
Messages
15
C++ My first script (Loginprompt)
Hi guys,

I've been reading a bit on the forum and I've tried to learn C++ and so far I think I'm making progress.

Code:
#include <iostream>
#include <string>

using namespace std;

const string uc = "Username";
const string pc = "Password";

string username,password;
int id;
bool result;

bool login(string u,string p) {
     if(u == uc && p == pc) return(true);
     if(u != uc || p != pc) return(false);
}

int setid(string u) {
     if(u == uc) return(1);
}

int main(int argc, char *argv[])
{
      cout << "Username: ";
      cin >> username;
      cout << "Password: ";
      cin >> password;
      result = login(username,password);
      if(result == true) id = setid(username);
      cout << "Welcome " << username << ", you have been logged in and your ID is " << id;
      Sleep("2000");
}

I know that the script is easy to improve. For example you could add an array so you could add multiple users, but I wasn't quite sure on how to do this so I didn't put an effort into doing this (:

Btw: Can you suggest some great tutorials for learning to make program in C++ that moves mouse, sends keys and so on?

I'm aiming towards making an Autofighter some day and perhaps an Aimbot for Counter Strike (:
 
C++ My first script (Loginprompt)
This isn't a script. A script is usually something like a text file that is parsed by an application, for example, JavaScript in Windows Script files.

As for learning to make aimbots and whatnot, I can only say this: LEARN TO PLAY THE GAME. Partially because of people who use aimbots that I don't play CS much any more.

And for tutorials, http://www.google.com/.
 
C++ My first script (Loginprompt)
C++ is a fail for any Runescape bots (I made my own WCer so I would know). It's slow and incorporating randoms is extremely difficult. Your program is pretty nice for a starting program. C++ is great for CS aimbots because it can use addresses and all that, but a good cs aimbot will take many many months if not years of knowledge. I can't give you all the info, but over the last few months I've gathered that for a colour-clicking bot you need:
SetCursorPos()
GetPixel()
GetCursorPos() -helpful but not necessary-
Good knowledge of loops, variables, and a willingness to face challenges.
If you're set on an rs bot use java.
And go buy a book legit it's easier than reading off a screen and won't make u go insane as fast
Idiot - C++ is faster than some of the most common languages used to create RuneScape bots, including Visual Basic. The reason yours went slow is because you're checking each pixel individually - look in to the GetDIBits function.
 
C++ My first script (Loginprompt)
Thanks for that. I know that C++ is used a lot, but I thought that it's still not as powerful as Java for RS. SMR gave me the GetPixel idea so I thought it was solid :(
 
C++ My first script (Loginprompt)
Thanks for that. I know that C++ is used a lot, but I thought that it's still not as powerful as Java for RS. SMR gave me the GetPixel idea so I thought it was solid :(
Java is good for creating RS cheats because you can hook the RS applet and interface with it easier than you could with other languages, and so on.
 
C++ My first script (Loginprompt)
Dont you c++ for that:) just complicates shit.... use java instead its much easier and better for that kinda thing like aimbots and stuff:)
 
C++ My first script (Loginprompt)
This isn't a script. A script is usually something like a text file that is parsed by an application, for example, JavaScript in Windows Script files.

As for learning to make aimbots and whatnot, I can only say this: LEARN TO PLAY THE GAME. Partially because of people who use aimbots that I don't play CS much any more.

And for tutorials, http://www.google.com/.

There is a market in cheating/hacking for games ya' know? Learning C++ to write a hack could be a motivation to learn, that is how it was for me at least.
Charging $15 Per Month Per user for a multi-hacking tool for lets say, Counter-Strike, and imagine about 100 active, paying users.

$1500 Per Month (give or take a few due to web-domain), why not stop there? Expand your knowledge, learn more and offer what other cheat-providers haven't or cannot
 
C++ My first script (Loginprompt)
I don't understand what does this script do?

Care to explain?

Well it is NOT a script, please read all posts...

What this does is, asks for input/ for username and password
then whatever is input is compared to 2 strings using the '==' (equal to) statement, then using the 'If' statement, it checks to see whether it WAS equal to or not, if not, then it does not go any further, otherwise if it was equal to then it continues onto printing the username and password on the screen, along with a welcome statement.
 
C++ My first script (Loginprompt)
That isnt really a script is it?
 
C++ My first script (Loginprompt)
C++ is a fail for any Runescape bots (I made my own WCer so I would know). It's slow and incorporating randoms is extremely difficult. Your program is pretty nice for a starting program. C++ is great for CS aimbots because it can use addresses and all that, but a good cs aimbot will take many many months if not years of knowledge. I can't give you all the info, but over the last few months I've gathered that for a colour-clicking bot you need:
SetCursorPos()
GetPixel()
GetCursorPos() -helpful but not necessary-
Good knowledge of loops, variables, and a willingness to face challenges.
If you're set on an rs bot use java.
And go buy a book legit it's easier than reading off a screen and won't make u go insane as fast

loooooooooooool
 
C++ My first script (Loginprompt)
Nice Job For A 1st Script Bud :) But Its Not Really A Script Though, maybe you could add a few arrays etc.
 
C++ My first script (Loginprompt)
1. global variables pollute the global namespace :-(
2. using an entire namespace does too :-(
3. login()'s logic is redundant:
Code:
     if(u == uc && p == pc) return(true);
     if(u != uc || p != pc) return(false);
->
Code:
    return u == uc && p == pc;
4. there should really be a space between return and the return value, and you should use redundant parentheses when they aren't used for clarification.
5.
Code:
      if(result == true) id = setid(username);
that if-condition can be simplified to just:
Code:
if (result)
6. this isn't a script :)
7. Sleep() takes a number of milliseconds... not in string form; you're probably doing an implicit conversion between pointer to int and sleeping for a very strange number of milliseconds.
8. using Sleep() to avoid the console closing immediately can be avoided by running the program from the terminal/shell/command prompt.
9. breaking cross-platform compatibility to do that is stupid
10. c++ isn't required for dlls
11. == is an operator not a statement
12. this is a long list
 
C++ My first script (Loginprompt)
13. very insecure-- valid login can be found via a simple text editor
14. prints out welcome with valid username even if supplied with invalid username.
15. prints out junk id if invalid username supplied
16. misleading function names
17. this is now a longer list
 
Runescape Gamblingrunescape gambling
Back
Top