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
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.
and
msg $chan $gettok(%i,$rand(1,$numtok(%i,124)),124)
Keep up the good work. :)
ya think?