Guest User

Untitled

a guest
Oct 18th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 3.28 KB | None | 0 0
  1. on *:TEXT:!roll*:#: {
  2.   var %rolled $bonesroll(%dice)
  3.   msg $chan this roll scored: %rolled points!
  4. }
  5.  
  6. on *:TEXT:!take*:#: {
  7.   set %dice 5
  8. }
  9.  
  10. alias bonesroll {
  11.   var %dice1 0
  12.   var %dice2 0
  13.   var %dice3 0
  14.   var %dice4 0
  15.   var %dice5 0
  16.   if ($1 > 0) {
  17.     var %dice1 $rand(1,6)
  18.     msg $chan you rolled a: %dice1
  19.   }
  20.   if ($1 > 1) {
  21.     var %dice2 $rand(1,6)
  22.     msg $chan you rolled a %dice2
  23.   }
  24.   if ($1 > 2) {
  25.     var %dice3 $rand(1,6)
  26.     msg $chan you rolled a %dice3
  27.   }
  28.   if ($1 > 3) {
  29.     var %dice4 $rand(1,6)
  30.     msg $chan you rolled a %dice4
  31.   }
  32.   if ($1 > 4) {
  33.     var %dice5 $rand(1,6)
  34.     msg $chan you rolled a %dice5
  35.   }
  36.   var %ones 0
  37.   var %twos 0
  38.   var %threes 0
  39.   var %fours 0
  40.   var %fives 0
  41.   var %sixes 0
  42.   while ($ones+$twos+$threes+$fours+$fives+$sixes < $1) {
  43.     var %check 1
  44.     if (%dice1 = %check||%dice2 = %check||%dice3 = %check||%dice4 = %check||%dice5 = %check) {
  45.       inc %ones
  46.     }
  47.     var %check 2
  48.     if (%dice1 = %check||%dice2 = %check||%dice3 = %check||%dice4 = %check||%dice5 = %check) {
  49.       inc %twos
  50.     }
  51.     var %check 3
  52.     if (%dice1 = %check||%dice2 = %check||%dice3 = %check||%dice4 = %check||%dice5 = %check) {
  53.       inc %threes
  54.     }
  55.     var %check 4
  56.     if (%dice1 = %check||%dice2 = %check||%dice3 = %check||%dice4 = %check||%dice5 = %check) {
  57.       inc %fours
  58.     }
  59.     var %check 5
  60.     if (%dice1 = %check||%dice2 = %check||%dice3 = %check||%dice4 = %check||%dice5 = %check) {
  61.       inc %fives
  62.     }
  63.     var %check 6
  64.     if (%dice1 = %check||%dice2 = %check||%dice3 = %check||%dice4 = %check||%dice5 = %check) {
  65.       inc %sixes
  66.     }
  67.   }
  68.   var %scored 0
  69.   if (%ones == 5||%twos == 5||%threes == 5||%fours == 5||%fives == 5||%sixes == 5) {
  70.     inc %scored 10000
  71.     dec %dice 5
  72.   }
  73.   else {
  74.     if (%ones == 4) {
  75.       inc %scored 1500
  76.       dec %dice 4
  77.     }
  78.     else {
  79.       if (%ones == 3) {
  80.         inc %scored 1000
  81.         dec %dice 3
  82.       }
  83.       else {
  84.         if (%ones == 2) {
  85.           inc %scored 200
  86.           dec %dice 2
  87.         }
  88.         else {
  89.           if (%ones == 1) {
  90.             inc %scored 100
  91.             dec %dice 1
  92.           }
  93.         }
  94.       }
  95.     }
  96.     if (%fives == 4) {
  97.       inc %scored 1000
  98.       dec %dice 4
  99.     }
  100.     else {
  101.       if (%fives == 3) {
  102.         inc %scored 500
  103.         dec %dice 3
  104.       }
  105.       else {
  106.         if (%fives == 2) {
  107.           inc %scored 100
  108.           dec %dice 2
  109.         }
  110.         else {
  111.           if (%fives == 1) {
  112.             inc %scored 50
  113.             dec %dice 1
  114.           }
  115.         }
  116.       }
  117.     }
  118.     if (%twos == 4) {
  119.       inc %scored 700
  120.       dec %dice 4
  121.     }
  122.     else {
  123.       if (%twos == 3) {
  124.         inc %scored 200
  125.         dec %dice 3
  126.       }
  127.     }
  128.     if (%threes == 4) {
  129.       inc %scored 800
  130.       dec %dice 4
  131.     }
  132.     else {
  133.       if (%threes == 3) {
  134.         inc %scored 300
  135.         dec %dice 3
  136.       }
  137.     }
  138.     if (%fours == 4) {
  139.       inc %scored 900
  140.       dec %dice 4
  141.     }
  142.     else {
  143.       if (%fours == 3) {
  144.         inc %scored 400
  145.         dec %dice 3
  146.       }
  147.     }
  148.     if (%sixes == 4) {
  149.       inc %scored 1100
  150.       dec %dice 4
  151.     }
  152.     else {
  153.       if (%sixes == 3) {
  154.         inc %scored 600
  155.         dec %dice 3
  156.       }
  157.     }
  158.   }
  159.   return %scored
  160. }
Add Comment
Please, Sign In to add comment