Page 1 of 3

World Chat?

Posted: Tue Nov 06, 2012 9:21 am
by nikkinrob
I know on some servers they make /shout into a world chat. how is this done? or is there a way to add a new command /world to talk in a chat thats all across every zone on the server? Thanks so much for the input

Re: World Chat?

Posted: Tue Nov 06, 2012 6:01 pm
by whasf
sure! modify packet_system.cpp, find the handler for chat packets (0x0B5 I believe; a search will get you right to it on "chat") and put in some code to parse out the command you want and you can handle it yourself (i.e. If you see that command then take the text and iterate through all the zones and send the message to the players) :)

Re: World Chat?

Posted: Tue Nov 06, 2012 7:50 pm
by nikkinrob
can i get a little more info not good with coding myself

Re: World Chat?

Posted: Tue Nov 06, 2012 8:10 pm
by nikkinrob
im presuming this line needs to be altered?
case MESSAGE_SHOUT: PChar->loc.zone->PushPacket(PChar, CHAR_INSHOUT, new CChatMessagePacket(PChar, MESSAGE_SHOUT, data+6)); break;
and to something like PChar->????->PushPacket and so on.

Re: World Chat?

Posted: Tue Nov 06, 2012 10:09 pm
by bluekirby0
I would suggest hijacking the "yell" command since we don't actually use it. Should be easy to turn it into a global chat with a bit of ingenuity.

Re: World Chat?

Posted: Wed Nov 07, 2012 2:27 am
by diatanato
for /yell

packet_system.cpp line 2708

Code: Select all

case MESSAGE_YELL: 
{
    for (uint16 zone = 0; zone < 256; ++zone)
    {
        zoneutils::GetZone(zone)->PushPacket(
            PChar, 
            CHAR_INZONE, 
            new CChatMessagePacket(PChar, MESSAGE_SHOUT, data+6));
    }
}
break;

Re: World Chat?

Posted: Wed Sep 18, 2013 6:28 pm
by nasomi
I know I'm resurrecting an old thread, but I'm really wanting this to work. I tried replacing hte yell command with what's above, but it didn't work. Can anyone shine some light on this?

Re: World Chat?

Posted: Mon Sep 23, 2013 8:54 pm
by whasf
nasomi wrote:I know I'm resurrecting an old thread, but I'm really wanting this to work. I tried replacing hte yell command with what's above, but it didn't work. Can anyone shine some light on this?
What didn't work about it? Other than the number of zones has increased, that should be about it I would think (without testing it myself)

Re: World Chat?

Posted: Mon Sep 23, 2013 8:58 pm
by kjLotus
whasf wrote:
nasomi wrote:I know I'm resurrecting an old thread, but I'm really wanting this to work. I tried replacing hte yell command with what's above, but it didn't work. Can anyone shine some light on this?
What didn't work about it? Other than the number of zones has increased, that should be about it I would think (without testing it myself)
/yell might be client restricted to certain zones (jeuno, whitegate, adoulin)

Re: World Chat?

Posted: Fri Oct 04, 2013 7:48 am
by tagban
Could always create a command like @wc (worldchat) Whats up everypony? Considering the above for Yell would probably just need a little modification to make the custom command work, AND the command could be committed but default turned off, so that admins have options to enable/disable.

This would negate the need to adding everyone that joins the world into one giant LS.