Register for your free account! | Forgot your password?

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

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

Advertisement



Question about transforming...

Discussion on Question about transforming... within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
JobvdH's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 371
Received Thanks: 120
Question about transforming...

Hello guys,

I have been working on my older source for a while now, and ive already fixed allot and ive added some things (Note: Its LOTF 5017..)
Now my question is, how to i make transform work properly...

I have this as code..
Code:
                        if (SkillId == 1270)
                        {
                            XpList = false;
                            Transform = true;
                            TransformActivated = DateTime.Now;
                            Model = 214;
                            MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                            MyClient.SendPacket(General.MyPackets.Vital(UID, 12, ulong.Parse(Avatar.ToString() + Model.ToString())));
                        }
and this:
Code:
public DateTime TransformActivated = DateTime.Now;
public bool Transform = false;
And again, to remove the transform this (In skilltimers):
Code:
            if (Transform)
            {
                if (DateTime.Now > TransformActivated.AddSeconds(60))
                {
                    Transform = false;
                    Model = RealModel;
                    MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                    MyClient.SendPacket(General.MyPackets.Vital(UID, 12, ulong.Parse(Avatar.ToString() + Model.ToString())));
                }
            }
#EDIT: The disguise part works fine, i transform in this case into a robot and i will get transformed back after 60 seconds.. (But it doesnt show up a counter and a Restore button. and i can jump while transformed..)

But now my question is: How can i add a countdown to the skill and make it so I cant jump while transformed?

Thanks in advance,
JobvdH!
JobvdH is offline  
Old 06/15/2011, 15:57   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Meshes are really quite simple.
The way it works is you have 3 ushorts which are combined which represent...


Transformation Face Model

To make this all work correctly what you want to do is have those 3 values which all combine properly. By assigning the transformation properly you'll still have your avatar when you mouse over your character and a number of other bugs will disappear (because you'll be doing it correctly)


Here's how I do it in my source


Code:
public uint Mesh
        {
            get { return _mesh; }
            set
            {
                _mesh = value; SetUpdate(UpdateType.Mesh, value, SynchroType.Broadcast);
            }
        }
        public ushort Body
        {
            get { return _body; }
            set
            {
                 _body = value; Mesh = (uint)(Transformation * 10000000 + Face * 10000 + value);
            }
        }
        public ushort Face
        {
            get { return _face; }
            set {  _face = value; Mesh = (uint)(Transformation * 10000000 + value * 10000 + Body); }
        }
        public ushort Transformation
        {
            get { return _transformation; }
            set { _transformation = value; Mesh = (uint)(value * 10000000 + Face * 10000 + Body); }
        }
In this case SetUpdate is a method we're using (stolen from tq's sources essentially) which determines who to send the update packets to. Basically whenever MESH changes we send a update packet to screen... because we're using accessors for each PART of mesh though, we are actually updating it any time we modify Face, Mesh or Transformation.
pro4never is offline  
Thanks
1 User
Old 06/16/2011, 10:06   #3
 
JobvdH's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 371
Received Thanks: 120
Thanks for your reply, I will look to your code and se how I can put it on a correct way in my source.

I need some help xd
I have no idea how i should get this work to get a transformation working correct
JobvdH is offline  
Reply


Similar Threads Similar Threads
transforming Effect Value .
02/01/2011 - CO2 Private Server - 9 Replies
i recoded the transforming skills today such as Golom/DivineHare/etc and so far it works fine the health/mesh/spawning player/We but the only problem i had is spawning the transformed char to other players if i had a player that is already in range the transforming packet is being sent to that player and he will be able to see the effect. but lets say another player has logged in. it dosent matter if the new player was in range or not cus he want be able to see the effect on the...



All times are GMT +1. The time now is 14:12.


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.