[Question]GM/PM Broadcast Command

12/12/2009 00:30 airborne.#1
You know how in the 5165 source when you use the /c command it says your name so like I use /c qwerty it says "[System]CharName: qwerty.." in white letters, how do I change it so that it only says "[System]qwerty" but in red? and no it doesn't say the name of whoever broadcasted it.. like tq bins.

Btw this is how the cmd is setup now:

Code:
                        {
                            Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + ": " + Message.Remove(0, 3), 2011, 0);
                        }
12/12/2009 00:36 Ïñƒämöü§ƒï§h#2
Quote:
Originally Posted by airborne. View Post
You know how in the 5165 source when you use the /c command it says your name so like I use /c qwerty it says "[System]CharName: qwerty.." in white letters, how do I change it so that it only says "[System]qwerty" but in red? like tq bins.

Btw this is how the cmd is setup now:

Code:
                        {
                            Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + ": " + Message.Remove(0, 3), 2011, 0);
                        }
Mind posting the hole code then i might help you out
12/12/2009 00:37 airborne.#3
Quote:
Originally Posted by Ïñƒämöü§ƒï§h View Post
Mind posting the hole code then i might help you out
Sigh you don't really need the rest but here you go..

Code:
                        if (Cmd[0] == "/c")
                        {
                            Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + ": " + Message.Remove(0, 3), 2011, 0);
                        }
12/12/2009 00:42 Ïñƒämöü§ƒï§h#4
Quote:
Originally Posted by airborne. View Post
Sigh you don't really need the rest but here you go..

Code:
                        if (Cmd[0] == "/c")
                        {
                            Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + ": " + Message.Remove(0, 3), 2011, 0);
                        }
Ok here i fixed it

Code:
if (Cmd[0] == "/c")
                        {
                            Game.World.SendMsgToAll(GC.MyChar.Name,  ": " + Message.Remove(0, 3), 2011, 0);
                        }
Hope it helps =P
#Edit the commands works =P
12/12/2009 00:45 airborne.#5
Quote:
Originally Posted by Ïñƒämöü§ƒï§h View Post
Ok here i fixed it

Code:
if (Cmd[0] == "/c")
                        {
                            Game.World.SendMsgToAll(GC.MyChar.Name,  ": " + Message.Remove(0, 3), 2011, 0);
                        }
Hope it helps =P
I didnt test it to see if it works just figure lol
Alright cool, but got any idea how to make the text red?
12/12/2009 00:46 Ïñƒämöü§ƒï§h#6
Quote:
Originally Posted by airborne. View Post
Alright cool, but got any idea how to make the text red?
No i dont ill look into this gimme like a couple minutes ill figure it out =P
12/12/2009 00:51 CptSky#7
Quote:
Originally Posted by airborne. View Post
Alright cool, but got any idea how to make the text red?
At the start of your packet, you have the color in RGB.
12/12/2009 02:00 InfamousNoone#8
Quote:
Originally Posted by CptSky View Post
At the start of your packet, you have the color in RGB.
It's likely the function he's using already takes a color parameter, and if not has an overloaded method to take one. I'm willing to bet that 0 at the end is the color, so red would be 0xFFFF0000 (A = 255, R = 255, G = 0, B = 0)
12/12/2009 08:34 E.M.E#9
2011 is the White text... you need to find out the red one id that all... iam not giving out more info :P
04/11/2011 03:59 kardasoo#10
guys and how we can change the [sistem] mode where i need to search!!pls any help
04/11/2011 05:56 pro4never#11
Quote:
Originally Posted by E.M.E View Post
2011 is the White text... you need to find out the red one id that all... iam not giving out more info :P
No, it really isn't.


2011 is the chat TYPE (center of screen)

The color is most likely an optional overload. The packet takes a chat color value in RGB which can be altered. I'd find it very strange if there was no optional version of the chat method that did not take color as a parameter.

Note:

if you add a reference to say... Windows.Form you could do something like (uint)Color.Red instead of writing it out in hex
04/17/2011 12:25 kardasoo#12
guys i need help pls how to change on msg GM that [Sistem] to be [GM]message....
04/17/2011 12:31 { Angelius }#13
Quote:
Originally Posted by kardasoo View Post
guys i need help pls how to change on msg GM that [Sistem] to be [GM]message....
use the Service Chat Type. 2014
04/17/2011 20:50 kill_acvc#14
Quote:
Originally Posted by airborne. View Post
Alright cool, but got any idea how to make the text red?
Change the fourth offset of your message packet, which is a "UInt32" and determines the color. You can use System.Drawing.Color.(Your Color).ToArgb() method to figure out a color's RGB version, represented by an uint. Don't forget to reference System.Drawing on the references window.

[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]