Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 21:11

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

Advertisement



[HELP] Walking w/ Steed problem

Discussion on [HELP] Walking w/ Steed problem within the CO2 Private Server forum part of the Conquer Online 2 category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2007
Posts: 21
Received Thanks: 0
[HELP] Walking w/ Steed problem

this is the video

this is my char/entity.cs
Code:
public bool Move(Enums.ConquerAngle Direction)
        {
            ushort _X = X, _Y = Y;
            Facing = Direction;
            sbyte xi = 0, yi = 0;
            switch (Direction)
            {
               case Enums.ConquerAngle.North: xi = -1; yi = -1; break;
                case Enums.ConquerAngle.South: xi = 1; yi = 1; break;
                case Enums.ConquerAngle.East: xi = 1; yi = -1; break;
                case Enums.ConquerAngle.West: xi = -1; yi = 1; break;
                case Enums.ConquerAngle.NorthWest: xi = -1; break;
                case Enums.ConquerAngle.SouthWest: yi = 1; break;
                case Enums.ConquerAngle.NorthEast: yi = -1; break;
                case Enums.ConquerAngle.SouthEast: xi = 1; break;
            }
            _X = (ushort)(X + xi);
            _Y = (ushort)(Y + yi);
            Game.Map Map = null;
            if (ServerBase.Kernel.Maps.TryGetValue(MapID, out Map))
            {
                if (Map.Floor[_X, _Y, MapObjType, this])
                {
                    if (MapObjType == MapObjectType.Monster)
                    {
                        Map.Floor[_X, _Y, MapObjType, this] = false;
                        Map.Floor[X, Y, MapObjType, this] = true;
                    }

                    X = _X;
                    Y = _Y;
                    return true;
                }
                else
                {
                    if (Mode == Enums.Mode.None)
                    {
                        if (EntityFlag != EntityFlag.Monster)
                            Teleport(MapID, X, Y);
                        else
                            return false;
                    }
                }
            }
            else
            {
                if (EntityFlag != EntityFlag.Monster)
                    Teleport(MapID, X, Y);
                else
                    return false;
            }
            return true;
        }
This is my Packet
Code:
static void PlayerGroundMovment(GroundMovement groundMovement, Client.GameState client)
if (client.Entity.ContainsFlag(Update.Flags.Ride))
                client.Entity.Vigor -= 1;
           // client.Entity.PX = client.Entity.X;
            //client.Entity.PY = client.Entity.Y;*/


            if (groundMovement.Direction > Enums.ConquerAngle.South)
            {
                groundMovement.Direction = (JudeProject.Game.Enums.ConquerAngle)((byte)groundMovement.Direction % 8);
            }
			
            client.Entity.Move(groundMovement.Direction);
            if (groundMovement.GroundMovementType == 9)
            {
                client.Entity.Move(groundMovement.Direction);

            }
           
			
            client.SendScreen(groundMovement, true);
            client.Screen.Reload(groundMovement);
My Groundmovement
Code:
namespace JudeProject.Network.GamePackets
{
    using JudeProject;
    using JudeProject.Client;
    using JudeProject.Game;
    using JudeProject.Interfaces;
    using JudeProject.Network;
    using System;

    public class GroundMovement : Writer, IPacket
    {
        private byte[] Buffer;
        public const uint Run = 1;
        public const uint TwoCoordonates = 9;
        public const uint Walk = 0;

        public GroundMovement(bool CreateInstance)
        {
            if (CreateInstance)
            {
                this.Buffer = new byte[32];
                Writer.WriteUInt32(24, 0, this.Buffer);
                Writer.WriteUInt32(10005, 2, this.Buffer);
            }
        }

        public void Deserialize(byte[] buffer)
        {
            this.Buffer = buffer;
        }

        public void Send(GameState client)
        {
            client.Send(this.Buffer);
        }

        public byte[] ToArray()
        {
            return this.Buffer;
        }

        public Enums.ConquerAngle Direction
        {
            get
            {
                return (Enums.ConquerAngle)((byte)(this.Buffer[4] % 8));
            }
            set
            {
                this.Buffer[4] = (byte)value;
            }
        }
       

        public uint GroundMovementType
        {
            get
            {
                return JudeProject.BitConverter.ToUInt32(this.Buffer, 12);
            }
            set
            {
                Writer.WriteUInt32(value, 12, this.Buffer);
            }
        }

        public uint MapID
        {
            get
            {
                return JudeProject.BitConverter.ToUInt32(this.Buffer, 20);
            }
            set
            {
                Writer.WriteUInt32(value, 20, this.Buffer);
            }
        }

        public uint TimeStamp
        {
            get
            {
                return JudeProject.BitConverter.ToUInt32(this.Buffer, 0x10);
            }
            set
            {
                Writer.WriteUInt32(value, 0x10, this.Buffer);
            }
        }

        public uint UID
        {
            get
            {
                return JudeProject.BitConverter.ToUInt32(this.Buffer, 8);
            }
            set
            {
                Writer.WriteUInt32(value, 8, this.Buffer);
            }
        }
    }
}
my movement angle
Code:
public enum ConquerAngle : byte
        {
			East = 5,
            North = 3,
            NorthEast = 4,
            NorthWest = 2,
            South = 7,
            SouthEast = 6,
            SouthWest = 0,
            West = 1
}
how do i fix my walking problem? does anyone know how? thanks
pounder is offline  
Old 08/09/2013, 06:39   #2
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
Thread Closed

Duplicate thread.
Spirited is offline  
Closed Thread


Similar Threads Similar Threads
Will trade Rare Steed Packs code for lavender steed fix
02/06/2012 - CO2 Private Server - 10 Replies
Hey all... I will trade Rare Steed Packs to the one who will really help me to fix of on screen steed look in source 5530. When riding other players see my steed Lavender but it is not a Lavender steed i wear ...like it is on screenshot--> I will trade those steed packs codes to the one who will really help me: Thanks in advanced :)
[Release] Steed Walking
05/05/2011 - CO2 PServer Guides & Releases - 18 Replies
removed
Steed walking... and deadlocks.
02/05/2011 - CO2 Private Server - 10 Replies
Has anyone found out how steed walking works? If so please let me know. I simply can't find out. For those who have C# sources and have thread/memory usage problems... Use profilers to see what's your problem... For big amounts of threads, if you are not using a thread for a player, your problem might be deadlocks. Lately I had about 600 threads at the same time and with dotTrace profiler, I found out that most of them were in a deadlock state as there were no function called on...



All times are GMT +1. The time now is 21:11.


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