SHARE
TWEET

asdfgh

a guest Dec 2nd, 2016 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; /isb hit crit numberOfWarlocks
  2. ; e.g. /isb 92 20 5
  3.  
  4. alias isb {
  5.   var %sims = 1
  6.   var %debuffs = 0
  7.   var %uptime = 0
  8.   var %casts = 1
  9.   while (%sims < 1000000) {
  10.     var %x = 1
  11.     while (%x <= $3) {
  12.       ; checkt 4x in 12,5s gecastet wurde
  13.       if (%casts == $calc(4* $3)) { var %debuffs = 0 }
  14.  
  15.       ; addet einen cast, egal ob er verfehlt oder trifft
  16.       inc %casts
  17.  
  18.       ; wenn debuff aktiv, Anzahl der Casts in denen er aktiv war um 1 erhöhen
  19.       if (%debuffs > 0) { inc %uptime }
  20.  
  21.       ; wenn treffer, -1 debuff
  22.       if ($rand(1,100) <= $1) {
  23.         dec %debuffs
  24.         ; wenn crit, checken ob der debuff trifft oder nicht. wenns so is, debuffs auf 4 Aufladungen setzen und casts auf 0
  25.         if ($rand(1,100) <= $2) {
  26.           if ($rand(1,100) <= $1) {
  27.             var %debuffs = 4
  28.             var %casts = 0
  29.           }
  30.         }
  31.       }
  32.       inc %x
  33.     }
  34.     inc %sims
  35.   }
  36.  
  37.   echo h: $1 c: $2 n: $3 . With formula: $round($calc((1-(1- ($2 *0.01)*($1 *0.01)^2)^4)),3) With simulation: $round($calc(%uptime / (%sims * $3)),3)
  38.  
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top