SHARE
TWEET

Untitled

a guest Aug 12th, 2017 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. elseif ($regex($1,/^[ $+ %trigger $+ ]co?mba?t?%?/Si)) {
  2.  
  3.  
  4.   var %sn $+(st.,$right($ticks,5)),%host hiscore.runescape.com
  5.   var %address $address($nick,3)
  6.   var %rsn $iif(!$2,$iif($rini(Defname,%address),$v1,$nick),$fname($2-))
  7.   hadd -m %sn output %o
  8.   hadd %sn colour %3
  9.   hadd %sn rsn %rsn
  10.   hadd %sn prsn $iif($rini(Privacy,%address) && !$2,Hidden,%rsn)
  11.   hadd %sn errorout .notice $nick
  12.   hadd %sn cmb $iif(*% iswm $1,cmbperc,yes)
  13.   hadd %sn host %host
  14.   hadd %sn path $+(/index_lite.ws?player=,%rsn)
  15.   sockopen %sn %host 80
  16. }
  17. elseif (st.* iswm $sockname) {
  18.   var %s
  19.   sockread %s
  20.   if (Page isin %s) {
  21.     $output($hget($sockname,output) $logo(%cn,Stats) $c2(%cn,The username) $c1(%cn,$hget($sockname,rsn)) $c2(%cn,was not found in the RuneScape Hiscores.))
  22.     hfree $sockname
  23.     sockclose $sockname
  24.     halt
  25.   }
  26.   if (*unexpected condition* iswm %s) {
  27.     $output($hget($sockname,output) $logo(%cn,Stats) Due to a technical issue Jagex have caused we are currently unable to process your request)
  28.     hfree $sockname
  29.     sockclose $sockname
  30.     halt
  31.   }
  32.   if (*,*,* iswm %s) {
  33.     hinc $sockname snum 1
  34.     tokenize 44 %s
  35.     $iif($hget($sockname,hl),hadd $sockname $+($gettok($s1($hget($sockname,snum)),1,32),Rank) $1)
  36.     $iif($hget($sockname,skill) == $s1($hget($sockname,snum)),hadd $sockname skline %s)
  37.     $iif($hget($sockname,cmb) == cmbperc,hadd $sockname expline $hget($sockname,expline) $3)
  38.     hadd $sockname $gettok($s1($hget($sockname,snum)),1,32) $iif($hget($sockname,hl),$3,$2)
  39.   }
  40.   elseif ($hget($sockname,snum) >= 23) {
  41.     var %b $iif($hget($sockname,hl),2,1)
  42.     while (%b <= 26) {
  43.       var %stat $hget($sockname,$gettok($s1(%b),1,32))
  44.       var %c $gettok($hget($sockname,elg),2,46)
  45.       var %t $gettok($hget($sockname,elg),1,46)
  46.       hadd $sockname statsline $hget($sockname,statsline) $iif(-1 !isin %stat,$+($c1(%cn,$gettok($s3(%b),1,32)),$chr(58),$chr(32),$c2(%cn,%stat),$chr(44),$iif(%b <= 25,$c1(%cn,$chr(124))))))
  47.       $iif($hget($sockname,cmb),hadd $sockname cmbline $hget($sockname,cmbline) %stat)
  48.       $iif($hget($sockname,hl),hadd $sockname hline $hget($sockname,hline) $iif(-1 !isin %stat,$+($v2,$chr(96),$gettok($s1(%b),1,32))))
  49.       $iif($hget($sockname,elg),hadd $sockname elgline $hget($sockname,elgline) $iif(%stat %t %c && -1 !isin %stat,$+($c1(%cn,$gettok($s3(%b),1,32)),$chr(58),$chr(32),$c2(%cn,%stat),$chr(44),$iif(%b <= 25,$c1(%cn,$chr(124))))))
  50.       inc %b
  51.     }
  52.     elseif ($hget($sockname,cmb) == yes) {
  53.       tokenize 32 $hget($sockname,cmbline)
  54.       var %cmbstats $2 $4 $3 $5-8 $25
  55.       if (-1 -1 -1 -1 -1 -1 -1 -1 !isin %cmbstats) {
  56.         $output($hget($sockname,output) $logo(%cn,Combat) $c2(%cn,$hget($sockname,prsn)) $c1(%cn,is level) $c2(%cn,$cmb(%cmbstats)) $c1(%cn,F2P:) $c2(%cn,$gettok($cmb($gettok(%cmbstats,1-7,32)),1,32)) $c1(%cn,ASDCRPM(SU)) $c2(%cn,$remove(%cmbstats,$chr(45))))
  57.         if ($($+($,nextlevel,$chr(40),%cmbstats,$chr(41),.,%cn),2)) {
  58.           var %v1 $v1
  59.           $iif(!$hget($sockname,autocmb),$output($hget($sockname,output) $logo(%cn,Combat) Next level in: %v1))
  60.         }
  61.       }
  62.       else {
  63.         $output($hget($sockname,output) $logo(%cn,Combat) Combat stats of $c2(%cn,$hget($sockname,rsn)) $c1(%cn,are unranked))
  64.       }
  65.       hfree $sockname
  66.       sockclose $sockname
  67.     }
  68.     elseif ($hget($sockname,cmb) == cmbperc) {
  69.       tokenize 32 $hget($sockname,expline)
  70.       var %cmbxp $calc($replace($2-8,$chr(32),+) + $25)
  71.       $output($hget($sockname,output) $logo(%cn,Cmb%) $c2(%cn,$hget($sockname,prsn)) $c1(%cn,has) $c2(%cn,$bytes(%cmbxp,bd)) $c1(%cn,combat exp and) $c2(%cn,$bytes($calc($1 - %cmbxp),bd)) $c1(%cn,skill exp, resulting in a combat percent of) $c2(%cn,$+($round($calc((%cmbxp / $1) *100),2),%)))
  72.       hfree $sockname
  73.       sockclose $sockname
  74.     }
  75.  
  76.     else {
  77.       var %line $hget($sockname,$iif($hget($sockname,elgline),elgline,statsline))
  78.       var %numline $numtok(%line,124)
  79.       var %line $remtok(%line,%numline,124),%elg $elg($gettok($hget($sockname,elg),1,46))
  80.       var %logo $logo(%cn,$+(Stats,$iif(%elg,: %elg $gettok($hget($sockname,elg),2,46))))
  81.       tokenize 44 %line
  82.       $output($hget($sockname,output) %logo $+($c1(%cn,[),$c2(%cn,$hget($sockname,prsn)),$c1(%cn,])) $1-13)
  83.       $iif(%numline >= 14,$output($hget($sockname,output) $logo(%cn,Stats) $remove($14,$chr(124)) $15-26))
  84.       hfree $sockname
  85.       sockclose $sockname
  86.     }
  87.   }
  88. }
RAW Paste Data
Top