How do you get OP Codes for Skills from the PK2? (eSRO)

06/30/2011 21:15 Blapz#1
The topic is pretty self explanatory, I converted the PK2 to a text file and got this.
Code:
1 1 172 SKILL_PUNCH_01 ???? SKILL_PUNCH 0 1 2 0 0 0 0 1500 1500 0 0 0 0 1 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 1 255 0 0 0 0 0 255 255 255 255 xxx xxx xxx xxx xxx 0 0 0 6386804 5 150 0 0 150 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
I have no idea how to get the OP Code out of that, if someone could help, I would appreciate it.

If it is not possible to get the OP Codes from the PK2, what is the easiest way to get them for eSRO.
06/30/2011 21:24 kevin_owner#2
It isn't possible to get those from the pk2.
The easiest way is to sniff them from the packets.
For example if you use packet dumper and you get the following packet.

01 00 00 50 00 00 01
The opcode in this packet is 5000. this is the 3rd and 4th byte.

To get the one for the skill you need to open packet logger while you're playing and cast a skill and check which packets just went from client to server (it would sure take a lot of attempts to get the correct one also a non crowded area helps a lot so you don't get a lot of packets)

but esro has the silkroad security running so you would need to decrypt the packets but drew wrote a proxy and there is srproxy I don't know if these work for esro but this would probably be the easiest way.

By the way if I might ask where do you need the opcode for cause it sounds like you don't have a lot of experience with these whole opcode thing or packets.

Edit: and if my last statement is correct this whole post would probably be unknown territory for you
06/30/2011 21:36 Blapz#3
Quote:
Originally Posted by kevin_owner View Post
It isn't possible to get those from the pk2.
The easiest way is to sniff them from the packets.
For example if you use packet dumper and you get the following packet.

01 00 00 50 00 00 01
The opcode in this packet is 5000. this is the 3rd and 4th byte.

To get the one for the skill you need to open packet logger while you're playing and cast a skill and check which packets just went from client to server (it would sure take a lot of attempts to get the correct one also a non crowded area helps a lot so you don't get a lot of packets)

but esro has the silkroad security running so you would need to decrypt the packets but drew wrote a proxy and there is srproxy I don't know if these work for esro but this would probably be the easiest way.

By the way if I might ask where do you need the opcode for cause it sounds like you don't have a lot of experience with these whole opcode thing or packets.

Edit: and if my last statement is correct this whole post would probably be unknown territory for you
I know what you're saying, I do appreciate the help the help thanks. Security is already taken care of as I got GG disabled. Unless the packets are encoded, which wont be a problem, once again thanks for the help :)
06/30/2011 21:46 Blapz#4
@Kevin, What packet sniffer do you recommend? I've been using Wireshark for a bit
06/30/2011 22:10 kevin_owner#5
Wireshark could work but I use one which was created by a friend of mine it uses Winpcap. wireshark also uses winpcap but it has a lot of options.

You could also try drew's edxSilkroadLoader but I don't know if this works but it has a auto packet parser in it so you get the opcode with the parsed content.
07/01/2011 02:09 r7slayer#6
Quote:
Originally Posted by kevin_owner View Post
It isn't possible to get those from the pk2.
The easiest way is to sniff them from the packets.
For example if you use packet dumper and you get the following packet.

01 00 00 50 00 00 01
The opcode in this packet is 5000. this is the 3rd and 4th byte.

To get the one for the skill you need to open packet logger while you're playing and cast a skill and check which packets just went from client to server (it would sure take a lot of attempts to get the correct one also a non crowded area helps a lot so you don't get a lot of packets)

but esro has the silkroad security running so you would need to decrypt the packets but drew wrote a proxy and there is srproxy I don't know if these work for esro but this would probably be the easiest way.

By the way if I might ask where do you need the opcode for cause it sounds like you don't have a lot of experience with these whole opcode thing or packets.

Edit: and if my last statement is correct this whole post would probably be unknown territory for you
Rly? I thought you could get the opcodes from the pk2? Lol dam...

Then i wonder how zeteris who is currently developing Zbot is able to get the opcodes, because if you have to cast a skill/spell to get the opcodes then this would require getting characters of each skill tree, e.g. warrior, rogue, wizz, etc and at least lvl 90? To be able to acquire all the skill opcodes?

I was currently interested in obtaining the opcodes too, just for learning purposes. Currently trying to learn C#.

Edit-
Kev i know your experienced in C++ but, you wouldn't by any chance know of any good resouces to use for learning C# would you?
Been using Worx - Beggining Visual C# and .Net 4 <- this feels too basic and i allready know quite abit from this E-Book allready as i'm quite experienced in Object Oriented programming in Java and a little bit of Visual basic.
Been looking at Worx - Professional C# 4 and CSharp Unleased but the jump seems quite a leap lol.
Any pointers to where to go look for tuts, guides or learning material would be great ^^
07/01/2011 06:21 ZeraPain#7
there are only 2 opcodes..
one for casting a skill and one for casting a buff
(or maybe just one, didn't check)
07/01/2011 08:56 kevin_owner#8
ZeraPain is right there are only one or two opcodes for the skills mabye more I don't know but all the skill casting packets have the same format if I'm correct. That packet contains for example a skillId which you can find in the media.pk2 skilldata. There might also be a characerId in it and some other stuff. but there isn't a new opcode for every skill that would just be insane:)

About the C# learning well I used this free tutorial:
[Only registered and activated users can see links. Click Here To Register...]

It has some nice small and clean examples. It helped me to understand the little syntax change from C++ to C#.
07/01/2011 09:56 lesderid#9
Quote:
Originally Posted by r7slayer View Post
Any pointers to where to go look for tuts, guides or learning material would be great ^^
Depends on what you wanna learn: basics of C# or basics of the .Net framework.

For C# basics: [Only registered and activated users can see links. Click Here To Register...].
For .Net, there's always MSDN.
07/01/2011 10:52 zeteris#10
Quote:
Originally Posted by kevin_owner View Post
ZeraPain is right there are only one or two opcodes for the skills mabye more I don't know but all the skill casting packets have the same format if I'm correct. That packet contains for example a skillId which you can find in the media.pk2 skilldata. There might also be a characerId in it and some other stuff. but there isn't a new opcode for every skill that would just be insane:)
Yes, you just need 2 Opcodes to send to server ( One for the skills, another for buffs ). But servers send back a few more packets, which contains, char id, skill id, and skill temp id.
07/01/2011 15:17 r7slayer#11
Quote:
Originally Posted by kevin_owner View Post
ZeraPain is right there are only one or two opcodes for the skills mabye more I don't know but all the skill casting packets have the same format if I'm correct. That packet contains for example a skillId which you can find in the media.pk2 skilldata. There might also be a characerId in it and some other stuff. but there isn't a new opcode for every skill that would just be insane:)

About the C# learning well I used this free tutorial:
[Only registered and activated users can see links. Click Here To Register...]

It has some nice small and clean examples. It helped me to understand the little syntax change from C++ to C#.
Haha, thanks for setting me straight on the opcodes lol and everyone else too.
Used wireshark before at uni so probably will try and use that for capturing the packets.
And thanks for the link, will be usefull as ever little help, helps lol


Quote:
Originally Posted by lesderid View Post
Depends on what you wanna learn: basics of C# or basics of the .Net framework.

For C# basics: [Only registered and activated users can see links. Click Here To Register...].
For .Net, there's always MSDN.
Well iv'e pritty much got the basics coverd as quite a few things in c# are similar to Java OOP which iv'e studied.
And thanks for the link will check it out :)

Quote:
Originally Posted by zeteris View Post
Yes, you just need 2 Opcodes to send to server ( One for the skills, another for buffs ). But servers send back a few more packets, which contains, char id, skill id, and skill temp id.
Thanks! Some usefull info :)
07/01/2011 15:30 bootdisk#12
How come there are 2 different OP codes for casting an skill?
In previous versions it was just the 7074 with different flags.
Buffs are essentially 'attacks' too and 7074 denotes "action".

From my old utility called SLiP I got:

Code:
function attackRegular(s, target)
    packetstart(s, 0x7074)
        packetwritebyte(s, 1, 1, 1)
        packetwriteinteger(s, target)
    packetsendto(s)
end

function attackSkill(s, skill, target)
    packetstart(s, 0x7074)
        packetwritebyte(s, 1, 4)
        packetwriteinteger(s, skill)
        packetwritebyte(s, 1)
        packetwriteinteger(s, target)
    packetsendto(s)
end

function buffSkill(s, skill)
    trace("buffSkill: ", skill)
    packetstart(s, 0x7074)
        packetwritebyte(s, 1, 4)
        packetwriteinteger(s, skill)
        packetwritebyte(s, 0)
    packetsendto(s)
end
What you wrote in your first post that has a number '174' is the skill parameter in these functions.

I think this thread needs to be cleaned because it mixes a lot of stuff...