 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
vsdagama Grandmaster Cheater Supreme
Reputation: 0
Joined: 12 Feb 2007 Posts: 1046 Location: Nexon's basement
|
Posted: Tue Nov 18, 2008 12:26 pm Post subject: which language should I learn?? |
|
|
Hey,
I've been hacking Maplestory for some time (leeching)
But now I want to do my own stuff,
for example making a UCE and learning some language.
Now the question is: what language should I learn??
My purpose is to create bots, and other stuff like that.
C++, java, ... (don't know anything about them)
And are there some recommended guides/books about it ??
thanks!!
_________________
|
|
| Back to top |
|
 |
blackmorpheus Expert Cheater
Reputation: 0
Joined: 05 Apr 2008 Posts: 159
|
Posted: Tue Nov 18, 2008 12:40 pm Post subject: |
|
|
C++,
CPP Primer 4th edition. ( u can download free e-book)
Learn C++ in 21 days ( google it)
You could also go for c#, but don't know much about that..
|
|
| Back to top |
|
 |
vsdagama Grandmaster Cheater Supreme
Reputation: 0
Joined: 12 Feb 2007 Posts: 1046 Location: Nexon's basement
|
Posted: Tue Nov 18, 2008 12:52 pm Post subject: |
|
|
k, I would like a language that could be used for different things, so I don't have to learn many other (I will if needed)
Can anyone explain what's the acutal difference between all that languages?? like why isn't there only 1?
could you give some links??
all links for primer's tut are dead.
_________________
|
|
| Back to top |
|
 |
Stonehenge Master Cheater
Reputation: 0
Joined: 03 Oct 2008 Posts: 280 Location: Unknown Jumphole
|
Posted: Tue Nov 18, 2008 1:21 pm Post subject: |
|
|
Why Oh why did you have to ask this question here... Let the language wars begin
Anyway, C++ would be a really good language to learn. There are different programming languages because different people like different syntaxes, and because certain levels are either high or low level. High level languages, such as C+, Visual Basic, and others, take you farther away from machine language. It's closer to English, you might say. Lower level language like C++, and C (as low level as you might want to get) use more machiney language, but with the advantage of being able to more closely interact with the computer and control it more.
C is getting old and is pretty low level. You can really control every aspect of the computer this way. The bad thing is: you have to control every aspect of the computer. Like dealing out and taking back memory and really low level stuff.
C++ is very fun and natural for me to write. Plus the fact that you can do most anything with it makes it a good language. I may call this "medium level language". I absolutely love it. And let the fact that Photoshop, Flash, and other Adobe Suite software is coded in C++ tell you something. C++ is also bloody fast. Any Windows machine can run a program written in either this or the above language. A very general purpose language. You can write bots in this or whatever it was you wanted to do.
C# is even higher level, the youngest in the C family. Cool syntax and easy learning curve, along with Microsoft's Strong support let this language attract many beginners. You may want to investigate this programming language deeply, I think you'll like it. It does require any user that runs your programs to have the .NET framework installed. I don't like this. However, I also dislike it because it's "fluffy". I have no idea why I think this, my mind can't get over the stupid supposition that it's for kids. THIS IS NOT CORRECT, but it's a mental block I can't overcome. Oh well.
Java was made by Sun Microsystems in 1995. You probably won't be able to make a bot or whatever with this language. You can however, put these programs in Web Pages, a valuable asset, as you cannot do this with most other programming languages. C# was an attempt to be better than Java. Is it? You decide. I've never programmed in it so let someone who has tell you about it.
Visual Basic is what we here at CEF write most of the trainers for flash games in, due to it's handy "SetVariable" command. I absolutely hate it otherwise. Others love it. The syntax is absolutely dreadful to me. Some call it "Visual Babytalk". This is in no way permanently dismissing VB as crap, some love it, I just dislike it. It may be the language to end all languages to others. Everyone has their favourite.
Delphi is another popular one. Ask someone else about it, I know nothing about it. It's pretty old though.
Assembly: Like limbo. How low can you go? Not any lower than Assembly unless you wanna go into the 1's and 0's. Virus writers write in this. If you ever want to do anything but hack with a programming language you learn, don't learn this, or learn something with this. Super low level, you manipulate memory in the palms of your hands with this. Maybe learn this after you've mastered another higher level language.
Before picking one, look up some tutorials on the 'net for them. Write some code and see how you like it. You may recoil from C++ like the plague while I love it, and love VB while I wouldn't touch it with a 10 foot pole. Merely a matter of preference.
C tutorial: http://www.physics.drexel.edu/students/courses/Comp_Phys/General/C_basics/
C++ tutorial: http://www.cplusplus.com/doc/tutorial/
C# tutorial: http://www.csharp-station.com/Tutorial.aspx
Java tutorial: http://java.sun.com/docs/books/tutorial/
VB tutorial: http://visualbasic.about.com/od/learnvbnet/a/LVBE_L1.htm
Delphi Tutorial: http://www.techiwarehouse.com/cms/engine.php?page_id=49b4d286
And yes, an Assembly tutorial: http://win32assembly.online.fr/tutorials.html
Disclaimer: I am not the Potentate of the Universe, so I do not think I am absolutely correct about the above information. I am merely conveying my knowledge as best I can. If I said something wrong, just tell me and I will correct it.
_________________
|
|
| Back to top |
|
 |
vsdagama Grandmaster Cheater Supreme
Reputation: 0
Joined: 12 Feb 2007 Posts: 1046 Location: Nexon's basement
|
Posted: Tue Nov 18, 2008 2:56 pm Post subject: |
|
|
Wow
Thanks for such an extensive explanation!!
So acutally I can choose between some languages, just the one that pleases me the most, or the one I like the most?
Can you tell me what language this is?
It's from my private server, and I think it's pretty easy to understand.
Is it C++? :
| Code: | include "WorldServerConnectPlayerPacket.h"
#include <string>
#include <vector>
using std::string;
using std::vector;
void ChatHandler::handleChat(Player *player, PacketReader &packet) {
string message = packet.getString();
int8_t bubbleOnly = packet.getByte(); // Skill Macros only display chat bubbles
char *chat = const_cast<char *>(message.c_str()); // Leaving chat as char[] for GM commands for now
size_t chatsize = message.size(); // See above line
if (chat[0] == '!' && player->isGM()) {
if (chatsize < 2) {
return;
}
char *next_token;
char command_char[90];
strcpy_s(command_char, 90, strtok_s(chat+1, " ", &next_token));
string command = string(command_char);
if (player->getGMLevel() >= 3) { // Admin Level
if (command == "header") {
WorldServerConnectPlayerPacket::scrollingHeader(ChannelServer::Instance()->getWorldPlayer(), next_token);
}
else if (command == "ban") {
if (strlen(next_token) == 0) {
PlayerPacket::showMessage(player, "You must specify a user to ban.", 5);
return;
}
string targetname = strtok_s(0, " ", &next_token);
if (Player *target = Players::Instance()->getPlayer(targetname))
target->getSession()->disconnect();
int8_t reason = 1;
if (strlen(next_token) > 0)
reason = atoi(next_token);
// Ban account
mysqlpp::Query accbanquery = Database::getCharDB().query();
accbanquery << "UPDATE users INNER JOIN characters ON users.id = characters.userid SET users.ban_reason = " << (int16_t) reason << ", users.ban_expire = '9000-00-00 00:00:00' WHERE characters.name = '" << targetname << "'";
accbanquery.exec();
string banmsg = targetname + " has been banned";
switch (reason) {
case 0x01: banmsg += " for hacking."; break;
case 0x02: banmsg += " for using macro/auto-keyboard."; break;
case 0x03: banmsg += " for illicit promotion or advertising."; break;
case 0x04: banmsg += " for harassment."; break;
case 0x05: banmsg += " for using profane language."; break;
case 0x06: banmsg += " for scamming."; break;
case 0x07: banmsg += " for misconduct."; break;
case 0x08: banmsg += " for illegal cash transaction."; break;
case 0x09: banmsg += " for illegal charging/funding. Please contact customer support for further details."; break;
case 0x0A: banmsg += " for temporary request."; break;
case 0x0B: banmsg += " for impersonating GM."; break;
case 0x0C: banmsg += " for using illegal programs or violating the game policy."; break;
case 0x0D: banmsg += " for one of cursing, scamming, or illegal trading via Megaphones."; break;
default: banmsg += "."; break;
}
PlayersPacket::showMessage(banmsg, 0);
}
else if (command == "unban") {
if (strlen(next_token) == 0) {
PlayerPacket::showMessage(player, "You must specify a user to unban.", 5);
return;
}
// Unban account
mysqlpp::Query accbanquery = Database::getCharDB().query();
accbanquery << "UPDATE users INNER JOIN characters ON users.id = characters.userid SET users.ban_expire = '0000-00-00 00:00:00' WHERE characters.name = '" << next_token << "'";
accbanquery.exec();
PlayerPacket::showMessage(player, string(next_token) + " has been unbanned.", 6);
}
else if (command == "shutdown") {
ChannelServer::Instance()->shutdown();
} |
I'll look at all the examples you gave me, see which one I like
Thanks!!!
*edit: C is basic, like you said,
C++ seems the most appealing to me, I like it!
C#: I don't see any difference now between C++ and C#, what is the difference and which one should I take?
*2nd edit: I'm trying out C++ now, but I have already installed visual C++ 2008 express edition, how can I make the "hello world" program in it?? Should I take another program to make such a things?
_________________
|
|
| Back to top |
|
 |
Stonehenge Master Cheater
Reputation: 0
Joined: 03 Oct 2008 Posts: 280 Location: Unknown Jumphole
|
Posted: Tue Nov 18, 2008 3:11 pm Post subject: |
|
|
If I'm right, and I'm usually not, that code snippet you posted is C++. And yes you can just choose one that you like. Isn't programming wonderful?
C is not Object Oriented.
C++ can be if you want it to be.
C# is totally OO no matter what you want.
I don't like Object Oriented Programming (OOP).
OOP is an abstract concept (to me) that is hard to explain (for me) to someone who hasn't programmed before. It would behoove you to look it up and read about it 'till you understand it. And I'm glad you are leaning toward C++.
C++ is uber general purpose; you can do just about anything with it. And the guy who invented it is named Bjarne Stroustrup. How cool is that? I love it.
_________________
|
|
| Back to top |
|
 |
vsdagama Grandmaster Cheater Supreme
Reputation: 0
Joined: 12 Feb 2007 Posts: 1046 Location: Nexon's basement
|
Posted: Tue Nov 18, 2008 3:24 pm Post subject: |
|
|
K, I am taking C++ then :p
So now I started the tut, but how can I make the code into an exe for example??
In visual C++ 2008 express edition I made a .cpp file with | Code: | // my first program in C++
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
|
in it, but I don't know how I let the computer put that in practice...
Or are there easyer programs to begin with??
Thanks for the help!!!
EDIT: Ok, I added the firstry.cpp to a solution, I built the solution, I got a map with firsty.exe, but when I click it a cmd window pops up and disapears asap, how do I make it stay??
_________________
|
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Tue Nov 18, 2008 3:29 pm Post subject: |
|
|
seriously, dont ask, google for hello world, the old system("pause")/ sin.get /ignore war will never end
_________________
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Tue Nov 18, 2008 3:31 pm Post subject: |
|
|
Most people just wait for user input (scanf()/cin, or getch()/getchar() but if you use these then clean the input buffer by calling fflush()) or an infinite loop (while (1);, for (;;);, do { } while(1);, etc...) and some even simply call "sleep()". (which is diffrent than Sleep)
Just wait for user input, or you can also run using Ctrl+F5 and it'll run your program through cmd.exe and wait for user input automatically.
|
|
| Back to top |
|
 |
vsdagama Grandmaster Cheater Supreme
Reputation: 0
Joined: 12 Feb 2007 Posts: 1046 Location: Nexon's basement
|
Posted: Tue Nov 18, 2008 3:34 pm Post subject: |
|
|
srry for my noobishness,
thanks for the ctrl+F5 tip :p
I don't understand any of the getch() things yet, but soon I will :p
_________________
|
|
| Back to top |
|
 |
Stonehenge Master Cheater
Reputation: 0
Joined: 03 Oct 2008 Posts: 280 Location: Unknown Jumphole
|
Posted: Tue Nov 18, 2008 3:50 pm Post subject: |
|
|
| vsdagama wrote: | K, I am taking C++ then :p
So now I started the tut, but how can I make the code into an exe for example??
In visual C++ 2008 express edition I made a .cpp file with | Code: | // my first program in C++
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
|
in it, but I don't know how I let the computer put that in practice...
Or are there easyer programs to begin with??
Thanks for the help!!! |
Heavens, uninstall Visual C++ and install Dev C++: http://prdownloads.sourceforge.net/dev-cpp/devcpp-4.9.9.2_setup.exe
Notice with your code, it will run that Hello World so fast you wont see it. So, do this:
#include <iostream>
using namespace std;
| Code: |
int main ()
{
cout << "Hello World!\n";
system("PAUSE"); // Wait for the user to press a key
return 0; // Exit your program
}
|
the \n I added after the hello world is a NEWLINE character. Otherwise the output would look like this:
Hello World!Press any key to continue...
Instead of like this:
Hello World!
Press any key to continue...
Get it?
The system("PAUSE"); line is to make the program wait for you. It's what does the Press any key for some go go juice thing. Some people say not to do the system("PAUSE"), but I do it anyway. It doesn't hurt. Got it?
To compile in DC++, click the compile button.
The .exe will be in C:\Dev-Cpp
_________________
|
|
| Back to top |
|
 |
vsdagama Grandmaster Cheater Supreme
Reputation: 0
Joined: 12 Feb 2007 Posts: 1046 Location: Nexon's basement
|
Posted: Tue Nov 18, 2008 4:03 pm Post subject: |
|
|
K, I will leave you alone now for a week :p
Till I read the whole tut, and some others..
Tyvm!!!
_________________
|
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Tue Nov 18, 2008 4:04 pm Post subject: |
|
|
keep visual C++, theres no really good reason to use one over the other, but vc++ is more standard
_________________
|
|
| Back to top |
|
 |
nog_lorp Grandmaster Cheater
Reputation: 0
Joined: 26 Feb 2006 Posts: 743
|
|
| Back to top |
|
 |
Stonehenge Master Cheater
Reputation: 0
Joined: 03 Oct 2008 Posts: 280 Location: Unknown Jumphole
|
Posted: Tue Nov 18, 2008 4:08 pm Post subject: |
|
|
| Snootae wrote: | | keep visual C++, theres no really good reason to use one over the other, but vc++ is more standard |
Dev Cpp is way faster for me.
and nog lorp, doesn't endl; do the same thing?
_________________
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|