Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.19 KB | None | 0 0
  1. on *:text:!dd *:#[bot]royaldicing: {
  2.   ; You can remove the first two IF lines if you don't care about checking if the nicks are on the channel.
  3.   if ($2 !ison $chan) { msg $chan $2 is not a valid nick. | halt }
  4.   if ($3 !ison $chan) { msg $chan $3 is not a valid nick. | halt }
  5.   if (!$4) { msg $chan Invalid format.  Use: !dd nick1 nick2 reward | halt }
  6.   set %dd $2 $3 $4
  7.   msg $chan Dice duel between $2 and $3 has begun.
  8.   .timerDD 1 300 EndDD
  9. }
  10. on *:text:!roll:#: {
  11.   if (!%dd) { msg $chan No duel in progress. | halt }
  12.   if (!$istok(%dd,$nick,32)) { msg $chan You are not one of the duelists. | halt }
  13.   if ($($+(%,ddr.,$nick),2)) { msg $chan You have already rolled. | halt }
  14.   var %r = $rand(1,6), %d1 = $gettok(%dd,1,32), %d2 = $gettok(%dd,2,32), %p = $gettok(%dd,3,32)
  15.   set %ddr. $+ $nick %r
  16.   msg $chan $nick rolled a %r $+ .
  17.   var %r1 = $($+(%,ddr.,$gettok(%dd,1,32)),2), %r2 = $($+(%,ddr.,$gettok(%dd,2,32)),2)
  18.   if (%r1 && %r2) {
  19.     if (%r1 > %r2) { msg $chan %d1 won the %p pot with a %r1 $+ - $+ %r2 $+ . }
  20.     elseif (%r2 > %r1) { msg $chan %d2 won the %p pot with a %r2 $+ - $+ %r1 $+ . }
  21.     else { msg $chan %d1 and %d2 tied with a %r1 $+ - $+ %r2 $+ . }
  22.     unset %dd
  23.     unset %ddr.*
  24.     .timerDD off
  25.   }
  26. }
  27. alias EndDD {
  28.   msg $chan The duel ran out of time and has been ended.
  29.   unset %dd
  30.   unset %ddr.*
  31. }
  32. on *:TEXT:!60x2*:#: {
  33.   if ($2) && ($3) && ($4) && ($nick !ishop $chan) && ($nick !isop $chan) {
  34.     notice $nick 12You must be a channel (half)operator to use this command.
  35.     halt
  36.   }
  37.   if ($2) && ($3) && ($nick ishop $chan || $nick isop $chan) {
  38.     set %roller1 $2
  39.     set %rollpot $3
  40.     msg # 12 $+ %roller1 %rollpot Pot gl - 1 60 = win. type !dice
  41.   }
  42. }
  43.  
  44. on *:TEXT:!dice*:#: {
  45.   var %roll1 = $rand(1,100)
  46.   if ($nick == %roller1) {
  47.     msg $chan  12 $nick 1 Rolled The Number 2|12 %roll1 2| 1On a 121-100 percentage dice.
  48.     if (%roll1 < 60) {
  49.       msg $chan 12 %roller1 1 lost the 12 %rollpot pot 1  with the roll: 12 %roll1 .
  50.       unset %*roll*
  51.     }
  52.     elseif (%roll1 > 60) {
  53.       msg $chan 12 %roller1 1 wins the 12 %rollpot pot 1  with the roll: 12 %roll1 .
  54.       unset %*roll*
  55.     }
  56.   }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement