Thread: Level-Mute
View Single Post
  #1  
Old 07-30-2011, 08:19 PM
Supaman771 Supaman771 is offline
Posting The Truth
Supaman771's Avatar
Join Date: Feb 2008
Posts: 1,694
Supaman771 is a glorious beacon of lightSupaman771 is a glorious beacon of lightSupaman771 is a glorious beacon of light
Level-Mute

Well, Era's Battle of the Bands is today and we were discussing that spamming could disrupt the event, or lag the level more (since there's going to be a bunch of people there).
So I made this simple toggle-able level mute NPC to throw down and solve the problem.
He said he wouldn't use it because the Timeout would "Lag the server".
I don't understand how? So if anyone could explain... as well as comment on how I could possibly code this better?
Thanks:
PHP Code:
function onCreated()
{
  
setTimer0.05 );
  
this.on 0;
}

//#CLIENTSIDE
functon onPlayerEnters()
{
  if ( 
this.on == )
  {
    if ( 
player.guild != "Judge" || player.guild != "Preformer" )
    {
      
player.chat "...";
    }
  }
 
setTimer0.05 );
}

function 
onPlayerChats()
{
  if ( 
player.guild == "Judge" )
  {
    if ( 
player.chat == ":muteon" )
    {
      
this.on 1;
      
player.chat "Level-Mute Enabled";
    }
    elseif ( 
player.chat == ":muteoff" )
    {
      
this.on 0;
      
player.chat "Level-Mute Disabled"
    
}
  }
  if ( 
this.on == )
  {
    if ( 
player.guild != "Judge" || player.guild != "Preformer" )
    {
      if ( 
player.chat != "..." )
      {
        
player.chat "...";
      }
    }
  }
 
setTimer0.05 );
}

function 
onTimeout()
{
  if ( 
this.on == )
  {
    if ( 
player.guild != "Judge" || player.guild != "Preformer" )
    {
      
player.chat "...";
    }
  }
 
setTimer0.05 );

__________________
Reply With Quote