Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 02:24

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[HELP] One question about programing

Discussion on [HELP] One question about programing within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old 03/05/2011, 14:40   #16
 
Keyeight's Avatar
 
elite*gold: 844
Join Date: Oct 2010
Posts: 839
Received Thanks: 192
Quote:
Originally Posted by White&Black View Post
OMFG.i see There is a lot of work on it from you posts =). But worth to try
yeh it worth to try but very hard work :S i still trying to get source codes hhhhhhhhhh
Keyeight is offline  
Old 03/06/2011, 03:15   #17
 
elite*gold: 0
Join Date: Mar 2008
Posts: 556
Received Thanks: 545
C++ is hard to learn for most people ^^ I recommend VB.net but if you want a smooth bot I would definatly learn C++ its engineering seems better than vb and c#
Murgen is offline  
Old 03/06/2011, 07:45   #18
 
lesderid's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 2,400
Received Thanks: 1,517
Quote:
Originally Posted by Murgen View Post
but if you want a smooth bot I would definatly learn C++ its engineering seems better than vb and c#
Please tell my how/why it is.
lesderid is offline  
Old 03/06/2011, 11:21   #19
 
kevin_owner's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
You can do everything in all those languages. The only difference is performance, development time and if it's multiplatform or not. I'm sure that there are many big differences but these are the 3 that pop up in my brain:P

C++ is faster and with some apps like 3d rendering and that stuff way faster than C# but C# is way faster than vb. but C++ has a longer development time than C# cause you don't have that whole .net framework but C++ is multiplatform so it's just what you perfer. I'm using C++ cause 1. it's multiplatform and you got more control over your application. C# uses quite a lot memory compared to C++ so that's why i also prefer C++ and about the speed.

but you can make a smooth bot in vb there is nothing work with that even if the process time would be 10 ms longer it would still be so little that you wouldn't notice it. the most delay is between you and the server.
kevin_owner is offline  
Thanks
2 Users
Old 03/06/2011, 15:07   #20
 
* White *'s Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 717
Received Thanks: 330
Quote:
Originally Posted by kevin_owner View Post
You can do everything in all those languages. The only difference is performance, development time and if it's multiplatform or not. I'm sure that there are many big differences but these are the 3 that pop up in my brain:P

C++ is faster and with some apps like 3d rendering and that stuff way faster than C# but C# is way faster than vb. but C++ has a longer development time than C# cause you don't have that whole .net framework but C++ is multiplatform so it's just what you perfer. I'm using C++ cause 1. it's multiplatform and you got more control over your application. C# uses quite a lot memory compared to C++ so that's why i also prefer C++ and about the speed.

but you can make a smooth bot in vb there is nothing work with that even if the process time would be 10 ms longer it would still be so little that you wouldn't notice it. the most delay is between you and the server.
thanks for your explanation its very useful
* White * is offline  
Old 03/06/2011, 15:54   #21
 
lesderid's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 2,400
Received Thanks: 1,517
Quote:
Originally Posted by kevin_owner View Post
You can do everything in all those languages. The only difference is performance, development time and if it's multiplatform or not. I'm sure that there are many big differences but these are the 3 that pop up in my brain:P

C++ is faster and with some apps like 3d rendering and that stuff way faster than C# but C# is way faster than vb. but C++ has a longer development time than C# cause you don't have that whole .net framework but C++ is multiplatform so it's just what you perfer. I'm using C++ cause 1. it's multiplatform and you got more control over your application. C# uses quite a lot memory compared to C++ so that's why i also prefer C++ and about the speed.

but you can make a smooth bot in vb there is nothing work with that even if the process time would be 10 ms longer it would still be so little that you wouldn't notice it. the most delay is between you and the server.
These days, the speed isn't really an issue anymore.
And when you want to make it multiplatform, use Mono.

Anyways, it's just what language you choose.
lesderid is offline  
Old 03/06/2011, 16:05   #22
 
kevin_owner's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
Yeah that's right but still with something like an mmo you could still consider about the language if you want many players on it. But it's more about how it's programmed than the language. so yeah i agree with you
kevin_owner is offline  
Thanks
1 User
Old 03/06/2011, 20:29   #23

 
Haxor's Avatar
 
elite*gold: 0
Join Date: Feb 2008
Posts: 3,777
Received Thanks: 1,455
I think the most important thing in bot to create is the packet handling
Because in bot you must know how and which packet u must to send and u must analyze the packet to control it
then come the coding skills
If you good coder and you dont know about packets sniff you cant do anything
Haxor is offline  
Old 03/06/2011, 21:11   #24
 
* White *'s Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 717
Received Thanks: 330
Quote:
Originally Posted by saif1999 View Post
I think the most important thing in bot to create is the packet handling
Because in bot you must know how and which packet u must to send and u must analyze the packet to control it
then come the coding skills
If you good coder and you dont know about packets sniff you cant do anything
packets sniff .can you explain .i dont know what it means ^^
* White * is offline  
Old 03/06/2011, 21:18   #25
 
kevin_owner's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
Well packet sniffing is collecting all the data which is exchanged between the client and the server so between your game and the server you connected with.
if you want to create a bot, emulator or some other tools you need to know how to sniff packets(you could inject into the client but let's keep it at packet sniffing for now).

In these packets you have the data like at that position in game is a monster and it's walking into that direction or that player over there wears these items.

so if you're creating a bot you need to sniff those data and analyze it cause you need to know what's inside which can be a lot of work cause you need to guess a lot. and after you analyzed those packets you need to build a new packet and send it to the server.

so it's just collecting the data between the server and client
kevin_owner is offline  
Old 03/06/2011, 22:23   #26
 
npcdoom's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 76
Received Thanks: 147
Quote:
Originally Posted by lesderid View Post
These days, the speed isn't really an issue anymore.
And when you want to make it multiplatform, use Mono.

Anyways, it's just what language you choose.
Speed is always an important issue, not language, just because pc are getting really fast, you cant just do whatever you want =P, but it all depends on the requirements and the problem you trying to solve.
npcdoom is offline  
Thanks
1 User
Old 03/06/2011, 23:02   #27
 
* White *'s Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 717
Received Thanks: 330
Quote:
Originally Posted by kevin_owner View Post
Well packet sniffing is collecting all the data which is exchanged between the client and the server so between your game and the server you connected with.
if you want to create a bot, emulator or some other tools you need to know how to sniff packets(you could inject into the client but let's keep it at packet sniffing for now)...
it is posible to learn?becouse i understand 10% of that. I tought its easy but now i see that I need toread in google ;D
* White * is offline  
Old 03/06/2011, 23:31   #28
 
kevin_owner's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
Quote:
Originally Posted by White&Black View Post
it is posible to learn?becouse i understand 10% of that. I tought its easy but now i see that I need toread in google ;D
Yep you're able to learn a few months ago I was thinking like wth is all that network stuff:S I didn't understand anything about it how do you read such network thing and once you have that whole hex look-a-like packet how to make it readable how can i build my own packets how do I know what value it is and where it comes from.

Since i'm using C++ I read beej's guide. which is a great startup for beginners to understand some basics about how you can send stuff over the network. Be aware that you need to know how to use a programming language you can't just dive into that stuff cause it will drive you crazy

So after that tutorial I build a server app which could accept 1 user and send and receive a text(cause a string was the only way for that program I didn't had something like a packetwriter yet).

so once I got a little chat program I started to download some open source network servers and see how they wrote packets. This didn't really helped cause I didn't understand a thing about it. But then I found something on the net which explained how to convert something like a int into a array without convert it into a string.

This was done by the following line:
Code:
*(int*)&buffer[0] = value;
in this case the value is the value which i want to put in my char array which is called buffer. so now I got some code on how to write but now I wanted to read that value so how do I do that? well there was this line of code for
Code:
int value = *(int*)&buffer[0];
as y ou can see the operands are changed. *(operand is the part which is at the left or right of an operator. some has 1 operand some 2 and others might have 3 but that doesn't matter right now the equal sign has 2.)

so right now you're reading the value out of an char array which just converts 4 bytes (which is the size of an int) from the buffer to that variable.

owh and by the way the index of the array is the start position of the conversation.

oke well this might be a bit overwhelming and a little long to read but if you try to focus on creating some kind of chat program first and than start creating something like a packet reader and writer to pack data so you can send it all.

Owh I just remembered another method so stupid this one might be easier which is creating an structure and fill that structure and send it over the network so you don't have to pack it byte for byte but you define something like:

Code:
struct packet
{
        int Id;
        float someOtherData;
        string Name;
}
so in this cause you have the whole packet in 1 struct. this might also be a bit tricky for the name but I won't go into that part for now.

I hope this helped a litte.

btw should I write some kind of tutorial on how to start with an emulator? just an simple basic thing so you have something to play arround with?
kevin_owner is offline  
Thanks
1 User
Old 03/07/2011, 00:31   #29
 
elite*gold: 0
Join Date: Nov 2008
Posts: 31
Received Thanks: 29
Quote:
Originally Posted by kevin_owner View Post
Code:
*(int*)&buffer[0] = value;
So, basically, that would look like this, if it was written in normal code.

To keep things nice and simple, I will assume that we only want to represent the actual integer as a byte array, not to copy the value into the array. The other wa

Code:
/* integer i, with value slightly over nine thousand.
   these appear a lot in computers memory */

long i = 9001; 

/* this is a pointer to char; on most systems char will be 8bit integer.
   usually signed one, it depends on your compiler and flags given to it */

char *p; 

/* if were we not giving a crap about warnings, the type cast would not be necessary;
   we are giving a crap, so we need it there */

p = (char *)&i; 

/* now the pointer <p> points to the beginning of memory block allocated for integer <i>.
   what you actually do with it is up to you... */
Anyway, your post just confused the hell outta people around here. Also, I would like to point out that following two lines of code are equivalent, given the buffer variable is just a pointer.

Code:
buffer
&buffer[0]
dracek is offline  
Old 03/07/2011, 00:40   #30
 
kevin_owner's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
Quote:
Originally Posted by dracek View Post
So, basically, that would look like this, if it was written in normal code.

To keep things nice and simple, I will assume that we only want to represent the actual integer as a byte array, not to copy the value into the array. The other wa

Code:
/* integer i, with value slightly over nine thousand.
   these appear a lot in computers memory */

long i = 9001; 

/* this is a pointer to char; on most systems char will be 8bit integer.
   usually signed one, it depends on your compiler and flags given to it */

char *p; 

/* if were we not giving a crap about warnings, the type cast would not be necessary;
   we are giving a crap, so we need it there */

p = (char *)&i; 

/* now the pointer <p> points to the beginning of memory block allocated for integer <i>.
   what you actually do with it is up to you... */
Anyway, your post just confused the hell outta people around here. Also, I would like to point out that following two lines of code are equivalent, given the buffer variable is just a pointer.

Code:
buffer
&buffer[0]
actually I want to copy the value into that array cause that's the way I build the packet. the reason i'm using this is cause i didn't find another way yet cause this one works fine for me.

Look my packet writer has a member which is currentPosition which i'm using for the index in that char array. so when I add a value lets say a short but it could also be a int I increase the currentPosition with the size of an int or short so it doesn't overwrite some data.

I'm sure that there will be an easier way and that it'll confuse some people and i have to admit that i went way to far in the code. Sorry for that:P

but would you mind telling me how you would build a packet to send cause that's the only way I know and i'd like to know more/better ways?
kevin_owner is offline  
Reply


Similar Threads Similar Threads
[Programing] what is the best programing launguage
10/31/2010 - CO2 Programming - 19 Replies
hi i am willing to learn a new programming launguage to create bots witch i will post for free useing so if you can please tell me what is the best one to learn i will start learning it as soon as possible i allready know a bit about VB
[HELP]how to start programing ?
06/28/2009 - CO2 Programming - 30 Replies
i just finished my final exams today if i want to start learning programing .. what u should i start with ,, i mean what language to start where is the best to learn it ., if any one wants to help just say it
new to programing
12/20/2008 - Cabal Hacks, Bots, Cheats, Exploits & Macros - 0 Replies
first of all, i want to thank you all for the help you got me from other threads. now i would like to ask something... no i don't want bots or hacks made from anyone... i just want a little advice in something. to know about programing a bypass for gameguard or to make a bot which programs, coder or programing books i should look to?? i mean, should i look for auto it to make a bot? should i try c++ programing? if theres someone who could help me with knowing more about programing...
Help for Programing a bot
04/01/2008 - Conquer Online 2 - 0 Replies
Well, i want to make a bot for CO, but i need some help. I don't know if it's better to take the packets that send conquer server, and manipulate it; or find the memory address and change the values when i need it. Well, in addition, i have a question. Always the system assigned the same memory address for the game? For example, if i use the "odbg", and i find that the memory address for the player name is "x", always "x" have the player name? Well, i need some help. I don't need that...
Request for programing help
05/30/2006 - Conquer Online 2 - 1 Replies
Well ass all of we know the auto lvl doent work i use to lvl whit COPartner but now its freez. Ill try to crack it but i need some help hehe if anyone can give me and idea of how to do it or any source ty hope elitepvpers ll join togetter to do this crack lol by the way im not good programer so i need so much help



All times are GMT +1. The time now is 02:24.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.