World Chat?
World Chat?
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?
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)
-- Whasf
Re: World Chat?
can i get a little more info not good with coding myself
Re: World Chat?
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.
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.
-
- Developer
- Posts: 707
- Joined: Sun Jul 22, 2012 12:11 am
Re: World Chat?
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?
for /yell
packet_system.cpp line 2708
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?
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?
Nasomi FFXI Community Server - Classic CoP era fun!
http://www.facebook.com/nasomi
http://www.twitter.com/nasomi
http://www.facebook.com/nasomi
http://www.twitter.com/nasomi
Re: World Chat?
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)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?
-- Whasf
Re: World Chat?
/yell might be client restricted to certain zones (jeuno, whitegate, adoulin)whasf wrote: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)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?
Re: World Chat?
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.
This would negate the need to adding everyone that joins the world into one giant LS.