Register for your free account! | Forgot your password?

You last visited: Today at 09:16

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

Advertisement



Lil help here.

Discussion on Lil help here. within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
-Sensei-'s Avatar
 
elite*gold: 0
Join Date: Oct 2011
Posts: 267
Received Thanks: 59
Lil help here.

Can someone tell me what do you call this effect in clientside.?
I cant find it.


help would be appreciated
-Sensei- is offline  
Old 12/06/2011, 03:01   #2
 
EviL|Shepherd's Avatar
 
elite*gold: 0
Join Date: Sep 2006
Posts: 248
Received Thanks: 117
The big blue one or the white one?
EviL|Shepherd is offline  
Old 12/06/2011, 03:04   #3
 
-Sensei-'s Avatar
 
elite*gold: 0
Join Date: Oct 2011
Posts: 267
Received Thanks: 59
The white one
-Sensei- is offline  
Old 12/06/2011, 03:06   #4
 
EviL|Shepherd's Avatar
 
elite*gold: 0
Join Date: Sep 2006
Posts: 248
Received Thanks: 117
Quote:
Originally Posted by -Sensei- View Post
The white one
Not 100% sure, but since noone else seems to be piping up, give me a few to locate it.

Well, I apologize, I was unable to find it. I'm sure someone here knows.
EviL|Shepherd is offline  
Old 12/06/2011, 05:28   #5
 
{ Angelius }'s Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 992
Received Thanks: 1,110
its a string packet 1015...
effect name = moveback
{ Angelius } is offline  
Thanks
2 Users
Old 12/06/2011, 06:42   #6
 
-Sensei-'s Avatar
 
elite*gold: 0
Join Date: Oct 2011
Posts: 267
Received Thanks: 59
Thank you so much

btw how can i make it work others can see the effect, i can only see the effect in my screen.

Heres the code
Quote:
_String str = new _String(true);
str.UID = client.Entity.UID;
str.TextsCount = 1;
str.Type = _String.Effect;
str.Texts.Add("moveback");
client.Entity.Owner.SendScreen(str, true);
-Sensei- is offline  
Old 12/09/2011, 08:00   #7
 
-Sensei-'s Avatar
 
elite*gold: 0
Join Date: Oct 2011
Posts: 267
Received Thanks: 59
#bump
-Sensei- is offline  
Old 12/09/2011, 08:38   #8
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Quote:
Originally Posted by -Sensei- View Post
Thank you so much

btw how can i make it work others can see the effect, i can only see the effect in my screen.

Heres the code
Notice, I don't know what the client classes are etc. but something a long these lines.

Code:
_String str = new _String(true);
 str.UID = client.Entity.UID;
 str.TextsCount = 1;
 str.Type = _String.Effect;
 str.Texts.Add("moveback");

foreach (Client sendto in ClientDictionary)
{
 sendto.Entity.Owner.SendScreen(str, true);
}
What I would do is making a global method to send globalpackets.
BaussHacker is offline  
Old 12/09/2011, 09:45   #9
 
-Sensei-'s Avatar
 
elite*gold: 0
Join Date: Oct 2011
Posts: 267
Received Thanks: 59
Quote:
Originally Posted by BaussHacker View Post
Notice, I don't know what the client classes are etc. but something a long these lines.

Code:
_String str = new _String(true);
 str.UID = client.Entity.UID;
 str.TextsCount = 1;
 str.Type = _String.Effect;
 str.Texts.Add("moveback");

foreach (Client sendto in ClientDictionary)
{
 sendto.Entity.Owner.SendScreen(str, true);
}
What I would do is making a global method to send globalpackets.
I made it like this
Code:
                        _String str = new _String(true);
                        str.UID = client.Entity.UID;
                        str.TextsCount = 1;
                        str.Type = _String.Effect;
                        str.Texts.Add("moveback");

                        foreach (Client.GameState sendto in Conquer_Online_Server.ServerBase.Kernel.GamePool.Values)
                        {
                            sendto.Entity.Owner.SendScreen(str, true);
                        }
                        break;
and it works the same to my old code.
-Sensei- is offline  
Old 12/09/2011, 10:20   #10
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Quote:
Originally Posted by -Sensei- View Post
I made it like this
Code:
                        _String str = new _String(true);
                        str.UID = client.Entity.UID;
                        str.TextsCount = 1;
                        str.Type = _String.Effect;
                        str.Texts.Add("moveback");

                        foreach (Client.GameState sendto in Conquer_Online_Server.ServerBase.Kernel.GamePool.Values)
                        {
                            sendto.Entity.Owner.SendScreen(str, true);
                        }
                        break;
and it works the same to my old code.
Could you post your SendScreen method?
BaussHacker is offline  
Old 12/09/2011, 10:31   #11
 
-Sensei-'s Avatar
 
elite*gold: 0
Join Date: Oct 2011
Posts: 267
Received Thanks: 59
Quote:
Originally Posted by BaussHacker View Post
Could you post your SendScreen method?
Here
PHP Code:
        public void SendScreen(Interfaces.IPacket bufferbool self)
        {
            foreach (
Interfaces.IMapObject obj in Screen.Objects)
            {
                if (
obj == null) continue;
                if (
obj.MapObjType == Game.MapObjectType.Player)
                {
                    
GameState client obj.Owner as GameState;
                    
client.Send(buffer);
                }
            }
            if (
self)
                
Send(buffer);
        } 
-Sensei- is offline  
Old 12/09/2011, 11:05   #12
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Try set the true to false.
BaussHacker is offline  
Old 12/09/2011, 11:17   #13


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
Quote:
foreach (Client.GameState sendto in Conquer_Online_Server.ServerBase.Kernel.GamePool.V alues)
{
sendto.Entity.Owner.SendScreen(str, true);
}
Lol no. You don`t loop through ALL game clients and send the effect to ALL players on ALL players` screen. You just do MyCharacter.SendScreen(str, true) or however it works in your source. That foreach loop alone is a bug.
KraHen is offline  
Thanks
2 Users
Old 12/09/2011, 11:24   #14
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Quote:
Originally Posted by KraHen View Post
Lol no. You don`t loop through ALL game clients and send the effect to ALL players on ALL players` screen. You just do MyCharacter.SendScreen(str, true) or however it works in your source. That foreach loop alone is a bug.
Oh yeah, should have mention that.
BaussHacker is offline  
Thanks
1 User
Old 12/09/2011, 11:39   #15
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,191
Normally, you would do something like this...

If you want the effect to appear on everyone's own character:
Code:
StringPacket strPacket = new StringPacket(herp derp);
strPacket.Type = whateverTheFuckThisEnumEquals;
strPacket.Text.Add("effect");

foreach (Client client in Kernel.GamePool.Values)
{
     strPacket.UID = client.Identity;
     client.Send(strPacket);
}
If you want the effect to appear on only your own character from everyone else's view:
Code:
StringPacket strPacket = new StringPacket(herp derp);
strPacket.Type = whateverTheFuckThisEnumEquals;
strPacket.Text.Add("effect");
strPacket.UID = client.Identity;

foreach (Client client in (screen data from the sending client))
{
       client.Send(strPacket);
}
Edit: You probably use an interface if your using a smart source... so you would do something like...
Code:
foreach (IScreenObject client in (screen data from the sending client))
{
       if (client.Flag == Flags.Player)
           client.Send(strPacket);
}
Spirited is offline  
Thanks
1 User
Reply




All times are GMT +1. The time now is 09:17.


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.