on 19:TEXT:!disconnect:#: { quit !disconnect used by $nick } on *:TEXT:!pestoff:#: { if ( $nick isop $chan && %status == on ) { msg $chan $nick has disabled my scripts. | set %status off } elseif ( $nick isop $chan && %status == off ) { notice $nick My scripts are currently disabled. } } on *:TEXT:!peston:#: { if ( $nick isop $chan && %status == off ) { m msg $chan $nick has enabled my scripts. | set %status on } elseif ( $nick isop $chan && %status == on ) { notice $nick My scripts are currently enabled. } } on *:TEXT:!av*:#: { if ( $nick isop $chan || $nick ishop $chan ) { if ( %status == on ) { /guser 3 $$2 2 /mode $chan +v $$2 /notice $nick $$2 has been added to the AVOICE list. /notice $$2 $nick has added you to the AVOICE list. } elseif ( %status == off ) { halt } } } on 3:JOIN:#: { if ( %status == on ) { mode $chan +v $nick } } on 19:TEXT:!global*:#: { if ( $$2 == act ) { ame $3- } else { amsg 4[Global4] $2- } } on *:TEXT:[-X|Bot-], leave:#: { if ( $nick isop $chan ) { part $chan Parted by $nick } } on 19:TEXT:!join #*:?: { join $$2- close -m } on *:TEXT:!lag:#: { if ( $nick isop $chan ) { msg $chan Currently my lag is %zlag.current $+ s. } } on *:CONNECT: { if ( $network == SwiftIRC ) { msg NickServ IDENTIFY 041692 mode $me +B join #thepc join #thepc.staff password } } on 19:TEXT:!reset:#: { s $server } on 19:TEXT:!say*:#: { msg $chan $2- } on *:TEXT:!change *:#: { if ( $nick isop $chan || $nick ishop $chan ) { if ( %status == off || $nick isvoice $chan ) { halt } else { set %world $$2 set %ht $ctime set %nick $nick amsg 12|| NEW PEST CONTROL WORLD SET BY %nick || } } else { halt } } } on *:TEXT:!world:#: { if ( %status == on ) { notice $nick 4[2Pest-Control4]10 %world 4[2Set by %nick $duration($calc($ctime - %ht)) ago $+ 4] } } on *:TEXT:!pcw:#: { if ( %status == on ) { notice $nick 4[2Pest-Control4]10 %world 4[2Set by %nick $duration($calc($ctime - %ht)) ago $+ 4] } } ;zLagbar by DrunkDwarf on *:start:lag.start on *:unload:lag.unload alias lag.start { if ($version < 6.01) { echo -a * Sorry, this addon does not work with your mIRC verson | unload -rs $lag.q($script) | halt } if ($window(@zLagbar)) { window -ar @zLagbar | clear @zLagbar } else { window -ahBfp +d @zLagbar 0 0 200 21 } if (!%zlag.style) { %zlag.style = graph } if (!$len(%zlag.peak)) { %zlag.peak = 5 } if (!$len(%zlag.colour1)) { %zlag.colour1 = 16776960 } if (!$len(%zlag.colour2)) { %zlag.colour2 = 0 } if (!$len(%zlag.colour3)) { %zlag.colour3 = $rgb(text) } if (!$len(%zlag.font)) { %zlag.font = Verdana } if (!$len(%zlag.font.size)) { %zlag.font.size = 11 } if (!$len(%zlag.delay)) { %zlag.delay = 5 } if (!$len(%zlag.method)) { %zlag.method = pong } if ($len(%zlag.checking)) { unset %zlag.checking } if (!$exists(tempcolour.bmp)) { window -hBpf +d @temp.colour -1 -1 64 64 drawrect -fr @temp.colour $rgb(0,0,0) 1 0 0 64 64 drawsave @temp.colour tempcolour.bmp window -c @temp.colour } drawrect -rf @zLagbar $rgb(face) 1 0 0 200 21 dll $lag.q($scriptdirtbwin.dll) Attach @zLagbar dll $lag.q($scriptdirtbwin.dll) OnSize /lag.size dll $lag.q($scriptdirtbwin.dll) Select @zLagbar if ($appactive) { window -ar @zLagbar } lag.size $dll($lag.q($scriptdirtbwin.dll), GetTBInfo, NOT_USED) if (%zlag.style == graph) { drawline -rn @zLagbar $rgb(shadow) 1 78 0 200 0 drawline -rn @zLagbar $rgb(shadow) 1 78 0 78 21 drawline -rn @zLagbar $rgb(hilight) 1 78 20 199 20 drawline -rn @zLagbar $rgb(hilight) 1 199 1 199 21 drawrect -rnf @zLagbar %zlag.colour2 1 79 1 120 19 } if (%zlag.style == line) { drawline -rn @zLagbar $rgb(shadow) 1 78 0 200 0 drawline -rn @zLagbar $rgb(shadow) 1 78 0 78 21 drawline -rn @zLagbar $rgb(hilight) 1 78 20 199 20 drawline -rn @zLagbar $rgb(hilight) 1 199 1 199 21 drawrect -rnf @zLagbar %zlag.colour2 1 79 1 120 19 } if (%zlag.style == bar) { drawline -rn @zLagbar $rgb(shadow) 1 78 5 200 5 drawline -rn @zLagbar $rgb(shadow) 1 78 5 78 16 drawline -rn @zLagbar $rgb(hilight) 1 78 15 199 15 drawline -rn @zLagbar $rgb(hilight) 1 199 5 199 16 drawrect -rnf @zLagbar %zlag.colour2 1 79 6 120 9 } var %temp.textpos = $round($calc((21 - $height(Lag:,%zlag.font,%zlag.font.size)) / 2)),0) drawtext -rnc @zLagbar %zlag.colour3 %zlag.font %zlag.font.size 1 %temp.textpos 75 18 Lag: N/A drawdot @zLagbar lag.check .timerlag -io 0 %zlag.delay lag.check } alias lag.refresh { drawrect -nrf @zLagbar $rgb(face) 1 0 0 200 21 if ($readini($mircini,Background,toolbar)) { lag.temp.bkg if (%zlag.style == bar) { drawpic -nsl @zLagbar 78 0 122 5 $calc($gettok(%zlag.pos,1,32) + 78) $gettok(%zlag.pos,2,32) 122 5 $lag.q($scriptdirlagbkg.bmp) drawpic -nsl @zLagbar 78 16 122 5 $calc($gettok(%zlag.pos,1,32) + 78) $calc($gettok(%zlag.pos,2,32) + 16) 122 5 $lag.q($scriptdirlagbkg.bmp) } drawpic -nsl @zLagbar 0 0 78 21 %zlag.pos 78 21 $lag.q($scriptdirlagbkg.bmp) drawdot @zLagbar } if (%zlag.style == graph) { drawline -rn @zLagbar $rgb(shadow) 1 78 0 200 0 drawline -rn @zLagbar $rgb(shadow) 1 78 0 78 21 drawline -rn @zLagbar $rgb(hilight) 1 78 20 199 20 drawline -rn @zLagbar $rgb(hilight) 1 199 1 199 21 drawrect -rnf @zLagbar %zlag.colour2 1 79 1 120 19 } if (%zlag.style == line) { drawline -rn @zLagbar $rgb(shadow) 1 78 0 200 0 drawline -rn @zLagbar $rgb(shadow) 1 78 0 78 21 drawline -rn @zLagbar $rgb(hilight) 1 78 20 199 20 drawline -rn @zLagbar $rgb(hilight) 1 199 1 199 21 drawrect -rnf @zLagbar %zlag.colour2 1 79 1 120 19 } if (%zlag.style == bar) { drawline -rn @zLagbar $rgb(shadow) 1 78 5 200 5 drawline -rn @zLagbar $rgb(shadow) 1 78 5 78 16 drawline -rn @zLagbar $rgb(hilight) 1 78 15 199 15 drawline -rn @zLagbar $rgb(hilight) 1 199 5 199 16 drawrect -rnf @zLagbar %zlag.colour2 1 79 6 120 9 } var %temp.textpos = $round($calc((21 - $height(Lag:,%zlag.font,%zlag.font.size)) / 2)),0) drawtext -rnc @zLagbar %zlag.colour3 %zlag.font %zlag.font.size 1 %temp.textpos 75 18 Lag: $iif(%zlag.current,%zlag.current $+ s,N/A) drawdot @zLagbar } alias lag.check { if ($appactive) { window -ar @zLagbar } if ($server) { if (%zlag.checking) return if (%zlag.method == pong) { raw -q ping lag. [ $+ [ $ticks ] ] } if (%zlag.method == ctcp) { .ctcp $me lag. [ $+ [ $ticks ] ] } if (%zlag.method == raw) { lag. [ $+ [ $ticks ] ] } set -u60 %zlag.checking on } } alias lag.size { %zlag.pos = $calc($1 - 204) $int($calc(($2 - 18) / 2)) if ($readini($mircini,Background,toolbar)) { lag.temp.bkg if (%zlag.style == bar) { drawpic -nsl @zLagbar 78 0 122 5 $calc($gettok(%zlag.pos,1,32) + 78) $gettok(%zlag.pos,2,32) 122 5 $lag.q($scriptdirlagbkg.bmp) drawpic -nsl @zLagbar 78 16 122 5 $calc($gettok(%zlag.pos,1,32) + 78) $calc($gettok(%zlag.pos,2,32) + 16) 122 5 $lag.q($scriptdirlagbkg.bmp) } drawpic -nsl @zLagbar 0 0 78 21 %zlag.pos 78 21 $lag.q($scriptdirlagbkg.bmp) drawdot @zLagbar } window @zLagbar %zlag.pos 200 21 } on *:close:@zLagbar:{ dll $lag.q($scriptdirtbwin.dll) Detach @zLagbar } menu @zLagbar { Style .$iif(%zlag.style == graph,$style(1)) Graph:{ set %zlag.style graph | lag.refresh } .$iif(%zlag.style == line,$style(1)) Line Graph:{ set %zlag.style line | lag.refresh } .$iif(%zlag.style == bar,$style(1)) Percent bar:{ set %zlag.style bar | lag.refresh } Colour .Text:{ set %temp.coloursel 3 | set %temp.colour3 $dialog(lagcolour.select,lagcolour.select,-2) | if ($len(%temp.colour3)) { set %zlag.colour3 %temp.colour3 | lag.refresh } | unset %temp.colour* } .Foreground:{ set %temp.coloursel 1 | set %temp.colour1 $dialog(lagcolour.select,lagcolour.select,-2) | if ($len(%temp.colour1)) { set %zlag.colour1 %temp.colour1 | lag.refresh } | unset %temp.colour* } .Background:{ set %temp.coloursel 2 | set %temp.colour2 $dialog(lagcolour.select,lagcolour.select,-2) | if ($len(%temp.colour2)) { set %zlag.colour2 %temp.colour2 | lag.refresh } | unset %temp.colour* } Method .$iif(%zlag.method == pong,$style(1)) Pong:{ %zlag.method = pong } .$iif(%zlag.method == ctcp,$style(1)) CTCP:{ %zlag.method = ctcp } .$iif(%zlag.method == raw,$style(1)) Raw:{ %zlag.method = raw } Font:{ var %temp.font = $$?="Enter Font" | var %temp.font.size = $$?="Enter Font Size" | if (%temp.font) { %zlag.font = %temp.font } | if (%temp.font.size) { %zlag.font.size = %temp.font.size } } Peak $chr(40) $+ %zlag.peak $+ s $+ $chr(41):{ var %zlag.temp.peak = $$?="Enter Peak number of seconds" | if (%zlag.temp.peak isnum) { %zlag.peak = %zlag.temp.peak } } Delay $chr(40) $+ %zlag.delay $+ s $+ $chr(41):{ var %zlag.temp.delay = $$?="Enter Delay" | if (%zlag.temp.delay isnum) { %zlag.delay = %zlag.temp.delay | .timerlag -io 0 %zlag.delay lag.check } } - Reset to Defaults:{ lag.var.default } - Unload Lagbar:{ unload -rs $lag.q($script) | halt } } on ^*:pong:{ if (lag.* iswm $2) && (%zlag.method == pong) { lag.reply $gettok($2,2,46) | haltdef } } ctcp *:lag.*:?:{ if ($nick == $me) && ($gettok($1,2,46) isnum) && (%zlag.method == ctcp) { lag.reply $gettok($1,2,46) | haltdef } } raw 421:*:{ if (%zlag.method == raw) && (lag.* iswm $2) { lag.reply $gettok($2,2,46) | haltdef } } alias lag.reply { if ($1) { unset %zlag.checking if (!%zlag.style) { %zlag.style = graph } if (!$len(%zlag.peak)) { %zlag.peak = 5 } if (!$len(%zlag.colour1)) { %zlag.colour1 = 16776960 } if (!$len(%zlag.colour2)) { %zlag.colour2 = 0 } if (!$len(%zlag.colour3)) { %zlag.colour3 = $rgb(text) } if (!$len(%zlag.font)) { %zlag.font = Verdana } if (!$len(%zlag.font.size)) { %zlag.font.size = 11 } if (!$len(%zlag.method)) { %zlag.method = pong } %zlag.old = %zlag.current %zlag.current = $calc(($ticks - $1) / 1000) %zlag.perc = $round($calc(%zlag.current * 100 / %zlag.peak),0) %zlag.perc = $iif(%zlag.perc > 100,100,%zlag.perc) %zlag.perc2 = $calc((18 / 100) * %zlag.perc) if (%zlag.current > %zlag.highest) || (!%zlag.highest) { %zlag.highest = %zlag.current } if (%zlag.current < %zlag.lowest) || (!%zlag.lowest) { %zlag.lowest = %zlag.current } if ($appactive) { window -a @zLagbar } drawrect -nrf @zLagbar $rgb(face) 1 0 0 78 21 if ($readini($mircini,Background,toolbar)) { lag.temp.bkg drawpic -nsl @zLagbar 0 0 78 21 %zlag.pos 78 21 $lag.q($scriptdirlagbkg.bmp) } var %temp.textpos = $round($calc((21 - $height(Lag:,%zlag.font,%zlag.font.size)) / 2)),0) drawtext -nrc @zLagbar %zlag.colour3 %zlag.font %zlag.font.size 1 %temp.textpos 75 18 Lag: %zlag.current $+ s if (%zlag.style == bar) { if ($readini($mircini,Background,toolbar)) { lag.temp.bkg drawpic -nsl @zLagbar 78 0 122 5 $calc($gettok(%zlag.pos,1,32) + 78) $gettok(%zlag.pos,2,32) 122 5 $lag.q($scriptdirlagbkg.bmp) drawpic -nsl @zLagbar 78 16 122 5 $calc($gettok(%zlag.pos,1,32) + 78) $calc($gettok(%zlag.pos,2,32) + 16) 122 5 $lag.q($scriptdirlagbkg.bmp) } if (!$readini($mircini,Background,toolbar)) { drawrect -nrf @zLagbar $rgb(face) 1 78 0 122 5 drawrect -nrf @zLagbar $rgb(face) 1 78 16 122 5 } drawrect -rnf @zLagbar %zlag.colour2 1 79 6 120 9 drawrect -nrf @zLagbar %zlag.colour1 1 79 6 $calc((120 / 100) * %zlag.perc) 9 } if (%zlag.style == graph) || (!%zlag.style) { drawline -rn @zLagbar %zlag.colour2 1 198 19 198 0 drawline -rn @zLagbar %zlag.colour1 1 198 19 198 $calc(19 - %zlag.perc2) drawscroll -n @zLagbar -1 0 79 1 120 19 } if (%zlag.style == line) { var %zlag.oldperc = $round($calc(%zlag.old * 100 / %zlag.peak),0) var %zlag.oldperc = $iif(%zlag.oldperc > 100,100,%zlag.oldperc) var %zlag.oldperc2 = $calc((18 / 100) * %zlag.oldperc) drawscroll -n @zLagbar -4 0 79 1 120 19 drawrect -rfn @zLagbar %zlag.colour2 1 194 1 5 19 drawline -rn @zLagbar %zlag.colour1 1 198 $calc(19 - %zlag.perc2) 192 $calc(19 - %zlag.oldperc2) } drawdot @zLagbar unset %zlag.perc %zlag.perc2 } } alias lag { if ($isid) { if ($1 == highest) { return %zlag.highest } if ($1 == lowest) { return %zlag.lowest } return %zlag.current } if (!$isid) { set %zlag.temp.message $chr(91) $+ Lag: %zlag.current $+ s $chr(40) $+ Highest: %zlag.highest $+ s Lowest: %zlag.lowest $+ s $+ $chr(41) $+ $chr(93) if ($active ischan) || ($query($active)) { msg $active %zlag.temp.message } else { echo $colour(info text).dd -at * %zlag.temp.message } unset %zlag.temp.message } } alias lag.unload { .timerlag off | dll $lag.q($scriptdirtbwin.dll) Detach @zLagbar | window -c @zLagbar } dialog lagcolour.select { title "Select Colour" size -1 -1 273 102 scroll "", 1, 48 7 150 16, range 255 horizontal bottom scroll "", 2, 48 31 150 16, range 255 horizontal bottom scroll "", 3, 48 55 150 16, range 255 horizontal bottom button "Ok", 4, 127 79 70 21, ok icon 5, 205 7 64 64, tempcolour.bmp, 0, noborder edit "", 6, 3 5 40 21 edit "", 7, 3 29 40 21 edit "", 8, 3 53 40 21 edit "", 9, 30 78 70 21, result hide button "Cancel", 10, 201 79 70 21, cancel } on *:dialog:lagcolour.select:init:*:{ if (%temp.coloursel) { set %temp.colourrgb $rgb(%zlag.colour [ $+ [ %temp.coloursel ] ]) did -a $dname 6 $gettok(%temp.colourrgb,1,44) | did -a $dname 7 $gettok(%temp.colourrgb,2,44) | did -a $dname 8 $gettok(%temp.colourrgb,3,44) | did -a $dname 9 %zlag.colour [ $+ [ %temp.coloursel ] ] did -c $dname 1 $gettok(%temp.colourrgb,1,44) | did -c $dname 2 $gettok(%temp.colourrgb,2,44) | did -c $dname 3 $gettok(%temp.colourrgb,3,44) } if (!%temp.coloursel) { did -a $dname 6 0 | did -a $dname 7 0 | did -a $dname 8 0 | did -a $dname 9 0 } window -hBpf +d @temp.colour -1 -1 64 64 drawrect -fr @temp.colour $rgb($did(6),$did(7),$did(8)) 1 0 0 64 64 drawsave @temp.colour tempcolour.bmp did -g $dname 5 tempcolour.bmp } on *:dialog:lagcolour.select:scroll:*:{ if ($did == 1) { did -o $dname 6 1 $did(1).sel } if ($did == 2) { did -o $dname 7 1 $did(2).sel } if ($did == 3) { did -o $dname 8 1 $did(3).sel } if ($istok(1 2 3,$did,32)) { drawrect -fr @temp.colour $rgb($did(6),$did(7),$did(8)) 1 0 0 64 64 drawsave @temp.colour tempcolour.bmp did -g $dname 5 tempcolour.bmp did -o $dname 9 1 $rgb($did(6),$did(7),$did(8)) } } on *:dialog:lagcolour.select:edit:*:{ if ($did == 6) { if (!$len($did(6))) || ($did(6) !isnum) { did -o $dname 6 1 0 } | did -c $dname 1 $did(6) } if ($did == 7) { if (!$len($did(7))) || ($did(7) !isnum) { did -o $dname 7 1 0 } | did -c $dname 2 $did(7) } if ($did == 8) { if (!$len($did(8))) || ($did(8) !isnum) { did -o $dname 8 1 0 } | did -c $dname 3 $did(8) } if ($istok(6 7 8,$did,32)) { drawrect -fr @temp.colour $rgb($did(6),$did(7),$did(8)) 1 0 0 64 64 drawsave @temp.colour tempcolour.bmp did -g $dname 5 tempcolour.bmp did -o $dname 9 1 $rgb($did(6),$did(7),$did(8)) } } on *:dialog:lagcolour.select:close:*:{ window -c @temp.colour } alias lag.temp.bkg { if ($exists($readini($mircini,Background,Toolbar))) { if (!%zlag.temp.crc) || (%zlag.temp.crc != $crc($readini($mircini,Background,Toolbar))) { window -hBfp +d @zlagtemp -1 -1 $window(-1).dw 100 drawpic -sl @zlagtemp 0 0 $window(-1).dw 100 $lag.q($readini($mircini,Background,Toolbar)) drawsave @zlagtemp $lag.q($scriptdirlagbkg.bmp) window -c @zlagtemp %zlag.temp.crc = $crc($readini($mircini,Background,Toolbar)) } } } alias lag.var.default { %zlag.peak = 5 %zlag.colour1 = 16776960 %zlag.colour2 = 0 %zlag.colour3 = $rgb(text) %zlag.font = Verdana %zlag.font.size = 11 %zlag.delay = 5 } alias lag.q { return " $+ $1- $+ " } alias c1 { return $+(12,$1-) } alias c2 { return $+(04,$1-) } on *:text:*:#: { tokenize 32 $strip($1-) if ($left($1,1) !isin @!.) halt if ($right($1,-1) == stats) var %style = astats elseif ($regex($1,/co?mb(at)?/Si)) var %style = combat elseif ($setskill($remove($1,@,!,.))) var %style = istat, %skill = $setskill($remove($1,@,!,.)) elseif ($right($1,-1) == defname) && ($2) { writeini DefRSN.ini RSNs $mask($fulladdress,3) $replace($2-,$chr(32),-) .notice $nick 7You're default RSN for the host 4 $mask($fulladdress,3) 7has been set to $2- halt } else halt inc %ID if ($len($2-) > 12) { 4 $($+(%,stats.display.,%ID),2) $c1(The nick) $c2($2-) $c1(is too long) cleanup %ID halt } elseif ($2) set $+(%,stats.rsn.,%ID) $replace($2-,$chr(32),-) elseif ($readini(DefRSN.ini,RSNs,$mask($fulladdress,3))) set $+(%,stats.rsn.,%ID) $ifmatch elseif ($readini(DefRSN.ini,RSNs,$nick)) set $+(%,stats.rsn.,%ID) $ifmatch else set $+(%,stats.rsn.,%ID) $nick set $+(%,stats.style.,%ID) %style set $+(%,stats.skill.,%ID) %skill set $+(%,stats.display.,%ID) $iif($left($1,1) == @,msg $chan,notice $nick) sockopen $+(stats.,%ID) hiscore.runescape.com 80 } on *:sockopen:stats.*: { var %id = $gettok($sockname,2,46) sockwrite -n $sockname GET /lang/en/aff/runescape/hiscorepersonal.ws?user1= $+ $($+(%,stats.rsn.,%ID),2) HTTP/1.1 sockwrite -n $sockname Host: hiscore.runescape.com $+ $crlf $+ $crlf } on *:sockread:stats.*: { sockread &Incoming bwrite $sockname -1 -1 &Incoming if ($bfind(&Incoming, 1, ).text) makehash $sockname elseif ($bfind(&Incoming, 1, does not feature in the hiscores.).text) { $($+(%,stats.display.,%ID),2) $c1(The nick) $c2($($+(%,stats.rsn.,%ID),2)) $c1(Does not appear in the hiscores) cleanup $gettok($sockname,2,46) } } alias -l makehash { var %file = $1 bread %file 1 $file(%file).size &stats var %currentstat, %x = 1 while (%x) { var %x = $bfind(&stats,$calc(%x + 1),