All pastes #541983 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-06-05 18:04 UTC
rendered paste body
ok Below is the script... the commands r... 

!pc on !pc off
!setpcw !setworld
!pcw !world
!suggest !wsuggest
!sworld !sw
!autocall on <time in seconds>  !autocall off
!av <name> 




---------------------SCRIPT-------------------------


on $*:Text:/!(setpcw|setworld)/Si:#:{
  if (%pcstatus. [ $+ [ $chan ] ] == off) {
    notice $nick $c1(Pest Control Features Disabled pm an op to activate)
  /halt }
  if (%autostatus. [ $+ [ $chan ] ] == on) {
    notice $nick $c1(Pest Control Autocall on please deactivate before changing world.)
  /halt }
  if ($nick isop $chan) || ($nick ishop $chan)  {
    if ($2 isnum 1-140) {
      set $+(%,pcsetter.,$chan) $nick
      set $+(%,pcw.,$chan) $2
      set $+(%,pcwtime.,$chan) $ctime
      msg $chan $c1(Pc World has been changed! Set by:) $c2($($+(%,pcsetter.,$chan),2)) . $c1(Type) $c2(!world or !pcw) $c1(to view!)
    }
    else notice $nick $c2(Worlds 1-140 only at this time)
  }
  else notice $nick Op only command
}
on $*:Text:/!(pcw|world)/Si:#:{
  if (%pcstatus. [ $+ [ $chan ] ] == off) {
    notice $nick $c1(Pest Control Features Disabled pm an op to activate)
  /halt }
  if ($nick isop $chan) || ($nick ishop $chan) ||  ($nick isvoice $chan) { 
    notice $nick $c1 Pc world: $c2($($+(%,pcw.,$chan),2) ) $c1(set by) $c2($($+(%,pcsetter.,$chan),2)) $c1($duration($calc($ctime - $($+(%,pcwtime.,$chan),2))) Ago.)
  }
}


on $*:Text:/!(suggest|wsuggest)/Si:#:{
  if (%pcstatus. [ $+ [ $chan ] ] == off) {
    notice $nick $c1(Pest Control Features Disabled pm an op to activate)
  /halt }
  if ($nick isop $chan) || ($nick ishop $chan) ||  ($nick isvoice $chan) {
    if ($2 isnum 1-140) {
      set $+(%,ssetter.,$chan) $nick
      set $+(%,spcw.,$chan) $2
      set $+(%,sugtime.,$chan) $ctime
      msg $chan $c1(The Suggested Pc World has been changed! Set by:) $c2($($+(%,pcsetter.,$chan),2). $c1(Type) $c2(!suggested or !sworld) $c1(to view!)
    }
  }
}
on $*:Text:/!(sworld|sw)/Si:#:{
  if (%pcstatus. [ $+ [ $chan ] ] == off) {
    notice $nick $c1(Pest Control Features Disabled pm an op to activate)
  /halt }
  if ($nick isop $chan) || ($nick ishop $chan) ||  ($nick isvoice $chan) {
    notice $nick $c1(The Suggested Pc world is:) $c2($($+(%,spcw.,$chan),2)) $c1(set by) $c2($($+(%,ssetter.,$chan),2)) $c1($duration($calc($ctime - $($+(%,sugtime.,$chan),2))) Ago.)
  }
}
on $*:TEXT:/!autocall*/Si:#:{
  if ($nick isop $chan || $nick ishop $chan) {
    if (!$2) {
      if (%autostatus. [ $+ [ $chan ] ] == $null) {
        set %autostatus. [ $+ [ $chan ] ] on
        notice $nick Pest Control auto announce is on.
      }
      else {
        notice $nick $c1(Pest Control auto announce is %autostatus. [ $+ [ $chan ] ] $+ ).
      }
    }
    if ($2 == off) {
      set %autostatus. [ $+ [ $chan ] ] off
      notice $nick $c1(Pest Control auto announce is now off).
      /timers off
      if ($3 == $null) { notice $nick you have shut off autocall. /halt.
    }
  }
}

  if ($2 == on) {
    set %autostatus. [ $+ [ $chan ] ] on
    /timer 0 $3 msg $chan $c1(Pest Control World) $c2($($+(%,pcw.,$chan),2)) $c1(has been set by:) $c2($($+(%,pcsetter.,$chan),2)).
  }
  elseif ($3 == $null) { notice $nick Please specify the number of seconds per repeat. }

} 
on $*:TEXT:/!pc*/Si:#:{
  if ($nick isop $chan || $nick ishop $chan) {
    if (!$2) {
      if (%pcstatus. [ $+ [ $chan ] ] == $null) {
        set %pcstatus. [ $+ [ $chan ] ] on
        notice $nick Pest Control is on.
      }
      else {
        notice $nick $c1(Pest Control is %pcstatus. [ $+ [ $chan ] ] $+ ).
      }
    }
    if ($2 == off) {
      set %pcstatus. [ $+ [ $chan ] ] off
      notice $nick $c1(Pest Control is now off).
    }
    if ($2 == on) {
      set %pcstatus. [ $+ [ $chan ] ] on
      notice $nick $c1(Pest Control is now on).
    }
  }
}
ON *:TEXT:!av*:#:{
  if ($nick isop $chan) || ($nick ishop $chan) {
    writeini AVLIST.ini ADRESSES $address($2,2) $2
    msg $chan $c1 added $2 to auto voice list
    /mode $chan +v $2
  }
}
on *:join:#:{
  if ($readini(AVLIST.ini,ADRESSES,$address($nick,2))) {
    /mode $chan +v $nick
  }