World Chat?

Any discussion not related to the other forum topics
User avatar
Signature
Posts: 126
Joined: Fri May 02, 2014 3:44 am

Re: World Chat?

Post by Signature » Sun May 04, 2014 8:02 am

I give up on this. I spent all night trying to turn shout into a global channel with 0 success.

Can someone please explain this in more detail.... Something that is TESTED to work. Any help would be appreciated.
Thank you in advance!

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: World Chat?

Post by tagban » Sun May 04, 2014 12:47 pm

Use Yell.

Code: Select all

                case MESSAGE_YELL:
					{
						if (map_config.audit_chat == 1 && map_config.audit_yell == 1)
						{
							std::string qStr = ("INSERT into audit_chat (speaker,type,message,datetime) VALUES('");
							qStr +=PChar->GetName();
							qStr +="','YELL','";
							qStr += escape(data+6);
							qStr +="',current_timestamp());";
							const char * cC = qStr.c_str();
							Sql_QueryStr(SqlHandle, cC);
						}
						for (uint16 zone = 0; zone < 285; ++zone)
						{
							zoneutils::GetZone(zone)->PushPacket(
								PChar,
								CHAR_INZONE,
								new CChatMessagePacket(PChar, MESSAGE_SHOUT, data + 6));
						}
						//PChar->pushPacket(new CMessageStandardPacket(PChar, 0, 256));
					}
				break;

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: World Chat?

Post by kjLotus » Sun May 04, 2014 2:12 pm

you should use MAX_ZONEID instead of 285 :)

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: World Chat?

Post by tagban » Sun May 04, 2014 6:44 pm

Sounds good to me kj, I made mine based on the original reply.

User avatar
Signature
Posts: 126
Joined: Fri May 02, 2014 3:44 am

Re: World Chat?

Post by Signature » Mon May 05, 2014 2:13 am

is there any other file that needs to be altered? This doesn't work. No matter what I try I cannot get this to work. :*(

nasomi
Posts: 141
Joined: Wed Feb 13, 2013 8:51 am

Re: World Chat?

Post by nasomi » Mon May 05, 2014 6:56 am

Did you recompile after you put it in? There is only one file that needs to be modified and I can confirm that it works.

User avatar
Signature
Posts: 126
Joined: Fri May 02, 2014 3:44 am

Re: World Chat?

Post by Signature » Mon May 05, 2014 6:58 am

I save the file and restart my servers. Nothing changes. Recompiling right now. Doh!

User avatar
Signature
Posts: 126
Joined: Fri May 02, 2014 3:44 am

Re: World Chat?

Post by Signature » Mon May 05, 2014 8:04 am

Thank you! I can't believe the silly mistakes we overlook sometimes! I managed to take over the /yell channel for global shout.... Here's my next question... How would we go about making the zone your'e shouting from visible on the other end....

on your end it loooks like this.
YourName[S'andoria]: message.....

they see,
Yourname: message.

id it possible to keep that zone tag on the recieving end of that /yell?

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: World Chat?

Post by tagban » Mon May 05, 2014 11:12 am

If you treat it as "YELL" instead of SHOUT like on my server Boom, it will appear as a shout. afaik, you could probably add the zone name into the sending packet, just never bothered to try. :)

User avatar
Signature
Posts: 126
Joined: Fri May 02, 2014 3:44 am

Re: World Chat?

Post by Signature » Mon May 05, 2014 6:54 pm

Yeah I need to figure out the code that displays the zone on the other end... I have it setup exactly like you /yell goes into shout thanks to you btw. :)

Post Reply