/*
* MBot/MSP Auto Set Nickname and Status Message v0.1
* by souFrag
* Released 31.08.2005
* ICQ#50566818
* http://www.soufrag.cl
* Miranda IM en Español: http://www.mi-miranda.org
*/
DOWNLOAD SCRIPT
/****************************/
/******* INSTALLATION *******/
/****************************/
/*
/* Drag and drop this file to the MBot/MSP console :-)
/*
/****************************/
/****************************/
/******* DESCRIPTTION *******/
/****************************/
/*
This script will change your nickname and/or status message every X period of time.
In basic mode, you can set it to change your nick/status message every X minutes.
If you change to ADVANCED_MODE you can use a cron-like syntax for specifing the frequency and ranges for this event.
You may:
- Calculate the remaining time from now to any date you want.
- Show local time.
- Generate a random word.
- Generate a random number.
- Any suggestion?
I've only tested it with MSN and ICQ.
MSN: can change nickname and status message (aka personal message).
ICQ: can only change status message. I've suggested the ICQ developer to create a service so I can change the nickname. Let's wait to see what he says :-)
Please let me know how it works with other protocols.
*/
/****************************/
/**** BEGIN CONFIGURATION ***/
/****************************/
/*
These are the only lines you should edit.
Just change the "right value" of define(left value, right value);
*/
//Here you can add as many protocols as you want.
//I've just tested this with MSN and ICQ, but ICQ doesn't support changing the nickname (just the status message).
//If you have more thatn one copy of a protocol, you can add them as:
//e.g. $protocols = array("MSN", "ICQ", "MSN2", "MSNwork", "ICQ2", "ICQ3");
$protocols = array("MSN", "ICQ");
//Change nickname? (true/false)
define("SET_NICKNAME", true);
//Change status message? (true/false)
define("SET_STATUS_MESSAGE", true);
//Here you must set the date you'd like to count from.
define("HOUR", 0); // 0-23
define("MINUTE", 0); // 0 - 59
define("SECOND", 0); // 0 - 59
define("MONTH", 1); // 1 - 12
define("DAY", 1); // 1 - 31
define("YEAR", 2006); // ? - ?
/*
Here you can use the following variables:
COUNT FROM NOW TO THE DATE YOU'VE SET ABOVE:
%yyyy% - Number of full years
%q% - Number of full quarters
%m% - Number of full months
%y% - Difference between day numbers
(eg 1st Jan 2004 is "1", the first day. 2nd Feb 2003 is "33". The datediff is "-32".)
%d% - Number of full days
%w% - Number of full weekdays
%ww% - Number of full weeks
%h% - Number of full hours
%n% - Number of full minutes
%s% - Number of full seconds
LOCAL TIME:
%time12% - Current time (12-hour format) as hh:mm am/pm (hour:minute am/pm)
%time12_% - Current time (12-hour format without leading zeros) as h:mm am/pm (hour:minute am/pm)
%time24% - Current time (24-hour format) as hh:mm (hour:minute)
%time24_% - Current time (24-hour format without leading zeros) as h:mm (hour:minute)
OTHER:
%randomNumber% - Generates a random number between RAND_MIN_NUMBER and RAND_MAX_NUMBER
%randomWord% - Generates a random word of RAND_CHARS characters
Examples:
define("NICKNAME", "Felipe / Just %n% minutes for my birthday!");
define("NICKNAME", "My local time: %time12%");
define("STATUS_MESSAGE", "Local time: %time12%");
define("STATUS_MESSAGE", "I can generate random words and numbers: %randomWord%, %randomNumber%");
*/
//The new nickname you'd like to be set.
define("NICKNAME", "Felipe Brahm / Just %ww% weeks = %d% days = %h% hours = %n% minutes = %s% seconds to my birthday!");
//The new status message you'd like to be set.
define("STATUS_MESSAGE", "My local time is %time12_%");
//Show PopUp every time the nickname is changed. Change this value to true or false (without quotes!).
define("SHOW_POPUP", true);
//Time interval (in minutes!) to change your nickname. It must be >= 1
define("TIME_INTERVAL", 1);
//Just change these values if you'd like to use the %randomNumber% or %randomWord% variables.
define("RAND_MIN_NUMBER", 0);
define("RAND_MAX_NUMBER", 99999);
//Random generated word length.
define("RAND_CHARS", 10);
//Characters used when generating the random word.
$chars = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S' ,'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
//Change this to true so you can use the advanced time interval as follows:
/*
The smallest interval is one minute "* * *".
Scheduler service uses cron-like syntax for specifing the frequency and ranges for events:
a) * - matches all;
b) A - matches one; (A < (60,24,7));
c) * /N - matches every Nth; (N < (60,24,7)); (there is no space between * and /)
d) A-B - matches all in range; (A < B AND B < (60,24,7));
e) A,B,...,G-H,..Z - sum of single + ranges;
f) mon, tue, wed, thu, fri, sat, sun - equivalents of 0,1,2,3,4,5,6;
EXAMPLE:
1. Every 5 minutes: "* /5 * *"
(there is no space between * and /)
2. saturday-sunday, 11:00 - 15:00, every 10 min: "* /10 11-15 sat-sun"
(there is no space between * and /)
3. mon,tue,fri 11:00,12:00,13:00: "00 11,12,13 0-1,fri"
*/
define("ADVANCED_MODE", false);
define("ADVANCED_TIME_INTERVAL", "*/10 11-15 sat-sun");
/****************************/
/**** END CONFIGURATION ***/
/****************************/
DOWNLOAD SCRIPT
PLEASE POST ANY QUESTIONS/SUGGESTIONS IN THIS THREAD.

Reply With Quote

Bookmarks