Originally Posted By: Riamus2
All scripting questions should be in the scripting forum. smile

Code:
on *:text:!dd *:#yourchannel: {
  ; You can remove the first two IF lines if you don't care about checking if the nicks are on the channel.
  if ($2 !ison $chan) { msg $chan $2 is not a valid nick. | halt }
  if ($3 !ison $chan) { msg $chan $3 is not a valid nick. | halt }
  if (!$4) { msg $chan Invalid format.  Use: !dd nick1 nick2 reward | halt }
  set %dd $2 $3 $4
  msg $chan Dice duel between $2 and $3 has begun.
}
on *:text:!roll:#yourchannel: {
  if (!%dd) { msg $chan No duel in progress. | halt }
  var %r1 = $rand(1,6), %r2 = $rand(1,6), %d1 = $gettok(%dd,1,32), %d2 = $gettok(%dd,2,32), %p = $gettok(%dd,3,32)
  msg $chan %d1 rolled a %r1 $+ .
  msg $chan %d2 rolled a %r2 $+ .
  if (%r1 > %r2) { msg $chan %d1 won the %p pot with a %r1 $+ - $+ %r2 $+ . }
  elseif (%r2 > %r1) { msg $chan %d2 won the %p pot with a %r1 $+ - $+ %r2 $+ . }
  else { msg $chan %d1 and %d2 tied with a %r1 $+ - $+ %r2 $+ . }
  unset %dd
}


That's a basic script for you. I could have set more than one global variable in the !dd section instead of using one global and then a lot of local variables in the !roll section, but I prefer avoiding global variables unless needed.

I didn't add any flood protection. You can add any generic flood protection you like or just mIRC's flood protection if you think there is a need.


Tysm, but i mean they need to roll at their own, like u vs me, so i have to roll and you have to roll. and at the scores when its about who won, it shows just who is noticed first, like i won a 4-6 it should show 6-4 i would really appriciate if you could help me more.