Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ctcp *:VERSION:*: .ctcpreply $nick VERSION Hexrays/Java/AdvOR ver.3.22
- var %rnd_read
- var %Free_winner = $null
- on *:TEXT:*hello*RandomBot*:#: { msg $chan Hello, $nick $+ ! }
- on *:TEXT:*hi, RandomBot*:#: { msg $chan Hello, $nick $+ ! }
- on *:TEXT:*love*RandomBot*:#: { msg $chan Thank you, $nick $+ ! }
- on *:TEXT:*like*RandomBot*:#: { msg $chan Thank you, $nick $+ ! }
- on *:TEXT:*hate*RandomBot*:#: { msg $chan That is sad news, $nick $+ (( }
- on *:TEXT:*vs*RandomBot*:#: { msg $chan Im not fighting with people! only with bots. }
- on *:TEXT:*fight*RandomBot*:#: { msg $chan Im not fighting with people! only with bots. }
- on *:TEXT:*attack*RandomBot*:#: { msg $chan Im not fighting with people! only with bots. }
- on *:TEXT:!randombot:#: { msg $chan RandomBot`s idea and execution: PyroMan }
- on *:TEXT:!rand*:#: {
- var %num = 0
- if ($3 != $null) {
- if ($3 < 0) {
- msg $chan $nick $+ your number need to be positive only.
- return
- }
- if ($2 < 0) {
- msg $chan $nick $+ your number need to be positive only.
- return
- }
- %num = $rand($2, $3)
- msg $chan $nick your result is: %num
- return
- }
- else if ($2 == $null) { msg $chan write a number. }
- else if ($2 < 1) msg $chan Invalid number. Use numbers > 0 only
- else if ($2 == 1) msg $chan $nick $+, , your number is: 1, obviously.
- else if ($2 > 0) {
- %num = $rand(1, $2)
- if (%num > 0) msg $chan $nick $+, , your result is: %num
- else msg $chan $nick , this is not a number even. Strings not acceptible
- }
- }
- on *:TEXT:!rand*:?: {
- var %num = 0
- if ($3 != $null) {
- if ($3 < 0) {
- msg $chan $nick your number need to be positive only.
- return
- }
- if ($2 < 0) {
- msg $chan $nick your number need to be positive only.
- return
- }
- %num = $rand($2, $3)
- msg $chan $nick your number is: %num
- return
- }
- else if ($2 == $null) { msg $chan write a number. }
- else if ($2 < 1) msg $chan $nick Invalid number. Use numbers > 0 only
- else if ($2 == 1) msg $chan $nick your number is: 1, obviously.
- else if ($2 > 0) {
- %num = $rand(1, $2)
- if (%num > 0) msg $chan $nick your number is: %num
- else msg $chan $nick This is not a number even. Strings not acceptible
- }
- }
- on *:TEXT:*!yesno*:#: {
- var %lis = $rand(1, 10)
- if (%lis == 1) msg $chan Yes.
- if (%lis == 2) msg $chan Can't be.
- if (%lis == 3) msg $chan Definitely!
- if (%lis == 4) msg $chan Ofc no.
- if (%lis == 5) msg $chan Yes, of course.
- if (%lis == 6) msg $chan No.
- if (%lis == 7) msg $chan Probably.
- if (%lis == 8) msg $chan more No than Yes.
- if (%lis == 9) msg $chan Yes, for sure.
- if (%lis == 10) msg $chan Nah.
- }
- on *:TEXT:*!YN*:#: {
- var %lis = $rand(1, 10)
- if (%lis == 1) msg $chan Yes.
- if (%lis == 2) msg $chan Can't be.
- if (%lis == 3) msg $chan Definitely!
- if (%lis == 4) msg $chan Ofc no.
- if (%lis == 5) msg $chan Yes, of course.
- if (%lis == 6) msg $chan No.
- if (%lis == 7) msg $chan Probably.
- if (%lis == 8) msg $chan more No than Yes.
- if (%lis == 9) msg $chan Yes, for sure.
- if (%lis == 10) msg $chan Nah.
- }
- on *:TEXT:*!yesno*:?: {
- var %lis = $rand(1, 10)
- if (%lis == 1) msg $chan $nick Yes.
- if (%lis == 2) msg $chan $nick Can't be.
- if (%lis == 3) msg $chan $nick Definitely!
- if (%lis == 4) msg $chan $nick Ofc no.
- if (%lis == 5) msg $chan $nick Yes, of course.
- if (%lis == 6) msg $chan $nick No.
- if (%lis == 7) msg $chan $nick Probably.
- if (%lis == 8) msg $chan $nick more No than Yes.
- if (%lis == 9) msg $chan $nick Yes, for sure.
- if (%lis == 10) msg $chan $nick Nah.
- }
- on *:TEXT:*!YN*:?: {
- var %lis = $rand(1, 10)
- if (%lis == 1) msg $chan $nick Yes.
- if (%lis == 2) msg $chan $nick Can't be.
- if (%lis == 3) msg $chan $nick Definitely!
- if (%lis == 4) msg $chan $nick Ofc no.
- if (%lis == 5) msg $chan $nick Yes, of course.
- if (%lis == 6) msg $chan $nick No.
- if (%lis == 7) msg $chan $nick Probably.
- if (%lis == 8) msg $chan $nick more No than Yes.
- if (%lis == 9) msg $chan $nick Yes, for sure.
- if (%lis == 10) msg $chan $nick Nah.
- }
- on *:TEXT:!ll*:#: {
- if (mod isin $nick) { }
- else {
- msg $chan $nick , you are not a Mod for such request!
- return
- }
- var %count = 0
- VAR %max = 100
- VAR %k = 2
- VAR %i = 1
- VAR %z
- if ($ [ $+ [ $calc(%max + 2) ] ] != $null) {
- msg $chan Sorry, %max players is maximum for now.
- return
- }
- WHILE (%k <= %max) {
- if ($ [ $+ [ %k ] ] != $null) {
- INC %count
- if ($chr(44) isin $ [ $+ [ %k ] ]) {
- %z = $remove($ [ $+ [ %k ] ], $chr(44))
- SET %players. [ $+ [ %count ] ] %z
- }
- else {
- SET %players. [ $+ [ %count ] ] $ [ $+ [ %k ] ]
- }
- }
- INC %k
- }
- VAR %x = $rand(1, %count)
- ACTION LUCKY LOOSER results for $nick :
- ACTION Lucky Looser is: %players. [ $+ [ %x ] ]
- }
- on *:TEXT:!*:#: {
- if (pair isin $1) {
- }
- else if (group isin $1) {
- }
- else {
- return
- }
- if (mod isin $nick) { }
- else {
- msg $chan $nick , you are not a Mod for such request!
- return
- }
- var %count = 0
- VAR %max = 100
- VAR %k = 2
- VAR %i = 1
- VAR %j = 0
- VAR %z
- if ($ [ $+ [ $calc(%max + 2) ] ] != $null) {
- msg $chan Sorry, %max players is maximum for now.
- return
- }
- WHILE (%k <= %max) {
- if ($ [ $+ [ %k ] ] != $null) {
- INC %count
- if ($chr(44) isin $ [ $+ [ %k ] ]) {
- %z = $remove($ [ $+ [ %k ] ], $chr(44))
- SET %players. [ $+ [ %count ] ] %z
- }
- else {
- SET %players. [ $+ [ %count ] ] $ [ $+ [ %k ] ]
- }
- }
- INC %k
- }
- VAR %mr = %count
- WHILE (%i <= %count) {
- VAR %name = $rand(1, %mr)
- SET %pair. [ $+ [ %i ] ] %players. [ $+ [ %name ] ]
- SET %players. [ $+ [ %name ] ] worked
- WHILE (%j <= %mr) {
- if (%players. [ $+ [ %j ] ] == worked ) {
- %y = %j
- WHILE (%y <= %mr) {
- SET %players. [ $+ [ %y ] ] %players. [ $+ [ $calc(%y + 1) ] ]
- if (%y == %mr) {
- SET %players. [ $+ [ %y ] ] $null
- }
- INC %y
- }
- }
- INC %j
- }
- if (%mr > 1) {
- DEC %mr
- }
- INC %i
- %j = 0
- %y = 0
- }
- %i = 1
- VAR %mes = $null
- VAR %p2 = 2
- VAR %p3 = 3
- VAR %p4 = 4
- VAR %p5 = 5
- VAR %p6 = 6
- VAR %p7 = 7
- ; if (%Free_winner != $null) { if (%pair. [ $+ [ %count ] ] == %Free_winner) {
- ; %p = %pair. [ $+ [ %count ] ]
- ; WHILE (%i <= $calc(%count - 1)) {
- ; if (** isin %pair. [ $+ [ %i ] ]) {
- ; }
- ; else {
- ; %pair. [ $+ [ %count ] ] = %pair. [ $+ [ %i ] ]
- ; %pair. [ $+ [ %i ] ] = %p
- ; break
- ; }
- ; INC %i
- ; }
- ; } }
- ; %i = 1
- if (** isin %pair. [ $+ [ %count ] ]) {
- %p = %pair. [ $+ [ %count ] ]
- WHILE (%i <= $calc(%count - 1)) {
- if (** isin %pair. [ $+ [ %i ] ]) {
- }
- else if (%pair. [ $+ [ %i ] ] == %Free_winner) {
- }
- else {
- %pair. [ $+ [ %count ] ] = %pair. [ $+ [ %i ] ]
- %pair. [ $+ [ %i ] ] = %p
- break
- }
- INC %i
- }
- }
- %i = 1
- if (3group isin $1) {
- ACTION Triple GROUPING results for $nick :
- WHILE (%i <= %count) {
- if (%i != 1) {
- if (%i // %p3) {
- if (%i == 3) {
- %mes = %mes $+ / $+ %pair. [ $+ [ %i ] ]
- INC %p3 1
- }
- else {
- if (%i == %count) {
- %mes = %mes $+ $chr(32) $+ , $+ $chr(32) $+ %pair. [ $+ [ %i ] ] is alone
- }
- else {
- %mes = %mes $+ $chr(32) $+ , $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %p3 3
- }
- }
- }
- else {
- if (%i == %count) {
- if (%i // $calc(%p3 - 1)) { %mes = %mes $+ / $+ %pair. [ $+ [ %i ] ] }
- else {
- %mes = %mes $+ / $+ %pair. [ $+ [ %i ] ] $+ / $+ (need_a_partner)
- }
- }
- else {
- %mes = %mes $+ / $+ %pair. [ $+ [ %i ] ]
- }
- }
- }
- else %mes = %mes $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %i
- }
- }
- else if (group isin $1) {
- ACTION GROUPING results for $nick :
- WHILE (%i <= %count) {
- if (%i != 1) {
- if (%i // %p2) {
- %mes = %mes $+ / $+ %pair. [ $+ [ %i ] ]
- INC %p2 2
- }
- else {
- if (%i == %count) {
- %mes = %mes $+ $chr(32) $+ , $+ $chr(32) $+ %pair. [ $+ [ %i ] ] is alone.
- }
- else %mes = %mes $+ $chr(32) $+ , $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- }
- }
- else %mes = %mes $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %i
- }
- }
- else if (6pair isin $1) {
- ACTION Sextuple PAIRINGS results for $nick :
- WHILE (%i <= %count) {
- if (%i != 1) {
- if (%i // %p6 && %i > 5) {
- if (%i == 6) {
- %mes = %mes $+ $chr(32) $+ vs $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %p6 1
- }
- else {
- if (%i == %count) {
- %mes = %mes $+ $chr(32) $+ , $+ $chr(32) $+ %pair. [ $+ [ %i ] ] gets a free round.
- %Free_winner = %pair. [ $+ [ %i ] ]
- }
- else {
- %mes = %mes $+ $chr(32) $+ , $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %p6 6
- }
- }
- }
- else {
- %mes = %mes $+ $chr(32) $+ vs $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- }
- }
- else %mes = %mes $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %i
- }
- }
- else if (5pair isin $1) {
- ACTION Quintuple PAIRINGS results for $nick :
- WHILE (%i <= %count) {
- if (%i != 1) {
- if (%i // %p5 && %i > 4) {
- if (%i == 5) {
- %mes = %mes $+ $chr(32) $+ vs $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %p5 1
- }
- else {
- if (%i == %count) {
- %mes = %mes $+ $chr(32) $+ , $+ $chr(32) $+ %pair. [ $+ [ %i ] ] gets a free round.
- %Free_winner = %pair. [ $+ [ %i ] ]
- }
- else {
- %mes = %mes $+ $chr(32) $+ , $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %p5 5
- }
- }
- }
- else {
- %mes = %mes $+ $chr(32) $+ vs $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- }
- }
- else %mes = %mes $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %i
- }
- }
- else if (4pair isin $1) {
- ACTION Quadruple PAIRINGS results for $nick :
- WHILE (%i <= %count) {
- if (%i != 1) {
- if (%i // %p4 && %i > 3) {
- if (%i == 4) {
- %mes = %mes $+ $chr(32) $+ vs $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %p4 1
- }
- else {
- if (%i == %count) {
- %mes = %mes $+ $chr(32) $+ , $+ $chr(32) $+ %pair. [ $+ [ %i ] ] gets a free round.
- %Free_winner = %pair. [ $+ [ %i ] ]
- }
- else {
- %mes = %mes $+ $chr(32) $+ , $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %p4 4
- }
- }
- }
- else {
- %mes = %mes $+ $chr(32) $+ vs $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- }
- }
- else %mes = %mes $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %i
- }
- }
- else if (3pair isin $1) {
- ACTION Triple PAIRINGS results for $nick :
- WHILE (%i <= %count) {
- if (%i != 1) {
- if (%i // %p3) {
- if (%i == 3) {
- %mes = %mes $+ $chr(32) $+ vs $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %p3 1
- }
- else {
- if (%i == %count) {
- %mes = %mes $+ $chr(32) $+ , $+ $chr(32) $+ %pair. [ $+ [ %i ] ] gets a free round.
- %Free_winner = %pair. [ $+ [ %i ] ]
- }
- else {
- %mes = %mes $+ $chr(32) $+ , $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %p3 3
- }
- }
- }
- else {
- %mes = %mes $+ $chr(32) $+ vs $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- }
- }
- else %mes = %mes $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %i
- }
- }
- else if (pair isin $1) {
- ACTION PAIRINGS results for $nick :
- WHILE (%i <= %count) {
- if (%i != 1) {
- if (%i // %p2) {
- %mes = %mes $+ $chr(32) $+ vs $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %p2 2
- }
- else {
- if (%i == %count) {
- %mes = %mes $+ $chr(32) $+ , $+ $chr(32) $+ %pair. [ $+ [ %i ] ] gets a free round.
- %Free_winner = %pair. [ $+ [ %i ] ]
- }
- else %mes = %mes $+ $chr(32) $+ , $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- }
- }
- else %mes = %mes $+ $chr(32) $+ %pair. [ $+ [ %i ] ]
- INC %i
- }
- }
- ACTION %mes
- }
- on *:TEXT:*:?: {
- if (! isin $1) {
- if (help isin $1) { }
- else {
- return
- }
- }
- msg $chan $nick Available commands:
- msg $chan $nick !random [number] - gives you a random number in definite range. for example "!random 6" will give you random number between 1 and 6 (works here, in private message. also works on channel)
- msg $chan $nick !yesno [question] - gives you an answer positive/negative on your question (works in private messages + works on channel)
- msg $chan $nick !pairings [string1] [string2] [string3]... [string32] - will give you random pairings results for tournaments. RandomBot tool will not allow same player take a free win, if that player already got one before. (works only for MOD, only on channel)
- msg $chan $nick !LL [string1] [string2] [string3]... [string32] - will give you a lucky looser result for tournaments. (works only for MOD, only on channel)
- msg $chan $nick !grouping [string1] [string2] [string3]... [string32] - will give you a random grouping result for tournaments. for example "!grouping a b c d" can give you result like this: " a_&_c b_&_d " (works only for MOD, only on channel)
- msg $chan $nick !3pairings [string1] [string2] [string3]... [string32] - will give you a random triple pairings result for tournaments. for example "!3pairings a b c d e f" can give you result like this: " a vs c vs d , b vs e vs f " (works only for MOD, only on channel)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement