Advertisement
intersys

Untitled

Aug 15th, 2014
490
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.44 KB | None | 0 0
  1. on *:text:*:#: {
  2.   if ($1 == !findmix) {
  3.     if ($2 !isnum 2-5) { msg $stl($chan $nick The number players must be move between 2-5.) }
  4.     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)) }
  5.     else { fx $2 }
  6.   }
  7. }
  8.  
  9. on !*:join:#: {
  10.   if ($isinmix($nick)) { .timer $+ $nick [ $+ [ 2 ] ] off }
  11. }
  12. on !*:part:#: {
  13.   if ($isinmix($nick)) { writeini -n mixs.ini $isinmix($nick) players $remtok($readini(mixs.ini,$isinmix($nick),players),$nick,44) }
  14. }
  15.  
  16. ;;;;Aliaes;;;;
  17.  
  18. alias stl return 15»07»10» $1- 10«07«15«
  19. 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 } }
  20. alias test {
  21.   var %x = 1, %file = mixs.ini
  22.   while ($ini(mixs.ini,%x)) {
  23.     var %topic = $v1
  24.     if ($readini(%file,%topic,numplayers) > $numtok($readini(%file,%topic,players),44)) && ($readini(%file,%topic,numplayers) == $1) {
  25.       return %topic
  26.     }
  27.     inc %x
  28.   }
  29. }
  30. alias fx {
  31.   if ($test($1) == $null) {
  32.     var %num = $rand(100,999), %chans = #Mix [ $+ [ %num ] ]
  33.     msg $chan $stl(We dont have a free room, please wait a few seconds we create for you new room.)
  34.     ChannelTest %chans $iif(%channel.user != $null,%channel.user,$nick) $1
  35.     writeini -n Mixs.ini %chans NumPlayers $1
  36.     .timer $+ $iif(%channel.user != $null,%channel.user,$nick) 1 5 invite $iif(%channel.user != $null,%channel.user,$nick) %chans
  37.     msg $iif(%channel.user != $null,%channel.user,$nick) $stl(You invited to %chans $+ $chr(44) you have 20 seconds to get in!)
  38.     writeini mixs.ini %chans players $addtok($readini(mixs.ini,%chans,players),$iif(%channel.user != $null,%channel.user,$nick),44)
  39.   }
  40.   else {
  41.     invite $nick $test($1)
  42.     msg $nick $stl(You invited to $test($1) $+ $chr(44) you have 20 seconds to get in!)
  43.     writeini mixs.ini $test($1) players $addtok($readini(mixs.ini,$test($1),players),$nick,44)
  44.     .timer $+ $nick [ $+ [ 2 ] ] 1 20 writeini -n mixs.ini $isinmix($nick) players $remtok($readini(mixs.ini,$isinmix($nick),players),$nick,44)
  45.   }
  46. }
  47. alias ChannelTest {
  48.   join $1 | who $1
  49.   set %channel.test on
  50.   set %channel.users $1
  51.   set %channel.user $2
  52.   set %channel.num $3
  53. }
  54. raw 366:*: {
  55.   if (%channel.test == on) {
  56.     if ($nick(%channel.users,0) < 1) { remini Mixs.ini %channel.users | fx %channel.num | unset %channel.* | .timer $+ $2 off }
  57.     else { mode %channel.users +isl 6 | unset %channel.* }
  58.   }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement