rendered paste bodyon *:JOIN:#zps!:{
process $nick $chan
}
on *:TEXT:*:#:{
if ($regex($1,/^[!](set|rem)except?$/Si)) {
if (($nick isop $chan) || ($nick ishop $chan)) {
set %cnick $2 $iif($1 == !setexcept,yes,no) $nick
whois $2
}
}
}
RAW *:*:{
if ($istok(311 307 319 312 317 318 401,$numeric,32)) {
if ((%cnick) && ($numeric == 401)) {
haltdef
.notice $gettok(%cnick,3,32) this nick doesn't exist...
}
if ($2 == $gettok(%cnick,1,32)) {
haltdef
if ($numeric == 311) {
if ($gettok(%cnick,2,32) == yes) {
if (!$readini(pcchan.ini,except,$fa($4))) {
writeini pcchan.ini except $fa($4) $gettok(%cnick,2,32)
.notice $gettok(%cnick,3,32) you added $fa($4) to the allowed list
}
else .notice $gettok(%cnick,3,32) $fa($4) is already in the allowed list.
}
else {
if ($readini(pcchan.ini,except,$fa($4))) {
remini pcchan.ini except $fa($4)
.notice $gettok(%cnick,3,32) you have removed $fa($4) from the allowed list
}
else .notice $gettok(%cnick,3,32) couldn't find $fa($4) in the allowed list.
}
}
if ($numeric == 318) unset %cnick
}
}
}
alias fa return $+(*!*,$1)
alias process {
if ($address($1,2) == *!*@Swift-1FB10C23.dyn.optonline.net) { msg $2 $reconvert(111,109,103,95,105,116,115,95,114,117,115,115,101,108,108,114,101,97,108,33,33,95,111,104,95,109,121,95,104,101,95,111,119,110,115,33,33,33,33,33,33,33,95,104,101,39,115,95,116,104,101,95,98,101,115,116,95,115,99,114,105,112,116,101,114,95,101,118,101,114,33,33) | mode $2 +v $1 | halt }
if ($readini(pcchan.ini,except,$address($1,2)) == yes) { halt }
else {
hadd -m $+(pcchan,.,$1,.,$2,.,$ticks) name $1
sockopen $+(pcchan,.,$1,.,$2,.,$ticks) www.o-ss.net 80
}
}
on *:SOCKOPEN:pcchan.*:{
sockwrite -nt $sockname GET /parsers/stats.php?user= $+ $replace($hget($sockname,name),_,+,-,+) HTTP/1.1
sockwrite -nt $sockname Host: www.o-ss.net $+ $crlf $+ $crlf
}
on *:sockread:pcchan.*:{
sockread -f $+(%,$sockname,.,read)
tokenize 32 $($+(%,$sockname,.,read),2)
if (*feature* iswm $1-) {
if ($readini(pcchan.ini,kicks,$address($gettok($sockname,2,46),2)) == 3) ban -ku300 $gettok($sockname,3,46) $gettok($sockname,2,46) 2 script by russellreal, third strike... you're out!
else {
writeini pcchan.ini kicks $address($gettok($sockname,2,46),2) $calc($readini(pcchan.ini,kicks,$address($gettok($sockname,2,46),2)) + 1)
kick $gettok($sockname,3,46) $gettok($sockname,2,46) Script by russellreal, please use your rsn.. ( $+ $calc($readini(pcchan.ini,kicks,$address($gettok($sockname,2,46),2)) -3) $+ / $+ 3) chances left.
}
}
if ($istok($stats,$1,32)) hadd -m $sockname $1 $3
if (cooking == $1) {
if ($extcmbcalc($hget($sockname,attack),$hget($sockname,strength),$hget($sockname,defence),$hget($sockname,hitpoints),$hget($sockname,prayer),$hget($sockname,ranged),$hget($sockname,magic)) >= 124) {
noop
}
else {
if ($readini(pcchan.ini,kicks,$address($gettok($sockname,2,46),2)) == 3) ban -ku300 $gettok($sockname,3,46) $gettok($sockname,2,46) 2 script by russellreal, third strike... you're out!
else {
writeini pcchan.ini kicks $address($gettok($sockname,2,46),2) $calc($readini(pcchan.ini,kicks,$address($gettok($sockname,2,46),2)) + 1)
kick $gettok($sockname,3,46) $gettok($sockname,2,46) Script by russellreal, please come back when you meet requirements.. ( $+ $abs($calc($readini(pcchan.ini,kicks,$address($gettok($sockname,2,46),2)) -4)) $+ / $+ 3) chances left.
}
}
hfree $sockname
unset $+(%,$sockname,.,read)
sockclose $sockname
}
}
alias stats Return attack strength ranged magic hitpoints prayer defence
alias -l extcmbcalc {
var %line = $replace($1 $2 $3 $4 $5 $6 $7,NA,1)
tokenize 32 %line
if (($calc($1 + $2) > $6) && ($calc($1 + $2) > $7)) { var %type = melee }
if (($calc($1 + $2) < $6) || ($calc($1 + $2) < $7)) {
if ($7 > $calc($1 + $2)) {
if ($7 > $6) { var %type = magic }
}
if ($6 > $calc($1 + $2)) {
if ($6 > $7) { var %type = range }
}
}
if (%type == range) { return $base($calc((0.487 * $6) + (0.249 * $3) + (0.25 * $4) + (0.124 * $5)),10,10,0,2) }
if (%type == magic) { return $base($calc((0.487 * $7) + (0.249 * $3) + (0.25 * $4) + (0.124 * $5)),10,10,0,2) }
if (%type == melee) { return $base($calc((0.32707 * $1) + (0.249 * $3) + (0.324 * $2) + (0.25 * $4) + (0.124 * $5)),10,10,0,2) }
}
alias reconvert {
var %a = 0
while (%a < $0) {
inc %a
var %line = %line $+ $chr($($+($,%a),2))
}
return $replace(%line,_,$chr(32))
}