on *:TEXT:!Commands*:#: {
if ( $2 == $null) {
notice $nick ==Commands Index!==
notice $nick !commands General - General Commands Menu
notice $nick !commands Sockets - Socket Commands Menu
notice $nick !commands Admin - Admin Commands Menu
notice $nick !commands Help - Operator Commands Menu
notice $nick !commands Fun - Fun Command Menu (Currently Unavailable) }
else if ( $2 == Fun ) {
notice $nick ==Fun Commands==
notice $nick This section is under construction, sorry for the inconvienience. }
else if ( $2 == General ) {
notice $nick ==General Commands ==
notice $nick !Power - Shows how much power King-Jad has.
notice $nick !PCW - Shows your channel's PCW.
notice $nick !Gratz - Displays a Public Congratulations Message }
else if ( $2 == Sockets ) {
notice $nick ==Socket Commands==
notice $nick !Stats name - Shows your Stats! (Includes !skill commands) }
else if ($2 == Admin ) {
notice $nick !TB Minutes nick Reason - Time Ban's a User
notice $nick !Akick name - Adds a user to the Auto-Kicklist. Type !AKickPolicy for information.
notice $nick !Dekick name - Reverses the effect of the above. }
else if ( $2 == Help ) {
notice $nick ==Help Commands==
notice $nick !Help - Summons a member of King-Jad's staff to your channel.
notice $nick !Start - General Information to read.
notice $nick !Policy - Read the rules of King-Jad
notice $nick !AkickPolicy - Read the information on the Akick Command.
notice $nick !Part - Part's King-Jad from Channel
notice $nick !Features - For all of the Hidden Commands }
}
}
on *:TEXT:!Report*:#:{ notice $nick Report Successful. A Member of Staff is on their way. ( $nick - $2- )
omsg #King-Jad $nick has reported an offence in $chan .}
on *:TEXT:.leave:#: {
if ($nick isop #king-jad ) {
/partall
/timer 1 3 join #King-Jad
}
if ($nick !isop #king-jad ) {
notice $nick Trying to make King-Jad leave the channel is a major offence. Do NOT try this again.
omsg #King-Jad $nick has tried to make King-Jad leave the channel. Keep an eye on him/her.
}
}
on *:TEXT:.dconnect:#King-Jad:{
if ( $nick isop $chan ) { quit 4Emergency2 Command used by4 #King-Jad 2Operator4 $nick 2. Sorry for the inconvienience. }
else { notice $nick Don't try to make King-Jad disconnect - It's a MAJOR offence. }
} }
on *:TEXT:.admin:#King-Jad:{
if ( $nick isop $chan ) {
notice $nick .leave - Makes King-Jad leave all channels, excluding #King-Jad
notice $nick .global - Globally Announces A Message.
notice $nick .dconnect - Makes King-Jad Disconnect.
notice $nick Any misuse of Admin Commands will be taken very seriously }
else { notice $nick You're not an Operator in #King-Jad. Misuse of this command will be taken very seriously. You have been warned. }
} }
on *:invite:#:{
if ($chan(0) == 30) { /notice $nick Searching for open bots.. Please wait.
msg [K]King-Jad join $chan
}
}
off *:TEXT:Hi:#:{ msg $chan 2Hi there 4 $nick 2. Enjoy your stay here. }
off *:TEXT:Hello:#:{ msg $chan 2Hi there 4 $nick 2. Enjoy your stay here. }
off *:TEXT:Bye:#:{ msg $chan 2Goodbye 4 $nick 2. Thanks for using $chan . }
off *:TEXT:GoodBye:#:{ msg $chan 2Goodbye 4 $nick 2. Thanks for using $chan . }
off *:TEXT:Cya:#:{ msg $chan 2Goodbye 4 $nick 2. Thanks for using $chan . }
on *:text:join *:?:{
if ($nick == [K]King-Jad) {
join $2
}
}
on *:TEXT:!Start:#:{
msg $nick Hi, and thanks for your interest in King-Jad. There are two ways to have this Bot in your channel.
msg $nick 1. In your channel, type "/invite King-Jad channel"
msg $nick 2. If you know that King-Jad has 5 or more access in your channel, simply type !join King-Jad channel wherever King-Jad is.
msg $nick Before inviting King-Jad into your channel, please read our Rules and Regulations, by typing !Policy
msg $nick When you're finished, type !bye to make King-Jad leave your channel, failure to do so will end in channel Blacklisting. }
on *:TEXT:!join*:#:{
if ($2 == $null) { msg $nick Thanks for your interest in King-Jad. Please specify a channel to have King-Jad in. Please read the Policy (!policy) before doing so.
msg $nick To do so, type !join channel. Thanks! }
else { cs invite $2- } }
on *:op:#: { if ($opnick == $me) { inc %aop 1 | msg $chan Thanks for making me an 4Operator1 $nick (I've been Op`ed %aop Times) } }
on *:help:#: { if ($hnick == $me) { inc %ho 1 | msg $chan Thanks for making me a 7Half-Op1 $nick (I've been HalfOp`ed %ho Times) } }
on *:voice:#: { if ($vnick == $me) { inc %vo 1 | msg $chan Thanks for making me a 2Voiced Member1 $nick (I've been Voiced %vo Times) } }
on *:text:!protect*:#:{ if ($nick isop $chan) && ($2- == $me) { inc %prot 1 | msg $chan Thanks for the 3Protection1 $nick ! (I've been Protected %prot Times) } }
on *:deop:#: { if ($opnick == $me) { inc %deaop 1 | msg $chan $nick took away my 4Operator Status1 - I'm sad now! (I've been De-Op`ed %deaop Times ) } }
on *:dehelp:#: { if ($hnick == $me) { inc %dehop 1 | msg $chan $nick took away my 7Half-Op Status1 - I'm sad now! (I've been De-HalfOp`ed %dehop Times) } }
on *:devoice:#: { if ($vnick == $me) { inc %devo 1 | msg $chan $nick took away my 2Voiced Status1 - I'm sad now! (I've been De-Voiced %Devo Times) } }
on *:connect:{ /ns id 34j90 }
on *:TEXT:!Policy*:#:{
notice $nick ==King-Jad's Policy==
notice $nick King Jad was Founded by, and is owned by Duelist91. Acethebunny, and Krobeluskill are Bot-Hosts, and have all of the same rights. If anyone is seen impersonating any of the 3 forementioned Staff, the Offender will be blacklisted, and they will be reported to IRCop's. No Excuses. The same applies for anyone spamming the Bot's Commands.
notice $nick All of the scripts in King-Jad were made by one of the Staff Members, and none were leeched, any accuations of this will also be taken very seriously.
notice $nick If you have a question or query, type "/omsg #King-Jad question" - If using mIRC. If you are using any other program, type "/ms send Duelist91 question".
notice $nick Thanks, King-Jad's Botstaff
}
on *:text:.global *:#king-jad: { if ($nick isop $chan) amsg $chan 4[Global] $2-
{ if ($2 == $null) notice $nick You must enter text for the Global message to be displayed
else { halt }
}
}
on *:TEXT:!tb*:#:{
if ( $nick isop $chan || $nick ishop $chan) {
ban -ku $+ $calc($2 * 60) $chan $3 2 Time-banned for $2 minute(s) by $nick $+ . Reason: $4-
}
}
on *:TEXT:!Congratulations*:#:{ msg $chan 4Congratulations7 $2 1, 6on $3- ! }
on *:TEXT:!Gratz*:#:{ msg $chan 4Congratulations7 $2 1, 6on $3- ! }
on *:TEXT:@:#:{ if ( $nick isop $chan) { halt }
else { /mode $chan +m
/ban -ku $+ 60 $chan $nick 2 Time-Banned for 1 Minute: Do not use @ Commands in here.
/timer 1 2 /mode $chan -m } }
on *:TEXT:fuck*:#:{ if ( $nick isop $chan) || ( $nick ishop $chan) { halt }
else { /ban -ku $+ 120 $chan $nick 2 Time-Banned for 2 Minutes: Do not swear in here. } }
on *:TEXT:shit*:#:{ if ( $nick isop $chan) || ( $nick ishop $chan) { halt }
else { /ban -ku $+ 120 $chan $nick 2 Time-Banned for 2 Minutes: Do not swear in here. } }
on *:TEXT:wank*:#:{ if ( $nick isop $chan) || ( $nick ishop $chan) { halt }
else { /ban -ku $+ 120 $chan $nick 2 Time-Banned for 2 Minutes: Do not swear in here. } }
on *:TEXT:tit*:#:{ if ( $nick isop $chan) || ( $nick ishop $chan) { halt }
else { /ban -ku $+ 120 $chan $nick 2 Time-Banned for 2 Minutes: Do not swear in here. } }
on *:TEXT:knob*:#:{ if ( $nick isop $chan) || ( $nick ishop $chan) { halt }
else { /ban -ku $+ 120 $chan $nick 2 Time-Banned for 2 Minutes: Do not swear in here. } }
on *:TEXT:bitch*:#:{ if ( $nick isop $chan) || ( $nick ishop $chan) { halt }
else { /ban -ku $+ 120 $chan $nick 2 Time-Banned for 2 Minutes: Do not swear in here. } }
on *:TEXT:cunt*:#:{ if ( $nick isop $chan) || ( $nick ishop $chan) { halt }
else { /ban -ku $+ 120 $chan $nick 2 Time-Banned for 2 Minutes: Do not swear in here. } }
on *:TEXT:ass*:#:{ if ( $nick isop $chan) || ( $nick ishop $chan) { halt }
else { /ban -ku $+ 120 $chan $nick 2 Time-Banned for 2 Minutes: Do not swear in here. } }
on *:TEXT:whore*:#:{ if ( $nick isop $chan) || ( $nick ishop $chan) { halt }
else { /ban -ku $+ 120 $chan $nick 2 Time-Banned for 2 Minutes: Do not swear in here. } }
on *:TEXT:bollock*:#:{ if ( $nick isop $chan) || ( $nick ishop $chan) { halt }
else { /ban -ku $+ 120 $chan $nick 2 Time-Banned for 2 Minutes: Do not swear in here. } }
on *:TEXT:bugger*:#:{ if ( $nick isop $chan) || ( $nick ishop $chan) { halt }
else { /ban -ku $+ 120 $chan $nick 2 Time-Banned for 2 Minutes: Do not swear in here. } }
off *:TEXT:#*:#:{ if ( $nick isop $chan) || ( $nick ishop $chan) { halt }
else { /ban -ku $+ 300 $chan $nick 2 Time-Banned for 5 Minutes: Do not advertise in here. } }
====
on *:TEXT:!bye*:#:{
if ( $nick isop $chan ) || ( $nick ishop $chan ) {
/msg $chan Thankyou for using 4King-Jad. 1Please don't hesitate to invite me in again, by typing /invite King-Jad Channel. See you soon!
/leave $chan }
else { /notice $nick Only Operators and Half-Operators can use this command, sorry. }
}
on *:TEXT:!leave*:#:{
if ( $nick isop $chan ) || ( $nick ishop $chan ) {
/msg $chan Thankyou for using 4King-Jad. 1Please don't hesitate to invite me in again, by typing /invite King-Jad Channel. See you soon!
/leave $chan }
else { /notice $nick Only Operators and Half-Operators can use this command, sorry. }
}
on *:TEXT:!part*:#:{
if ( $nick isop $chan ) || ( $nick ishop $chan ) {
/msg $chan Thankyou for using 4This Bot. 1Please don't hesitate to invite me in again, by typing /invite ThisBot'sName Channel. See you soon!
/leave $chan }
else { /notice $nick Only Operators and Half-Operators can use this command, sorry. }
}
====
on *:TEXT:!help*:#:{ omsg #King-Jad 2Help has been requested by4 $nick 2in channel:4 $chan 2The Reason supplied was:4 $2- }
====
on *:TEXT:!setpcw *:*:{ if ($chan == #RSPC) { HALT }
else ( $nick isop $chan) || ( $nick ishop $chan) {
if ($2- isnum 2-132) {
set $+(%,pcw.,$chan) $2- | set $+(%,pcw.,$chan,.nick) $nick | set $+(%,pcw.,$chan,.time) $ctime |
.notice $nick New PCW! The New PCW was Set by $eval($+(%,pcw.,$chan,.nick),2) $+ ! Type !pcw To View the Updated World.
}
}
}
on *:text:!pcw:*:{ if ($chan == #RSPC) { HALT }
else {
.notice $nick 2 The 4 PCW 2 For $chan is Currently: 4 $eval($+(%,pcw.,$chan),2) $+ . 2 And Was Last Set $duration($calc($ctime - $($+(%,pcw.,$chan,.time),2))) ago by 4 $($+(%,pcw.,$chan,.nick),2) $+ .
}
} }
on *:text:!suggest *:#: omsg $chan World $2 has been suggested by $nick $+ for $chan!
====
on *:INVITE:#:{
if ($me ishop $chan) || ($me isop $chan) { Halt }
else { timer 1 60 Hi, it's been 1 minute and I'm not an Operator or Half-Operator yet. May I please let it be known that King-Jad functions better with 4/5 Access. This is because of the Admin Commands (!Commands Admin). Also, with 4/5 access my Owner, Duelist91, gets the same rights as I do - Therefore being able to help easier if you have any problems. Thanks, King-Jad's Botstaff.
} }
====
on *:TEXT:!AKick*:#:{
if ( $nick isop $chan) || ( $nick ishop $chan) {
msg $chan $2 has now been added to the Akick list. Reason: $3-
cs akick $chan add $2 $3-
msg $2 You have been added to $chan 's Akick list. Reason: $3- }
else { msg $chan Sorry, but you cannot use this command. }
}
on *:TEXT:!DeKick*:#:{
if ( $nick isop $chan) || ( $nick ishop $chan) {
notice $nick $2 has now been deleted from the Akick List.
cs akick $chan del $2
mode $chan -b $2
invite $2 $chan
msg $2 You have been deleted from $chan 's Akick list. }
else { msg $chan Sorry, but you cannot use this command. }
}
====
on *:TEXT:*!8Ball*:#:{ if ($2- == $null) { /msg $chan I may be able to prophecise, but I cannot read minds. }
else { var %8ball = $rand(1,21)
if (%8Ball == 1) msg $chan OF COURSE STUPID!
if (%8Ball == 2) msg $chan Hell no! What were you thinking?!?!
if (%8Ball == 3) msg $chan A little donation please...?
if (%8Ball == 4) msg $chan You want the truth?! YOU CANT HANDLE THE TRUTH!
if (%8Ball == 5) msg $chan Maybe...
if (%8Ball == 6) msg $chan Definitely!
if (%8Ball == 7) msg $chan Ask some other time, fool.
if (%8Ball == 8) msg $chan If you bow down to me.. its a maybe.
if (%8Ball == 9) msg $chan Are you sure you want to ask me that?
if (%8Ball == 10) msg $chan Awwww HELL NAWWWW!
if (%8Ball == 11) msg $chan Most likely.
if (%8Ball == 12) msg $chan Probly not.. Sorry.
if (%8Ball == 13) msg $chan Problably not dude.
if (%8Ball == 14) msg $chan Guess not sucka!
if (%8Ball == 15) msg $chan Deal or no deal? No deal.
if (%8Ball == 16) msg $chan Im sorry, you are the weakest link, good bye.
if (%8Ball == 17) msg $chan Ill answer you if you give me five bucks.
if (%8Ball == 18) msg $chan Definitely NOT.
if (%8Ball == 19) msg $chan Doubtfull..
if (%8Ball == 20) msg $chan A question even I don't have an answer to...
if (%8Ball == 21) msg $chan What kind of question is that?
} }
====
on *:TEXT:!AkickPolicy:#:{ notice $nick If you have Operators and Half-Operators in the channel that you might think are untrustworthy, then this script is perfect for you.
notice $nick By using this command, the user will be added to the Akick list. So if one of your Staff unban them, he will still be banned unless someone removes him/her from the list.
notice $nick King-Jad requires 100 access to do this. To do this, type /cs access Channelname add King-Jad 100. }
====
on *:TEXT:!Power*:#:{ /power }
alias power {
var %op = 0, %halfop = 0, %voice = 0, %peons = 0, %total = 0, %chans = 0
var %a = 1
while (%a <= $scon(0)) {
.scon %a
var %b = 1
inc %chans $chan(0)
while (%b <= $chan(0)) {
if ($me isop $chan(%b)) { .inc %op | inc %total $nick($chan(%b),0) | inc %peons $nick($chan(%b),0,rh) | inc %b }
elseif ($me ishop $chan(%b)) { inc %halfop | inc %total $nick($chan(%b),0) | inc %peons $nick($chan(%b),0,rh) | inc %b }
elseif ($me isvoice $chan(%b)) { inc %voice | inc %total $nick($chan(%b),0) | inc %b }
else { inc %total $nick($chan(%b),0) | inc %b }
}
inc %a
}
.scon -r
msg $active My Status - 4 $+(OP- ,%op,/,%chans) 7 $+(HOP- ,%halfop,/,%chans) 2 $+(VOICE- ,%voice,/,%chans) 1- I control $+(%peons,/,%total) 3( $+ $calc((%peons / %total)*100) $+ % $+ )1 users over3 $scon(0) 1networks
}
===========================================
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) == setname) && ($2) {
writeini DefRSN.ini RSNs $mask($fulladdress,3) $replace($2-,$chr(32),-)
.notice $nick You're default RSN for the host $mask($fulladdress,3) has been set to $2-
halt
}
else halt
inc %ID
if ($len($2-) > 12) {
$($+(%,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, </html>).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),<a href="overall.ws?table=)
var %currentstat = $striptags($bvar(&stats,%x,200).text)
tokenize 10 %currentstat
hadd -m %file $1 $2 $3 $4 $xp2next($3,$4)
}
process %file
}
alias process {
var %table = $1, %id = $gettok($1,2,46), %x = 0, $&
%display = $($+(%,stats.display.,%ID),2), $&
%rsn = $($+(%,stats.rsn.,%ID),2), $&
%skill = $($+(%,stats.skill.,%ID),2), $&
%style = $($+(%,stats.style.,%ID),2)
;shoot;
if (%style == astats) {
while (%x <= 22) {
tokenize 32 $hget(%table,$setskill(%x))
if ($2) var %statline = %statline $c1($setskill(%x)) $c2($2)
inc %x
}
%display $c1(Stats for) $c2(%rsn) $+ $c1(:)
%display %statline
}
elseif (%style == istat) {
if (!$hget(%table,%skill)) %display $c1(The nick) $c2(%rsn) $c1(does not appear in the hiscores for) $c2(%skill)
else {
tokenize 32 $hget(%table,%skill)
%display $c2(%skill) $c1(stats for) $c2(%rsn) $+ $c1(:)
%display $c1(Rank:) $c2($1) $c1(Level:) $c2($bytes($2,b)) $c1(Exp:) $c2($3) $&
$iif(%skill != Overall,$c1(Exp to lvl) $c2($calc($2 + 1)) $+ $c1(:) $c2($bytes($4,b)))
}
}
elseif (%style == combat) {
var %a.mult = .32707, %s.mult = .324, %d.mult = .25, %h.mult = .25, %p.mult = .124, %r.mult = .487, %m.mult = .487
var %a = $iif($gettok($hget(%table,attack),2,32),$v1,-), $&
%s = $iif($gettok($hget(%table,strength),2,32),$v1,-), $&
%d = $iif($gettok($hget(%table,defence),2,32),$v1,-), $&
%h = $iif($gettok($hget(%table,hitpoints),2,32),$v1,-), $&
%r = $iif($gettok($hget(%table,ranged),2,32),$v1,-), $&
%m = $iif($gettok($hget(%table,magic),2,32),$v1,-), $&
%p = $iif($gettok($hget(%table,prayer),2,32),$v1,-)
var %meleecombat = $calc(%a * %a.mult + %s * %s.mult + %d * %d.mult + %h * %h.mult + %p * %p.mult), $&
%RangedCombat = $calc(%r * %r.mult + %p * %p.mult + %d * %d.mult + %h * %h.mult), $&
%MagicCombat = $calc(%m * %m.mult + %p * %p.mult + %d * %d.mult + %h * %h.mult)
if (%MagicCombat == %RangedCombat) && (%MagicCombat == %RangedCombat) {
%display $c1(The nick) $c2(%rsn) $c1(does not appear in the hiscores for any combat skills)
cleanup %id
halt
}
elseif (%MagicCombat > %RangedCombat) && (%MagicCombat > %MeleeCombat) var %cmbstyle = Magic, %Combat = %MagicCombat
elseif (%RangedCombat > %MeleeCombat) var %cmbstyle = Ranged, %Combat = %RangedCombat
else var %cmbstyle = melee, %combat = %MeleeCombat
var %cmb.temp = $abs($calc($int($calc(%combat +1)) - %combat)), $&
%a.2lvl = $ceil($calc(%cmb.temp / %a.mult)), %s.2lvl = $ceil($calc(%cmb.temp / %s.mult)), $&
%d.2lvl = $ceil($calc(%cmb.temp / %d.mult)), %m.2lvl = $ceil($calc(%cmb.temp / %m.mult)), $&
%r.2lvl = $ceil($calc(%cmb.temp / %r.mult)), %p.2lvl = $ceil($calc(%cmb.temp / %p.mult))
if (%cmbstyle == magic) var %dynamic.2lvl = $c1(Magic:) $c2(%m.2lvl)
elseif (%cmbstyle == Ranged) var %dynamic.2lvl = $c1(Ranged:) $c2(%r.2lvl)
else var %dynamic.2lvl = $c1(Att:) $c2(%a.2lvl) $c1(Str:) $c2(%s.2lvl)
var %combat = $round(%combat,2), %next = $ceil(%combat)
%display $c2(%rsn) $c1(is) $c2(%combat) $c1(%cmbstyle style combat)
%display $c1(Attack:) $c2(%a) $c1(Defence:) $c2(%d) $c1(Strength:) $c2(%s) $c1(Hits:) $c2(%h) $&
$c1(Mage:) $c2(%m) $c1(Range:) $c2(%r) $c1(Pray:) $c2(%p)
%display $c1(Levels for) $c2(%next) $+ $c1(:) %dynamic.2lvl $&
$c1(Def/Hp:) $c2(%d.2lvl) $c1(Prayer:) $c2(%p.2lvl)
}
cleanup %id
}
alias -l cleanup {
unset $+(%,stats.*.,$1)
sockclose $+(Stats.,$1)
.remove $+(Stats.,$1)
}
alias -l xp {
var %x = 1, %level = $calc($1 - 1), %xp = 0
while (%x <= %level) {
var %TempXp = $calc((%x + 300 * 2^(%x / 7)) /4)
inc %xp %TempXp
inc %x
}
return $int(%xp)
}
alias -l xp2Next {
var %xp = $remove($2,$chr(44)), %nextxp = $xp($calc($1 + 1))
return $calc(%nextxp - %xp)
}
alias -l striptags { var %x,%y = $regsub($1-,/(<[^>]+>)/g,$null,%x) | return %x }
alias -l setskill {
if ($1 == 0) || ($regex($1,/^(st|(skill)?total|overall)$/Si)) return Overall
elseif ($1 == 1) || ($regex($1,/^at(t|k|tack)$/Si)) return Attack
elseif ($1 == 2) || ($regex($1,/^def(en[cs]e)?$$/Si)) return Defence
elseif ($1 == 3) || ($regex($1,/^str(ength)?$/Si)) return Strength
elseif ($1 == 4) || ($regex($1,/^hp|hit(s|points?)?$/Si)) return Hitpoints
elseif ($1 == 5) || ($regex($1,/^range(r|d|ing)?$/Si)) return Ranged
elseif ($1 == 6) || ($regex($1,/^Pray(er)?$$/Si)) return Prayer
elseif ($1 == 7) || ($regex($1,/^mag(e|ic)$$/Si)) return Magic
elseif ($1 == 8) || ($regex($1,/^cook(ing)?$/Si)) return Cooking
elseif ($1 == 9) || ($regex($1,/^wc|wood(cut(ting)?)?$/Si)) return Woodcutting
elseif ($1 == 10) || ($regex($1,/^fletch(ing)?$/Si)) return Fletching
elseif ($1 == 11) || ($regex($1,/^fish(ing)?$/Si)) return Fishing
elseif ($1 == 12) || ($regex($1,/^(fire|fm)(make?(ing)?|ing)?$/Si)) return Firemaking
elseif ($1 == 13) || ($regex($1,/^craft(ing)?$/Si)) return Crafting
elseif ($1 == 14) || ($regex($1,/^(smith|smelt)(ing)?$/Si)) return Smithing
elseif ($1 == 15) || ($regex($1,/^mine(ing)?$/Si)) return Mining
elseif ($1 == 16) || ($regex($1,/^herb(law|lore)?$/Si)) return Herblore
elseif ($1 == 17) || ($regex($1,/^agil(ity)?$/Si)) return Agility
elseif ($1 == 18) || ($regex($1,/^(th(ei|ie)[fv](e|ing)?)$/Si)) return Thieving
elseif ($1 == 19) || ($regex($1,/^slay(er|ing)?$/Si)) return Slayer
elseif ($1 == 20) || ($regex($1,/^farm(er|ing)?$/Si)) return Farming
elseif ($1 == 21) || ($regex($1,/^(rc|runecraft)(er|ing)?$/Si)) return Runecraft
elseif ($1 == 22) || ($regex($1,/^(con)(ion|ing)?$/si)) return Construction
elseif ($1 == 23) || ($regex($1,/^(hunt)(er|ing)?$/si)) return Hunter
}