Author Topic: Blockland Greenlight message spammer  (Read 6191 times)

Requested by Siba.

Announces a message to the server every 10-30 seconds telling players to help Blockland get on greenlight.
Use /togglegreenlightmessage to disable or re-enable.
Use /setgreenlighttimer (min) (max) to change how long the delay in messages is in milliseconds.
Clients can use /nogreenlight to disable seeing the messages.
I personally think this is not needed. But Siba was going to convince someone to make it.

Download
« Last Edit: September 16, 2012, 12:22:22 AM by pecon98 »



why don't you make a an enable / disable function. :|

why don't you make a an enable / disable function. :|
Added because fine.

every single server needs this

At first I thought this was the menu thing being suggested in the Greenlight topic, and I this was going to be pretty useless. But this is a better alternative. I'm not going to use it since I don't really host, but this is good. Nice job.

also add a way for users to block this.
also add a way for the message time to be changed.

This is a really good way to annoy the forget out of players even after they already clicked Yes.

Someone will just end up making an add-on that Blocks this from being seen.
As it can get annoying sometimes.


function blNotificationLoop(%msg,%time,%mil)
{
   cancel($blNotificationLoop);
   %cnt = ClientGroup.getCount();
   for(%i=0;%i<%cnt;%i++)
   {
      %client = ClientGroup.getObject(%i);
      if(!%client.ignoreSpam)
         messageClient(%client,'',%msg);
   }
   if(!%mil)
      $blNotificationLoop = schedule(%time * 1000,0,blNotificationLoop,%msg,%time,%mil);
   else
      $blNotificationLoop = schedule(%time,0,blNotificationLoop,%msg,%time,%mil);
}
function serverCmdToggleGLMessage(%client,%time,%mil)
{
   if(!%client.isAdmin)
      return;
   if(isEventPending($blNotificationLoop))
   {
      cancel($blNotificationLoop);
      messageAll('',"\c6Blockland Greenlight Notification Spam has been \c0DISABLED\c6.");
      return;
   }
   else
   {
      if(%time / 1000 >= 1 && !%mil)
      {
         messageClient(%client,'',"\c6It appears that you wrote the time in millaseconds.");
         messageClient(%client,'',"\c6So we will fix it, because I'm sure you mean \c3" @ %time / 1000 @ " \c6seconds not \c3" @ %time @ " \c6seconds.");
         messageClient(%client,'',"\c6But if you did mean \c3" @ %time @ " \c6millaseconds, then just do /ToggleGLMessage " @ %time @ " 1. The 1 will tell Blockland to use millaseconds.");
         %time = %time / 1000;
      }
      announce("\c6Blockland Greenlight Notification Spam has been \c4ENABLED\c6.");
      blNotification(%time,"Help Blockland get on Steam's greenlight! Click <a:steamcommunity.com/sharedfiles/filedetails/?id=95710780>here!</a>",%mil);
   }
}

function serverCmdIgnoreMe(%client)
{
   if(%client.ignoreSpam)
   {
      messageClient(%client,'',"\c6You will no longer be ignored in Blockland Greenlight Message Spam.");
      %client.ignoreSpam = false;
   }
   else
   {
      messageClient(%client,'',"\c6You will no longer be bothered about Blockland Greenlight.");
      %client.ignoreSpam = true;
   }
}


Now loving use that.


Now loving use that.
No, forget you.
I made my own seconds before you.
Releasing in a minute.

No, forget you.
I made my own seconds before you.
Releasing in a minute.
but mine is better
:P


No, forget you.
I made my own seconds before you.
Releasing in a minute.
His has an option for clients to turn it off though.