
Super Administrator
Antal indlæg: 39
Tilmeldt: 13.06.09
|
Deprecated: preg_replace() [function.preg-replace]: The /e modifier is deprecated, use preg_replace_callback instead in /var/www/vonderlippe.dk/public_html/includes/bbcodes/url_bbcode_include.php on line 21
Fandt dette bingo script.
Det skal smides ind i "scripts editor"/"remote", og så skulle det virke.
Har dog ikke testet det, og yder derfor heller ikke support på dette.
Kode###############################################
#### Load Script /load -rs bingoscript.mrc ###
### Skriv !bingo 'Antal slots' 'præmie' ##
## Have Fun #
### ##
#### ###
###############################################
on *:text:!bingo*:#: {
if ($nick isop $chan) {
if (!%bingo-on) { .set %bingo-on off }
if ($1- == !bingo-off) {
if (%bingo == on) {
.unset %b-player
.unset %b-players
.unset %b-prize
.write -c tals.txt
.write -c bingotal.txt
.write -c bingo.txt
.set %bingo-on off
.timerbingo off
.msg $chan 13,14-|-1 Bingo stoppet af $nick 13,14-|-1
}
}
if (%bingo-on == on) {
.notice $nick 4En Bingo er i gang
}
if (%bingo-on == off) {
if (!$2) { .notice $nick 4Skriv antal slots }
if (!$3) { .notice $nick 4Skriv prize }
if ($2) {
if ($3) {
.set %bingochan $chan
.set %bingo-on on
.set %b-players $2
.set %b-player 0
.set %b-prize $3-
.msg $chan 13,14-|-1 Bingo on med %b-players personer 13,14-|-1 Prize er: %b-prize 13,14-|-1
.msg $chan 13,14-|-1 Skriv !plade for at være med 13,14-|-1
}
}
}
}
}
on *:load: { echo -a BingoScript Loadet. }
on *:text:!remove:#: {
if (%spam == $null) {
if (%bingo-on == on) {
var %i = 1
while (%i <= $lines(bingo.txt)) {
if ($read(bingo.txt, %i) == $nick) {
.write -dl %i bingo.txt
.write -dl %i bingotal.txt
.set %b-player $calc( %b-player -1)
.msg $nick Du er nu ude at bingo!
}
inc %i
}
}
}
}
on *:text:!plade:#: {
if (%spam == $null) {
if (%bingo-on == on) {
if (%b-player < %b-players) {
if (!$read(bingo.txt,w, $nick)) {
if (%b-player) { .inc %b-player }
if (!%b-player) { .set %b-player 1 }
.set %1 $rand(0,9) $+ $rand(1,9)
.set %2 $rand(0,9) $+ $rand(1,9)
.set %3 $rand(0,9) $+ $rand(1,9)
.set %4 $rand(0,9) $+ $rand(1,9)
.set %5 $rand(0,9) $+ $rand(1,9)
.set %6 $rand(0,9) $+ $rand(1,9)
.set %7 $rand(0,9) $+ $rand(1,9)
.set %8 $rand(0,9) $+ $rand(1,9)
:check
if (%1 == %2) { .set %2 $rand(0,9) $+ $rand(0,9) | goto check }
if (%1 == %3) { .set %3 $rand(0,9) $+ $rand(0,9) | goto check }
if (%1 == %4) { .set %4 $rand(0,9) $+ $rand(0,9) | goto check }
if (%1 == %5) { .set %5 $rand(0,9) $+ $rand(0,9) | goto check }
if (%1 == %6) { .set %6 $rand(0,9) $+ $rand(0,9) | goto check }
if (%1 == %7) { .set %7 $rand(0,9) $+ $rand(0,9) | goto check }
if (%2 == %3) { .set %3 $rand(0,9) $+ $rand(0,9) | goto check }
if (%2 == %4) { .set %4 $rand(0,9) $+ $rand(0,9) | goto check }
if (%2 == %5) { .set %5 $rand(0,9) $+ $rand(0,9) | goto check }
if (%2 == %6) { .set %6 $rand(0,9) $+ $rand(0,9) | goto check }
if (%2 == %7) { .set %7 $rand(0,9) $+ $rand(0,9) | goto check }
if (%3 == %4) { .set %4 $rand(0,9) $+ $rand(0,9) | goto check }
if (%3 == %5) { .set %5 $rand(0,9) $+ $rand(0,9) | goto check }
if (%3 == %6) { .set %6 $rand(0,9) $+ $rand(0,9) | goto check }
if (%3 == %7) { .set %7 $rand(0,9) $+ $rand(0,9) | goto check }
if (%4 == %5) { .set %5 $rand(0,9) $+ $rand(0,9) | goto check }
if (%4 == %6) { .set %6 $rand(0,9) $+ $rand(0,9) | goto check }
if (%4 == %7) { .set %7 $rand(0,9) $+ $rand(0,9) | goto check }
if (%5 == %6) { .set %6 $rand(0,9) $+ $rand(0,9) | goto check }
if (%5 == %7) { .set %7 $rand(0,9) $+ $rand(0,9) | goto check }
if (%6 == %7) { .set %8 $rand(0,9) $+ $rand(0,9) | goto check }
goto end
:end
.write bingo.txt $chr(32)
.write bingo.txt $nick
.set %bb-tal [ [ %1 ] $+ ] . [ $+ [ %2 ] $+ ] . [ $+ [ %3 ] $+ ] . [ $+ [ %4 ] $+ ] . [ $+ [ %5 ] $+ ] . [ $+ [ %6 ] $+ ] . [ $+ [ %7 ] $+ ] . [ $+ [ %8 ] ]
.write bingotal.txt %bb-tal
.msg $chan 13,14-|-1 $nick er nu addet. %b-player / %b-players 13,14-|-1 Skriv /msg $me !bingo når du har bingo 13,14-|-1 Prize er: %b-prize 13,14-|-1
.notice $nick Dine tal er: $replace($sorttok(%bb-tal,46,n),.,$chr(32)) /msg $me !bingo )
}
}
if (%b-player == %b-players) {
.msg $chan 13,14-|-1 Bingo Starter om 10 sek. 13,14-|-1 Vi spiller om %b-prize 13,14-|-1
.msg $chan 13,14-|-1 Botten er lavet af Jantzen 13,14-|-1
.mode $chan +m
.timer 1 10 .bingoon
}
}
.set -u2 %spam 1
}
}
on *:text:!ppl*:#: {
if ($nick isop $chan) {
if (%bingo-on == on) {
.set %b-players $2
.msg $chan 13,14-|-1 Players ændret til $2 af $nick 13,14-|-1
}
}
}
on *:text:!vis-plade:#: {
if (%spam == $null) {
if (%bingo-on == on) {
var %i = 1
while (%i <= $lines(bingo.txt)) {
if ($read(bingo.txt, %i) == $nick) {
.notice $nick Din plade er: $replace($sorttok($read(bingotal.txt, %i),46,n),.,$chr(32)) /msg $me !bingo
}
inc %i
}
}
}
.set -u2 %spam 1
}
on *:text:!vis-plade:?: {
if (%spam == $null) {
if (%bingo-on == on) {
var %i = 1
while (%i <= $lines(bingo.txt)) {
if ($read(bingo.txt, %i) == $nick) {
.notice $nick Din plade er: $replace($sorttok($read(bingotal.txt, %i),46,n),.,$chr(32)) /msg $me !bingo
}
inc %i
}
}
}
.set -u2 %spam 1
}
alias bingoon {
.timerbingo 0 5 .bingo
}
alias bingo {
if (%bingo-on == on) {
.set %tay $rand(0,9) $+ $rand(1,9)
if (%bingotal [ $+ [ %tay ] ]) {
.timer 1 0 .bingo
}
if (!%bingotal [ $+ [ %tay ] ]) {
.msg %bingochan nr. %tay
.set %bingotal [ $+ [ %tay ] ] ok
.write tals.txt %tay
}
}
if (%bingo-on == off) { .timerbingo off }
}
on *:text:!bingo:?: {
if (%bingo-on == on) {
.msg $nick 13,14-|-1 Tjekker om det passer :D 13,14-|-1
.set %bb-nick $nick
.unset %i
.unset %fejl
.unset %tals1
.unset %tals2
.unset %tals3
.unset %tals4
.unset %tals5
.unset %tals6
.unset %tals7
.unset %tals8
.tjek
}
}
alias tjek {
set %i 1
while (%i <= $lines(bingo.txt)) {
if ($read(bingo.txt, %i) == %bb-nick) {
.set %b-navn $read(bingo.txt , %i)
.set %b-nummer %i
goto go
.halt
}
inc %i
}
:go
.unset %i
.set %b-tal1 $gettok($read(bingotal.txt, %b-nummer ),1,46)
.set %b-tal2 $gettok($read(bingotal.txt, %b-nummer ),2,46)
.set %b-tal3 $gettok($read(bingotal.txt, %b-nummer ),3,46)
.set %b-tal4 $gettok($read(bingotal.txt, %b-nummer ),4,46)
.set %b-tal5 $gettok($read(bingotal.txt, %b-nummer ),5,46)
.set %b-tal6 $gettok($read(bingotal.txt, %b-nummer ),6,46)
.set %b-tal7 $gettok($read(bingotal.txt, %b-nummer ),7,46)
.set %b-tal8 $gettok($read(bingotal.txt, %b-nummer ),8,46)
goto 1
:1
if (%bingotal [ $+ [ %b-tal1 ] ] == ok) {
.set %tals1 ok
}
if (%bingotal [ $+ [ %b-tal2 ] ] == ok) {
.set %tals2 ok
}
if (%bingotal [ $+ [ %b-tal3 ] ] == ok) {
.set %tals3 ok
}
if (%bingotal [ $+ [ %b-tal4 ] ] == ok) {
.set %tals4 ok
}
if (%bingotal [ $+ [ %b-tal5 ] ] == ok) {
.set %tals5 ok
}
if (%bingotal [ $+ [ %b-tal6 ] ] == ok) {
.set %tals6 ok
}
if (%bingotal [ $+ [ %b-tal7 ] ] == ok) {
.set %tals7 ok
}
if (%bingotal [ $+ [ %b-tal8 ] ] == ok) {
.set %tals8 ok
}
goto ok
:ok
if (!%tals1) { .set %fejl ja }
if (!%tals2) { .set %fejl ja }
if (!%tals3) { .set %fejl ja }
if (!%tals4) { .set %fejl ja }
if (!%tals5) { .set %fejl ja }
if (!%tals6) { .set %fejl ja }
if (!%tals7) { .set %fejl ja }
if (!%tals8) { .set %fejl ja }
if (%fejl == ja) { goto fejl }
if (!%fejl) {
.msg # 13,14-|-1 Vinder fundet %bb-nick 13,14-|-1 %b-tal1 %b-tal2 %b-tal3 %b-tal4 %b-tal5 %b-tal6 %b-tal7 %b-tal8 13,14-|-1
.timerbingo off
.write -c tals.txt
.write -c bingotal.txt
.write -c bingo.txt
.unset %bb-nick
.unset %tals1
.unset %tals2
.unset %tals3
.unset %tals4
.unset %tals5
.unset %tals6
.unset %tals7
.unset %tals8
.unset %b-tall
.unset %b-nummer
.unset %b-navn
.set %bingo-on off
.mode # -m
var %i = 1
while (%i <= 100) {
if (%i < 10) { .unset %bingotal0 [ $+ [ %i ] ] }
if (%i >= 10) { .unset %bingotal [ $+ [ %i ] ] }
inc %i
}
}
:fejl
if (!%tals1) { if (!%hhh) { .set %hhh %b-tal1 } | if (%hhh) { .set %hhh %hhh - %b-tal1 } }
if (!%tals2) { if (!%hhh) { .set %hhh %b-tal2 } | if (%hhh) { .set %hhh %hhh - %b-tal2 } }
if (!%tals3) { if (!%hhh) { .set %hhh %b-tal3 } | if (%hhh) { .set %hhh %hhh - %b-tal3 } }
if (!%tals4) { if (!%hhh) { .set %hhh %b-tal4 } | if (%hhh) { .set %hhh %hhh - %b-tal4 } }
if (!%tals5) { if (!%hhh) { .set %hhh %b-tal5 } | if (%hhh) { .set %hhh %hhh - %b-tal5 } }
if (!%tals6) { if (!%hhh) { .set %hhh %b-tal6 } | if (%hhh) { .set %hhh %hhh - %b-tal6 } }
if (!%tals7) { if (!%hhh) { .set %hhh %b-tal7 } | if (%hhh) { .set %hhh %hhh - %b-tal7 } }
if (!%tals8) { if (!%hhh) { .set %hhh %b-tal8 } | if (%hhh) { .set %hhh %hhh - %b-tal8 } }
.msg %bb-nick 13,14-|-1 Du mangler: %hhh 13,14-|-1
.unset %hhh
}
|