Away System

By D34th on Nov 26, 2009

This Awaysystem is part of my script Death - iRc i had help on it from tektro and i hope you all enjoy it it is simple click set after typeing in the away nick and the away reason then click away

Dialog Away {
  Title Death - iRc Away 
  size -1 -1 80 80
  Option dbu
  edit "Away nick",1, 1 2 79 12,autohs
  Button "Set",2, 1 18 79 12
  edit "Reason",3, 1 35 79 12,autohs
  Button "Set",4, 1 50 79 12
  Button "Away",5, 1 65 30 12
  Button "Back",6, 51 65 28 12
  Button "Done",7, 32 65 19 12
}
on *:Dialog:Away:Sclick:2: {
  set %ReturnNick $me
  set %AwayNick $did(1).text
}
on *:Dialog:Away:Sclick:4: {
  set %AwayReason $did(3).text
}
on *:Dialog:Away:Sclick:5: {
  nick %AwayNick 
  amsg i am now away because %awayReason
}
on *:Dialog:Away:Sclick:6: {
  .Nick %ReturnNick
  amsg i am now back from %awayReason
}
on *:Dialog:Away:Sclick:7: {
  dialog -x $dname $Dname
}

Comments

Sign in to comment.
D34th   -  Nov 26, 2009

Alright thank you for the suggestion i just got bored and realized i needed a away system for my script so made this one and had tektro help me a bit

 Respond  
Ghost-writer   -  Nov 26, 2009

Nice tiny dialog, does its thing.

on *:Dialog:Away:Sclick:2: {
  set %ReturnNick $me
  set %AwayNick $did(1).text
}
on *:Dialog:Away:Sclick:4: {
  set %AwayReason $did(3).text
}
on *:Dialog:Away:Sclick:5: {
  nick %AwayNick 
  amsg i am now away because %awayReason
}
on *:Dialog:Away:Sclick:6: {
  .Nick %ReturnNick
  amsg i am now back from %awayReason
}
on *:Dialog:Away:Sclick:7: {
  dialog -x $dname $Dname
}

Can all be put in 1 event, its still good as is but heres what i would do

on *:Dialog:Away:Sclick:*: {
if ($did == 2) {
  set %ReturnNick $me
  set %AwayNick $did(1).text
}
if ($did == 4) set %AwayReason $did(3).text
if ($did == 5) {
nick %AwayNick 
  amsg i am now away because %awayReason
}
if ($did == 6) {
.Nick %ReturnNick
  amsg i am now back from %awayReason
}
if ($did == 7) dialog -x $dname $Dname
}
 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.