Mirc Slot Script

MR_X

Grünschnabel
Hallo,

Es geht um ein Slotscript für MIRC oder IRC...
Das ist ein Script was jemand anderes geschrieben hat. Aber man darf es benutzen und verändern. Ich selbst habe keine Erfahrung!

Es ist so das sich jeder Chips adden kann. Das fide ich nicht so gut weil es dan nicht so ein Spass macht. Was muss ich ädern damit ein bestimmter user lvl auschließlich chips vergeben kann so das aber alle den Slot spielen können? Mit " on @3:TEXT:*:#:{ " zum Beispiel gehts nicht weil dann auch nur user lvl 3 den slotspielen können...

Code:
alias -l comma {
  var %a, %b = $regsub($ticks,$1,/\G([+-]?\d+?)(?=(?:\d{3})++(?=\.\d++$|$))/g,\1 $+ $chr(44),%a)
  return %a
}
on *:TEXT:*:#:{
  if ($regex($1-2,/^!add chips$/Si)) {
    if (!$4) || ($4 !isnum) msg # Bitte benutze das korekte Format: !add chips <nick> <chips>.
    else {
      set %Chips $calc($read(CasinoChips.txt, s, $3) + $4) 
      write -ds $+ $3 CasinoChips.txt
      write CasinoChips.txt $3 %Chips
      msg # $nick has added $comma($4) Chips to $+($3,'s) $+(fund,$chr(44)) $3 now has: $comma(%Chips) Chips.
    }
  }
  elseif ($regex($1-2,/^!del chips$/Si)) {
    if (!$4) || ($4 !isnum) msg # $+($nick,$chr(44)) Bitte benutze das korekte Format: !del chips <nick> <chips>.
    else {
      set %Chips $calc($read(CasinoChips.txt, s, $3) - $4)
      write -ds $+ $3 CasinoChips.txt
      write CasinoChips.txt $3 %chips
      msg # $nick has removed $comma($4) Chips from $+($3,'s) $+(fund,$chr(44)) $3 now has: %Chips Chips.
    }
  }
  elseif ($regex($1,/^!balance$/Si)) {
    if (!$2) {
      set %balance $read(CasinoChips.txt, s, $nick)
      if (!$read(CasinoChips.txt, s, $nick)) msg # $+($nick,$chr(44)) Dein Konto hat: 0 Chips. 
      elseif ($read(CasinoChips.txt, s, $nick)) msg # $+($nick,$chr(44)) Dein Konto hat: $comma(%Balance) Chips. 
    }
    else {
      set %Balance $read(CasinoChips.txt, s, $2)
      if (!$read(CasinoChips.txt, s, $2)) msg # $+($2,'s) Konto ist: 0 Chips.
      elseif ($read(CasinoChips.txt, s, $2)) msg # $+($2,'s)) Konto ist: $comma(%Balance) Chips. 
    }
  }
  elseif ($regex($1,/^!slots$/Si)) {
    set %cbalance $read(CasinoChips.txt, s, $nick)
    if (%cbalance < $2) msg # $+($nick,$chr(44)) Du hast nur %cbalance chips
    elseif (!$read(CasinoChips.txt, s, $nick)) msg # $+($nick,$chr(44)) Du hast keine Chips mehr zum Spielen. Bitte wende Dich an User Alucard2121 für Chips!
    elseif ($2 == $null) || ($2 !isnum) msg # $+($nick,$chr(44)) Benutze den richtigen Befehl: !slots <bet here>.
    elseif ($2 < 0) msg # $+($nick,$chr(44)) Please use a positive number to bet with.
    else {
      set %prand $rand(1,175)
      set %srand1 $rand(1,5)
      set %srand2 $rand(1,5)
      set %srand3 $rand(1,5)
      while (%srand1 == %srand2) {
        set %srand2 $rand(1,5)
      }
      if (%prand < 5) {
        set %srand1 3
        set %srand2 3
        set %srand3 3
      }
      elseif (%prand < 15) {
        set %srand1 2
        set %srand2 2
        set %srand3 2
      }
      elseif (%prand < 30) {
        set %srand1 1
        set %srand2 1
        set %srand3 1
      }
      if (%srand1 == 1) set %srand1 o_O 
      if (%srand1 == 2) set %srand1 B) 
      if (%srand1 == 3) set %srand1 SMSkull 
      if (%srand1 == 4) set %srand1 R) 
      if (%srand1 == 5) set %srand1 :D 
      if (%srand2 == 1) set %srand2 o_O 
      if (%srand2 == 2) set %srand2 B) 
      if (%srand2 == 3) set %srand2 SMSkull 
      if (%srand2 == 4) set %srand2 R) 
      if (%srand2 == 5) set %srand2 :D 
      if (%srand3 == 1) set %srand3 o_O 
      if (%srand3 == 2) set %srand3 B) 
      if (%srand3 == 3) set %srand3 SMSkull 
      if (%srand3 == 4) set %srand3 R) 
      if (%srand3 == 5) set %srand3 :D 
      set %win1 $2
      set %win2 $calc( $2 * 5 )
      set %win3 $calc( $2 * 10 )
      set %awins 0
      msg # : ( %srand1 )( %srand2 )( %srand3 ) 
      if (%srand1 == @) if (%srand2 == @) if (%srand3 == @) {
        if (%srand1 == %srand2 && %srand2 == %srand3) {
          if ($calc( %win1 * 4 ) > %awins) set %awins $calc( %win1 * 4 )
        }
      }

      if (%srand1 == % || %srand2 == % || %srand3 == %) {
        if (%srand1 == %srand2 && %srand2 == %srand3) {
          if (%win2 > %awins) set %awins %win2
        }
      }
      if (%srand1 == $ || %srand2 == $ || %srand3 == $) {
        if (%srand1 == %srand2 && %srand2 == %srand3) {
          if (%win3 > %awins) set %awins %win3
        }
      }
      if (%awins == 0) {
        msg # Sorry, Du hast verloren $comma($2) chip/s
        write -ds $+ $nick CasinoChips.txt
        set %outval $calc( %cbalance - $2 )
        write CasinoChips.txt $nick %outval
      }
      else {
        msg # Super! Du hast gewonnen $comma(%awins) chips!
        write -ds $+ $nick CasinoChips.txt
        set %outval $calc(( %cbalance - $2 ) + %awins ))
        write CasinoChips.txt $nick %outval
      }
      msg # $+($nick,$chr(44)) Dein neuer Stand ist $comma($read(CasinoChips.txt, s, $nick))
      notice $nick Please Wait 30 seconds if you want to play again.
      ignore -cu30 $nick
      timertime 1 30 notice $nick You can now play again!
    }
  }
}


Frohe Ostern
Mr_X
 
Zuletzt bearbeitet:
Zurück