|
You last visited: Today at 19:52
Advertisement
Help with Packets
Discussion on Help with Packets within the CO2 Private Server forum part of the Conquer Online 2 category.
05/03/2009, 00:51
|
#1
|
elite*gold: 20
Join Date: May 2008
Posts: 1,103
Received Thanks: 254
|
Help with Packets
Ok here is a small problem when i use Expballs i cant get it to update ur level only if you dc i know its packet i tryed alot but they wont work
else if (ItemParts[0] == "723700")
{
if (Level < 100 && EPotRate == false)
AddExp((ulong)(1295000 + Level * 100000), false);
else if (Level < 110 && EPotRate == false)
AddExp((ulong)(1395000 + Level * 160000), false);
else if (Level < 115 && EPotRate == false)
AddExp((ulong)(1595000 + Level * 200000), false);
else if (Level < 120 && EPotRate == false)
AddExp((ulong)(1795000 + Level * 260000), false);
else if (Level < 125 && EPotRate == false)
AddExp((ulong)(2095000 + Level * 300000), false);
else if (Level < 130 && EPotRate == false)
AddExp((ulong)(2395000 + Level * 360000), false);
//below is rates with exppot usage.
else if (Level < 100 && EPotRate == true)
AddExp((ulong)(129500 + Level * 15000), false);
else if (Level < 110 && EPotRate == true)
AddExp((ulong)(139500 + Level * 24000), false);
else if (Level < 115 && EPotRate == true)
AddExp((ulong)(159500 + Level * 30000), false);
else if (Level < 120 && EPotRate == true)
AddExp((ulong)(179500 + Level * 39000), false);
else if (Level < 125 && EPotRate == true)
AddExp((ulong)(209500 + Level * 45000), false);
else if (Level < 130 && EPotRate == true)
AddExp((ulong)(239500 + Level * 54000), false);
World.UpdateSpawn(this);
RemoveItem(ItemUID);
|
|
|
05/03/2009, 01:48
|
#2
|
elite*gold: 0
Join Date: Oct 2005
Posts: 295
Received Thanks: 342
|
To change level, packet type is as follows.
Code:
final short PACKET_STATUS = 0x2721;
final int TYPE_LEVEL = 0xC;
packet structStatusPacket ( int playerID, int[] type, long[] val ) {
short len = ( 12*(short)type.length ) + 12;
packet p = new packet( len );
p.addShort ( len );
p.addShort ( PACKET_STATUS );
p.addInt ( playerID );
p.addInt ( type.length );
for ( int i = 0; i < type.length; i++ ) {
p.addInt ( type[i] );
p.addLong ( val[i] );
}
return p;
}
So to construct a level change packet to level 120:
int[] type = { TYPE_LEVEL };
int[] level = { 120 };
packet p=structStatusPacket ( playerID, type, level );
This probably isn't the language you are using, but you should be able to extrapolate the required info, my code is pretty readable.
|
|
|
05/03/2009, 05:44
|
#3
|
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
|
my expball looks like this
Code:
else if (ItemParts[0] == "723700") // ExpBall
{
if (Level < 100 && EPotRate == false)
AddExp((ulong)(1295000 + Level * 100000), false);
else if (Level < 110 && EPotRate == false)
AddExp((ulong)(1395000 + Level * 160000), false);
else if (Level < 115 && EPotRate == false)
AddExp((ulong)(1595000 + Level * 200000), false);
else if (Level < 120 && EPotRate == false)
AddExp((ulong)(1795000 + Level * 260000), false);
else if (Level < 125 && EPotRate == false)
AddExp((ulong)(2095000 + Level * 300000), false);
else if (Level < 130 && EPotRate == false)
AddExp((ulong)(2395000 + Level * 360000), false);
//below is rates with exppot usage.
else if (Level < 100 && EPotRate == true)
AddExp((ulong)(129500 + Level * 24000), false);
else if (Level < 110 && EPotRate == true)
AddExp((ulong)(139500 + Level * 30000), false);
else if (Level < 115 && EPotRate == true)
AddExp((ulong)(159500 + Level * 39000), false);
else if (Level < 120 && EPotRate == true)
AddExp((ulong)(179500 + Level * 51000), false);
else if (Level < 125 && EPotRate == true)
AddExp((ulong)(209500 + Level * 66000), false);
else if (Level < 130 && EPotRate == true)
AddExp((ulong)(239500 + Level * 84000), false);
RemoveItem(ItemUID);
}
|
|
|
05/03/2009, 05:58
|
#4
|
elite*gold: 20
Join Date: May 2008
Posts: 1,103
Received Thanks: 254
|
Quote:
Originally Posted by PeTe Ninja
my expball looks like this
Code:
else if (ItemParts[0] == "723700") // ExpBall
{
if (Level < 100 && EPotRate == false)
AddExp((ulong)(1295000 + Level * 100000), false);
else if (Level < 110 && EPotRate == false)
AddExp((ulong)(1395000 + Level * 160000), false);
else if (Level < 115 && EPotRate == false)
AddExp((ulong)(1595000 + Level * 200000), false);
else if (Level < 120 && EPotRate == false)
AddExp((ulong)(1795000 + Level * 260000), false);
else if (Level < 125 && EPotRate == false)
AddExp((ulong)(2095000 + Level * 300000), false);
else if (Level < 130 && EPotRate == false)
AddExp((ulong)(2395000 + Level * 360000), false);
//below is rates with exppot usage.
else if (Level < 100 && EPotRate == true)
AddExp((ulong)(129500 + Level * 24000), false);
else if (Level < 110 && EPotRate == true)
AddExp((ulong)(139500 + Level * 30000), false);
else if (Level < 115 && EPotRate == true)
AddExp((ulong)(159500 + Level * 39000), false);
else if (Level < 120 && EPotRate == true)
AddExp((ulong)(179500 + Level * 51000), false);
else if (Level < 125 && EPotRate == true)
AddExp((ulong)(209500 + Level * 66000), false);
else if (Level < 130 && EPotRate == true)
AddExp((ulong)(239500 + Level * 84000), false);
RemoveItem(ItemUID);
}
|
Yea same as mine but the problem im having is its a packet error where its not updating your leveling intll you log ou and back on
|
|
|
05/03/2009, 06:23
|
#5
|
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
|
guys i would like to remind you i just found out that he is using a partially converted to ini source..could that be the problem
|
|
|
05/03/2009, 07:14
|
#6
|
elite*gold: 0
Join Date: Oct 2005
Posts: 295
Received Thanks: 342
|
I hate to say it but, ****? Your level display problem will be because you are not sending the status packet to display the correct level in the player's status window. And ****, that is very very sloppy code.
Expballs give 600,000*level*0.4 exp roughly (yes i know it's not exactly that). Just add that onto current experience then do a loop to take away each next level boundry, add 1 to level until you get a negative, absolute that, make it the current exp and you're done, 3 or 4 lines of code. Like what the hell?
|
|
|
05/03/2009, 07:31
|
#7
|
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
|
Quote:
Originally Posted by Qonquer
I hate to say it but, ****? Your level display problem will be because you are not sending the status packet to display the correct level in the player's status window. And ****, that is very very sloppy code.
Expballs give 600,000*level*0.4 exp roughly (yes i know it's not exactly that). Just add that onto current experience then do a loop to take away each next level boundry, add 1 to level until you get a negative, absolute that, make it the current exp and you're done, 3 or 4 lines of code. Like what the hell?
|
**** man, I've been trying to work out that formula forever lol
|
|
|
05/03/2009, 07:41
|
#8
|
elite*gold: 0
Join Date: Oct 2005
Posts: 295
Received Thanks: 342
|
actually, no, that's not right... lol...
QO uses a table to look them up, but I worked it out roughly by noticing an expball gave you 50 times the amount of exp at level 125 than it does at level 1. Which gives a step of 0.4 so it should be
600,000 * (1 + ((level-1)*0.4))
At least that's the formula I use on the quiz show on QO, i figured it doesnt need to be spot on and as long as ppl get exp for answering a question, they're happy.
|
|
|
 |
Similar Threads
|
Packets.
06/27/2011 - Kal Online - 48 Replies
Hier hat BakaBug geschrieben das müsste euch endlich helfen ^.^
hoffe jetzt kommen auch paar antworten und nicht nur views <.< ;)
(karma?XP)
Yeah for all who want make something for Kal..
here is my release
Ahm yeah you can use it for hacking in nvm
PACKET STRUCKTUR
|
packets
11/19/2009 - Kal Online - 25 Replies
Hey^^
i need some help.
i need to know how the packets of the in engine are crypt?
German:
ich muss wissen wie die packets der int engine verschlüsselt sind.
|
help in +4 ore packets
04/09/2008 - RF Online - 5 Replies
can you please tell me what packet to look into if i am going to alter the packet for ore mining, is it the send or the receive part? please just what to look into and then from that on ill make my way through.
|
At all who know a lot about Packets..
02/13/2008 - Metin2 - 2 Replies
Also ich benutze seit einiger Zeit WPE hab auch geschafft ein MMORPG damit zu hacken.. barbie.de (kleine Schwester wollte sich ne Puppe kaufen xD)
Jetzt zu Metin2.. könnt ihr mir das mal erklären.. Ich hab das Prog Wpe und sehe auch das ich Packete verschicke und bekomme, doch die sind verschlüsselt. Wie kann man die entschlüsseln? Hab was von einem Algorhitmus und einer Crypttable gehört, könnt ihr mir das erklären, wie ich mit einem Algorhitmus oder mit einer Crypttable die Packete...
|
All times are GMT +1. The time now is 19:53.
|
|