Lil help here.

12/06/2011 02:54 -Sensei-#1
Can someone tell me what do you call this effect in clientside.?
I cant find it.
[Only registered and activated users can see links. Click Here To Register...]

help would be appreciated
12/06/2011 03:01 EviL|Shepherd#2
The big blue one or the white one?
12/06/2011 03:04 -Sensei-#3
The white one :)
12/06/2011 03:06 EviL|Shepherd#4
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.
12/06/2011 05:28 { Angelius }#5
its a string packet 1015...
effect name = moveback
12/06/2011 06:42 -Sensei-#6
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);
12/09/2011 08:00 -Sensei-#7
#bump
12/09/2011 08:38 BaussHacker#8
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.
12/09/2011 09:45 -Sensei-#9
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.
12/09/2011 10:20 BaussHacker#10
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?
12/09/2011 10:31 -Sensei-#11
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);
        } 
12/09/2011 11:05 BaussHacker#12
Try set the true to false.
12/09/2011 11:17 KraHen#13
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.
12/09/2011 11:24 BaussHacker#14
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. :rolleyes:
12/09/2011 11:39 Spirited#15
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);
}