All pastes #944865 Raw Edit

Unnamed

public text v1 · immutable
·published 2008-03-16 14:54 UTC
rendered paste body
menu * {
  Power Script!
  .Say To Channel: /update |  msg $active  14[7« I'm on  ( $+ $chan($me) $+ / $+ 30  ) $+([,$remove($round($calc($chan($me) / 30*100),1),.0),%,]) Channels, Opped In ( $+ %1opped $+ / $+ $chan($me) $+ ) $+([,$remove($round($calc(%1opped / $chan($me)*100),1),.0),%,]) $+ , Voiced In ( $+ %1voice $+ / $+ $chan($me) $+ ) $+([,$remove($round($calc(%1voice / $chan($me)*100),1),.0),%,]) $+ , I Have Power Over ( $+ $calc(%1o.p - %1opped) $+ / $+ $calc(%1users - $chan($me)) $+ ) $+([,$remove($round($calc((%1o.p / %1users)*100),1),.0),%,]) Users. 7»14] | unset %1* 
  .Say To Channel (With Kick/Ban Count): /update | msg $active  14[7« I'm on  ( $+ $chan($me) $+ / $+ 30  ) $+([,$remove($round($calc($chan($me) / 30*100),1),.0),%,]) Channels, Opped In ( $+ %1opped $+ / $+ $chan($me) $+ ) $+([,$remove($round($calc(%1opped / $chan($me)*100),1),.0),%,]) $+ , Voiced In ( $+ %1voice $+ / $+ $chan($me) $+ ) $+([,$remove($round($calc(%1voice / $chan($me)*100),1),.0),%,]) $+ , Kicked ( $+ %kick.count $+ ), Banned ( $+ %ban.count $+ ), I Have Power Over ( $+ $calc(%1o.p - %1opped) $+ / $+ $calc(%1users - $chan($me)) $+ ) $+([,$remove($round($calc((%1o.p / %1users)*100),1),.0),%,]) Users. 7»14] | unset %1*
  .About Information:/dialog -m about about
  .Power Information:{
    if (!$dialog(power)) {
      /dialog -m power power
      halt 
    }
  }
}


dialog about {
  title "Power Script By Sw1ft v1.0"
  size -1 -1 250 180
  option bdu

  text "Power Script By Sw1ft v1.0, Copyright @ #Royal-Cup @ Quakenet.org, If you Need Help Or Have Any Query's Contact Me, Thank You For Using My script :)",23,25 55 200 150,read
}

dialog power {
  title "Power Script By Sw1ft v1.0"
  size -1 -1 155 150
  option dbu

  menu "&File",1
  item "&Refresh",2
  item "&Say to Channel",3
  item "&About",4
  item "&Exit",5,ok

  button "Say To Channel (With Kick/Ban count)",97, 20 118 100 10
  button "Say To Channel",98,20 105 100 10
  text "Information",99,50 10 40 10

  text "Channels:",6,5 20 50 24
  edit "",7,47 20 85 9,read,center
  text "Total Users:",8,5 30 50 24
  edit "",9,47 30 45 8,read
  text "Total Opped:",10,5 40 50 24
  edit "",11,47 40 45 8,read
  text "Total Voiced:",12,5 50 50 24
  edit "",13, 47 50 45 8,read
  text "Users Protected:",14,5 60 50 24
  edit "",15, 47 60 45 8,read
  text "Channel Count:",16,5 70 50 24
  edit "",17, 47 70 45 8,read
  text "Kicked:",18, 5 80 50 24
  edit "",19, 47 80 45 8,read
  text "Banned:",20,5 90 50 24
  edit "",21, 47 90 45 8,read

  text "Power Script By Sw1ft v1.0",100,24 130 100 10,(center)
}


on 1:dialog:power:init:*:{ 
  /update
  did -ra $dname 17 $chan($me)
  did -ra $dname 15 $calc(%1o.p - %1opped)
  did -ra $dname 11 %1opped
  did -ra $dname 9 $calc(%1users - $chan($me))
  did -ra $dname 7 %1channels
  did -ra $dname 13 %1voice
  did -ra $dname 19 %kick.count
  did -ra $dname 21 %ban.count
} 


on 1:dialog:power:close:*:{
  unset %1*  
}

on 1:dialog:power:sclick:*:{
  if ($did == 18) {
    unset %1*
    /update
    did -ra $dname 17 $chan($me)
    did -ra $dname 15 $calc(%1o.p - %1opped)
    did -ra $dname 11 %1opped
    did -ra $dname 9 $calc(%1users - $chan($me))
    did -ra $dname 7 %1channels
    did -ra $dname 13 %1voice
    did -ra $dname 19 %kick.count
    did -ra $dname 21 %ban.count
  }
  if ($did == 98) {
    msg $active  14[7« I'm on  ( $+ $chan($me) $+ / $+ 30  ) $+([,$remove($round($calc($chan($me) / 30*100),1),.0),%,]) Channels, Opped In ( $+ %1opped $+ / $+ $chan($me) $+ ) $+([,$remove($round($calc(%1opped / $chan($me)*100),1),.0),%,]) $+ , Voiced In ( $+ %1voice $+ / $+ $chan($me) $+ ) $+([,$remove($round($calc(%1voice / $chan($me)*100),1),.0),%,]) $+ , I Have Power Over ( $+ $calc(%1o.p - %1opped) $+ / $+ $calc(%1users - $chan($me)) $+ ) $+([,$remove($round($calc((%1o.p / %1users)*100),1),.0),%,]) Users. 7»14] 
  }
  if ($did == 97) {
    msg $active  14[7« I'm on  ( $+ $chan($me) $+ / $+ 30  ) $+([,$remove($round($calc($chan($me) / 30*100),1),.0),%,]) Channels, Opped In ( $+ %1opped $+ / $+ $chan($me) $+ ) $+([,$remove($round($calc(%1opped / $chan($me)*100),1),.0),%,]) $+ , Voiced In ( $+ %1voice $+ / $+ $chan($me) $+ ) $+([,$remove($round($calc(%1voice / $chan($me)*100),1),.0),%,]) $+ , Kicked ( $+ %kick.count $+ ), Banned ( $+ %ban.count $+ ), I Have Power Over ( $+ $calc(%1o.p - %1opped) $+ / $+ $calc(%1users - $chan($me)) $+ ) $+([,$remove($round($calc((%1o.p / %1users)*100),1),.0),%,]) Users. 7»14] 
  }
}

on 1:dialog:power:menu:*:{
  if ($did == 2) { 
    /update 
  }
  if ($did == 3) { 
    msg $active  14[7« I'm on  ( $+ $chan($me) $+ / $+ 30  ) $+([,$remove($round($calc($chan($me) / 30*100),1),.0),%,]) Channels, Opped In ( $+ %1opped $+ / $+ $chan($me) $+ ) $+([,$remove($round($calc(%1opped / $chan($me)*100),1),.0),%,]) $+ , Voiced In ( $+ %1voice $+ / $+ $chan($me) $+ ) $+([,$remove($round($calc(%1voice / $chan($me)*100),1),.0),%,]) $+ , I Have Power Over ( $+ $calc(%1o.p - %1opped) $+ / $+ $calc(%1users - $chan($me)) $+ ) $+([,$remove($round($calc((%1o.p / %1users)*100),1),.0),%,]) Users. 7»14] 
  }
  if ($did == 4) { 
    /dialog -m about about 
  }
}




alias update {
  if ($server) {
    var %i = $comchan($me,0) 
    while (%i) { 
      if ($me isop $comchan($me,%i)) {
        inc %1o.p $nick($comchan($me,%i),0) 
      inc %1opped }
      if ($me isvoice $comchan($me,%i)) {
        inc %1voice 
      }
      inc %1users $nick($comchan($me,%i),0) 
      set %1channels $addtok(%1channels,$comchan($me,%i),44) 
      dec %i 
    }
  }
}