Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on $*:TEXT:/^[!@.]top10/Si:#: {
- if (!$skl($2)) && ($2) { notice $nick skill not found | halt }
- if (!$2) {
- var %b $right($ticks,6)
- set %n $nick
- set %top.num $+ %b $chr(48)
- set %top.msg $+ %b $iif($left($1,1) == @,msg #,.notice $nick)
- sockopen top10 $+ %b rscript.org 80
- }
- elseif ($2 != $null) {
- var %b $right($ticks,6)
- set %n $nick
- set %top.num $+ %b $replace($2-,$chr(32),_)
- set %top.msg $+ %b $iif($left($1,1) == @,msg #,.notice $nick)
- sockopen top10 $+ %b rscript.org 80
- }
- }
- on *:sockopen:top10*: {
- sockwrite -nt $sockname GET $iif(%top.num [ $+ [ $right($sockname,6) ] ] == 0,/lookup.php?type=top10&table=0,/lookup.php?type=top10&table= $+ $skilnum(%top.num [ $+ [ $right($sockname,6) ] ])) HTTP/1.1
- sockwrite -nt $sockname Host: rscript.org
- sockwrite -nt $sockname $crlf
- }
- on *:sockread:top10*: {
- var %read
- var %a = 0
- while ($sock($sockname).rq > 0) {
- sockread %read
- echo -a %read
- set %x [ $+ [ $right($sockname,6) ] ] %x [ $+ [ $right($sockname,6) ] ] $gettok(%read,4,32) $chr(40) $+ $gettok(%read,3,32) $+ $chr(41) $chr(124) %a $+ :
- inc %a
- }
- %top.msg [ $+ [ $right($sockname,6) ] ] $chr(40) $+ $upper($iif(%top.num [ $+ [ $right($sockname,6) ] ] == 0, Overall top10,$skl(%top.num [ $+ [ $right($sockname,6) ] ]) top10)) $+ $chr(41) $left($right(%x [ $+ [ $right($sockname,6) ] ],-61),-15)
- sockclose $sockname
- }
- alias skilnum {
- if ($regex($1,/(all|overal(l)?)/i)) return $chr(48)
- if ($regex($1,/att(a(c)?k)?/i)) return 1
- if ($regex($1,/(def(en[sc]e)?)/i)) return 2
- if ($regex($1,/str(ength)?$/i)) return 3
- if ($regex($1,/(h(it)?p(oint[sz])?)/i)) return 4
- if ($regex($1,/^(constitution|cns)/Si)) return 4
- if ($regex($1,/(rang(e|ing)?)/i)) return 5
- if ($regex($1,/(Pray(er)?)/i)) return 6
- if ($regex($1,/(mag(ic|e))/i)) return 7
- if ($regex($1,/(cook(ing)?)/i)) return 8
- if ($regex($1,/(w(ood)?c(utting)?)/i)) return 9
- if ($regex($1,/(fletch(ing)?)/i)) return 10
- if ($regex($1,/fish(ing)?/i)) return 11
- if ($regex($1,/f(ire)?m(aking)?/i)) return 12
- if ($regex($1,/craft(ing)?/i)) return 13
- if ($regex($1,/smith(ing)?/i)) return 14
- if ($regex($1,/(mine|mining)/i)) return 15
- if ($regex($1,/herb(lore)?/i)) return 16
- if ($regex($1,/agil(ity)?/i)) return 17
- if ($regex($1,/thie[fv](ing)?/i)) return 18
- if ($regex($1,/slay(er)?/i)) return 29
- if ($regex($1,/farm(ing)?/i)) return 20
- if ($regex($1,/r(une)?c(raft)?/i)) return 21
- if ($regex($1,/hunt(er|ing)?/i)) return 22
- if ($regex($1,/con(struc(tion)?)/i)) return 23
- if ($regex($1,/summ(on(ing)?)?/i)) return 24
- }
- alias skl {
- if ($regex($1,/^(overall|total)/Si)) { Return Overall }
- if ($regex($1,/^(att|atk|attack)/Si)) { Return Attack }
- if ($regex($1,/^(str|strenth|strength)/Si)) { Return Strength }
- if ($regex($1,/^(def|defence)/Si)) { Return Defence }
- if ($regex($1,/^(hp|hits|hitpoints|hit)/Si)) { Return Constitution }
- if ($regex($1,/^(cn|cns|constitution)/Si)) { Return Constitution }
- if ($regex($1,/^(range|ranged|ranging)/Si)) { Return Ranged }
- if ($regex($1,/^(pray(er)?)/Si)) { Return Prayer }
- if ($regex($1,/^(mage|magic)/Si)) { Return Magic }
- if ($regex($1,/^(cook|cooking)/Si)) { Return Cooking }
- if ($regex($1,/^(wc|wood(cut(ting)?))/Si)) { Return Woodcutting }
- if ($regex($1,/^(fletch|fletching)/Si)) { Return Fletching }
- if ($regex($1,/^(fishing|fish)/Si)) { Return Fishing }
- if ($regex($1,/^(fm|fire|firemaking)/Si)) { Return Firemaking }
- if ($regex($1,/^(craft|crafting)/Si)) { Return Crafting }
- if ($regex($1,/^(smithing|smith)/Si)) { Return Smithing }
- if ($regex($1,/^(mine|mining)/Si)) { Return Mining }
- if ($regex($1,/^(herb|Herblore)/Si)) { Return Herblore }
- if ($regex($1,/^(agil|agility)/Si)) { Return Agility }
- if ($regex($1,/^(theif|theiv|thiev|theiving|thieving)/Si)) { return Thieving }
- if ($regex($1,/^(slay|slayer)/Si)) { Return Slayer }
- if ($regex($1,/^(farm|farming)/Si)) { Return Farming }
- if ($regex($1,/^(rune|rc|runecrafting|runecraft)/Si)) { Return Runecrafting }
- if ($regex($1,/^(hunt|hunting|hunter)/Si)) { return Hunter }
- if ($regex($1,/^(con|construction)/Si)) { return Construction }
- if ($regex($1,/^(sum|summ|summon|summoning)/Si)) { return Summoning }
- if ($regex($1,/^(dun|dungeon|dungeoneering|dung)/Si)) { return Dungeoneering }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement