Register for your free account! | Forgot your password?

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

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

Advertisement



Making Effect World Side? (5165)

Discussion on Making Effect World Side? (5165) within the CO2 Private Server forum part of the Conquer Online 2 category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
Making Effect World Side? (5165)

How would I make this code world side so that the world can see the firework or whatever effect i'm doing?

Code:
if (Cmd[0] == "/effect")
                            {
                                Game.World.Effect = Cmd[1];
                                    foreach (Game.Character Player in Game.World.H_Chars.Values)
                                       try
                                    { 
                                        Player.MyClient.AddSend(Packets.String(Player.EntityID, 10, Game.World.Effect));
                                    }
                                       catch { }
                            }
-NewDawn- is offline  
Old 02/23/2010, 10:15   #2


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
That looks fine to me.

Although you might need Player.MyClient.FinshSend(); or whatever it is.
Korvacs is offline  
Old 02/23/2010, 15:17   #3
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
Korvacs you dont need to as the source has a 10ms timer on it.

but yh it woulda decrease the delay

@newdawn

That code should just work
~Yuki~ is offline  
Old 02/23/2010, 15:26   #4
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
Quote:
Originally Posted by ~Yuki~ View Post
Korvacs you dont need to as the source has a 10ms timer on it.

but yh it woulda decrease the delay

@newdawn

That code should just work
Well yah, the code does work, but it's client side. If it goes off, nobody else can see it. I want it so that if someone sets off I firework or gets married (or gets an effect as part of a quest even) everyone else can see it.

(Got to go to class- I'll respond in a bit)
-NewDawn- is offline  
Old 02/23/2010, 17:19   #5
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Do a loop through clients who can see the player and display the same effect to them (except at the x/y of the person using it)
pro4never is offline  
Old 02/23/2010, 18:26   #6


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
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));
                                }
                            }
Hows this? I just removed the try catch and added brackets for the foreach.
Korvacs is offline  
Old 02/23/2010, 19:34   #7
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
i woulda set it to PointDistance as i would not want ppl to see the effect if they arent in range / on other maps
~Yuki~ is offline  
Old 02/24/2010, 00:01   #8
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
Quote:
Originally Posted by Korvacs View Post
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));
                                }
                            }
Hows this? I just removed the try catch and added brackets for the foreach.
Well, that does make it cleaner but it's still client sided.

Quote:
Originally Posted by pro4never View Post
Do a loop through clients who can see the player and display the same effect to them (except at the x/y of the person using it)
How would I do a loop that would do that?
If I created a loop, wouldn't it just do it for the client it's coming from?

Quote:
Originally Posted by ~Yuki~ View Post
i woulda set it to PointDistance as i would not want ppl to see the effect if they arent in range / on other maps
How would I do that? =\
Can someone give me an example? This effect command is just a simple code that I can test it on. I have so many ideas but I really need help... so if anyone has an idea... PM me or respond please.. =s
-NewDawn- is offline  
Old 02/24/2010, 00:14   #9


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
What sort of effect is it, it seems that your trying to make one stay with a character as it moves around.

What you posted, and what i modified it to will send the effect to everyone, and it will only work for there clients.

I assumed this was fine because you said they were fireworks...
Korvacs is offline  
Old 02/24/2010, 03:13   #10
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
Quote:
Originally Posted by Korvacs View Post
What sort of effect is it, it seems that your trying to make one stay with a character as it moves around.

What you posted, and what i modified it to will send the effect to everyone, and it will only work for there clients.

I assumed this was fine because you said they were fireworks...
Well that's the problem, it's not just fireworks...
here:
-NewDawn- is offline  
Old 02/24/2010, 03:14   #11
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Since you have another thread about this I think one of them should be closed.
Gonna report it just so a moderator knows.
Arcо is offline  
Thanks
1 User
Closed Thread


Similar Threads Similar Threads
SRO's side effect All watch before u turn out like this
06/04/2009 - Silkroad Online - 5 Replies
YouTube - Angry German Kid Silkroad Online Version!! HILARIOUS!!
The side effect of No-Crc...
01/02/2009 - Dekaron Exploits, Hacks, Bots, Tools & Macros - 8 Replies
Is apparently everyone going out and loading up on Nebular's bot. To be honest this is getting crazy annoying and looks much worse for the game. It might even be the cause of these connect problem everyone is having. I don't mind that a no-crc isn't out, but public updates to the bot should be stopped too imo.
The side effect of No-Crc...
01/01/2009 - Dekaron - 3 Replies
Is apparently everyone going out and loading up on Nebular's bot. To be honest this is getting crazy annoying and looks much worse for the game. It might even be the cause of these connect problem everyone is having. I don't mind that a no-crc isn't out, but public updates to the bot should be stopped too imo.
The humorous side of making a PvP or Leveling server!
10/16/2008 - CO2 Private Server - 9 Replies
Well, if you run a PvP server; Odds are the only people playing are; * Yourself * Friends * People who lack the capability to connect to AcidCO * People who haven't heard of AcidCO And if you run a leveling ser-- oh wait, nobody competent enough is around anymore to code one of these properly (Except maybe Marcus on QO, I really don't know how good he is, so I won't say anything, but never the less he has Q/Steve helping him), never mind.



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


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