All pastes #757450 Raw Edit

mIRC ScRipT

public text v1 · immutable
·published 2007-11-01 11:16 UTC
rendered paste body
dialog tryaway {
  title "YapannE Away system"
  size -1 -1 144 120
  option dbu
  box "Options" 1, 7 5 130 30
  check "Away Nick:" 2, 12 13 35 10
  check "Show that you are away every" 3, 12 22 85 10
  edit "" 4, 50 13 45 9, center
  edit "" 5, 97 23 15 9, center
  text "Minutes." 6, 115 23 20 10
  box "Away" 7, 7 37 130 64
  text "Reason:" 8, 12 45 20 10
  edit "" 9, 33 45 95 30, multi vsbar
  button "Away" 10, 63 104 35 12
  button "Back" 12, 100 104 35 12
  button "OK" 13, 10 104 35 12, ok
  button "Sleep" 14, 12 77 30 10
  button "Lunch" 15, 42 77 30 10
  button "Dinner" 16, 42 87 30 10
  button "School" 17, 102 77 30 10
  button "SeX" 18, 12 87 30 10
  button "Work" 19, 102 87 30 10
  button "Shop" 20, 72 77 30 10
  button "Dog" 21, 72 87 30 10
  button "HighLight Nicks" 23, 96 12 40 10, center
}
dialog tryhl {
  title "HighLight Nicks"
  size -1 -1 82 45
  option dbu
  button "Add", 1, 3 5 20 12
  button "Delete", 2, 3 20 20 12
  list 3, 26 4 51 38, size
}
alias awtime { return $duration($calc($ctime - %ctime),3) }
on *:dialog:tryaway:sclick:*: {
  if ($did == 10) {
    did -e tryaway 12
    did -b tryaway 2,3,4,5,9
    did -b tryaway 10
    window -d @awayme
    setlayer 140 @awayme
    set %away 1
    set %awaynick $did(4).text
    set %time $time
    set %ctime $ctime
    set %nicki $me
    set %reason %reason  $didtok(tryaway,9,32)
    scon -a amsg 7I11m 7A11way!! 7R11eason:12 %reason 7T11ime:12 %time . (YapannE Away)
    if ($did(2).state) {
      set %awnick 1
      scon -a nick $did(4).text
    }
    if ($did(3).state) {
      set %showtime 1
      set %timesel $did(5).text
      if ($did(5).text !isnum) { echo -a Only Numbers! }
      if (%showtime) { .timerZZ 0 $calc(%timesel *60) scon -a amsg 7I11m 7S11till 7A11way! 7R11eason:12 %reason 7S11ince:12 %time . (YapannE Away)
      }
    }
  }
  if ($did == 12) {
    did -e tryaway 2,3,4,5,9,10
    did -b tryaway 12
    did -r tryaway 9
    .timerZZ off
    unset %away
    unset %awnick
    unset %showtime
    unset %timesel
    scon -a nick %nicki
    scon -a amsg 7I11m 7B11ack!! 7F11rom:12 %reason 7S11ince:12 %time 7I11dle 7A11way 7T11ime:12 $awtime . (YapannE Away)
    .timer 1 3 unset %reason
    .timer 1 4 unset %ctime
    .timer 1 5 unset %time
  }
  if ($did == 14) { did -ra tryaway 9 ZzZ?zZSleepZinGzZ?zz?ZZz }
  if ($did == 15) { did -ra tryaway 9 Lunch, Eating a Great TASTEFull Hamburger, YAM YAM! }
  if ($did == 16) { did -ra tryaway 9 Dinner, Eating another Hamburger! :D }
  if ($did == 17) { did -ra tryaway 9 School, sleepiNG, wake me up when lesson ends.. }
  if ($did == 18) { did -ra tryaway 9 Doing SeX, OH YEA ITS GOOD, Or Not. }
  if ($did == 19) { did -ra tryaway 9 Work, Earning money for my life. }
  if ($did == 20) { did -ra tryaway 9 Shop, Buying milk. :P }
  if ($did == 21) { did -ra tryaway 9 Taking the dog for a walk, and picking up is shit. :[ }
  if ($did == 23) { dialog -m tryhl tryhl }
}
on *:dialog:tryaway:init:*: {
  if (%awnick) {
    did -a tryaway 4 %awaynick
    did -c tryaway 2
  }
  if (%showtime) {
    did -c tryaway 3
    did -a tryaway 5 %timesel
  }
  if (%away) { did -b tryaway 10
    did -b tryaway 2,3,4,5,9
    did -a tryaway 9 %reason
  }
  if (!%away) { did -b tryaway 12 }
}
on *:text:*:#: {
  if (%away) {
    if ($1- isin %hlnicks) || ($me isin $1-) { .notice $nick Im away, reason: %reason . }
  }
}
on *:text:*:?:{ 
  if (%away) { 
    close -m $nick  
    echo @awayme $timestamp < $+ $nick $+ > $1- 
  } 
}
on *:dialog:tryhl:sclick:*: {
  if ($did == 1) {
    set %hlnicks %hlnicks $$?"Enter Highlight nick"
    did -a tryhl 3 $$!
  }
  if ($did == 2) {
    set %hlnicks $remtok(%hlnicks,$did(3).seltext,32)
    did -d tryhl 3 $did(3).sel
  }
}
on *:dialog:tryhl:init:0:{
  var %x = 1
  while ($gettok(%hlnicks,%x,32)) {
    did -a tryhl 3 $gettok(%hlnicks,%x,32)
    inc %x
  }
}

menu * {
  Away { dialog -m tryaway tryaway }