Author Topic: Simple Away  (Read 321 times)

morbid

  • Trial Moderator
  • Junior
  • ***
  • Posts: 61
  • Reputation +0/-0
  • I own you
  • Location: I'm probably standing right behind you.
    • View Profile
Simple Away
« on: February 16, 2011, 04:58:02 pm »

Type /a reason
to go away


and /b
to come back

Code: [Select]
on 1:input:*:{
  IF ($1 == /a ) {
    set %away.reason $2-
    if %away.reason == $null { set %away.reason %default }
    nick AWAY NICK  HERE
    msg $active 14,1:15,1|14,1:0,1Away12,1:0,1 %away.reason
    away %away.reason
    halt
  }
  ELSEIF ($1 == /b ) {
    nick MAIN NICK HERE
    pass PASSWORD HERE OR SET AS VARIABLE WITH %p
    msg $active  14,1:15,1|14,1:0,1Back12,1:0,1 %away.reason 12,1/0,1Time12,1:0,1 $Duration($awaytime)
    away
    halt
  }
  else {
    return
  }
}

Quote
:|: 10:57 :|: |@ morbid | :|:Away: Test
:|: morbid / [away].
:|: 10:57 :|: |@ [away] | :|:Back: Test /Time: 3secs
:|: [away] / morbid.

Share on Bluesky Share on Facebook


Jane

  • Management
  • Full
  • *******
  • Posts: 130
  • Reputation +1/-0
  • mIRC Scripters
    • View Profile
Re: Simple Away
« Reply #1 on: February 16, 2011, 08:52:31 pm »
It's a Good and useful one, but it would be better if it was added to bot :)

morbid

  • Trial Moderator
  • Junior
  • ***
  • Posts: 61
  • Reputation +0/-0
  • I own you
  • Location: I'm probably standing right behind you.
    • View Profile
Re: Simple Away
« Reply #2 on: February 16, 2011, 08:59:42 pm »
Eh   I don't mess with bots very much.

Leon_Rahil

  • Guest
Re: Simple Away
« Reply #3 on: February 20, 2011, 01:12:48 am »
Why don't you use:
Code: [Select]
alias {

}
instead of:
Code: [Select]
on *:input:*: {

}