There is no1 looking at my last post about changing mobspeed, well like 1 each day :s weird..
Well to the problem..
The mobs (ALL mobs) walk very slow. Like when you have walk mode with your character, i changed mobspeed in both mobinfo.txt and mob.cs but still no change =/
i've only just started coding my private server, but if i remember correctly, there's a speed byte in the packet for entity movement. (0 = walk, 1 = run)
You know I'm trying to learn how to create packets right now.
If you would help me make my weather packet and explain to me why the values are such that in the code then maybe I could help other people?
Alright heres your standard Entity Movement Packet:
Code:
public static COPacket Movement(uint UID, byte Dir)
{
byte[] Packet = new byte[8 + 16];
COPacket P = new COPacket(Packet);
P.WriteInt16((ushort)(Packet.Length - 8));
P.WriteInt16((ushort)10005);
P.WriteInt32((byte)(Dir + 8 * Program.Rnd.Next(7)));
P.WriteInt32(UID);
P.WriteInt32((uint)Environment.TickCount);
return P;
}
What you basically need to do is to modify the packet so that you can optionally make the mob walk or run, please note that making this change will require alot of changes to the source wherever this packet is created.
Ok so what ive done is ive added a bool which allows you to set if the entity is running or walking, the ? 0 : 1 basically says that the value will be converted to either 0 or 1 depending on if the bool is true or false.
It turns out that the 5165 movement packet is different from the 5100 packet, so ill have to make changes to the wiki to reflect that.
As for learning packet structures i created a page on the wiki about understand what an offset is, and that should hopefully help you to understand how packets are layed out the way they are:
Alright heres your standard Entity Movement Packet:
Code:
public static COPacket Movement(uint UID, byte Dir)
{
byte[] Packet = new byte[8 + 16];
COPacket P = new COPacket(Packet);
P.WriteInt16((ushort)(Packet.Length - 8));
P.WriteInt16((ushort)10005);
P.WriteInt32((byte)(Dir + 8 * Program.Rnd.Next(7)));
P.WriteInt32(UID);
P.WriteInt32((uint)Environment.TickCount);
return P;
}
What you basically need to do is to modify the packet so that you can optionally make the mob walk or run, please note that making this change will require alot of changes to the source wherever this packet is created.
Ok so what ive done is ive added a bool which allows you to set if the entity is running or walking, the ? 0 : 1 basically says that the value will be converted to either 0 or 1 depending on if the bool is true or false.
It turns out that the 5165 movement packet is different from the 5100 packet, so ill have to make changes to the wiki to reflect that.
As for learning packet structures i created a page on the wiki about understand what an offset is, and that should hopefully help you to understand how packets are layed out the way they are:
The TQ official packet has a slot for a running bool, the client picks it up and shows either a mob walking, or a mob running, the same is true of when a character moves.
The packet in the 5165 source just didnt include it.
And no i meant for it to be a bool, so that you can go:
[Help]MobSpeed 05/05/2010 - CO2 Private Server - 0 Replies Okey i've been searching around here on forum but i never find it -.-
My mobs move slow, as like when your character is on "walk" mode. Really slow with other words.. and i changed the mobspeed in mobinfo.txt but their is no change even if i have 1000 or 10000..
Checked around in Mob.cs etc but i havnt find anything =/
Can someone please help me? :)
[REQUEST] SPEEDHACk + MOBSPEED 03/12/2010 - Dekaron - 3 Replies i have 2 scrips of this hacks.. but i play like 2 min with speed+mobspeed and game DC -.-
[CT]Help with mobspeed. 01/26/2010 - Dekaron - 8 Replies Alrighty, I have a high speed ct, but mob is slower than my character's.
How can I increase the mobspeed in the ct file?
alloc(DrakoMobSpeed,64)
label(MobIsWalking)
label(ReturnMobSpeed)
label(MobRunSpeed)
label(MobWalkSpeed)
registersymbol(MobRunSpeed)