|
You last visited: Today at 02:45
Advertisement
Progress bar not working.
Discussion on Progress bar not working. within the CO2 Private Server forum part of the Conquer Online 2 category.
04/14/2013, 04:10
|
#1
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 68
|
Progress bar not working.
i was looking at angelius guide and found this about progress bar
so friend of my helped me build one, but it didnt work so here is how we did and i hope to get answer for
for the npc part we did this for testing
Code:
case 8:
{
Data gData = new Data("Pick");
gData.UID = client.Entity.UID;
gData.dwParam = 220;
gData.ID = 164;
gData.Facing = Enums.ConquerAngle.East;
gData.EffectTimeout = 2;
break;
}
and for the data.cs part we did this
Code:
public Data(string effectName)
{
Buffer = new byte[45 + effectName.Length];
WriteUInt16((ushort)Buffer.Length, 0, Buffer);
WriteUInt16(10010, 2, Buffer);
StringCount = 1;
EffectName = effectName;
}
public Game.Enums.ConquerAngle Facing
{
get
{
return (Game.Enums.ConquerAngle)Buffer[22];
}
set
{
WriteUInt32((uint)value, 22, Buffer);
}
}
public uint EffectTimeout
{
set
{
WriteUInt32(value, 32, Buffer);
}
}
public byte StringCount
{
set
{
WriteByte(value, 37, Buffer);
}
}
public byte EffectNameLength
{
set
{
WriteByte(value, 38, Buffer);
}
}
public string EffectName
{
set
{
WriteString(value, 39, Buffer);
EffectNameLength = (byte)value.Length;
}
}
to be honest i think the code looks fine, but since its not working then of corse its not.
|
|
|
04/14/2013, 04:19
|
#2
|
elite*gold: 0
Join Date: Nov 2011
Posts: 150
Received Thanks: 11
|
Try putting:
Quote:
After:
Quote:
|
|
|
04/14/2013, 04:54
|
#3
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 68
|
Quote:
Originally Posted by littlechris95
Try putting:
After:
|
i just did and now when i use the case 8 it dc me, not the source just loging me off from the server
|
|
|
04/14/2013, 05:02
|
#4
|
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
|
"gData.Facing = Enums.ConquerAngle.East;"
Why do you make it face east? Why not use the direction of your player?
However are you appending "TQServer" to the packet?
Please post a packet dump.
|
|
|
04/14/2013, 06:02
|
#5
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 68
|
you talking about the packet 10010?
|
|
|
04/14/2013, 10:53
|
#6
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
|
Using the packet writer he is, TQServer will indeed be added to the end of the packet.
The packet is incorrect.
The code snippet someone gave you was right, You initialized a packet instance and the variables, but you never actually done anything with it.
so yes, client.send(gData.toArray()); was right.
If you get DC'd - That most likely means the packet is invalid and you need to double check it using a packet sniffer and not relying on packet structures posted by other people (Hard lesson well learned, ty ulti)
|
|
|
04/14/2013, 15:14
|
#7
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 68
|
okay thx will see what i can come up ith
|
|
|
04/14/2013, 16:17
|
#8
|
elite*gold: 0
Join Date: Feb 2009
Posts: 262
Received Thanks: 161
|
public Data(string effectName)
{
Buffer = new byte[46 + effectName.Length];
WriteUInt16((ushort)(Buffer.Length - 8), 0, Buffer);
WriteUInt16(10010, 2, Buffer);
StringCount = 1;
EffectName = effectName;
}
|
|
|
04/14/2013, 16:35
|
#9
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 68
|
Quote:
Originally Posted by teroareboss1
public Data(string effectName)
{
Buffer = new byte[46 + effectName.Length];
WriteUInt16((ushort)(Buffer.Length - 8), 0, Buffer);
WriteUInt16(10010, 2, Buffer);
StringCount = 1;
EffectName = effectName;
}
|
thank you, i also fixed that. and added
client.Send(gData.ToArray()); on npc part
now it dont dc anymore but still not showing.
|
|
|
04/14/2013, 19:26
|
#10
|
elite*gold: 0
Join Date: Sep 2012
Posts: 51
Received Thanks: 32
|
Quote:
Originally Posted by teroareboss1
Buffer = new byte[46 + effectName.Length];
|
Could you explain why 46, please?
I think it should be 45, as Angelius posted; if last data before "TQServer" string is EffectName, the total length of the packet would be 39 + effectName.Length + "TQServer".Length - 2 = 45 + efectName.Length
If the packet length (first 2 bytes) also must be included in PacketLength( at offest 2), then replace 45 by 47. Anyway, I cannot see how it could be 46.
Also I wonder why it is not needed to write a timestamp in offset 16...
|
|
|
04/14/2013, 21:54
|
#11
|
elite*gold: 0
Join Date: Feb 2009
Posts: 262
Received Thanks: 161
|
Quote:
Originally Posted by urgabel
Could you explain why 46, please?
I think it should be 45, as Angelius posted; if last data before "TQServer" string is EffectName, the total length of the packet would be 39 + effectName.Length + "TQServer".Length - 2 = 45 + efectName.Length
If the packet length (first 2 bytes) also must be included in PacketLength( at offest 2), then replace 45 by 47. Anyway, I cannot see how it could be 46.
Also I wonder why it is not needed to write a timestamp in offset 16...
|
yeah,you right is 47. I have not read all of the packet, only the first part.
and I knew that the size is "46" at packet 10010
|
|
|
04/14/2013, 21:59
|
#12
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 68
|
Code:
public Data(string effectName)
{
Buffer = new byte[47 + effectName.Length];
WriteUInt16((ushort)(Buffer.Length - 8), 0, Buffer);
WriteUInt16(10010, 2, Buffer);
StringCount = 1;
EffectName = effectName;
}
here we go.
|
|
|
04/14/2013, 22:16
|
#13
|
elite*gold: 0
Join Date: Feb 2009
Posts: 262
Received Thanks: 161
|
the problem is here : gData.Facing = Enums.ConquerAngle.East;
east = 5;
use:
Code:
public enum BarProgress
{
InProgress = 1,
FullProgress = 2
}
public BarProgress ProcesBar { get { return (BarProgress)ReadByte(22); } set { WriteByte((byte)value, 22); } }
|
|
|
04/15/2013, 08:12
|
#14
|
elite*gold: 0
Join Date: Aug 2010
Posts: 992
Received Thanks: 1,110
|
Quote:
Originally Posted by LordGragen.
Code:
case 8:
{
Data gData = new Data("Pick");
gData.UID = client.Entity.UID;
gData.dwParam = 220;
gData.ID = 164;
gData.Facing = Enums.ConquerAngle.East;
gData.EffectTimeout = 2;
break;
}
Code:
public Data(string effectName)
{
Buffer = new byte[45 + effectName.Length];
WriteUInt16((ushort)Buffer.Length, 0, Buffer);
WriteUInt16(10010, 2, Buffer);
StringCount = 1;
EffectName = effectName;
}
|
A- You don't have to use the get/set property because you will never have to read any data from that packet.
B- I don't think that a Timeout of 2 seconds will work try 4+
C- I see you are setting ->
gData.UID = client.Entity.UID;
gData.dwParam = 220;
gData.ID = 164;
But you are not really writing those values to the buffer.
So a simple byte array wold do the job perfectly without complicating things, Something like...
PHP Code:
void Sen_Effect(IClient Client, uint data_8, ushort Type, ushort direction, uint LoopTime, string EffectName) { //38 + 1 + 8 + EffectName.Length = 47 + EffectName.Length //Where 38 is the normal 10010 packet length, 1 for the extra byte at offset 38, 8 for the Server Stamp byte[] Packet = new byte[47 + EffectName.Length]; WriteUInt16(Packet.Length - 8, 0, Packet); WriteUInt16(10010, 2, Packet); WriteUInt32(Client.UID, 4, Packet); WriteUInt32(data_8, 8, Packet); WriteUInt16(Type, 20, Packet); WriteUInt16(direction, 22, Packet); WriteUInt32(LoopTime, 32, Packet); WriteByte(1, 37, Packet); WriteByte(EffectName.Length, 38, Packet); WriteString(EffectName, 39, Packet); Client.send(Packet); }
To call it -> Sen_Effect(Client, 220, 164, 1, 5, "Pick");
Good luck.
|
|
|
04/15/2013, 11:30
|
#15
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 68
|
thank you all very very much for all the help.
very grateful.
now i can start my garden system.
|
|
|
 |
|
Similar Threads
|
C# Bot, In Progress Looking For Help
08/22/2012 - Rappelz - 38 Replies
Request
If you have interest, and have experience working in any c language and are intersted in working on this with me post here or pm me. Currently there are 3 people working on the project.
So far Its only in C#. But If you code in another .net language and make a dll. that's fine too.
Whats Done/Works
A bot in C# Using WPF, called "Rappelz X Bot".
I have spent about 6 months on this.
The Bot can currently level to 15 on its own.
Details
|
[HELP]Some progress
03/14/2012 - Rappelz Private Server - 4 Replies
Hi
We have been developing such things as pet master class + cube + Lydin + cube dungeon but not 100%
about master class I have all resource + I add some skill in db (Tree_display,Job_Resource,Tree_Resource) but the problem doesn't display
http://data.imagup.com/12/1146421033.JPG
For the cube dungeon I want to join the location with gate .
|
Bar Progress HP Pet
09/11/2010 - Last Chaos - 0 Replies
$HPPETLEISTE = GUICtrlCreateProgress(25, 255, 225, 10)
GUICtrlSetBkColor(-1, 16777215)
$PETHP = GUICtrlCreateLabel("HP Pet", 25, 240, 40, 15)
$INPUTHPPET = GUICtrlCreateLabel("0", 70, 240, 50, 15)
Global $AV_HPPET=
Global $HPPET2 = 0
|
Hax Bot New Bot (still in progress)
09/25/2009 - Silkroad Online - 57 Replies
- Attacking monsters 100%
- Skills 100%
- Buffs 100%
- Sitting down based on HP 100%
- Sitting down based on MP 100%
- Auto login (type your info once and wait) 100%
- Inventory parsed (this includes - movement, swap, combine, pickup - for guild, player, pet, storage) 100%
- Minimize to tray 100%
- Going clientless 100%
- Going client 100%
|
Progress GG ???
01/13/2009 - Lineage 2 - 1 Replies
Hey all first i'd like to say hello to all since this is one of my first posts :P.
Anyway, i,ve been doing a little research about .des files. and i figured out that its encrypted with a way of coding called cryptography. It kinda creates a key for the encrypted file. Now for the real developers among us, i,ve got a wiki site where u can explore it and hopefully find a way to by pass gg and share it with us.
for interlude, hellbound gracia w/e. Just any kind of client gg.
Well i did my...
|
All times are GMT +1. The time now is 02:45.
|
|