Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:text:*:#: {
- if ($1 == !commands) || ($1 == !help) && ($chan == %MainChannel) { msg $chan $stl(The Commands in The Main Channel: !findmix $+ $chr(44) !remove $+ $chr(46) The Commands in the Mix-Channel: !votekick $+ $chr(44) !findmatch $+ $chr(46)) }
- elseif ($1 == !findmix) && ($chan == %MainChannel) {
- if ($2 !isnum 2-5) { msg $chan $stl($nick The number players must be move between 2-5.) }
- elseif ($isinmix($nick)) { msg $chan $stl(You already in mix-room $+ $chr(44) for exit please part from the mix-room you are in it $+ $chr(46)) }
- elseif ($isinminvites($nick)) { msg $chan $stl(You already in the invites-list ( $+ $isinminvites($nick) $+ ) $+ $chr(44) for remove yourself type: !Remove $+ $chr(46)) }
- else { fx $2 }
- }
- elseif ($1 == !remove) && ($chan == %MainChannel) {
- if (!$isinminvites($nick)) { msg $chan $stl($nick You are not in the invites-list!) }
- else { writeini -n mixs.ini $isininvites($nick) invites $remtok($readini(mixs.ini,$isininvites($nick),invites),$nick,44) | msg $chan $stl(You remove yourself from the invites-list $+ $chr(46)) }
- }
- elseif ($1 == !votekick) && ($isinmix($nick)) && ($chan != %mainchannel) && ($2) {
- msg $chan $stl($nick Turn on votekick for $2 $+ $chr(44) to kick this user type !Yes $+ $chr(44) to kick this player type !No $+ $chr(44) you have 30 seconds to vote!)
- set -u30 %votekick [ $+ [ $isinmix($nick) ] ] on
- .timer $+ %votekick [ $+ [ $isinmix($nick) ] ] 1 30 Votekick $isinmix($nick) $address($2,2)
- }
- elseif ($1 == !Yes) && (%votekick [ $+ [ $isinmix($nick) ] ]) { inc %vote.yes [ $+ [ $isinmix($nick) ] ] }
- elseif ($1 == !no) && (%votekick [ $+ [ $isinmix($nick) ] ]) { inc %vote.no [ $+ [ $isinmix($nick) ] ] }
- elseif ($1 == !findgame) && ($isinmix($nick)) {
- if (%findgame [ $+ [ $isinmix($nick) ] ]) { msg $chan $stl(You already search a game please wait ...) }
- elseif ($numtok($readini(mixs.ini,$isinmix($nick),players),44) != $readini(mixs.ini,$isinmix($nick),numplayers)) { msg $chan $stl(Error: you need to be $readini(mixs.ini,$isinmix($nick),numplayers) players in the channel) }
- elseif ($numtok($readini(mixs.ini,$isinmix($nick),players),44) == $readini(mixs.ini,$isinmix($nick),numplayers)) || (!%findgame [ $+ [ $isinmix($nick) ] ]) { msg $chan $stl(please wait 5 minutes for the bot find match for you) }
- elseif ($var(%findgame*,1).value == %findgame [ $+ [ $isinmix($nick) ] ]) {
- findgames $gettok($var(%findgame*,1),2,35) $isinmix($nick)
- msg
- .timerMatch# [ $+ [ $gettok($var(%findgame*,1),2,35) ] ] [ $+ [ $isinmix($nick) ] ] 1 60 findgames $gettok($var(%findgame*,1),2,35) $isinmix($nick) OFF
- }
- else {
- .timerfindgame [ $+ [ $isinmix($nick) ] ] 1 300 msg $chan $stl(Not found any game $+ $chr(44) try again later $+ $chr(46) )
- set -u300 %findgame [ $+ [ $isinmix($nick) ] ] $numtok($readini(mixs.ini,$isinmix($nick),players),44)
- }
- }
- }
- on !*:join:#: {
- if (% [ $+ [ $nick ] ] [ $+ [ GetIN ] ]) {
- writeini mixs.ini $isininvites($nick) players $addtok($readini(mixs.ini,$isininvites($nick),players),$nick,44)
- writeini -n mixs.ini $isininvites($nick) invites $remtok($readini(mixs.ini,$isininvites($nick),invites),$nick,44)
- unset % [ $+ [ $nick ] ] [ $+ [ GetIN ] ]
- }
- }
- on !*:part:#: {
- if ($isinmix($nick)) { writeini -n mixs.ini $isinmix($nick) players $remtok($readini(mixs.ini,$isinmix($nick),players),$nick,44) }
- }
- ;;;;Aliaes;;;;
- alias stl return 15»07»10» $1- 10«07«15«
- alias isinmix { var %x = 1 | while ($ini(mixs.ini,%x)) { if ($istok($readini(mixs.ini,$ifmatch,players),$1,44)) { return $ini(mixs.ini,%x) } | inc %x } }
- alias isininvites { var %x = 1 | while ($ini(mixs.ini,%x)) { if ($istok($readini(mixs.ini,$ifmatch,invites),$1,44)) { return $ini(mixs.ini,%x) } | inc %x } }
- alias findgames {
- if ($3 == off) {
- msg # [ $+ [ $1 ] ] $stl(The match has reject $+ $chr(46) (Not the both sides accept for this match))
- msg $2 $stl(The match has reject $+ $chr(46) (Not the both sides accept for this match))
- unset %accept [ $+ [ # ] ] [ $+ [ $1 ] ] [ $+ [ $2 ] ]
- }
- if (%accept [ $+ [ # ] ] [ $+ [ $1 ] ] [ $+ [ $2 ] ] != 2) {
- msg $2 $stl(Match has found with the mix-channel $1 $+ $chr(44) The players of the mix: $readini(mixs.ini,# [ $+ [ $1 ] ],players) $+ $chr(44) to accept for this match type !Accept $+ , to reject type !Reject)
- msg # [ $+ [ $1 ] ] $stl(Match has found with the mix-channel $1 $+ $chr(44) The players of the mix: $readini(mixs.ini,$2,players) $+ $chr(44) to accept for this match type !Accept $+ , to reject type !Reject)
- }
- if (%accept [ $+ [ # ] ] [ $+ [ $1 ] ] [ $+ [ $2 ] ] == 2) {
- msg $2 $stl(Get in to # [ $+ [ $1 ] ] for start the match $+ $chr(44) You have 1 minute to get in! )
- msg # [ $+ [ $1 ] ] $stl(The match about to begin $+ $chr(44) please wait to $2 players get in to your channel)
- }
- }
- alias votekick {
- if (%vote.yes [ $+ [ $2 ] ] > %vote.no [ $+ [ $2 ] ]) {
- msg $2 $stl(The votekick is over! the results is: No: %vote.no [ $+ [ $2 ] ] - Yes: %vote.yes [ $+ [ $2 ] ])
- kick $2 $3 You kicked by votekick ( $+ %vote.yes [ $+ [ $2 ] ] $+ / %vote.no [ $+ [ $2 ] ] $+ ) }
- unset %vote.yes [ $+ [ $2 ] ] %vote.no [ $+ [ $2 ] ] %votekick [ $+ [ $2 ] ]
- }
- alias test {
- var %x = 1, %file = mixs.ini
- while ($ini(mixs.ini,%x)) {
- var %topic = $v1
- if ($readini(%file,%topic,numplayers) > $numtok($readini(%file,%topic,players),44)) && ($readini(%file,%topic,numplayers) == $1) {
- return %topic
- }
- inc %x
- }
- }
- alias fx {
- ;if ($ini(mixs.ini,0) < 19) { msg %Mainchannel $stl(The maximum channels is over $+ $chr(44) please wait to some channel available $+ $chr(46)) }
- if (!$test($1)) {
- var %num = $rand(100,999), %chans = #Mix [ $+ [ %num ] ]
- .timerclose [ $+ [ %chans ] ] 1 3600 remini mixs.ini %chans | .timerclose2 [ $+ [ %chans ] ] 1 3600 msg %chans $stl(The time for the channel is over $+ Thank you for using our services %Mainchannel)
- msg $chan $stl(We dont have a free room, please wait a few seconds we create for you new room.)
- ChannelTest %chans $iif(%channel.user,%channel.user,$nick) $1
- writeini -n Mixs.ini %chans NumPlayers $1
- .timer $+ $iif(%channel.user,%channel.user,$nick) 1 5 invite $iif(%channel.user,%channel.user,$nick) %chans
- .timer $+ $iif(%channel.user,%channel.user,$nick) 1 6 msg $iif(%channel.user,%channel.user,$nick) $stl(You invited to mix-channel: %chans $+ $chr(44) the players on the mix: $readini(mixs.ini,%chans,players) ( $+ $numtok($readini(mixs.ini,%chans,players),44) $+ / $readini(mixs.ini,%chans,numplayers) $+ ) $+ $chr(44) the mix-channel closed in $duration($timer(close $+ %chans).secs,2))
- set -u [ $+ [ $timer(close $+ %chans).secs ] ] % [ $+ [ $nick ] ] [ $+ [ GetIN ] ] on
- writeini mixs.ini %chans invites $addtok($readini(mixs.ini,%chans,invites),$iif(%channel.user,%channel.user,$nick),44)
- }
- else {
- invite $nick $test($1)
- msg $nick $stl(You invited to mix-channel: $test($1) $+ $chr(44) the players on the mix: $readini(mixs.ini,$test($1),players) - ( $+ $numtok($readini(mixs.ini,$test($1),players),44) $+ / $readini(mixs.ini,$test($1),numplayers) $+ ) $+ $chr(44) the mix-channel closed in $duration($timer(close $+ $test($1)).secs,2))
- set -u [ $+ [ $timer(close $+ $test($1)).secs ] ] % [ $+ [ $nick ] ] [ $+ [ GetIN ] ] on
- writeini mixs.ini $test($1) invites $addtok($readini(mixs.ini,$test($1),invites),$nick,44)
- }
- }
- alias ChannelTest {
- join $1 | who $1
- set %channel.test on
- set %channel.users $1
- set %channel.user $2
- set %channel.num $3
- }
- raw 366:*: {
- if (%channel.test == on) {
- if ($nick(%channel.users,0) < 1) { remini Mixs.ini %channel.users | fx %channel.num | unset %channel.* | .timer $+ $2 off }
- else { mode %channel.users +isl $calc($readini(mixs.ini,%channel.users,numplayers) + 1) | topic %channel.users $stl(Mix-channel of $readini(mixs.ini,%channel.users,numplayers) players $+ $chr(44) ( $+ %mainchannel $+ )) | unset %channel.* }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement