A simple away for lunch time and dinner time script & now with bedtime lol update to full script combined

By dma on Jan 04, 2016

I updated this scrip changed the code and added bedtime... it also goes well it http://hawkee.com/snippet/6809/

have fun as i learn :) also thanks to H0LLYWOOD & Stewie for the insight

on 1:text:*dinner time*:#: {
  var %bt.rand $rand(1,3)
  if (%bt.rand == 1) { .msg $chan eat well $nick }
  if (%bt.rand == 2) { .msg $chan hurry back $nick }
  if (%bt.rand == 3) { .msg $chan east coast dinner time! }

on 1:text:*lunch*:#: {
  var %bt.rand $rand(1,3)
  if (%bt.rand == 1) { .msg $chan eat well $nick }
  if (%bt.rand == 2) { .msg $chan dont forget to comeback back $nick }
  if (%bt.rand == 3) { .msg $chan do you know what time it is? }

on 1:text:*bedtime*:#: {
  var %bt.rand $rand(1,3) 
  if (%bt.rand == 1) { .msg $chan sleep well $nick }
  if (%bt.rand == 2) { .msg $chan dont let the bed bugs bite $nick }
  if (%bt.rand == 3) { .msg $chan so early $nick  }

on $*:TEXT:/^(brb|gone|afk)/Si:#:{
  if (!$readini(idle.ini, $nick, time)) {
    set %away $nick
    writeini idle.ini $nick time $ctime
    msg $chan Alright, ill start my stop watch..
  elseif ($readini(idle.ini, $nick, time) >= 1) {
    msg $chan $nick $+ ,you are already marked as brb, Please say "back" when you return!

on *:text:back:#:{
  if ($readini(idle.ini, $nick, time) >= 1) {
    unset %away
    msg $chan Welcome back $nick you were gone for $duration($calc($ctime -$readini(idle.ini, $nick, time) )) $+ , aboot time brah
    remini idle.ini $nick
on *:TEXT:!ClearAway *:#:{
  if (!$2) { msg $chan Please specify a nick!
  else { 
    unset %away
    remini idle.ini $2
    msg $chan $2 $+ 's brb time has been cleared.
On *:TEXT:*:#: {
  if (%away isin $1-) {
    msg $chan Sorry $nick but there marked as brb at this time, they will say back when they return.

my first ever script enjoy it lemme know what you think. you can change the script up if you want

triggers: dinner time /lunch /bedtime


Sign in to comment.
fahadmehar   -  Dec 02, 2016

Should Be Auto Away

dma  -  Dec 07, 2016

ya think?

Sign in to comment

dma   -  Mar 19, 2016

I just made the full script and got the time BRB Tracker
By UncleJohn on Oct 13, 2009 thanks UncleJohn

Stewie1k94   -  Jan 13, 2016

Nice little script! Few suggestions, though.

You do not need to add in the "/" for "set"

And you could also make some improvements by using

var %i Eat well, $nick $+ |Don't forget to come back, $nick $+ |East coast dinner time.


msg $chan $gettok(%i,$rand(1,$numtok(%i,124)),124)

Keep up the good work. :)

dma  -  Jan 13, 2016

ok thanks

Sign in to comment

dma   -  Jan 04, 2016

oh yeah ... put this in your bot
it will be nice if you had a bot that answers to that wanna take a look before using it?
come to irc.suckerpunch.pw #irc

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.