Advertisement
intersys

Untitled

Aug 16th, 2014
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 7.87 KB | None | 0 0
  1. on *:text:*:#: {
  2.   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)) }
  3.   elseif ($1 == !findmix) && ($chan == %MainChannel) {
  4.     if ($2 !isnum 2-5) { msg $chan $stl($nick The number players must be move between 2-5.) }
  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)) }
  6.     elseif ($isinminvites($nick)) { msg $chan $stl(You already in the invites-list ( $+ $isinminvites($nick) $+ ) $+ $chr(44) for remove yourself type: !Remove $+ $chr(46)) }
  7.     else { fx $2 }
  8.   }
  9.   elseif ($1 == !remove) && ($chan == %MainChannel) {
  10.     if (!$isinminvites($nick)) { msg $chan $stl($nick You are not in the invites-list!) }
  11.     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)) }
  12.   }
  13.   elseif ($1 == !votekick) && ($isinmix($nick)) && ($chan != %mainchannel) && ($2) {
  14.     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!)
  15.     set -u30 %votekick [ $+ [ $isinmix($nick) ] ] on
  16.     .timer $+ %votekick [ $+ [ $isinmix($nick) ] ]  1 30 Votekick $isinmix($nick) $address($2,2)
  17.   }
  18.   elseif ($1 == !Yes) && (%votekick [ $+ [ $isinmix($nick) ] ]) { inc %vote.yes [ $+ [ $isinmix($nick) ] ]  }
  19.   elseif ($1 == !no) && (%votekick [ $+ [ $isinmix($nick) ] ]) { inc %vote.no [ $+ [ $isinmix($nick) ] ]  }
  20.   elseif ($1 == !findgame) && ($isinmix($nick)) {
  21.     if (%findgame [ $+ [ $isinmix($nick) ] ]) { msg $chan $stl(You already search a game please wait ...) }
  22.     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) }
  23.     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) }
  24.     elseif ($var(%findgame*,1).value == %findgame [ $+ [ $isinmix($nick) ] ]) {
  25.       findgames $gettok($var(%findgame*,1),2,35) $isinmix($nick)
  26.       msg
  27.       .timerMatch# [ $+ [ $gettok($var(%findgame*,1),2,35) ] ] [ $+ [ $isinmix($nick) ] ] 1 60 findgames $gettok($var(%findgame*,1),2,35) $isinmix($nick) OFF
  28.  
  29.     }
  30.     else {
  31.       .timerfindgame [ $+ [ $isinmix($nick) ] ] 1 300 msg $chan $stl(Not found any game $+ $chr(44) try again later $+ $chr(46) )
  32.       set -u300 %findgame [ $+ [ $isinmix($nick) ] ] $numtok($readini(mixs.ini,$isinmix($nick),players),44)
  33.     }
  34.   }
  35. }
  36. on !*:join:#: {
  37.   if (% [ $+ [ $nick ] ] [ $+ [ GetIN ] ]) {
  38.     writeini mixs.ini $isininvites($nick) players $addtok($readini(mixs.ini,$isininvites($nick),players),$nick,44)
  39.     writeini -n mixs.ini $isininvites($nick) invites $remtok($readini(mixs.ini,$isininvites($nick),invites),$nick,44)
  40.     unset % [ $+ [ $nick ] ] [ $+ [ GetIN ] ]
  41.   }
  42. }
  43. on !*:part:#: {
  44.   if ($isinmix($nick)) { writeini -n mixs.ini $isinmix($nick) players $remtok($readini(mixs.ini,$isinmix($nick),players),$nick,44) }
  45. }
  46.  
  47. ;;;;Aliaes;;;;
  48.  
  49. alias stl return 15»07»10» $1- 10«07«15«
  50. 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 } }
  51. 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 } }
  52.  
  53. alias findgames {
  54.   if ($3 == off) {
  55.     msg # [ $+ [ $1 ] ] $stl(The match has reject $+ $chr(46) (Not the both sides accept for this match))
  56.     msg $2 $stl(The match has reject $+ $chr(46) (Not the both sides accept for this match))
  57.     unset %accept [ $+ [ # ] ] [ $+ [ $1 ] ] [ $+ [ $2 ] ]
  58.   }
  59.   if (%accept [ $+ [ # ] ] [ $+ [ $1 ] ] [ $+ [ $2 ] ] != 2) {
  60.     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)
  61.     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)
  62.   }
  63.   if (%accept [ $+ [ # ] ] [ $+ [ $1 ] ] [ $+ [ $2 ] ] == 2) {
  64.     msg $2 $stl(Get in to # [ $+ [ $1 ] ] for start the match $+ $chr(44) You have 1 minute to get in! )
  65.     msg # [ $+ [ $1 ] ] $stl(The match about to begin $+ $chr(44) please wait to $2 players get in to your channel)
  66.   }
  67. }
  68. alias votekick {
  69.   if (%vote.yes [ $+ [ $2 ] ] > %vote.no [ $+ [ $2 ] ]) {
  70.     msg $2 $stl(The votekick is over! the results is: No: %vote.no [ $+ [ $2 ] ] - Yes: %vote.yes [ $+ [ $2 ] ])
  71.   kick $2 $3 You kicked by votekick ( $+ %vote.yes [ $+ [ $2 ] ] $+ / %vote.no [ $+ [ $2 ] ] $+ ) }
  72.   unset %vote.yes [ $+ [ $2 ] ] %vote.no [ $+ [ $2 ] ] %votekick [ $+ [ $2 ] ]
  73. }
  74.  
  75. alias test {
  76.   var %x = 1, %file = mixs.ini
  77.   while ($ini(mixs.ini,%x)) {
  78.     var %topic = $v1
  79.     if ($readini(%file,%topic,numplayers) > $numtok($readini(%file,%topic,players),44)) && ($readini(%file,%topic,numplayers) == $1) {
  80.       return %topic
  81.     }
  82.     inc %x
  83.   }
  84. }
  85.  
  86. alias fx {
  87.   ;if ($ini(mixs.ini,0) < 19) { msg %Mainchannel $stl(The maximum channels is over $+ $chr(44) please wait to some channel available $+ $chr(46)) }
  88.   if (!$test($1)) {
  89.     var %num = $rand(100,999), %chans = #Mix [ $+ [ %num ] ]
  90.     .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)
  91.     msg $chan $stl(We dont have a free room, please wait a few seconds we create for you new room.)
  92.     ChannelTest %chans $iif(%channel.user,%channel.user,$nick) $1
  93.     writeini -n Mixs.ini %chans NumPlayers $1
  94.     .timer $+ $iif(%channel.user,%channel.user,$nick) 1 5 invite $iif(%channel.user,%channel.user,$nick) %chans
  95.     .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))
  96.     set -u [ $+ [ $timer(close $+ %chans).secs ] ] % [ $+ [ $nick ] ] [ $+ [ GetIN ] ] on
  97.     writeini mixs.ini %chans invites $addtok($readini(mixs.ini,%chans,invites),$iif(%channel.user,%channel.user,$nick),44)
  98.   }
  99.   else {
  100.     invite $nick $test($1)
  101.     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))
  102.     set -u [ $+ [ $timer(close $+ $test($1)).secs ] ] % [ $+ [ $nick ] ] [ $+ [ GetIN ] ] on
  103.     writeini mixs.ini $test($1) invites $addtok($readini(mixs.ini,$test($1),invites),$nick,44)
  104.   }
  105. }
  106.  
  107. alias ChannelTest {
  108.   join $1 | who $1
  109.   set %channel.test on
  110.   set %channel.users $1
  111.   set %channel.user $2
  112.   set %channel.num $3
  113. }
  114.  
  115. raw 366:*: {
  116.   if (%channel.test == on) {
  117.     if ($nick(%channel.users,0) < 1) { remini Mixs.ini %channel.users | fx %channel.num | unset %channel.* | .timer $+ $2 off }
  118.     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.* }
  119.   }
  120. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement