Control Your Time in a Computer :|

By ProIcons on May 20, 2011

Ok Well i haven't any better thing to do so i made a small snippet for some users to control their time on a computer...

It is simple to use...
//echo -a $LY(Parameter)
/ly Parameter

The Parameters Can be:
Worker
Gamer
Hacker
Scripter
Normal

You are defining the parameter to define what are you doing in the computer...
are you working?playing?scripting? or whatever...

Remember the world is out of the computer
Go for a walk, for a coffee and have soome fun ;) Have Fun :P

alias LY {
  var %p_ft = $iif($isid,return,echo -a)
  if (!$1) { %p_ft You must define if you are a Normal,Worker,Scripter,Programmer,Hacker or Gamer User | halt }
  if (!$regex($1,/^Normal$|^Worker$|^Scripter$|^Programmer$|^Hacker$|^Gamer$/i)) { %p_ft You must define if you are a Normal,Worker,Scripter,Programmer,Hacker or Gamer User | halt }
  var %p_P = $replace($1-,Normal,10.417,Worker,22.917,Scripter,25,Programmer,29.167,Hacker,40.278,Gamer,12.50)
  var %p_utime = $int($calc($ticks / 1024))
  var %p_Online = $calc((%p_utime * 100) / 86400)
  var %p_Limit_e = $iif(%p_Online > %p_p,$true,$false)
  if (%p_Limit_e) { %p_ft You have exceeded your daily online limit. Your Uptime is:4 %p_Online $+ % - $replace($uptime(system,1),min,$chr(32) Minute,sec,$chr(32) Second,days,$chr(32) Days,day,$chr(32) Day,mins,$chr(32) Minutes,secs,$chr(32) Seconds,wk,$chr(32) Week,wks,$chr(32) Weeks,hrs,$chr(32) Hours,hr,$chr(32) Hour) 1Limit is:3 %p_P $+ % - $replace($duration($calc((86400/100)* %p_P)),min,$chr(32) Minute,sec,$chr(32) Second,days,$chr(32) Days,day,$chr(32) Day,mins,$chr(32) Minutes,secs,$chr(32) Seconds,wk,$chr(32) Week,wks,$chr(32) Weeks,hrs,$chr(32) Hours,hr,$chr(32) Hour) }
  else { %p_ft You have Not exceeded your daily online limit. Your Uptime is:3 %p_Online $+ % - $replace($uptime(system,1),min,$chr(32) Minute,sec,$chr(32) Second,days,$chr(32) Days,day,$chr(32) Day,mins,$chr(32) Minutes,secs,$chr(32) Seconds,wk,$chr(32) Week,wks,$chr(32) Weeks,hrs,$chr(32) Hours,hr,$chr(32) Hour) 1You Will reach your limit 4(3 $+ %p_P $+ % $+ 4)1 in4 $replace($duration($calc(((86400/100)* %p_P) - $uptime(system,3))),min,$chr(32) Minute,sec,$chr(32) Second,days,$chr(32) Days,day,$chr(32) Day,mins,$chr(32) Minutes,secs,$chr(32) Seconds,wk,$chr(32) Week,wks,$chr(32) Weeks,hrs,$chr(32) Hours,hr,$chr(32) Hour) }
}

Comments

Sign in to comment.
Jethro   -  May 22, 2011

Yeah but same difference.

 Respond  
Dani_l11   -  May 22, 2011

/^(normal|(gam|hack|script|work|programm)er)$/i

 Respond  
Jethro   -  May 22, 2011

Well, if you really opt for the use of reference brace, you could've done it like so:

/^(normal)$|(gam|hack|script|work|programm)er$/i
 Respond  
Dani_l11   -  May 22, 2011

I always use them (unless I need something special with back references), its easier for people to read, and you're less likely to make mistakes in the script.

 Respond  
Jethro   -  May 21, 2011

Dani_l11, actually you don't need the parentheses to enclose the regex matches, because no $regml() is used. Good suggestion nevertheless.

 Respond  
Fuzionx   -  May 21, 2011

mIRC has built in $uptime() command. You might want to use it in this snippet.

 Respond  
Dani_l11   -  May 21, 2011

/^Normal$|^Worker$|^Scripter$|^Programmer$|^Hacker$|^Gamer$/ -> /^(Normal|Worker|Scripter|Programmer|Hacker|Gamer)$/i

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.