Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 08:53

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

Advertisement



[RELEASE] Real way to show cool effect

Discussion on [RELEASE] Real way to show cool effect within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,434
Received Thanks: 1,147
[RELEASE] Real way to show cool effect

This release will not change anything. The majority and maybe everyone, I don't think that the real way is used by someone, use the MsgName packet to send the effect. It's a way, but not the right one.

This code is from my source. I have removed the unused parts. I don't have implemented the broadcast system.
You can't copy & paste I hope that some people will learn something.

PHP Code:
using System;

namespace 
COServer.Network
{
    public class 
MsgAction Msg
    
{
        
//Define constant(s) here...
        
const Int16 _MSG_SIZE 0x1C;

        public 
enum Action byte
        
{
            
None 0,
            
ChgAction 81,
        };

        public static 
Byte[] Create(User EntityUInt32 ParamUInt16 Action)
        {
            
PacketWriter PWriter = new PacketWriter(_MSG_SIZE);
            
PWriter.WriteInt16(_MSG_SIZE);
            
PWriter.WriteInt16(_MSG_ACTION);
            
PWriter.WriteInt32(Environment.TickCount);
            
PWriter.WriteUInt32(Entity.UniqId);
            
PWriter.WriteUInt32(Param);
            
PWriter.WriteUInt16(Entity.PosX);
            
PWriter.WriteUInt16(Entity.PosY);
            
PWriter.WriteUInt16(Entity.Direction);
            
PWriter.WriteUInt16(Action);

            return 
PWriter.Flush();
        }

        public static 
void Process(ref Client Clientref Byte[] Data)
        {
            try
            {
                if (
Client != null && (Int16)((Data[0x01] << 8) | Data[0x00]) == _MSG_SIZE)
                {
                    
UInt32 Timestamp = (UInt32)((Data[0x07] << 24) | (Data[0x06] << 16) | (Data[0x05] << 8) | Data[0x04]);
                    
UInt32 UniqId = (UInt32)((Data[0x0B] << 24) | (Data[0x0A] << 16) | (Data[0x09] << 8) | Data[0x08]);
                    
UInt32 Param = (UInt32)((Data[0x0F] << 24) | (Data[0x0E] << 16) | (Data[0x0D] << 8) | Data[0x0C]);
                    
UInt16 PosX = (UInt16)((Data[0x11] << 8) | Data[0x10]);
                    
UInt16 PosY = (UInt16)((Data[0x13] << 8) | Data[0x12]);
                    
UInt16 Direction = (UInt16)((Data[0x15] << 8) | Data[0x14]);

                    if (
Client.Character != null)
                    {
                        switch ((
UInt16)((Data[0x17] << 8) | Data[0x16]))
                        {
                            case (
UInt16)Action.ChgAction:
                                {
                                    
Client.Character.Action = (Byte)Param;
                                    if (
Param == 230//Cool
                                    
{
                                        if (
DateTime.Now Client.Character.LastCoolShow.AddMilliseconds(3000))
                                        {
                                            if (
Client.Character.IsAllSuperEquip())
                                                
Client.Send(MsgAction.Create(Client.Character, (UInt32)(Param | (Client.Character.Profession 0x10000 0x1000000)), (UInt16)Action.ChgAction)); //BroadcastRoomMsg(Data, INCLUDE_SELF);
                                            
else if (ItemHandler.GetQuality(ItemHandler.GetItemByPos(ref Client.Character.Items3).Id) == 9)
                                                
Client.Send(MsgAction.Create(Client.Character, (UInt32)(Param | (Client.Character.Profession 0x10000)), (UInt16)Action.ChgAction)); //BroadcastRoomMsg(Data, INCLUDE_SELF);
                                            
else
                                                
Client.Send(Data); //BroadcastRoomMsg(Data, INCLUDE_SELF);

                                            
Client.Character.LastCoolShow DateTime.Now;
                                            return;
                                        }
                                    }
                                    
Client.Send(Data); //BroadcastRoomMsg(Data, INCLUDE_SELF);
                                    
break;
                                }
                            default:
                                throw new 
Exception("Action[" + ((Data[0x17] << 8) | Data[0x16]) + "] not implemented!");
                        }
                    }
                }
            }
            catch (
Exception Exc) { Program.WriteLine(MsgError(DataExc)); }
        }
    }

CptSky is offline  
Thanks
19 Users
Old 07/28/2010, 23:14   #2
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
@CptSky

nice work, and well use of the code!(; Im sure this will apply some sense to other people hopefully ^_^.
killersub is offline  
Old 07/28/2010, 23:31   #3
 
elite*gold: 0
Join Date: Jun 2009
Posts: 787
Received Thanks: 314
Thanked not because I need it (or didnt know about it) but finally someone applied common sense.

+1
_tao4229_ is offline  
Thanks
1 User
Old 07/28/2010, 23:41   #4
 
© Haydz's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 1,042
Received Thanks: 252
Nice work CptSky.

When programming some of my sources, I generally ignored most of what was out there, and still went to see exactly what happened when I mirrored that action in real CO. The same thing applies to leveling up, yet people send the effect name for that.

Nowadays the EO source is also a great resource for seeing how the protocol should be used correctly.
© Haydz is offline  
Thanks
1 User
Old 07/30/2010, 00:23   #5
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Nice release jean^^
Arcо is offline  
Thanks
1 User
Old 07/30/2010, 12:30   #6
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Nice one CptSky, +1.

Do you mind telling me how does it work for super gem effects? Just if you want to.
-impulse- is offline  
Old 07/30/2010, 13:03   #7
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
not hard to figure out o.o
~Yuki~ is offline  
Old 07/30/2010, 18:15   #8


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,434
Received Thanks: 1,147
Quote:
Originally Posted by -impulse- View Post
Nice one CptSky, +1.

Do you mind telling me how does it work for super gem effects? Just if you want to.
Super gem effects and blessed equip effects use the MsgName packet.
CptSky is offline  
Old 07/30/2010, 20:31   #9
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Quote:
Originally Posted by CptSky View Post
Super gem effects and blessed equip effects use the MsgName packet.
Alright.
-impulse- is offline  
Old 07/30/2010, 23:47   #10
 
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 505
Honoustly, I didn't know I had to do it this way.
Yay 4 common sense, thanks a lot.
Enlighten us again!
Basser is offline  
Old 07/31/2010, 05:14   #11
 
arab4life's Avatar
 
elite*gold: 0
Join Date: Jan 2006
Posts: 430
Received Thanks: 286
Nice!
arab4life is offline  
Old 04/24/2011, 10:45   #12
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
This needs a bump.

+k this will defiantly help me near the future.
_DreadNought_ is offline  
Reply


Similar Threads Similar Threads
[Release] Taoist-Full Super Cool Effect
11/17/2011 - CO2 Weapon, Armor, Effects & Interface edits - 12 Replies
Hello All this is my Taoist-Full Super Cool Effect not my first edit but havent edited in awhile soo here it is hope u like it http://i295.photobucket.com/albums/mm148/jaker63/ yhjuhug.jpg
[Release] Ninja Cool effect
07/29/2010 - CO2 PServer Guides & Releases - 15 Replies
first use this guide to get the cool effect for all the chars http://www.elitepvpers.com/forum/co2-pserver-guide s-releases/440849-better-cool-super-cool-effects-5 165-source.html then open cooleffect.cs and search for else if (MyClient.MyChar.Job >= 39 && MyClient.MyChar.Job <= 46) MyClient.AddSend(Packets.String(MyClient.MyChar.En tityID, 10, "archer"));
[RELEASE] Cool Effect
09/18/2009 - CO2 PServer Guides & Releases - 20 Replies
Hey guys, was bored and thought I would release this. So let's get started. In character.cs at line 100 add in the "void TimerElapsed(object source, ElapsedEventArgs e)" you should find something like



All times are GMT +2. The time now is 08:53.


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