Register for your free account! | Forgot your password?

You last visited: Today at 18:02

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

Advertisement



help?

Discussion on help? within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
ruancarlosbr's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 54
Received Thanks: 2
help?

where it is on client;??

GAME_CLIENTE_CHAT= 0x9000
GAME_CLIENTE_open=
GAME_CLIENTE_pacht=

where is it???

Cliente
ruancarlosbr is offline  
Old 11/09/2010, 16:59   #2
 
lesderid's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 2,400
Received Thanks: 1,517
Ok, I didn't understand this.
EDIT:
The opcode 0x9000 is the C->S AcceptHandshake.
The packet with this opcode normally has no data.
lesderid is offline  
Thanks
1 User
Old 11/09/2010, 17:05   #3
 
Dr.Abdelfattah's Avatar
 
elite*gold: 7
Join Date: May 2010
Posts: 2,115
Received Thanks: 2,373
Quote:
Originally Posted by ruancarlosbr View Post
where it is on client;??

GAME_CLIENTE_CHAT= 0x9000
GAME_CLIENTE_open=
GAME_CLIENTE_pacht=

where is it???

Cliente
this is Opcodes
i think in media pk2 ... (just extract it & see) ,,
Dr.Abdelfattah is offline  
Old 11/09/2010, 18:14   #4
 
Shadowz75's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 443
Received Thanks: 597
Quote:
Originally Posted by abdelfattah View Post
this is Opcodes
i think in media pk2 ... (just extract it & see) ,,
there are no **** opcodes in the pk2 files. who started this rumor?
btw i dont understand your question, too.
Shadowz75 is offline  
Thanks
4 Users
Old 11/09/2010, 22:45   #5
 
Dr.Abdelfattah's Avatar
 
elite*gold: 7
Join Date: May 2010
Posts: 2,115
Received Thanks: 2,373
Quote:
Originally Posted by Shadowz75 View Post
there are no damn opcodes in the pk2 files. who started this rumor?
can u tell me what is that ??

PHP Code:
            CLIENT_PATCH 0x9000,
            
CLIENT_CONNECTION 0x6103,
            
CLIENT_PING 0x2001,
            
CLIENT_PING2 0x2002,
            
CLIENT_INGAME_REQUEST 0x72EE,
            
CLIENT_INGAME_SUCCESS 0x36CF,
            
CLIENT_MOVEMENT 0x7674,
            
CLIENT_LEAVE_REQUEST 0x744E,
            
CLIENT_LEAVE_CANCEL 0x7413,
            
CLIENT_ITEM_MOVE 0x73CF,
            
CLIENT_SELECT_OBJECT 0x7445,
            
CLIENT_GM 0x726D,
            
CLIENT_EMOTE 0x33F8,
            
CLIENT_TELEPORTDATA 0x32E7,
            
CLIENT_TELEPORTSTART 0x73AF,
            
CLIENT_CHAT 0x7576,
            
CLIENT_MAINACTION 0x70F0,
            
CLIENT_MASTERY_UP 0x70A0,
            
CLIENT_SKILL_UP 0x779D,
            
CLIENT_SAVE_INFO 0x7611,
            
CLIENT_GETUP 0x34C9,
            
CLIENT_REQUEST_PARTY 0x7442,
            
CLIENT_PARTY_REQUEST 0x368B,
            
CLIENT_PARTY_ADDMEMBERS 0x74F8,
            
CLIENT_PARTY_BANPLAYER 0x7170,
            
CLIENT_PARTY_LEAVE 0x7465,
            
CLIENT_JOIN_FORMED_PARTY 0x776F,
            
CLIENT_FORMED_PARTY_DELETE 0x7010,
            
CLIENT_PLAYER_UPDATE_STR 0x71D0,
            
CLIENT_PLAYER_UPDATE_INT 0x724A,
            
CLIENT_PLAYER_HANDLE 0x754B,
            
CLIENT_PLAYER_BERSERK 0x7436,
            
CLIENT_EXCHANGE_WINDOWS_CLOSE 0x7066,
            
CLIENT_EXCHANGE_REQUEST 0x77F2,
            
CLIENT_EXCHANGE_ACCEPT 0x7207,
            
CLIENT_EXCHANGE_APPROVE 0x745C,
            
CLIENT_CLOSE_NPC 0x770C,
            
CLIENT_OPEN_NPC 0x74F2,
            
CLIENT_NPC_BUYPACK 0x70AF,
            
CLIENT_OPEN_WAREHOUSE 0x7711,
            
CLIENT_CLOSE_SCROLL 0x70F4,
            
CLIENT_SAVE_PLACE 0x7228,
            
CLIENT_MOVEMENT_WITH_TRANSPORT 0x749B,
            
CLIENT_PET_TERMINATE 0x7779,
            
CLIENT_PARTYMATCHING_LIST_REQUEST 0x77EE,
            
CLIENT_CREATE_FORMED_PARTY 0x73EE,
            
CLIENT_ALCHEMY 0x7403,
            
CLIENT_STALL_OPEN 0x7036,
            
CLIENT_STALL_WELC 0x7783
but i am now discover that they are not in pk2 files ,,
Dr.Abdelfattah is offline  
Old 11/09/2010, 22:47   #6
 
Burton_1993's Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 318
Received Thanks: 144
Quote:
Originally Posted by abdelfattah View Post
can u tell me what is that ??

PHP Code:
            CLIENT_PATCH 0x9000,
            
CLIENT_CONNECTION 0x6103,
            
CLIENT_PING 0x2001,
            
CLIENT_PING2 0x2002,
            
CLIENT_INGAME_REQUEST 0x72EE,
            
CLIENT_INGAME_SUCCESS 0x36CF,
            
CLIENT_MOVEMENT 0x7674,
            
CLIENT_LEAVE_REQUEST 0x744E,
            
CLIENT_LEAVE_CANCEL 0x7413,
            
CLIENT_ITEM_MOVE 0x73CF,
            
CLIENT_SELECT_OBJECT 0x7445,
            
CLIENT_GM 0x726D,
            
CLIENT_EMOTE 0x33F8,
            
CLIENT_TELEPORTDATA 0x32E7,
            
CLIENT_TELEPORTSTART 0x73AF,
            
CLIENT_CHAT 0x7576,
            
CLIENT_MAINACTION 0x70F0,
            
CLIENT_MASTERY_UP 0x70A0,
            
CLIENT_SKILL_UP 0x779D,
            
CLIENT_SAVE_INFO 0x7611,
            
CLIENT_GETUP 0x34C9,
            
CLIENT_REQUEST_PARTY 0x7442,
            
CLIENT_PARTY_REQUEST 0x368B,
            
CLIENT_PARTY_ADDMEMBERS 0x74F8,
            
CLIENT_PARTY_BANPLAYER 0x7170,
            
CLIENT_PARTY_LEAVE 0x7465,
            
CLIENT_JOIN_FORMED_PARTY 0x776F,
            
CLIENT_FORMED_PARTY_DELETE 0x7010,
            
CLIENT_PLAYER_UPDATE_STR 0x71D0,
            
CLIENT_PLAYER_UPDATE_INT 0x724A,
            
CLIENT_PLAYER_HANDLE 0x754B,
            
CLIENT_PLAYER_BERSERK 0x7436,
            
CLIENT_EXCHANGE_WINDOWS_CLOSE 0x7066,
            
CLIENT_EXCHANGE_REQUEST 0x77F2,
            
CLIENT_EXCHANGE_ACCEPT 0x7207,
            
CLIENT_EXCHANGE_APPROVE 0x745C,
            
CLIENT_CLOSE_NPC 0x770C,
            
CLIENT_OPEN_NPC 0x74F2,
            
CLIENT_NPC_BUYPACK 0x70AF,
            
CLIENT_OPEN_WAREHOUSE 0x7711,
            
CLIENT_CLOSE_SCROLL 0x70F4,
            
CLIENT_SAVE_PLACE 0x7228,
            
CLIENT_MOVEMENT_WITH_TRANSPORT 0x749B,
            
CLIENT_PET_TERMINATE 0x7779,
            
CLIENT_PARTYMATCHING_LIST_REQUEST 0x77EE,
            
CLIENT_CREATE_FORMED_PARTY 0x73EE,
            
CLIENT_ALCHEMY 0x7403,
            
CLIENT_STALL_OPEN 0x7036,
            
CLIENT_STALL_WELC 0x7783
but i am now discover that they are not in ok2 files ,,
This is operations codes, not in PK2...the opcodes are in CLIENT Only.
Burton_1993 is offline  
Old 11/09/2010, 22:58   #7
 
Dr.Abdelfattah's Avatar
 
elite*gold: 7
Join Date: May 2010
Posts: 2,115
Received Thanks: 2,373
Quote:
Originally Posted by Burton_1993 View Post
This is operations codes, not in PK2...the opcodes are in CLIENT Only.
LOOL

Quote:
but i am now discover that they are not in pk2 files ,,
Dr.Abdelfattah is offline  
Old 11/10/2010, 04:34   #8
 
bootdisk's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 134
Received Thanks: 41
They're inside the client executable as constants.

Using our favourite user-mode debugger, OllyDbg, and by searching for constants, such as 0x9000 or 0x600D you can easily find those and more.

Now the question... what are they used for?
Basically it's the language spoken by the client and the server. Most of them have a response from the server and in most of the cases they start with 0xB nowadays (or at least on 1.268 was in that way... I'm into something in real life so I've stopped researching/doing anything related to SRO).

Supposed you want to move, so you click the floor. At that time the client sends a message to the server with the OP 0x7021 which means 'requesting movement', then the server does whatever it does (checks if it's a valid move, if you're not dead, etc) and once it has finished the checks it sends back the 0xB021 which is the 'movement response' (offtopic, some people think that this process is because of lag, they're wrong).

When you read things like 'packets' it's generally the OP + operands.

Quick but hope it helps.

Edit: they might have it in that way just in case they've to change the OP codes as for example, last year when Joymax decided to change the OP codes all the time or when switching to another version of SRO (and I personally think it's a good idea but it lacks the pre-built packets that I've mentioned in another thread).
bootdisk is offline  
Old 11/10/2010, 05:47   #9
 
elite*gold: 0
Join Date: Sep 2004
Posts: 53
Received Thanks: 0
Thanks for the quick explanation boot. I would like to know how would you make the opcode send a move to a certain coordinate? With that said, how do you code a command in C++ to make it send a move packet to a certain coordinate? I have no idea how I can connect a program to the client and to the servers.
dropglock is offline  
Old 11/10/2010, 07:30   #10
 
lesderid's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 2,400
Received Thanks: 1,517
Quote:
Originally Posted by dropglock View Post
Thanks for the quick explanation boot. I would like to know how would you make the opcode send a move to a certain coordinate? With that said, how do you code a command in C++ to make it send a move packet to a certain coordinate? I have no idea how I can connect a program to the client and to the servers.
Each packet has their own form of handling data.
You never (100%) know how it works.
The two options are: trying to figure it out (parse) yourself or download a silkroad emulator and look how they parsed it (and used it).
lesderid is offline  
Thanks
1 User
Old 11/10/2010, 12:57   #11
 
elite*gold: 0
Join Date: Sep 2004
Posts: 53
Received Thanks: 0
lesderid, when you say each packet has their own form of handling data, are you talking about the different parameters that a function may have? Is it safe to say that each packet is a function or a method? I am guessing the silkroad emulator way would be the easiest way to see how things are being handled. With that said, I am going to check out a Silkroad emulator and see how I can relate to what you have been telling me.
dropglock is offline  
Old 11/10/2010, 14:53   #12
 
lesderid's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 2,400
Received Thanks: 1,517
Quote:
Originally Posted by dropglock View Post
lesderid, when you say each packet has their own form of handling data, are you talking about the different parameters that a function may have? Is it safe to say that each packet is a function or a method?
Indeed. To compare it, I'll use this example:

Code:
public void Authenticate_6102 (string username, string password, WORD agentserverid, BYTE division)
{
  writer.SetOpcode(0x6102);
  writer.WriteByte(client.sroLocale);
  writer.WriteWord(username.length);
  writer.WriteString(username); //Actually, each character in the string gets written.
  writer.WriteWord(password.length);
  writer.WriteString(password); //Again, chars are written.
  writer.WriteWord(0x0000); //The extra kSRO code. Other versions don't have this WORD.
  writer.WriteWord(agentserverid);
  writer.WriteByte(division);
  client.Send(writer);
}
Note: This is pseudo code, I use pseudo classes and I write to the writer object and I use the client object without creating them first. The reason I did this is to make it easier to explain.

For packet documentation about the LoginServer, use my documentation at .

Edit: I know it sounds a bit 'scary' in the beginning but once you understand it, it's pretty easy.
lesderid is offline  
Reply




All times are GMT +2. The time now is 18:02.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.