Author Topic: How'd they make the #commands not show up in the chat menu?  (Read 8865 times)

0 Members and 1 Guest are viewing this topic.

bigbigger9

  • Gnoll Fighter
  • **
  • Posts: 73
  • Reputation: +0/-0
(No subject)
« Reply #15 on: September 18, 2003 11:51 pm CDT »
heh, just give me your AIM name or something. :P

Anyways, hate to ask another question that makes me look like an idiot, but anyways, what file is the remotesay in? Would I have to replace all the server files and make this a mod or what?
« Last Edit: December 31, 1969 06:00 pm CST by bigbigger9 »
~bigbigger9

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #16 on: September 19, 2003 12:22 am CDT »
remotesay is in comchat.cs

You would have to replace this file if you would like your command in..

To name it another mod.. Well that is something completely different.
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

bigbigger9

  • Gnoll Fighter
  • **
  • Posts: 73
  • Reputation: +0/-0
(No subject)
« Reply #17 on: September 19, 2003 12:48 am CDT »
I see, well, is there an easy way for me to distribute this change? I didn't know there was a comchat.cs in base... anyways, so I'll just have to tell people to add my new stuff to their comchat.cs in their server files?
« Last Edit: December 31, 1969 06:00 pm CST by bigbigger9 »
~bigbigger9

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #18 on: September 19, 2003 08:37 am CDT »
Yes.. Just make sure they put everything in the right place so things keep working.
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

bigbigger9

  • Gnoll Fighter
  • **
  • Posts: 73
  • Reputation: +0/-0
(No subject)
« Reply #19 on: September 20, 2003 04:08 pm CDT »
(Sorry, I went to Six Flags Magic Mountain yesterday)

Alright, but this change I'm giving out, also uses remotesay on the server's clients, will changing the remotesay in the server's comchat.cs effect this?
« Last Edit: December 31, 1969 06:00 pm CST by bigbigger9 »
~bigbigger9

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #20 on: September 20, 2003 04:23 pm CDT »
no
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

bigbigger9

  • Gnoll Fighter
  • **
  • Posts: 73
  • Reputation: +0/-0
(No subject)
« Reply #21 on: September 20, 2003 05:35 pm CDT »
Well, call me crazy... but just by adding that to comchat.cs it didn't work, I don't think it catches the message that way.
« Last Edit: December 31, 1969 06:00 pm CST by bigbigger9 »
~bigbigger9

bigbigger9

  • Gnoll Fighter
  • **
  • Posts: 73
  • Reputation: +0/-0
(No subject)
« Reply #22 on: September 20, 2003 05:40 pm CDT »
Alright, I put in a echo("a message was recieved"); thing in the remotesay, and it echoes that everything I say something, but not when it has a ! in the beginning... hm...
« Last Edit: December 31, 1969 06:00 pm CST by bigbigger9 »
~bigbigger9

Dragoon

  • Gnoll Fighter
  • **
  • Posts: 52
  • Reputation: +0/-0
(No subject)
« Reply #23 on: September 20, 2003 05:53 pm CDT »
Code: [Select]
function remoteSay(%clientId, %team, %message)
{
%msg = %clientId @ " \"" @ escapeString(%message) @ "\"";

echo("Message From: " @ %clientId @ " : " @ %message);

if($Server::FloodProtectionEnabled)
{
%time = getIntegerTime(true) >> 5;

if(%clientId.floodMute)
{
%delta = %clientId.muteDoneTime - %time;

if(%delta > 0)
{
Client::sendMessage(%clientId, $MSGTypeGame, "FLOOD! You cannot talk for " @ %delta @ " seconds.");
return;
}

%clientId.floodMute = "";
%clientId.muteDoneTime = "";
}

%clientId.floodMessageCount++;
schedule(%clientId @ ".floodMessageCount--;", 5, %clientId);

if(%clientId.floodMessageCount > 4)
{
%clientId.floodMute = true;
%clientId.muteDoneTime = %time + 10;
Client::sendMessage(%clientId, $MSGTypeGame, "FLOOD! You cannot talk for 10 seconds.");
return;
}
}

if(%team)
{
if($dedicated)
echo("SAYTEAM: " @ %msg);

%team = Client::getTeam(%clientId);

for(%cl = Client::getFirst(); %cl != -1; %cl = Client::getNext(%cl))
if(Client::getTeam(%cl) == %team && !%cl.muted[%clientId])
Client::sendMessage(%cl, $MsgTypeTeamChat, %message, %clientId);
}
else
{
if($dedicated)
echo("SAY: " @ %msg);
for(%cl = Client::getFirst(); %cl != -1; %cl = Client::getNext(%cl))
if(!%cl.muted[%clientId])
Client::sendMessage(%cl, $MsgTypeChat, %message, %clientId);
}
}
« Last Edit: December 31, 1969 06:00 pm CST by Dragoon »
I r Dragoon.

bigbigger9

  • Gnoll Fighter
  • **
  • Posts: 73
  • Reputation: +0/-0
(No subject)
« Reply #24 on: September 20, 2003 06:02 pm CDT »
Um... that's just the base remotesay?
« Last Edit: December 31, 1969 06:00 pm CST by bigbigger9 »
~bigbigger9

Dragoon

  • Gnoll Fighter
  • **
  • Posts: 52
  • Reputation: +0/-0
(No subject)
« Reply #25 on: September 20, 2003 06:27 pm CDT »
try again.
« Last Edit: December 31, 1969 06:00 pm CST by Dragoon »
I r Dragoon.

bigbigger9

  • Gnoll Fighter
  • **
  • Posts: 73
  • Reputation: +0/-0
(No subject)
« Reply #26 on: September 20, 2003 06:43 pm CDT »
Code: [Select]
function remoteSay(%clientId, %team, %message)
{
   %msg = %clientId @ " \"" @ escapeString(%message) @ "\"";

   // check for flooding if it's a broadcast OR if it's team in FFA
   if($Server::FloodProtectionEnabled && (!$Server::TourneyMode || !%team))
   {
      // we use getIntTime here because getSimTime gets reset.
      // time is measured in 32 ms chunks... so approx 32 to the sec
      %time = getIntegerTime(true) >> 5;
      if(%clientId.floodMute)
      {
         %delta = %clientId.muteDoneTime - %time;
         if(%delta > 0)
         {
            Client::sendMessage(%clientId, $MSGTypeGame, "FLOOD! You cannot talk for " @ %delta @ " seconds.");
            return;
         }
         %clientId.floodMute = "";
         %clientId.muteDoneTime = "";
      }
      %clientId.floodMessageCount++;
      // funky use of schedule here:
      schedule(%clientId @ ".floodMessageCount--;", 5, %clientId);
      if(%clientId.floodMessageCount > 4)
      {
         %clientId.floodMute = true;
         %clientId.muteDoneTime = %time + 10;
         Client::sendMessage(%clientId, $MSGTypeGame, "FLOOD! You cannot talk for 10 seconds.");
         return;
      }
   }

   if(%team)
   {
      if($dedicated)
         echo("SAYTEAM: " @ %msg);
      %team = Client::getTeam(%clientId);
      for(%cl = Client::getFirst(); %cl != -1; %cl = Client::getNext(%cl))
         if(Client::getTeam(%cl) == %team && !%cl.muted[%clientId])
            Client::sendMessage(%cl, $MsgTypeTeamChat, %message, %clientId);
   }
   else
   {
      if($dedicated)
         echo("SAY: " @ %msg);
      for(%cl = Client::getFirst(); %cl != -1; %cl = Client::getNext(%cl))
         if(!%cl.muted[%clientId])
            Client::sendMessage(%cl, $MsgTypeChat, %message, %clientId);
   }
}


Looks like it to me. Just without comments?
« Last Edit: December 31, 1969 06:00 pm CST by bigbigger9 »
~bigbigger9

Dragoon

  • Gnoll Fighter
  • **
  • Posts: 52
  • Reputation: +0/-0
(No subject)
« Reply #27 on: September 20, 2003 06:49 pm CDT »
Quote from: "Dragoon"
function remoteSay(%clientId, %team, %message)
{
   %msg = %clientId @ " "" @ escapeString(%message) @ """;

   echo("Message From: " @ %clientId @ " : " @ %message);

   if($Server::FloodProtectionEnabled)
   {
      %time = getIntegerTime(true) >> 5;

      if(%clientId.floodMute)
      {
         %delta = %clientId.muteDoneTime - %time;

         if(%delta > 0)
         {
            Client::sendMessage(%clientId, $MSGTypeGame, "FLOOD! You cannot talk for " @ %delta @ " seconds.");
            return;
         }

         %clientId.floodMute = "";
         %clientId.muteDoneTime = "";
      }

      %clientId.floodMessageCount++;
      schedule(%clientId @ ".floodMessageCount--;", 5, %clientId);

      if(%clientId.floodMessageCount > 4)
      {
         %clientId.floodMute = true;
         %clientId.muteDoneTime = %time + 10;
         Client::sendMessage(%clientId, $MSGTypeGame, "FLOOD! You cannot talk for 10 seconds.");
         return;
      }
   }

   if(%team)
   {
      if($dedicated)
         echo("SAYTEAM: " @ %msg);

      %team = Client::getTeam(%clientId);

      for(%cl = Client::getFirst(); %cl != -1; %cl = Client::getNext(%cl))
         if(Client::getTeam(%cl) == %team && !%cl.muted[%clientId])
            Client::sendMessage(%cl, $MsgTypeTeamChat, %message, %clientId);
   }
   else
   {
      if($dedicated)
         echo("SAY: " @ %msg);
      for(%cl = Client::getFirst(); %cl != -1; %cl = Client::getNext(%cl))
         if(!%cl.muted[%clientId])
            Client::sendMessage(%cl, $MsgTypeChat, %message, %clientId);
   }
}
Quote from: "bigbigger9"
function remoteSay(%clientId, %team, %message)
{
   %msg = %clientId @ " "" @ escapeString(%message) @ """;

   // check for flooding if it's a broadcast OR if it's team in FFA
   if($Server::FloodProtectionEnabled && (!$Server::TourneyMode || !%team))
   {
      // we use getIntTime here because getSimTime gets reset.
      // time is measured in 32 ms chunks... so approx 32 to the sec
      %time = getIntegerTime(true) >> 5;
      if(%clientId.floodMute)
      {
         %delta = %clientId.muteDoneTime - %time;
         if(%delta > 0)
         {
            Client::sendMessage(%clientId, $MSGTypeGame, "FLOOD! You cannot talk for " @ %delta @ " seconds.");
            return;
         }
         %clientId.floodMute = "";
         %clientId.muteDoneTime = "";
      }
      %clientId.floodMessageCount++;
      // funky use of schedule here:
      schedule(%clientId @ ".floodMessageCount--;", 5, %clientId);
      if(%clientId.floodMessageCount > 4)
      {
         %clientId.floodMute = true;
         %clientId.muteDoneTime = %time + 10;
         Client::sendMessage(%clientId, $MSGTypeGame, "FLOOD! You cannot talk for 10 seconds.");
         return;
      }
   }

   if(%team)
   {
      if($dedicated)
         echo("SAYTEAM: " @ %msg);
      %team = Client::getTeam(%clientId);
      for(%cl = Client::getFirst(); %cl != -1; %cl = Client::getNext(%cl))
         if(Client::getTeam(%cl) == %team && !%cl.muted[%clientId])
            Client::sendMessage(%cl, $MsgTypeTeamChat, %message, %clientId);
   }
   else
   {
      if($dedicated)
         echo("SAY: " @ %msg);
      for(%cl = Client::getFirst(); %cl != -1; %cl = Client::getNext(%cl))
         if(!%cl.muted[%clientId])
            Client::sendMessage(%cl, $MsgTypeChat, %message, %clientId);
   }
}


different... YES.
« Last Edit: December 31, 1969 06:00 pm CST by Dragoon »
I r Dragoon.

bigbigger9

  • Gnoll Fighter
  • **
  • Posts: 73
  • Reputation: +0/-0
(No subject)
« Reply #28 on: September 20, 2003 06:53 pm CDT »
...

What's the point of that? That doesn't help me at all? You must have got confused over what I wrote:

Quote from: "bigbigger9"
Alright, I put in a echo("a message was recieved"); thing in the remotesay, and it echoes that everything I say something, but not when it has a ! in the beginning... hm...
« Last Edit: September 20, 2003 07:02 pm CDT by bigbigger9 »
~bigbigger9

bigbigger9

  • Gnoll Fighter
  • **
  • Posts: 73
  • Reputation: +0/-0
(No subject)
« Reply #29 on: September 20, 2003 06:55 pm CDT »
...

What's the point of that? That doesn't help me at all? You must have got confused over what I wrote:

Quote from: "bigbigger9"
Alright, I put in a echo("a message was recieved"); thing in the remotesay, and it echoes that everything I say something, but not when it has a ! in the beginning... hm...
« Last Edit: December 31, 1969 06:00 pm CST by bigbigger9 »
~bigbigger9