Register for your free account! | Forgot your password?

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

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

Advertisement



[Extremely Important!!] Effects in 5165

Discussion on [Extremely Important!!] Effects in 5165 within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
[Extremely Important!!] Effects in 5165

There is a huge problem in the 5165 source regarding effects: they're all client side, meaning only the person who set it off can see them! Use my code to launch an effect:

Code:
if (Cmd[0] == "/effect")
                            {
                                Game.World.Effect = Cmd[1];
                                foreach (Game.Character Player in Game.World.H_Chars.Values)
                                {
                                    Player.MyClient.AddSend(Packets.String(Player.EntityID, 10, Game.World.Effect));
                                }
                            }
The code works like this:
/effect firework-1love <-- temporary effect
/effect M_Fire <-- Permanent Effect (Until Logout shown below)


Ok, so the problem is, we need to code some kind of class that will make effects appear on everyone's screens that are within range. Right now, if you set off an effect, even from a normal skill, it will only appear on your screen. This wouldn't be such a huge problem if it didn't mess with mostly all of the features in Conquer Online. =\

At the moment, these are the features being affected:
  1. Marriage Fireworks
  2. Skill Effects (including mount steed, shield, etc)
  3. Fireworks from the Market
  4. NightDevil and transformation effects
  5. Night and Day Command
  6. Flower Effects
and probably a lot more that I can't remember right now.

So I'm going to start us off, we all know that the "Level Up" effect is an effect that everyone can see. I'm trying to locate it right now, but if anyone is faster than i am, POST IT!


I will update this post every time we get further along.

Good Luck everyone! I'm sure we can all figure this out together!

(The effect above is NightDevil which is only a transformation as seen by the Person who performed the spell)
-NewDawn- is offline  
Old 02/24/2010, 03:08   #2
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,766
Received Thanks: 5,293
Code:
if (Cmd[0] == "/effect")
                            {
 
                                foreach (Game.Character Player in Game.World.H_Chars.Values)
                                {
                                    Player.MyClient.AddSend(Packets.String(Player.EntityID, 10, Cmd[1]));
                                }
                            }
Try?
Arcо is offline  
Thanks
1 User
Old 02/24/2010, 03:21   #3
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
Quote:
Originally Posted by .Arco View Post
Code:
if (Cmd[0] == "/effect")
                            {
 
                                foreach (Game.Character Player in Game.World.H_Chars.Values)
                                {
                                    Player.MyClient.AddSend(Packets.String(Player.EntityID, 10, Cmd[1]));
                                }
                            }
Try?
OMG! U're MAGIC!

So this in the fireworks release and all of the effect releases
MyClient.AddSend(Packets.String(MyClient.MyChar.En tityID, 10, "firework-1love"));

Should be replaced with stuff like that code?
**** dude! HIGH FIVE (i'm a noob - but i think that rocks.) lol


But there's a second part to the problem:
Lets say we have my character (Fang) who has a fairy going around him using one of the effects. How do we target players so that the effect is on one person BUT everyone can see?
-NewDawn- is offline  
Old 02/24/2010, 03:25   #4
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,766
Received Thanks: 5,293
Quote:
Originally Posted by -NewDawn- View Post
OMG! U're MAGIC!

So this in the fireworks release and all of the effect releases
MyClient.AddSend(Packets.String(MyClient.MyChar.En tityID, 10, "firework-1love"));

Should be replaced with stuff like that code?
**** dude! HIGH FIVE (i'm a noob - but i think that rocks.) lol



But there's a second part to the problem:
Lets say we have my character (Fang) who has a fairy going around him using one of the effects. How do we target players so that the effect is on one person BUT everyone can see?
Yes, but got to do the for each part as well.

What do you mean by a fairy using the effect?
Arcо is offline  
Old 02/24/2010, 03:39   #5
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
Quote:
Originally Posted by .Arco View Post
Yes, but got to do the for each part as well.

What do you mean by a fairy using the effect?
oh, if you're using my effect command,
type /effect elf-standby

It's just an effect that makes a fairy dance around u for a few seconds. lol
-NewDawn- is offline  
Old 02/24/2010, 03:41   #6
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
For Everyone to See them, Try

Code:
{ Game.World.Action(GC.MyChar, Packets.String(GC.MyChar.EntityID, 10, "elf-standby").Get); }
-Shunsui- is offline  
Thanks
1 User
Old 02/24/2010, 03:45   #7
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,766
Received Thanks: 5,293
Quote:
Originally Posted by -NewDawn- View Post
oh, if you're using my effect command,
type /effect elf-standby

It's just an effect that makes a fairy dance around u for a few seconds. lol
The effect command I gave you works for EVERY command just so you know.
Arcо is offline  
Old 02/24/2010, 03:49   #8
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
Quote:
Originally Posted by -Shunsui- View Post
For Everyone to See them, Try

Code:
{ Game.World.Action(GC.MyChar, Packets.String(GC.MyChar.EntityID, 10, "elf-standby").Get); }
When would I use this? To target an individual that has the effect but everyone can see it? =\?

Quote:
Originally Posted by .Arco View Post
The effect command I gave you works for EVERY command just so you know.
I WOULD use your command for effects like fireworks and roses... but i tested it on my server and all my beta testers on any map can see it. How can I prevent that?

EDIT: I came up with this:
Code:
 if (Cmd[0] == "/effect")
                        {
                            
                            foreach (Game.Character Player in Game.World.H_Chars.Values)
                            {
                                if (Player.Loc.Map == GC.MyChar.Loc.Map)
                                {
                                    if (MyMath.InBox(GC.MyChar.Loc.X, GC.MyChar.Loc.Y, Player.Loc.X, Player.Loc.Y, 12))
                                        Player.MyClient.AddSend(Packets.String(Player.EntityID, 10, Cmd[1]));
                                }
                            }
                        }
Still no idea how to make that a firework though to replace this file:
Code:
#region Firwork
                    case 720030:
                        {
                            RemoveItem(I);
                            {

                                foreach (Game.Character Player in Game.World.H_Chars.Values)
                                {

                                    Player.MyClient.AddSend(Packets.String(Player.EntityID, 10, "firework-like"));
                                }
                            }
                        }
                        break;
                    #endregion
-NewDawn- is offline  
Old 02/24/2010, 13:25   #9
 
ramix's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
try this

Code:
#region Firwork
                    case 720030:
                        {
                            RemoveItem(I);
                            {
                                World.Action(this, Packets.ItemPacket(EntityID, 255, 26).Get);
                            }
                        }
                        break;
                    #endregion
ramix is offline  
Old 02/25/2010, 00:16   #10
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
Quote:
Originally Posted by ramix View Post
try this

Code:
#region Firwork
                    case 720030:
                        {
                            RemoveItem(I);
                            {
                                World.Action(this, Packets.ItemPacket(EntityID, 255, 26).Get);
                            }
                        }
                        break;
                    #endregion
Well, we got fireworks working now with the help of this thread:


Now the only remaining effects problem that we need to conquer is how to make it so that an effect is targeted meaning someone can be standing by you and see an effect go off on you instead of themselves. (Fireworks over their head for example - not that we want this effect to happen BUT let just use it as an example.)

So ramix, what exactly does your code do? "World.Action" means that it will effect all maps and all characters right?
-NewDawn- is offline  
Old 02/25/2010, 00:25   #11
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,766
Received Thanks: 5,293
Quote:
Originally Posted by -NewDawn- View Post
Well, we got fireworks working now with the help of this thread:


Now the only remaining effects problem that we need to conquer is how to make it so that an effect is targeted meaning someone can be standing by you and see an effect go off on you instead of themselves. (Fireworks over their head for example - not that we want this effect to happen BUT let just use it as an example.)

So ramix, what exactly does your code do? "World.Action" means that it will effect all maps and all characters right?
Code:
                        if (Cmd[0] == "/effect")
                        {
                            Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                            {
                                foreach (Game.Character Player in Game.World.H_Chars.Values)
                            {
                                C.MyClient.AddSend(Packets.String(C.EntityID, 10, Cmd[2]));
                            }

                            }
                        }
Try that, not 100% sure it will work as its untested.
ex:/effect Arco effectname
Arcо is offline  
Old 02/25/2010, 01:07   #12
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
Quote:
Originally Posted by .Arco View Post
Code:
                        if (Cmd[0] == "/effect")
                        {
                            Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                            {
                                foreach (Game.Character Player in Game.World.H_Chars.Values)
                            {
                                C.MyClient.AddSend(Packets.String(C.EntityID, 10, Cmd[2]));
                            }

                            }
                        }
Try that, not 100% sure it will work as its untested.
ex:/effect Arco effectname
Doesn't work well =\ It only makes it so that it appears for that target. Nobody else can see it on that target.
-NewDawn- is offline  
Old 02/25/2010, 01:31   #13
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,766
Received Thanks: 5,293
Quote:
Originally Posted by -NewDawn- View Post
ok, I'll give it a try when I get back from getting my hair cut. It's 2 inches? longer than it should be. rofl. It looks like it'll work though. BBL.
I'm pretty sure that's not gonna work though, just give it a shot.
Arcо is offline  
Old 02/25/2010, 08:01   #14
 
.Ocularis's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 309
Received Thanks: 208
Code:
        public static void Action(Character C, byte[] Data)
        {
            try
            {
                foreach (Character CC in H_Chars.Values)
                {
                    if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20))
                        CC.MyClient.AddSend(Data);
                }
            }
            catch { }
        }
?

That reads from your character and updates your characters info to all other clients within a range of 20... I think :P

So if you add a new thing like this...
Code:
public ArrayList UsingEffects = new ArrayList(2... or 3 keep it small so someone can't add 9 million effects)
With new entrys added to the list with this
Code:
C.MyChar.UsingEffects.Add(EffectID or whatever);
Somewhere below this
Code:
    public class Character
    {
        System.Timers.Timer Timer = new System.Timers.Timer();
        public enum JobName : byte
        {
            Zubat(Noob) = 1
            InternTrojan = 10,
            Trojan = 11,
            VeteranTrojan = 12,
            TigerTrojan = 13,
            DragonTrojan = 14,
            TrojanMaster = 15,
            InternWarrior = 20,
            Warrior = 21,
            BrassWarrior = 22,
            SilverWarrior = 23,
            GoldWarrior = 24,
            WarriorMaster = 25,
            Gladiator = 35
            InternArcher = 40,
            Archer = 41,
            EagleArcher = 42,
            TigerArcher = 43,
            DragonArcher = 44,
            ArcherMaster = 45,
            InternNinja = 50,
            Ninja = 51,
            MiddleNinja = 52,
            DarkNinja = 53,
            MysticNinja = 54,
            NinjaMaster = 55,
            Taoist = 101,
            WaterTaoist = 132,
            WaterWizard = 133,
            WaterMaster = 134,
            WaterSaint = 135,
            FireTaoist = 142,
            FireWizard = 143,
            FireMaster = 144,
            FireSaint = 145
        }
in Character.cs

Then have something else that will read from that list and send the effect packets of all active effects in MyClient to TheirClient using
Code:
        public static void Action(Character C, byte[] Data)
        {
            try
            {
                foreach (Character CC in H_Chars.Values)
                {
                    if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20))
                        CC.MyClient.AddSend(Data);
                }
            }
            catch { }
        }
I think that would work... ish? Ish if at all? -.-

I've found nothing that would tell me NCS is currently capable of reading the current effects of MyClient and send the same effects to TheirClient within a range of 20.... but then again, I really don't even know what I'm looking for

... I'm thinking too damn hard now...


Does anyone know what I'm talking about more than me?
I'm thinking of the new KGB commercial now. I've got my head up my 'you know what'.....
But I'm learning
From the inside of my 'you know what' I guess ...


Anyway, if this was made to work... It wouldn't just make /effect viewable to all other clients.
It would fix gem,bless... cool... All effects. But the scripts that initialize those effects would have to be re written to write to the array list and then cleared when the effect is over..?
.Ocularis is offline  
Old 02/25/2010, 08:49   #15
 
ramix's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
Quote:
Originally Posted by -NewDawn- View Post
Well, we got fireworks working now with the help of this thread:


Now the only remaining effects problem that we need to conquer is how to make it so that an effect is targeted meaning someone can be standing by you and see an effect go off on you instead of themselves. (Fireworks over their head for example - not that we want this effect to happen BUT let just use it as an example.)

So ramix, what exactly does your code do? "World.Action" means that it will effect all maps and all characters right?


yes all characters can see your effect... that works for me i tested... i chance in cool effect too for all characters see the effect
ramix is offline  
Reply


Similar Threads Similar Threads
Better Cool and Super Cool Effects for 5165 source
10/13/2011 - CO2 PServer Guides & Releases - 26 Replies
Hello all. Here is my code for better procedure for Cool Effects for 5165 source. it's work good like 90pct same at global CQ. For perfectly working we need add some checks for all class 1h-2hweapons handled. Open Characters.cs file and find: if (Vigor < MaxVigor) Vigor += 6; if (!GettingLuckyTime)
[request] 5165 soul gear with effects
07/02/2010 - CO2 Private Server - 8 Replies
Well just like the threads name says i need soul gear for the 5165 source Someone of our staff is working his ass off to get the soul gear tho he does not know how to convert .wdb files.. does anybody have an link or any ideah on how to fix this problem. Also an direct link with soul gear and the effects that can be implemented is welcome. I will be verry thankfull and im pretty sure that alot of 5165 source owners would be happy with it :) Our site is www.crankco.nl and we are...
Effects. 5165
01/11/2010 - CO2 Private Server - 8 Replies
Hello. I serch and can't find cool , lucky , and super gems effect can somebody help me make it ? Also need to fix pvp and blessing i thing about Revive Here. Thanks and greet kacol.



All times are GMT +2. The time now is 13:21.


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.