Posted by Spitfire3292 Tue 23rd Jan 2007 03:45 - Syntax is mIRC Script - 24 views
Download | New Post | Modify | Hide line numbers
  1. alias getcmb {
  2.   tokenize 32 $1-
  3.   var %rsmc = $calc(($1 * .325) + ($3 * .325) + ($2 * .25) + ($4 * .25) + ($6 * .125))
  4.   var %rsrc = $calc(($5 * .4875) + ($6 * .125) + ($2 * .25) + ($4 * .25))
  5.   var %rsmac = $calc(($7 * .4875) + ($6 * .125) + ($2 * .25) + ($4 * .25))
  6.   ; Hitpoint Estimation? MAYBE! - $iif($4 = 1,$calc(10 + ($1 / 4) + ($2 / 4) + ($3 / 4)),$4)
  7.   if ((%rsmc > %rsrc) && (%rsmc > %rsmac)) {
  8.     var %rscmb = %rsmc
  9.     var %rsbase = Melee Based
  10.   }
  11.   elseif ((%rsrc > %rsmc) && (%rsrc > %rsmac)) {
  12.     var %rscmb = %rsrc
  13.     var %rsbase = Ranged Based
  14.   }
  15.   elseif ((%rsmac > %rsmc) && (%rsmac > %rsrc)) {
  16.     var %rscmb = %rsmac
  17.     var %rsbase = Magic Based
  18.   }
  19.   if ($prop == cmb) {
  20.     if (%rscmb == 1.273) { return $c1(The Combat Stats for:) $c2($($+(%,rsnick,$gettok($sockname,2,46)),2)) $c1(could not be retrieved becuase they don't have any combat stats in the HighScores) | halt }
  21.     return $c1(Combat Stats For:) $c2($($+(%,rsnick,$gettok($sockname,2,46)),2)) $c1(Combat Level:) $c2($round(%rscmb,1)) $c1($chr(40)) $+ $c2(%rsbase) $+ $c1($chr(41))
  22.   }
  23.   if ($prop == stcmb) {
  24.     if (%rscmb == 1.273 || %rscmb == $null) { return $null }
  25.     else {
  26.       return $c1(Combat Level:) $c2($round(%rscmb,1)) $c1($chr(40)) $+ $c2(%rsbase) $+ $c1($chr(41))
  27.     }
  28.   }
  29.   elseif ($prop == tonext) {
  30.     if (%rscmb == 1.273) { halt }
  31.     ;Was a good idea but didnt work because of lvl 126 combat cap - var %cmb.temp = $iif($($+(%,futlvl,$gettok($sockname,2,46)),2) != 1,$abs($calc($calc(%rscmb - $($+(%,futlvl,$gettok($sockname,2,46)),2)))),$abs($calc($int($calc(%rscmb + $($+(%,futlvl,$gettok($sockname,2,46)),2))) - %rscmb))), $&
  32.       var %cmb.temp = $abs($calc($int($calc(%rscmb + $($+(%,futlvl,$gettok($sockname,2,46)),2))) - %rscmb)), $&
  33.       %a = $ceil($calc(%cmb.temp / .325)), %s = $ceil($calc(%cmb.temp / .325)), $&
  34.       %d = $ceil($calc(%cmb.temp / .25)), %m = $ceil($calc(%cmb.temp / .4875)), $&
  35.       %r = $ceil($calc(%cmb.temp / .4875)), %p = $ceil($calc(%cmb.temp / .125))
  36.     if (%rsbase == Melee Based) {
  37.       return $c1(Levels for) $c2($iif($($+(%,futlvl,$gettok($sockname,2,46)),2) = 1,$int($calc(%rscmb + 1)),$($+(%,futlvl,$gettok($sockname,2,46)),2))) $+ $c1(:) $c1(Attack:) $c2(%a) $c1(Strength:) $c2(%s) $c1(Defence:) $c2(%d) $c1(HitPoints:) $c2(%d) $c1(Prayer:) $c2(%p)
  38.     }
  39.     elseif (%rsbase = Ranged Base) {
  40.       return $c1(Levels for) $c2($iif($($+(%,futlvl,$gettok($sockname,2,46)),2) = 1,$int($calc(%rscmb + 1)),$($+(%,futlvl,$gettok($sockname,2,46)),2))) $+ $c1(:) $c1(Ranged:) $c2(%r) $c1(Defence:) $c2(%d) $c1(HitPoints:) $c2(%d) $c1(Prayer:) $c2(%p)
  41.     }
  42.     elseif (%rsbase = Magic Base) {
  43.       return $c1(Levels for) $c2($iif($($+(%,futlvl,$gettok($sockname,2,46)),2) = 1,$int($calc(%rscmb + 1)),$($+(%,futlvl,$gettok($sockname,2,46)),2))) $+ $c1(:) $c1(Magic:) $c2(%m) $c1(Defence:) $c2(%d) $c1(HitPoints:) $c2(%d) $c1(Prayer:) $c2(%p)
  44.     }
  45.   }
  46. }
  47.  

PermaLink to this entry https://pastebin.co.uk/9445
Posted by Spitfire3292 Tue 23rd Jan 2007 03:45 - Syntax is mIRC Script - 24 views
Download | New Post | Modify | Hide line numbers