Whisper to all players ?

04/05/2010 05:06 Paralyzer[GM]#1
Well I looked at this but have NO CLUE how it could be done so like if I typed

/wall Please check out [Only registered and activated users can see links. Click Here To Register...] Thanks Paralyzer[PM]

it would whisper to all players Please check out [Only registered and activated users can see links. Click Here To Register...] Thanks Paralyzer[PM] xP any ideas ?
04/05/2010 05:14 zTREME#2
Yea, make a check for chars, then make it send a message to char only and not to all. Look at the whisper thing how it works. Then make the command send that message type. Remember to put a mychar thing in, so it comes from you :)
04/05/2010 05:18 pro4never#3
Can't you just use ALLUSERS as the player it's sent to?... If not just do a foreach loop for all clients connected and send them each the same whisper.

Either way should work.
04/05/2010 05:27 zTREME#4
the foreach was what i just told him XD
04/05/2010 05:48 Paralyzer[GM]#5
More to the face where can I find the whisper code Not in Chat.cs or World.cs or in a CTRL + F
04/05/2010 06:12 -NewDawn-#6
I don't have my source in front of me since I'm just installing my software on my laptop (which is fixed now- I'm so happy) so I can't check for you... but this is what I'd do: I'd run a search on the source for whisper and have it so that it searches "Entire Solution".
Sorry I can't be of much help atm. Good Luck!
04/05/2010 06:15 Paralyzer[GM]#7
I did that. no luck :(
04/05/2010 06:21 -NewDawn-#8
Quote:
Originally Posted by Paralyzer[GM] View Post
I did that. no luck :(
Hm... try looking for some component that uses the chat system, right click it, and go to it's definition. Maybe you'll find it in Character.cs (or what ever one that contains the statuses). Try that. =|
04/05/2010 06:48 zTREME#9
I have no idea where it is XD not looked at it x)
04/05/2010 06:50 ChingChong23#10
loop through all online players and send them the message...
04/05/2010 12:16 PeTe Ninja#11
why do you want to wsiper all players when you can just talk to them regularly? anyawy its like that /c message change the 2000 or w.e to the wisper chat which is like 2001
04/05/2010 12:23 Kiyono#12
Why do you need all those chat related commands anyway?
This should work.
Code:
if (Cmd[0] == "/whsp")
                        {
                            Game.World.SendMsgToAll(GC.MyChar.Name, Message.Remove(0, 6), 2001, 0);
                        }
04/05/2010 12:56 ImmuneOne#13
Meh, search for
Code:
                else if (Type == 2001)
                {
                    Character C2 = CharacterFromName(To);
                    if (C2 != null)
                    {
                        C.MyClient.AddSend(Packets.ChatMessage(C2.MyClient.MessageID, From, To, Message, Type, C.Mesh));
                        C2.MyClient.AddSend(Packets.ChatMessage(C2.MyClient.MessageID, From, To, Message, Type, C.Mesh));
                        if (C2 != null)
                            C.MyClient.AddSend(Packets.SpawnViewed(C2, 2));
                    }
Add underneath it;
Code:
                    else if (To == "ALL")
                    {
                        Game.World.SendMsgToAll(C.MyClient.MyChar.Name, Message, Type, C.Mesh);
                    }
04/05/2010 17:00 Huseby#14
#Closed