Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Runescript Script:
- [quote]
- Commands:
- !stats username
- !skill username
- !combat username
- .!defname username
- Extra Info: I added auto protection for hacking it, there is an auto 6sec ignore on any user who triggers to prevent flooding/spam/etc.. , and I added support for channels with mode +c, and you can pm the bot for the script aswell
- All aliases required have been added, although I didnt make an item to next level thing, Im not doing all the work for ya lol
- btw: combat alias is smooth's cause his owns and i blow at math :D
- [/quote]
- [code]
- alias pcp { return $calc($floor($calc(($1 * $1) / 600)) * 35) }
- alias s1 { return $iif(c isincs $chan($1).mode,$strip($2-),$+($chr(3),10,$2-)) }
- alias s2 { return $iif(c isincs $chan($1).mode,$strip($2-),$+($chr(3),07,$2-)) }
- alias s3 { return $iif(c isincs $chan($1).mode,$strip($2-),$+($chr(3),03,$2-)) }
- alias fskill {
- return $findtok(Stats.Atk.Def.Str.Hp.Range.Pray.Mage.Cook.Wc.Fletch.Fish.Fm.Craft.Smith.Mine.Herb.Agil.Thief.Slay.Farm.Rc.Hunt.Con.Summ.Dung,$1,46)
- }
- alias gskill {
- return $gettok(Stats.Attack.Defence.Strength.Hitpoints.Ranged.Prayer.Magic.Cooking.Woodcutting.Fletch.Fish.Firemake.Craft.Smith.Mine.Herb.Agility.Thief.Slayer.Farm.Rc.Hunt.Construct.Summon.Dungeoneering,$1,46)
- }
- alias iSkill {
- if ($regex($1,/^(cmb|combat)$/Si)) return Combat
- elseif ($1 == 1) || ($regex($1,/^(rsstats|stats|overall)$/Si)) return Stats
- elseif ($1 == 2) || ($regex($1,/^at(t|k|tack)$/Si)) return Atk
- elseif ($1 == 3) || ($regex($1,/^def(en[cs]e)?$$/Si)) return Def
- elseif ($1 == 4) || ($regex($1,/^str(ength|enght)?$/Si)) return Str
- elseif ($1 == 5) || ($regex($1,/^hp|hit(s|points?)?$/Si)) return Hp
- elseif ($1 == 6) || ($regex($1,/^range(r|d|ing)?$/Si)) return Range
- elseif ($1 == 7) || ($regex($1,/^Pray(er)?$$/Si)) return Pray
- elseif ($1 == 8) || ($regex($1,/^mag(e|ic)$$/Si)) return Mage
- elseif ($1 == 9) || ($regex($1,/^cook(ing)?$/Si)) return Cook
- elseif ($1 == 10) || ($regex($1,/^wc|wood(cut(ting)?)?$/Si)) return Wc
- elseif ($1 == 11) || ($regex($1,/^fletch(ing)?$/Si)) return Fletch
- elseif ($1 == 12) || ($regex($1,/^fish(ing)?$/Si)) return Fish
- elseif ($1 == 13) || ($regex($1,/^(fire|fm)(make?(ing)?|ing)?$/Si)) return Fm
- elseif ($1 == 14) || ($regex($1,/^craft(ing)?$/Si)) return Craft
- elseif ($1 == 15) || ($regex($1,/^(smith|smelt)(ing)?$/Si)) return Smith
- elseif ($1 == 16) || ($regex($1,/^min(e|ing)?$/Si)) return Mine
- elseif ($1 == 17) || ($regex($1,/^herb(law|lore)?$/Si)) return Herb
- elseif ($1 == 18) || ($regex($1,/^agil(ity)?$/Si)) return Agil
- elseif ($1 == 19) || ($regex($1,/^(th(ei|ie)[fv](e|ing)?)$/Si)) return Thief
- elseif ($1 == 20) || ($regex($1,/^slay(er|ing)?$/Si)) return Slay
- elseif ($1 == 21) || ($regex($1,/^farm(er|ing)?$/Si)) return Farm
- elseif ($1 == 22) || ($regex($1,/^(rc|runecraft)(er|ing)?$/Si)) return Rc
- elseif ($1 == 23) || ($regex($1,/^hunt(er|ing)?$/Si)) return Hunt
- elseif ($1 == 24) || ($regex($1,/^(con|construct)(ion|ing)?$/si)) return Con
- elseif ($1 == 25) || ($regex($1,/^(summon)(ing)?$/si)) return Summ
- elseif ($1 == 26) || ($regex($1,/^(dg|dun)?(g|ge|geon|geoneering)?$/si)) return Dungeoneering
- }
- alias exp {
- /var %x = 1, %level = $calc($1 - 1), %xp = 0
- /while (%x <= %level) {
- /var %tempxp = $calc($floor($calc(%x + 300 * 2 ^ (%x / 7))) / 4)
- /inc %xp %tempxp
- /inc %x
- }
- /return $int(%xp)
- }
- alias cmb {
- tokenize 46 $1-
- var %att = $calc($2 * 100), %btt = $calc($4 * 100), %ett = $calc($1 * 130), %ftt = $calc($3 * 130)
- var %ctt = $iif($and($6,1) == 1,$calc($calc($6 - 1) * 50),$calc($6 * 50)), %dtt = $iif($and($8,1) == 1,$calc($calc($8 - 1) * 50),$calc($8 * 50))
- var %gtt = $iif($and($5,1) == 1,$calc($calc($calc($5 - 1) + $calc($5 * 2)) * 65),$calc($5 * 195)), %htt = $iif($and($7,1) == 1,$calc($calc($calc($7 - 1) + $calc($7 * 2)) * 65),$calc($7 * 195))
- var %base = $calc($calc(%att + %btt + %ctt + %dtt) / 400), %mclass = $calc($calc(%ett + %ftt) / 400), %rclass = $calc(%gtt / 400), %maclass = $calc(%htt / 400)
- if ((%mclass > %rclass) && (%mclass > %maclass)) { return $calc(%mclass + %base) Melee Based }
- elseif ((%rclass > %mclass) && (%rclass > %maclass)) { return $calc(%rclass + %base) Ranged Based }
- elseif ((%maclass > %mclass) && (%maclass > %rclass)) { return $calc(%maclass + %base) Magic Based }
- }
- On $*:TEXT:/^[!.](def|set)(name|rsn)/Si:*: {
- if ($count($1-,$,%,#,^,&,*) > 0) { halt }
- if ($len($2-) <= 12) && ($len($2-) >= 3) {
- writeini -n DefRSN.ini $address($nick,3) rsn $replace($2-,$chr(32),_)
- notice $nick Hostmask $address($nick,3) Has been registred to the name: $2-
- }
- else { notice $nick Error in trying to set a defname }
- }
- on $*:TEXT:/^.\D/S:*:{
- if (!$iSkill($right($1,-1))) { halt }
- if ($count($1-,$,%,#,^,&,*) > 0) { msg $chan $s1($chan,[) $s2($chan,ERROR) $s1($chan,]) $s1($chan,:) $s1($chan,Illegal characters detected, 60 second ignore to prevent abuse) | .ignore $+(-pcntikdu,60) $address($nick,2) | halt }
- var %lookup = $iSkill($right($1,-1))
- var %z = $+($r(1,100),$r(1,100),$r(1,100),$r(1,100),$r(1,100),$r(1,100),$r(1,100),$r(1,100))
- sockopen $+(stats,.%z) hiscore.runescape.com 80
- sockmark $+(stats,.%z) $+($iif($query($nick),.msg $nick,$iif($left($1,1) == @,msg $chan,notice $nick)),.,$iif($2,$replace($2-,$chr(32),_),$iif($readini(DefRSN.ini,$address($nick,3),rsn),$v1,$replace($nick,$chr(32),_))),.,%lookup,.,$iif($query($nick),$nick,$chan))
- .ignore $+(-pcntikdu,6) $address($nick,2)
- if ($query($nick)) { close -m }
- }
- on *:SOCKOPEN:stats.*: {
- tokenize 46 $sock($sockname).mark
- if ($len($2) > 12) || ($len($2) < 3) {
- $1 $s1($4,[) $s2($4,ERROR) $s1($4,]) $s1($4,:) $s1($4,Please specify a RSN less then) $s2($4,12) $s1($4,characters and greater then) $s2($4,3)
- }
- else {
- sockwrite -n $sockname GET $+(/index_lite.ws?player=,$2) HTTP/1.1
- sockwrite -n $sockname Host: hiscore.runescape.com $+ $crlf $+ $crlf
- }
- }
- on *:SOCKREAD:stats.*: {
- var %chan = $gettok($sock($sockname).mark,4,46)
- if ($sockerr) {
- $gettok($sock($sockname).mark,1,46) $s1(%chan,Socket Error)
- halt
- }
- var %stats
- sockread %stats
- if (*404 - Page not found* iswm %stats) {
- $gettok($sock($sockname).mark,1,46) $s1(%chan,[) $s2(%chan,ERROR) $s1(%chan,]) $s1(%chan,:) $s2(%chan,$gettok($sock($sockname).mark,2,46)) $s1(%chan,not found in highscores)
- sockclose $sockname
- halt
- }
- if (*,*,* iswm %stats) {
- tokenize 44 %stats
- sockmark $sockname $+($gettok($sock($sockname).mark,1-,46),.,$+($1 $2 $3))
- }
- }
- on *:SOCKCLOSE:stats.*: {
- var %lookup = $gettok($sock($sockname).mark,3,46),%chan = $gettok($sock($sockname).mark,4,46),%s = $gettok($sock($sockname).mark,5-,46)
- var %loc = $fskill(%lookup),%sloc = $gskill(%loc)
- if (%lookup == Stats) {
- var %t = 1 | while (%t <= 25) { var %g %g $+($s1(%chan,$iSkill(%t)),$chr(32),$s2(%chan,$gettok($gettok(%s,%t,46),2,32))) | inc %t }
- $gettok($sock($sockname).mark,1,46) $s1(%chan,[) $s2(%chan,$gettok($sock($sockname).mark,2,46)) $s1(%chan,]) $s1(%chan,:) %g
- }
- if (%lookup = Combat) {
- var %D = $gettok($gettok(%s,3,46),3,32),%H = $gettok($gettok(%s,5,46),3,32),%P = $gettok($gettok(%s,7,46),3,32),%A = $gettok($gettok(%s,2,46),3,32),%St = $gettok($gettok(%s,4,46),3,32),%SU = $gettok($gettok(%s,25,46),3,32),%M = $gettok($gettok(%s,8,46),3,32),%R = $gettok($gettok(%s,6,46),3,32)
- var %cest = $calc(%A + %D + %H + %St + %SU + %M + %R + %P),%est = $round($calc((%cest / $iif($gettok($gettok(%s,1,46),3,32) == -1,1,$v1)) * 100),2)
- var %tD = $gettok($gettok(%s,3,46),2,32),%tH = $gettok($gettok(%s,5,46),2,32),%tP = $gettok($gettok(%s,7,46),2,32),%tA = $gettok($gettok(%s,2,46),2,32),%tSt = $gettok($gettok(%s,4,46),2,32),%tSU = $gettok($gettok(%s,25,46),2,32),%tM = $gettok($gettok(%s,8,46),2,32),%tR = $gettok($gettok(%s,6,46),2,32)
- var %cmb = $cmb($replace($+(%tA,.,%tD,.,%tSt,.,%tH,.,%tR,.,%tP,.,%tM,.,%tSU),-1,1))
- var %rank = $iif($gettok($gettok(%s,1,46),1,32) = -1,-,$v1),%lvl = $iif($gettok($gettok(%s,1,46),2,32) = -1,-,$v1),%exp = $iif($gettok($gettok(%s,1,46),3,32) = -1,-,$v1)
- $gettok($sock($sockname).mark,1,46) $s1(%chan,[) $s2(%chan,$gettok($sock($sockname).mark,2,46)) $s1(%chan,]) $s1(%chan,:) $s1(%chan,$chr(40)) $s2(%chan,%cmb) $s1(%chan,$chr(41)) $&
- $s1(%chan,Rank) $s2(%chan,%rank) $s1(%chan,Level) $s2(%chan,$bytes(%lvl,b)) $s1(%chan,Experience) $s2(%chan,$bytes(%exp,b)) $s1(%chan,Combat Exp) $s2(%chan,$bytes(%cest,b)) $s1(%chan,Combat%) $s2(%chan,$iif(%exp = -,-,$+(%est,%))) $&
- $s1(%chan,Attack) $s2(%chan,$gettok($gettok(%s,2,46),2,32)) $s1(%chan,Strength) $s2(%chan,$gettok($gettok(%s,4,46),2,32)) $s1(%chan,Defence) $s2(%chan,$gettok($gettok(%s,3,46),2,32)) $s1(%chan,Hitpoints) $s2(%chan,$gettok($gettok(%s,5,46),2,32)) $&
- $s1(%chan,Prayer) $s2(%chan,$gettok($gettok(%s,7,46),2,32)) $s1(%chan,Magic) $s2(%chan,$gettok($gettok(%s,8,46),2,32)) $s1(%chan,Ranged) $s2(%chan,$gettok($gettok(%s,6,46),2,32)) $s1(%chan,Summoning) $s2(%chan,$gettok($gettok(%s,25,46),2,32)) $s1(%chan,Dungeoneering) $s2(%chan,$gettok($gettok(%s,10,46),2,32
- }
- if (!$istok(Stats.Combat,%lookup,46)) {
- var %r = $gettok($gettok(%s,%loc,46),1,32),%l = $gettok($gettok(%s,%loc,46),2,32),%e = $gettok($gettok(%s,%loc,46),3,32)
- $gettok($sock($sockname).mark,1,46) $s1(%chan,[) $s2(%chan,$gettok($sock($sockname).mark,2,46)) $s1(%chan,]) $s1(%chan,:) $&
- $s1(%chan,Skill) $s2(%chan,%sloc) $s1(%chan,Rank) $s2(%chan,$bytes(%r,b)) $s1(%chan,Level) $s2(%chan,$bytes(%l,b)) $s1(%chan,Experience) $s2(%chan,$bytes(%e,b)) $&
- $s1(%chan,Exp to) $iif(%l < 99,$s1(%chan,Level) $s2(%chan,$calc(%l + 1)) $s2(%chan,$bytes($calc($exp($calc(%l + 1)) - %e),b)),$s1(%chan,Perfection) $s2(%chan,$bytes($calc(200000000 - %e),b))) $&
- $iif(%l < 99 && $istok(Attack.Defence.Strength.Hitpoints.Magic.Ranged.Prayer,%sloc,46),$s1(%chan,Pc points to) $s2(%chan,$calc(%l + 1)) $s2(%chan,$calc($calc($exp($calc(%l + 1)) - %e) / $pcp($calc(%l + 1))) ) )
- ;to add items to next level make it urself and use $exp($calc(%l + 1) to return exp to next level calc it yourself
- if ($istok(#world148 #glacier_Rat #xp #shelfy #worldcup #tezz #irchelp #xbnc #swiftirc #bnc #onzichtbaar ,$chan,32)) { HALT }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement