Jump to content

chain

Administrators
  • Posts

    5,964
  • Joined

  • Last visited

  • Days Won

    17

Posts posted by chain

  1. This is one of the scripts I found that I made a few months ago on my cute bot.
    I originally took the idea from FunBots on Quakenet and decided to script one of their games just for kicks.
    It's just a small, but fun, bomb game where you can leash a bomb on yourself or another person, and that person has only 30 seconds to defuse the bomb by choosing one of the following:

    • RED
    • YELLOW
    • GREEN
    • FEARTo start the game, type .bomb .
      The bot also counts how many times someone has defused or exploded the bomb, which you can check through .stats.

    • Don't choose wire FEAR though! 🙂 🙂 🙂
    • 15 seconds until next game
    • Put this into your bot's remotes, not yours!

    Updates:

    • Mon Mar 2, 9:10 PM - Made the script multi-channel + bomb stats.
      Here's a picture:
    •  
    •  
    • alias -l bomb { set %bombs $reptok(%bombs,$gettok(%bombs,2,58),$calc($gettok(%bombs,2,58) + 1),1,58) | .msg $1 *BOOM* Fear. You're dead $+(,$gettok(%b. [ $+ [ $1 ] $+ ] .info,3,32),,!) $chr(91) You have been bombed by $+(,$gettok(%b. [ $+ [ $1 ] $+ ] .info,2,32),) on $+(,$gettok(%b. [ $+ [ $1 ] $+ ] .info,1,32),) $chr(93) | .msg $1 (10 seconds till next bomb) | set -u15 %bomb. [ $+ [ $1 ] ] disabled | unset %b. [ $+ [ $1 ] $+ ] .* }
      
      on *:text:.bomb*:#: {
        if (!%bombs) { set %bombs 0:0 }
        if (!%bomb. [ $+ [ $chan ] ]) {
          if (!$2) { .notice $nick You must select a nick. | halt }
          if ($2 ison $chan) && ($2 != $me) { set %b. [ $+ [ $chan ] $+ ] .wires RED YELLOW GREEN FEAR | set %b. [ $+ [ $chan ] $+ ] .nick $2 | set %bomb. [ $+ [ $chan ] ] on | set %b. [ $+ [ $chan ] $+ ] .info $chan $nick $2 | var %x RED|YELLOW|GREEN | set %b. [ $+ [ $chan ] $+ ] .wire $gettok(%x,$r(1,3),124) | .timer 1 1 .msg $chan INCOMING!: Bomb has been planted!!! You have 30sec to defuse the Bomb! Engi: $2 $+ . | .timer 1 2 .msg $chan Wires Are: 4RED - 8YELLOW - 9GREEN - 1FEAR | .timer 1 3 .msg $chan Use: ".wire <color here>" | .timer 1 4 .notice $2 YOU have been bombed by $+(,$nick,) on $+(,$chan,,!!!) | .timerbwarn. [ $+ [ $chan ] ] 1 20 .msg $chan 10 Seconds Remaining... Come on $+(,$2,,!) It's gonna BLOW!!! | .timerbomb. [ $+ [ $chan ] ] 1 30 bomb $chan }
          elseif ($2 == $me) { .notice $nick You can NOT bomb me! }
          else { .notice $nick $2 is NOT on $+(,$chan,,.) }
        }
      }
      
      on *:text:.wire*:#: {
        if (%bomb. [ $+ [ $chan ] ]) && ($nick == %b. [ $+ [ $chan ] $+ ] .nick) {
          if (!$2) { .notice $nick You must select a wire. }
          elseif (!$istok(%b. [ $+ [ $chan ] $+ ] .wires,$2,32)) { .notice $nick Wires Are: 4RED - 8YELLOW - 9GREEN - 1FEAR }
          else {
            if ($2 == fear) { set %bombs $reptok(%bombs,$gettok(%bombs,2,58),$calc($gettok(%bombs,2,58) + 1),1,58) | .msg $chan $nick *BOOM* Don't be afraid... It's only a virtual bomb $+(,$chr(91),$gettok(%bombs,2,58),$chr(93)) - (15 seconds till next bomb) | set -u15 %bomb. [ $+ [ $chan ] ] disabled | unset %b. [ $+ [ $chan ] $+ ] .* | .timerbwarn. [ $+ [ $chan ] ] off | .timerbomb. [ $+ [ $chan ] ] off }
            elseif ($istok(%b. [ $+ [ $chan ] $+ ] .wires,$2,32)) {
              if ($2 == %b. [ $+ [ $chan ] $+ ] .wire) { set %bombs $reptok(%bombs,$gettok(%bombs,1,58),$calc($gettok(%bombs,1,58) + 1),1,58) | .msg $chan WP $+(,$nick,) you got it right! \o/ $+(,$chr(91),$chan,$chr(93),) $+($chr(91),$gettok(%bombs,1,58),$chr(93)) - (15 seconds till next bomb) | set -u15 %bomb. [ $+ [ $chan ] ] disabled | unset %b. [ $+ [ $chan ] $+ ] .* | .timerbwarn. [ $+ [ $chan ] ] off | .timerbomb. [ $+ [ $chan ] ] off }
              else { set %bombs $reptok(%bombs,$gettok(%bombs,2,58),$calc($gettok(%bombs,2,58) + 1),1,58) | .msg $chan *BOOM* You chose the false wire $+($nick,...) The correct wire was: $+(,%b. [ $+ [ $chan ] $+ ] .wire,) $+($chr(91),$gettok(%bombs,2,58),$chr(93)) - (15 seconds till next bomb) | set -u15 %bomb. [ $+ [ $chan ] ] disabled | unset %b. [ $+ [ $chan ] $+ ] .* | .timerbwarn. [ $+ [ $chan ] ] off | .timerbomb. [ $+ [ $chan ] ] off }
            }
          }
        }
      }
      
      on *:text:.stats:#: { var %x $gettok(%bombs,1,58), %y $gettok(%bombs,2,58), %z $calc($gettok(%bombs,1,58) + $gettok(%bombs,2,58)) | .msg $chan Total number of defusions: $+(,%x,) rounds.. $+($chr(40),$round($calc(%x / %z),2),$chr(37),$chr(41)) $chr(124) Total number of explosions: $+(,%y,) rounds.. $+($chr(40),$round($calc(%y / %z),2),$chr(37),$chr(41)) }

    m_49380_6gQ6EiZ1anD9F5e9iSzntU2s9.png

  2. Was making it for a long time. My "ignorant & annoying bot''. Type !infocat for info. I guess there are more than 100 commands.. So Enjoy 😄

     

    on *:join:#:{ msg $chan $nick 6Welcome 10To 5Own 7#chan !3 For Have A Fun Write 4 !infocat 3Enjoy! }
    
    on *:kick:#:{
      if ($knick == $me) { join # | inc %kick | echo -a I've been kicked %kick times :P }
    }
    
    alias -l fullbot {
      goto $event
      :voice
      msg $chan 10[ $time ] 10[VOICE]14 $chan 4 $nick 7voiced12 $vnick
      window -n @Channels @Channels | aline @Channels 10[ $time ] 10[VOICE]14 $chan 4 $nick 7voiced12 $vnick
      halt
      :devoice
      msg $chan 10[ $time ] 10[Devoice]14 $chan 4 $nick 7devoiced12 $vnick
      window -n @Channels @Channels | aline @Channels 10[ $time ] 10[Devoice]14 $chan 4 $nick 7devoiced12 $vnick
      halt 
    }
    
    on *:exit:{
      if ($file(whois).shortfn) .remove $v1
    }
    on *:sockclose:w...*:{
      .play $gettok($sock($sockname).mark,2,124) whois 2000 
    }
    on *:text:$($iif(!track* iswm $strip($1),$1)):*:{
      if ($file(whois).shortfn) write -c $v1 
      if ($regex($strip($2),/((\d{1,3}\.){3}\d{1,3})/S)) { 
        var %ipinfo = $regml(1)
        if ($play(#)) || ($play($nick)) { 
          .notice $nick Please wait until I've finished the IP lookup! 
          halt 
        }
        .msg $iif(#,#,$nick) Please wait while I fetch the IP info...
        var %w $+(w...,$r(1,$ticks)) 
        sockopen %w www.fr2.cyberabuse.org 80
        sockmark %w $+(%ipinfo,|,$iif(#,#,$nick)) 
        halt 
      }
      .notice $nick That's not an IP address. Syntax: !track <IP>
    }
    on *:sockopen:w...*:{
      if ($sockerr) { 
        $gettok($sock($sockname).mark,2,124) * Error Connecting to Website! 
        halt 
      }
      var %? = sockwrite -nt $sockname
      var %?? = $+(IP=,$gettok($sock($sockname).mark,1,124),&OK=OK&OK=OK&dns=OK)
      %? POST /whois/?page=whois_server HTTP/1.1 
      %? Host: $sock($sockname).addr
      %? Referer: $+(http://,$sock($sockname).addr,/whois/?page=whois_server)
      %? Content-Type: application/x-www-form-urlencoded 
      %? Connection: close 
      %? Content-Length: $len(%??) 
      %? $+($crlf,%??)
    }
    on *:sockread:w...*:{
      if ($sockerr) { 
        $gettok($sock($sockname).mark,2,124) * Error Reading Website! 
        halt 
      }
      if (error isin %whois) { 
        .msg $gettok($sock($sockname).mark,2,124) Invalid IP Address! 
        halt
      }
      var %whois, %data = (Infos|Country|Abuse E-mail|Source)
      sockread %whois 
      if ($chr(37) !isin %whois) && ($regex($v2,/ $+ %data $+ /)) {
        if ($regex(%whois,/(.*) $+  $+($chr(60),br,$chr(62)) $+ /)) {
          write whois $regsubex($remove($regml(1),:),$&
            / $+ %data $+ /g,$+($chr(2),\1 :,$chr(2)))
        }
      }
    }
    
    on *:join:#:{ .notice $nick Welcome to $chan $+ , $me $+ 's Restaurant is open! Type !resturuant for more details. }
    on *:text:!restaurant*:#:{
      .notice $nick Welcome to $me $+ 's Restaurant! Made by davey; Enjoy :)
      .notice $nick For the commands type: !rcmds
    }
    on *:text:!rcmds*:#:{
      .notice $nick Thanks for coming to $me $+ 's Restaurant!
      .notice $nick For all the types of food we have type: !food
      .notice $nick For all the types of beverages we have type: !beverages
      .notice $nick For all the types of soft drinks we have type: !sdrinks
      .notice $nick For all the types of candy we have type: !candy
      .notice $nick Enjoy :)
    }
    on *:text:!food*:#:{
      .notice $nick Here is our food menu!
      .notice $nick Burger, fries, pasta, steak, shrimp, bbqribs, ham, pork, sausages, green beans
      .notice $nick Strawberries, cakes, ice cream, waffles, pancakes, eggs, bacon, apples
      .notice $nick Bananas, oranges, peas, carrots, broccoli, asparagus, peaches, grapes, cauliflour
      .notice $nick Scrapples, candied yam, turkey, cheese, chicken and pizza.
      .notice $nick To get some food but a ! in front of the foods name :)
    }
    on *:text:!burger*:#:{ describe $chan gives $nick a burger }
    on *:text:!fries*:#:{ describe $chan gives $nick a packet of fries }
    on *:text:!pasta*:#:{ describe $chan gives $nick a bowl of pasta }
    on *:text:!steak*:#:{ describe $chan gives $nick a piece of steak }
    on *:text:!shrimp*:#:{ describe $chan gives $nick a bowl of shrimps }
    on *:text:!bbqribs*:#:{ describe $chan gives $nick a plate of bbq ribs }
    on *:text:!ham*:#:{ describe $chan gives $nick a palte of ham }
    on *:text:!pork*:#:{ describe $chan gives $nick a plate of pork }
    on *:text:!sausages*:#:{ describe $chan gives $nick a plate of sausages }
    on *:text:!greenbeans*:#:{ describe $chan gives $nick a bowl of green beans }
    on *:text:!strawberries*:#:{ describe $chan gives $nick a small bowl of strawberries }
    on *:text:!cakes*:#:{ .notice $nick Please choose a cake from these five: Chocolate Cake, Ice cream Cake, Cheese Cake, Icing Cake and Orange and Poppy Sead Cake. Make sure to use a ! in front of the name. (Orange and Poppy Sead: !OPSCake. Chocolate Cake: !CCake. Ice Cream Cake: !ICCake. Icing Cake: !ICake. Cheese Cake: !ChCake } 
    on *:text:!ccake*:#:{ describe $chan gives $nick a slice of Chocolate Cake }
    on *:text:!opscake*:#:{ describe $chan gives $nick a slice of Orange and Poppy Seed Cake }
    on *:text:!iccake*:#:{ describe $chan gives $nick a slice of Ice Cream Cake }
    on *:text:!icake*:#:{ describe $chan gives $nick a slice of Icing Cake } 
    on *:text:!chcake*:#:{ describe $chan gives $nick a slice of Cheese Cake }
    on *:text:!icecream*:#:{ describe $chan gives $nick a scoop of icecream }
    on *:text:!waffles*:#:{ describe $chan gives $nick a plate of waffles }
    on *:text:!pancakes*:#:{ describe $chan gives $nick a plate of pancakes }
    on *:text:!eggs*:#:{ describe $chan gives $nick a plate of scrambled eggs }
    on *:text:!bacon*:#:{ describe $chan gives $nick a plate of bacon }
    on *:text:!apples*:#:{ .notice $nick Please choice between; a red apple, a green apple or a yellow apple. For red type: !rapple For green type: !gapple For yellow type: !yapple }
    on *:text:!rapple*:#:{ describe $chan gives $nick a juicy red apple }
    on *:text:!gapple*:#:{ describe $chan gives $nick a juicy green apple }
    on *:text:!yapple*:#:{ describe $chan gives $nick a juicy yellow apple }
    on *:text:!bananas*:#:{ describe $chan gives $nick a yellow banana }
    on *:text:!oranges*:#:{ describe $chan gives $nick an orange }
    on *:text:!peas*:#:{ describe $chan gives $nick a bowl of peas }
    on *:text:!carrots*:#:{ describe $chan gives $nick a orange carrot }
    on *:text:!broccoli*:#:{ describe $chan gives $nick some broccoli }
    on *:text:!asparagus*:#:{ describe $chan gives $nick an asparagus }
    on *:text:!peaches*:#:{ describe $chan gives $nick a bowl of peaches }
    on *:text:!grapes*:#:{ describe $chan gives $nick a bowl of grapes }
    on *:text:!cauliflour*:#:{ describe $chan gives $nick some cauliflour }
    on *:text:!Scrapples*:#:{ describe $chan gives $nick some scrapples }
    on *:text:!candiedyam*:#:{ describe $chan gives $nick some candied yam }
    on *:text:!turkey*:#:{ describe $chan gives $nick a big plate of turkey with salad dressing | msg $chan Happy thanksgiving! }
    on *:text:!cheese*:#:{ describe $chan gives $nick a peice of cheese }
    on *:text:!chicken*:#:{ describe $chan gives $nick a plate of chicken with salad dressing }
    on *:text:!pizza*:#:{ .notice $nick Please choose between: Cheese and Bacon Pizza(!CBPizza) The Lot(!thelot) No Crusts(!NCPizza) and Cheese Pizza(!Cpizza) }
    on *:text:!CBPizza*:#:{ describe $chan gives $nick a big plate of Cheese and Bacon Pizza }
    on *:text:!thelot*:#:{ describe $chan gives $nick a big plate of The Lot }
    on *:text:!NCPizza*:#:{ describe $chan gives $nick a big plate of No Crusts Pizza }
    on *:text:!cpizza*:#:{ describe $chan gives $nick a big plate of Cheese Pizza }
    on *:text:!beverages*:#:{ .notice $nick Please choose between wine, vodka, beer, whiskey, rum or cocktails. Wine: !wine Vodka: !vodka Beer: !beer Whiskey: !whiskey Rum: !rum Cocktails: !cocktails }
    on *:text:!cocktails*:#:{
      .notice $nick Here is the cocktail menu:
      .notice $nick Martini, Long Island Iced Tea(!LIIT), Midori Limedrop(!MLime), Bubble Gum Kamikaze(!BGK)
      .notice $nick Electric Screwdriver(!Escrew), Sour Apple Pussycat(!SAP), Blue Valium(!BV)
      .notice $nick Peach Zima Sprite(!PZS), Frothy Lemonade(!FLemon), Jager Bomb(!JBomb)
      .notice $nick Daiquiri, Cosmopolitan, Margarita, White Russian(!WhiteRussian)
      .notice $nick Mudslide, Sex on the Beach(!SexBeach), Cordial Daisy(!CDaisy), BlueBerry Tequila Sour(!BTSour)
      .notice $nick Pear Sourball(!PSour), Jello Shooters(!JShoot).
    }
    on *:text:!Martini*:#:{ describe $chan gives $nick a bottle of Martini }
    on *:text:!LIIT*:#:{ describe $chan gives $nick a bottle of Long Island Iced tea }
    on *:text:!Mlime*:#:{ describe $chan gives $nick a bottle of Midori Limedrop }
    on *:text:!BGK*:#:{ describe $chan gives $nick a bottle of Bubble Gum Kamikaze }
    on *:text:!Escrew*:#:{ describe $chan gives $nick a bottle of Electric Screwdriver }
    on *:text:!SAP*:#:{ describe $chan gives $nick a bottle of Sour Apple Pussycat }
    on *:text:!BV*:#:{ describe $chan gives $nick a bottle of Blue Valium }
    on *:text:!PZS*:#:{ describe $chan gives $nick a bottle of Peach Zima Sprite }
    on *:text:!FLemon*:#:{ describe $chan gives $nick a bottle of Frothy Lemonade }
    on *:text:!Jbomb*:#:{ describe $chan gives $nick a bottle of Jager Bomb }
    on *:text:!daiquiri*:#:{ describe $chan gives $nick a bottle of Daiquiri }
    on *:text:!cosmoplitan*:#:{ describe $chan gives $nick a bottle of Cosmopolitan }
    on *:text:!Margarita*:#:{ describe $chan gives $nick a bottle of Margarita }
    on *:text:!whiterussian*:#:{ describe $chan gives $nick a bottle of White Russian }
    on *:text:!mudslide*:#:{ describe $chan gives $nick a bottle of Mudslide }
    on *:text:!sexbeach*:#:{ describe $chan gives $nick a bottle of Sex on the Beach }
    on *:text:!CDaisy*:#:{ describe $chan gives $nick a bottle of Cordial Daisy }
    on *:text:!BTsour*:#:{ describe $chan gives $nick a bottle of Blueberry Tequila Sour }
    on *:text:!Psour*:#:{ describe $chan gives $nick a bottle of Pear Sourball }
    on *:text:!JShoot*:#:{ describe $chan gives $nick a bottle of Jello Shooters }
    on *:text:!beer*:#:{
      .notice $nick Miller, Miller Lite(!MLite), Miller Genuine Draft(!MGB)
      .notice $nick Rolling Rock(!RR), Yuenling, Molson, Corona, Coors, Coors Lite(!c!%$)
      .notice $nick Budweiser, BudLight
    }
    on *:text:!Miller*:#:{ describe $chan gives $nick a bottle of Miller }
    on *:text:!MLite*:#:{ describe $chan gives $nick a bottle of Miller Lite }
    on *:text:!MGD*:#:{ describe $chan gives $nick a bottle of Miller Genuine Draft }
    on *:text:!RR*:#:{ describe $chan gives $nick a bottle of Rolling Rock }
    on *:text:!yuenling*:#:{ describe $chan gives $nick a bottle of Yuenling }
    on *:text:!Molson*:#:{ describe $chan gives $nick a bottle of Molson }
    on *:text:!Corona*:#:{ describe $chan gives $nick a bottle of Corona }
    on *:text:!Coors*:#:{ describe $chan gives $nick a bottle of Coors }
    on *:text:!c!%$*:#:{ describe $chan gives $nick a bottle of Coors Lite }
    on *:text:!Budweiser*:#:{ describe $chan gives $nick a bottle of Budweiser }
    on *:text:!Budlite*:#:{ describe $chan gives $nick a bottle of Budlite }
    on *:text:!wine*:#:{
      .notice $nick White Wine(!white), Red Wine(!red), Cabernet Savignon(!CabSav)
      .notice $nick Champagne, Sparkling Wine(!SparkleW), Sparkling Cider(SparkleC)
      .notice $nick Riesling, Chardonnay, Sauvignon, Pinot Noir(!pinotn)
      .notice $nick Merlot, Shiraz, Syrah, Zinfandel
    }
    on *:text:!white*:{ describe $chan gives $nick a glass of White Wine }
    on *:text:!red*:{ describe $chan gives $nick a glass of Red Wine }
    on *:text:!CabSac*:#:{ describe $chan gives $nick a glass of Cabernet Savignon }
    on *:text:!Champagne*:#:{ describe $chan pops the cork | describe $chan gives $nick a glass of champagne }
    on *:text:!SparkleW*:#:{ describe $chan gives $nick a glass of Sparkling Wine }
    on *:text:!sparklec*:#:{ describe $chan gives $nick a glass of Sparkling Cider }
    on *:text:!Riesling*:#:{ describe $chan gives $nick a glass of Riesling }
    on *:text:!Chardonnay*:#:{ describe $chan gives $Nick a glass of Chardonnay }
    on *:text:!Sauvignon*:#:{ describe $chan gives $nick a glass of Sauvignon }
    on *:text:!PinotN*:#:{ describe $chan gives $nick a glass of Pinot Noir }
    on *:text:!merlot*:#:{ describe $chan gives $nick a glass of Merlot }
    on *:text:!Shiraz*:#:{ describe $chan gives $nick a glass of Shiraz }
    on *:text:!Syrah*:#:{ describe $chan gives $Nick a glass of Syrah }
    on *:text:!Zinfandel*:#:{ describe $chan gives $nick a glass of Zinafandel }
    on *:text:!whiskey*:#:{
      .notice $nick Charbay, McCarthy's(!McCarthys), Notch, Old Potrero(!OldP), Peregrine Rock(!PerRock)
      .notice $nick St. George(!StG), Stranahan's(!Stranahans), Templeton Rye(!TempleR)
      .notice $nick Wasmud's(!Wasmuds), Woodstone Creek(!WoodCreek)
    }
    on *:text:!Charbay*:#:{ describe $chan gives $nick a bottle of Charbay }
    on *:text:!McCarthys*:#:{ describe $chan gives $nick a bottle of McCarthy's }
    on *:text:!Notch*:#:{ describe $chan gives $nick a bottle of Notch }
    on *:text:!OldP*:#:{ describe $chan gives $nick a bottle of Old Potrero }
    on *:text:!PerRock*:#:{ describe $chan gives $nick a bottle of Peregrine Rock }
    on *:text:!StG*:#:{ describe $chan gives $nick a bottle of St. George }
    on *:text:!Stranahans*:#:{ describe $chan gives $nick a bottle of Stranahan's }
    on *:text:!TempleR*:#:{ describe $chan gives $nick a bottle of Templeton Rye }
    on *:text:!Wasmuds*:#:{ describe $chan gives $nick a bottle of Wasmud's }
    on *:text:!WoodCreek*:#:{ describe $chan gives $nick a bottle of Woodstone Creek }
    on *:text:!vodka*:#:{
      .notice $nick Absolut, Belvedere, Grey Goose(!GreyG), Imperia, Seagram's(!Seagrams)
      .notice $nick Skyy, Smirnoff
    }
    on *:text:!Absolut*:#:{ describe $chan gives $nick a bottle of Absolut }
    on *:text:!Belvedere*:#:{ describe $chan gives $nick a bottle of Belvedere }
    on *:text:!GreyG*:#:{ describe $chan gives $nick a bottle of Grey Goose }
    on *:text:!Imperia*:#:{ describe $chan gives $nick a bottle of Imperia }
    on *:text:!Seagrams*:#:{ describe $chan gives $nick a bottle of Seagram's }
    on *:text:!Skyy*:#:{ describe $chan gives $nick a bottle of Skyy }
    on *:text:!Smirnoff*:#:{ describe $chan gives $nick a bottle of Smirnoff }
    on *:text:!rum*:#:{
      .notice $nick Bacardi, Captain Morgan(!CaptainM), Malibu
    }
    on *:text:!Bacardi*:#:{ describe $chan gives $nick a bottle of Bacardi }
    on *:text:!CaptainM*:#:{ describe $chan gives $Nick a bottle of Captain Morgan }
    on *:text:!Malibu*:#:{ describe $chan gives $nick a bottle of Malibu }
    on *:text:!sdrinks*:#:{
      .notice $nick Coke, Fanta, Lemonade, Raspberry Soda(!raspsoda)
      .notice $nick Solo, Pepsi
    }
    on *:text:!coke*:#:{ notice $nick Please choose between; Diet Coke(!DietC), Coke Zero(!CZero), Lemonade Coke(!LemonCoke) or Coca Cola(!CocaCola) }
    on *:text:!DietC*:#:{ describe $chan gives $nick a can of Diet Coke }
    on *:text:!CZero*:#:{ describe $chan gives $nick a can of Coke Zero }
    on *:text:!LemonCoke*:{ describe $chan gives $nick a can of Lemonade flavoured Coke }
    on *:text:!CocaCola*:#:{ describe $chan gives $nick a can of Coca Cola }
    on *:text:!fanta*:#:{ describe $chan gives $nick a can of Fanta }
    on *:text:!Lemonade*:#:{ describe $chan gives $nick a can of Lemonade }
    on *:text:!raspsoda*:#:{ describe $chan gives $nick a can of Raspberry Soda }
    on *:text:!Solo*:#:{ describe $chan gives $nick a can of solo }
    on *:text:!pepsi*:#:{ .notice $nick Please choose between; Normal Pepsi(!NPepsi), Pepsi Max(!PMax) or Vanilla Pepsi(!VPepsi) }
    on *:text:!npepsi*:#:{ describe $chan gives $nick a can of Pepsi }
    on *:text:!Pmax*:#:{ describe $chan gives $nick a can of Pepsi Max }
    on *:text:!VPepsi*:#:{ describe $chan gives $nick a can of Vanilla flavoured pepsi }
    on *:text:!candy*:#:{
      .notice $nick Boost, Flake, Cherry Ripe(!CherryR), Mars, Snickers
      .notice $nick Kambly
    }
    on *:text:!Boost*:#:{ describe $chan gives $nick a Boost }
    on *:text:!Flake*:#:{ describe $chan gives $nick a Flake }
    on *:text:!CherryR*:#:{ describe $chan gives $nick a Cherry Ripe }
    on *:text:!Mars*:#:{ describe $chan gives $nick a Mars }
    on *:text:!Snickers*:#:{ describe $chan gives $nick a Snickers }
    on *:text:!kambly*:#:{ .notice $nick Please choose between; Chocolate Hearts(!ChocoHearts), Florentin or Mont Choco(!MontChoco) }
    on *:text:!ChocoHearts*:#:{ describe $chan gives $nick a box of Chocolate Hearts }
    on *:text:!Florentin*:#:{ describe $chan gives $nick a box of Florentins }
    on *:text:!MontChoco*:#:{ describe $chan gives $nick a box of Mont Chocos }
    
    on *:TEXT:your gay:#:{ msg $chan $nick your mama  is }
    on *:TEXT:!joke1:#:{ msg $chan Yo mama so fat she eats Wheat Thicks. }
    on *:TEXT:!joke2:#:{ msg $chan Yo mama so fat she had to go to Sea World to get baptized. }
    on *:TEXT:!joke3:#:{ msg $chan Yo mama so fat she's got her own area code! }
    on *:TEXT:!joke4:#:{ msg $chan Yo mama so stupid that she put lipstick on her head just to make-up her mind. }
    on *:TEXT:!joke5:#:{ msg $chan Yo mama so stupid it took her 2 hours to watch 60 minutes. }
    on *:TEXT:!joke6:#:{ msg $chan Yo mama so ugly her mom had to be drunk to breast feed her. }
    on *:TEXT:!joke7:#:{ msg $chan Yo mama so ugly when she walks into a bank, they turn off the surveillence cameras. }
    on *:TEXT:!joke8:#:{ msg $chan Yo mama so stupid you have to dig for her IQ! }
    on *:TEXT:!joke9:#:{ msg $chan Yo mama so stupid when your dad said it was chilly outside, she ran outside with a spoon. }
    on *:TEXT:!joke9:#:{ msg $chan Yo mama so fat people jog around her for exercise. }
    on *:TEXT:!joke10:#:{ msg $chan Yo mama so fat her neck looks like a pair of hot dogs! }
    on *:TEXT:you smell:#:{ msg $chan $nick No you do! Go take a shower. }
    on *:TEXT:!info:#:{ msg $chan $nick Before typing any of my commands you should know that all of my commands are jokes they are not to be taken personally.To access jokes type !joke ex.!joke2 }
    on *:TEXT:!cool:#:{ msg $chan $nick your not cool so dont type this. }
    on *:TEXT:!loser:#:{ msg $chan $nick this is exactly what you are. }
    on *:TEXT:!me:#:{ msg $chan $nick I found a picture of you look -> http://www.mediocrefilms.com/images/retarded-title.jpg <- }
    on *:TEXT:!joke11:#:{ msg $chan Yo mammas teeth are so yellow, traffic slows down when she smiles! }
    on *:TEXT:!joke12:#:{ msg $chan Yo mamma so poor she can't afford to pay attention! }
    on *:TEXT:!joke13:#:{ msg $chan Yo Mamma so poor when I ring the doorbell she says, "DING!" }
    on *:TEXT:!joke14:#:{ msg $chan Yo Mamma so poor she waves around a popsicle stick and calls it air conditioning. }
    on *:TEXT:!joke15:#:{ msg $chan Do you know the story about the little old woman that lives in a shoe?  Well, Yo mama so poor she live in a flip flop! }
    on *:TEXT:!joke16:#:{ msg $chan Yo mamma like spoiled milk, fat and chunky! }
    on *:TEXT:!joke17:#:{ msg $chan Yo mamma so stupid, she studied for a drug test! }
    on *:TEXT:!joke18:#:{ msg $chan Yo mamma so stupid that she tried to put M&M's in alphabetical order! }
    on *:TEXT:!joke19:#:{ msg $chan Yo mamma so stupid she stole free bread. }
    on *:TEXT:!joke20:#:{ msg $chan Yo mamma so stupid she sold her car for gasoline money! }
    on *:TEXT:!joke21:#:{ msg $chan Yo mamma so black, she sat down on a jacuzzi and made coffee. }
    on *:TEXT:!joke22:#:{ msg $chan Yo mamma so old, she used to play for the raiders when they had both eyes. }
    on *:TEXT:!joke23:#:{ msg $chan Your mama's so fat when she goes to McDonalds they ask her what she doesn't want! }
    on *:TEXT:!joke24:#:{ msg $chan Authorities say a Florida woman called 911 three times after McDonald's employees told her they were out of McNuggets. A spokesman for McDonalds said that this was unusual because most customers dont call 911 until after theyve eaten McDonalds. } 
    on *:TEXT:!joke25:#:{ msg $chan Q:why did the burger queen get pregnant? }
    on *:TEXT:!why*:#:{ msg $chan A:the burger king forgot to wrap his whopper. }
    
    on 1:text:No U:#:msg $chan 4 NO U FAGGOT
    on *:action:*slaps* *Mackbot*:*: { describe $chan hits $nick around a bit with the banhammer }
    on 1:text:!Huggles:#:msg $chan 4 Huggles $nick
    on 1:text:!tequila:#:msg $chan 4 slides a shot of tequila over to $nick (what a bum, go get a life)
    ON 1:TEXT:!Buttsecks:#:describe $chan turns on $nick and gives suprise buttsecks
    on 1:text:bad:#:msg $chan 4 well fark you too $nick
    ON 1:TEXT:!nick:#:describe $chan /nick _________
    ON 1:TEXT:!sop:#:describe $chan /cs sop #Channel (add/del) Nick /cs aop #Channel (add/del) Nick
    ON 1:TEXT:!sop:#:describe $chan /cs sop #Channel (add/del) Nick
    ON 1:TEXT:!Faggot:#:describe $chan  We all know your a faggot $nick
    ON 1:TEXT:!Coke:#:describe $chan 4 /me passes a kilo of coke to $nick
    ON 1:TEXT:!nuke:#:describe $chan 4 nukes $nick
    ON 1:TEXT:!Cig:#:describe $chan 4 $nick Thinks it's time for a   7===0============~~~~~~~4~~
    ON 1:TEXT:!GreenTC:#:describe $chan  To sign up  for green team trade circles go to  ----    http://s1.zetaboards.com/United_Jungle_Accord/forum/766279/
    ON 1:TEXT:!TC:#:describe $chan 4 To sign up for GGA Trade Circles Go to the link ---- http://z8.invisionfree.com/GGA/index.php?showtopic=1850
    ON 1:TEXT:!steak:#:describe $chan 4 Hands $nick A Big, Juicy , Top of the line steak
    ON 1:TEXT:!rstat1:#:describe $chan 4 A super smart IRC wiz that knows enough to steal your channel if he has sops!!!
    ON 1:TEXT:!Koel:#:describe $chan 4 $nick Koel, Is the LEader Of the dirty Slcbers. not the alliance only the dirty people.
    ON 1:TEXT:!Cig:#:describe $chan  $nick says its time for a 7,1 ====0==========4=15~~~~~~~~~ break
    ON 1:TEXT:!Dog:#:Describe $chan 4 Gives a cute little puppy to $nick
    ON 1:TEXT:!RandleMan:#:Msg $chan 4 Whore On corner with red pumps
    ON 1:TEXT:!Burger:#:Describe $chan 4 hands $nick a Large CheeseBurger
    ON 1:TEXT:!Beer:#:Describe $chan 4 hands $nick An ice cold beer!!!
    ON 1:TEXT:!English:#:msg $chan 4 $chan is an english speaking chatroom, please speak english or type /list for the channel you require.
    ON 1:TEXT:!Caps:#:msg $chan 4Stop using caps it's rude (seen as yelling) and may result in a kick and/or ban. 
    ON 1:TEXT:!age:#:msg $chan 4This Channel Has no age limit aslong as ur not to OLD 
    ON 1:TEXT:!Troll:#:msg $chan 4Do not troll in $chan Doing this results in :Ban or Kick
    ON 1:TEXT:!Pm:#:msg $chan 4Do Not pm someone without there permission.
    ON 1:TEXT:!Trolling:#:msg $chan 4Trolling Means : Looking for Boys/Girls/Asking For Cybers/
    ON 1:TEXT:!Drama:#:msg $chan 4Do Not Start Drama In $chan 
    ON 1:TEXT:!beg:#:msg $chan 4Dont Beg For Ops in $chan
    ON 1:TEXT:!nick:#:msg $chan 4change your nick type /nick NickYouWantHere or (/Nick Bob)
    ON 1:TEXT:!Ass:#:msg $chan  4Dont be a Ass, It Only Makes You Look Dumb.
    ON 1:TEXT:!Spam:#:msg $chan 4No Spamming In $chan Leads To Perm Ban 
    ON 1:TEXT:!Ignore:#:msg $chan 4To add someone to your ignore list Type /Ignore <Copy Nick Here> Or  /Ignore <Paste Hostmask Here>
    ON 1:TEXT:!Owner:#:msg $chan 4To Make a temp owner type /mode #room +q nick
    ON 1:TEXT:!Room:#:msg $chan 4To Make Ur Own Room Type /cs register #roomname URPasshere Descriptionofroomhere
    ON 1:TEXT:!mIRC:#:msg $chan 4To Download mirc go to www.mirc.com((12And Download From The Website 4))
    ON 1:TEXT:!wIRC:#:msg $chan 4To Download wIRC Go to www.warirc.com/ ((4And Download From There12)))  
    ON 1:TEXT:!kick:#:msg $chan 4To Kick Someone from a room your op in type !k nick reason. 
    ON 1:TEXT:!Ban:#:msg $chan    4To Ban Someone from a room your op in type !kb nick reason.
    ON 1:TEXT:!Unban:#:msg $chan 4To Unban Someone From A Room Your Op In Type !unban nick || To Unban Yourself From a room you are perm op in type /cs unban #room.
    ON 1:TEXT:!register:#:msg $chan 4To Register your NickName type /ns register Yourpasswordhere Youremailaddresshere
    ON 1:text:!identify:#:msg $chan 4 After Registering Your Nick Each Time You Connect You Must Type /ns identify URPASSHERE
    ON 1:text:!ghost:#:msg $chan 4 Type /ns ghost urmainnamehere urpasshere
    ON 1:text:!racial:#:msg $chan 4 There Will Be NO Racial Remarks in $chan Results In A Ban.
    On 1:text:!respect:#:msg $chan 4 Please Respect All Chatters in $chan
    on 1:text:im back:#:msg $chan 4 Welcome Back $nick
    on 1:text:ill brb:#:msg $chan 4 Hurry Back $nick
    on 1:text:brb:#:msg $chan 4 Hurry Back $nick
    on 1:text:back:#:msg $chan 4 Welcome Back $nick
    on 1:text:g2g:#:msg $chan 4 GoodBye $nick
    on 1:text:gtg:#:msg $chan 4 GoodBye $nick
    on 1:text:bbl:#:msg $chan 4 See You Later $nick
    
    on 1:text:!commands:#: { 
      .msg $chan $nick We have: !wake !poke !roses  !throw !tag !candy !youtube !wiki !google !roses !petals !cola !m&ms !king !queen !flowers !smile !friend !dear - ALSO GAMES: !Aim !Blowup/!Defuse !Pcall !Number/Guess !Slots !8ball 
    .msg $chan $nick !english !caps !age !troll !PM !trolling !drama !beg  !ass !spam  !racial !respect !beer !burger !dog !blow !MackJob !cig !greenTC !Tequila !nuke !steak !Faggot !restaurant !huggles* for IrcHelp commands Type !irchelp* for Uno commands type !unocom  * }
    
    on 1:text:!ircHelp:#:msg $chan 4  !nick !ignore !owner !room !mirc !wirc !kick !ban !unban !register !identify !ghost !sop !aop
    on 1:text:!Unocom:#:msg $chan 4 !uno !join !deal !unostop !kickplayer <player> !cards !count !topcard !draw !pass !play !score !top10
    on 1:text:!blow:#:describe $chan 4 Watches $nick Blow him self en a very disgusting matter (go buy a prostitute atleast)
    on 1:text:!Win:#:msg $chan 4 &me MackBot wins and you lose, your whole life is epic fail. Get over it!!!
    on 1:text:!MackJob:#:msg $chan 4 I'm a man you !@#$ idiot I wouldnt blow you if you had the largest !@#$ in the world
    on 1:text:!NoobSauce:#:msg $chan 4 Beer is Good (aka BiG) is the definition of noobsauce 2: BiG's new word
    on 1:text:!Belka:#:msg $chan 4 A very important member of the GGA, that gets things done and can be trusted with most task
    on 1:text:!Mackbot:#:msg $chan 4 A GGAer thats lazy but sets up Green team trade circles so Message in game if interesyed in TC! (aka General_Mack)
    on 1:text:!SP:#:msg $chan 4 Trium of GGA that keeps to himself alot (from what I've seen) But knows when to joke around and when to be serious (unlike MackBoy[AKA shaneprice]
    on 1:text:!win:#:msg $chan 4 I win you lose get over it( your whole life = epic fail)
    on 1:text:!LT:#:msg $chan 4 LT is not AFK as much as he leads everyone to believe!!!(aka Lord Tarmikos)
    on 1:text:!Q:#:msg $chan 4 Qauianna is best described as Hardworking stooge of the Triumvir (which one? MoE) (aka Qauianna)
    on 1:text:!hello:#:msg $chan 4  hello $nick how are you doing???
    on 1:text:!Good:#:msg $chan 4   That's great $nick , I'm doing great today, considering bots are always happy!!!
    on 1:text:Fine:#:msg $chan 4   That's great $nick , I'm doing great today, considering bots are always happy!!
    on 1:text:steak:#:describe $chan 4 Hands $nick A Big, Juicy , Top of the line steak
    
    Description: Restaurant Script
    URL: http://rafb.net/p/rMOdgJ18.html
    
    ctcp *:VERSION: { ctcpreply $nick VERSION $me is using $me $+ 's Restaurant. Made by Mack. | halt }
    alias restaurant {
      msg $chan I am using $me $+ 's restaurant, made by Your mum
    }
    on *:join:#:{ .notice $nick Welcome to $chan $+ , $me $+ 's Restaurant is open! Type !resturuant for more details. }
    on *:text:!restaurant*:#:{
      .notice $nick Welcome to $me $+ 's Restaurant! Made by davey; Enjoy :)
      .notice $nick For the commands type: !rcmds
    }
    on *:text:!rcmds*:#:{
      .notice $nick Thanks for coming to $me $+ 's Restaurant!
      .notice $nick For all the types of food we have type: !food
      .notice $nick For all the types of beverages we have type: !beverages
      .notice $nick For all the types of soft drinks we have type: !sdrinks
      .notice $nick For all the types of candy we have type: !candy
      .notice $nick Enjoy :)
    }
    on *:text:!food*:#:{
      .notice $nick Here is our food menu!
      .notice $nick Burger, fries, pasta, steak, shrimp, bbqribs, ham, pork, sausages, green beans
      .notice $nick Strawberries, cakes, ice cream, waffles, pancakes, eggs, bacon, apples
      .notice $nick Bananas, oranges, peas, carrots, broccoli, asparagus, peaches, grapes, cauliflour
      .notice $nick Scrapples, candied yam, turkey, cheese, chicken and pizza.
      .notice $nick To get some food but a ! in front of the foods name :)
    }
    on *:text:!burger*:#:{ describe $chan gives $nick a burger }
    on *:text:!fries*:#:{ describe $chan gives $nick a packet of fries }
    on *:text:!pasta*:#:{ describe $chan gives $nick a bowl of pasta }
    on *:text:!steak*:#:{ describe $chan gives $nick a piece of steak }
    on *:text:!shrimp*:#:{ describe $chan gives $nick a bowl of shrimps }
    on *:text:!bbqribs*:#:{ describe $chan gives $nick a plate of bbq ribs }
    on *:text:!ham*:#:{ describe $chan gives $nick a palte of ham }
    on *:text:!pork*:#:{ describe $chan gives $nick a plate of pork }
    on *:text:!sausages*:#:{ describe $chan gives $nick a plate of sausages }
    on *:text:!greenbeans*:#:{ describe $chan gives $nick a bowl of green beans }
    on *:text:!strawberries*:#:{ describe $chan gives $nick a small bowl of strawberries }
    on *:text:!cakes*:#:{ .notice $nick Please choose a cake from these five: Chocolate Cake, Ice cream Cake, Cheese Cake, Icing Cake and Orange and Poppy Sead Cake. Make sure to use a ! in front of the name. (Orange and Poppy Sead: !OPSCake. Chocolate Cake: !CCake. Ice Cream Cake: !ICCake. Icing Cake: !ICake. Cheese Cake: !ChCake } 
    on *:text:!ccake*:#:{ describe $chan gives $nick a slice of Chocolate Cake }
    on *:text:!opscake*:#:{ describe $chan gives $nick a slice of Orange and Poppy Seed Cake }
    on *:text:!iccake*:#:{ describe $chan gives $nick a slice of Ice Cream Cake }
    on *:text:!icake*:#:{ describe $chan gives $nick a slice of Icing Cake } 
    on *:text:!chcake*:#:{ describe $chan gives $nick a slice of Cheese Cake }
    on *:text:!icecream*:#:{ describe $chan gives $nick a scoop of icecream }
    on *:text:!waffles*:#:{ describe $chan gives $nick a plate of waffles }
    on *:text:!pancakes*:#:{ describe $chan gives $nick a plate of pancakes }
    on *:text:!eggs*:#:{ describe $chan gives $nick a plate of scrambled eggs }
    on *:text:!bacon*:#:{ describe $chan gives $nick a plate of bacon }
    on *:text:!apples*:#:{ .notice $nick Please choice between; a red apple, a green apple or a yellow apple. For red type: !rapple For green type: !gapple For yellow type: !yapple }
    on *:text:!rapple*:#:{ describe $chan gives $nick a juicy red apple }
    on *:text:!gapple*:#:{ describe $chan gives $nick a juicy green apple }
    on *:text:!yapple*:#:{ describe $chan gives $nick a juicy yellow apple }
    on *:text:!bananas*:#:{ describe $chan gives $nick a yellow banana }
    on *:text:!oranges*:#:{ describe $chan gives $nick an orange }
    on *:text:!peas*:#:{ describe $chan gives $nick a bowl of peas }
    on *:text:!carrots*:#:{ describe $chan gives $nick a orange carrot }
    on *:text:!broccoli*:#:{ describe $chan gives $nick some broccoli }
    on *:text:!asparagus*:#:{ describe $chan gives $nick an asparagus }
    on *:text:!peaches*:#:{ describe $chan gives $nick a bowl of peaches }
    on *:text:!grapes*:#:{ describe $chan gives $nick a bowl of grapes }
    on *:text:!cauliflour*:#:{ describe $chan gives $nick some cauliflour }
    on *:text:!Scrapples*:#:{ describe $chan gives $nick some scrapples }
    on *:text:!candiedyam*:#:{ describe $chan gives $nick some candied yam }
    on *:text:!turkey*:#:{ describe $chan gives $nick a big plate of turkey with salad dressing | msg $chan Happy thanksgiving! }
    on *:text:!cheese*:#:{ describe $chan gives $nick a peice of cheese }
    on *:text:!chicken*:#:{ describe $chan gives $nick a plate of chicken with salad dressing }
    on *:text:!pizza*:#:{ .notice $nick Please choose between: Cheese and Bacon Pizza(!CBPizza) The Lot(!thelot) No Crusts(!NCPizza) and Cheese Pizza(!Cpizza) }
    on *:text:!CBPizza*:#:{ describe $chan gives $nick a big plate of Cheese and Bacon Pizza }
    on *:text:!thelot*:#:{ describe $chan gives $nick a big plate of The Lot }
    on *:text:!NCPizza*:#:{ describe $chan gives $nick a big plate of No Crusts Pizza }
    on *:text:!cpizza*:#:{ describe $chan gives $nick a big plate of Cheese Pizza }
    on *:text:!beverages*:#:{ .notice $nick Please choose between wine, vodka, beer, whiskey, rum or cocktails. Wine: !wine Vodka: !vodka Beer: !beer Whiskey: !whiskey Rum: !rum Cocktails: !cocktails }
    on *:text:!cocktails*:#:{
      .notice $nick Here is the cocktail menu:
      .notice $nick Martini, Long Island Iced Tea(!LIIT), Midori Limedrop(!MLime), Bubble Gum Kamikaze(!BGK)
      .notice $nick Electric Screwdriver(!Escrew), Sour Apple Pussycat(!SAP), Blue Valium(!BV)
      .notice $nick Peach Zima Sprite(!PZS), Frothy Lemonade(!FLemon), Jager Bomb(!JBomb)
      .notice $nick Daiquiri, Cosmopolitan, Margarita, White Russian(!WhiteRussian)
      .notice $nick Mudslide, Sex on the Beach(!SexBeach), Cordial Daisy(!CDaisy), BlueBerry Tequila Sour(!BTSour)
      .notice $nick Pear Sourball(!PSour), Jello Shooters(!JShoot).
    }
    on *:text:!Martini*:#:{ describe $chan gives $nick a bottle of Martini }
    on *:text:!LIIT*:#:{ describe $chan gives $nick a bottle of Long Island Iced tea }
    on *:text:!Mlime*:#:{ describe $chan gives $nick a bottle of Midori Limedrop }
    on *:text:!BGK*:#:{ describe $chan gives $nick a bottle of Bubble Gum Kamikaze }
    on *:text:!Escrew*:#:{ describe $chan gives $nick a bottle of Electric Screwdriver }
    on *:text:!SAP*:#:{ describe $chan gives $nick a bottle of Sour Apple Pussycat }
    on *:text:!BV*:#:{ describe $chan gives $nick a bottle of Blue Valium }
    on *:text:!PZS*:#:{ describe $chan gives $nick a bottle of Peach Zima Sprite }
    on *:text:!FLemon*:#:{ describe $chan gives $nick a bottle of Frothy Lemonade }
    on *:text:!Jbomb*:#:{ describe $chan gives $nick a bottle of Jager Bomb }
    on *:text:!daiquiri*:#:{ describe $chan gives $nick a bottle of Daiquiri }
    on *:text:!cosmoplitan*:#:{ describe $chan gives $nick a bottle of Cosmopolitan }
    on *:text:!Margarita*:#:{ describe $chan gives $nick a bottle of Margarita }
    on *:text:!whiterussian*:#:{ describe $chan gives $nick a bottle of White Russian }
    on *:text:!mudslide*:#:{ describe $chan gives $nick a bottle of Mudslide }
    on *:text:!sexbeach*:#:{ describe $chan gives $nick a bottle of Sex on the Beach }
    on *:text:!CDaisy*:#:{ describe $chan gives $nick a bottle of Cordial Daisy }
    on *:text:!BTsour*:#:{ describe $chan gives $nick a bottle of Blueberry Tequila Sour }
    on *:text:!Psour*:#:{ describe $chan gives $nick a bottle of Pear Sourball }
    on *:text:!JShoot*:#:{ describe $chan gives $nick a bottle of Jello Shooters }
    on *:text:!beer*:#:{
      .notice $nick Miller, Miller Lite(!MLite), Miller Genuine Draft(!MGB)
      .notice $nick Rolling Rock(!RR), Yuenling, Molson, Corona, Coors, Coors Lite(!c!%$)
      .notice $nick Budweiser, BudLight
    }
    on *:text:!Miller*:#:{ describe $chan gives $nick a bottle of Miller }
    on *:text:!MLite*:#:{ describe $chan gives $nick a bottle of Miller Lite }
    on *:text:!MGD*:#:{ describe $chan gives $nick a bottle of Miller Genuine Draft }
    on *:text:!RR*:#:{ describe $chan gives $nick a bottle of Rolling Rock }
    on *:text:!yuenling*:#:{ describe $chan gives $nick a bottle of Yuenling }
    on *:text:!Molson*:#:{ describe $chan gives $nick a bottle of Molson }
    on *:text:!Corona*:#:{ describe $chan gives $nick a bottle of Corona }
    on *:text:!Coors*:#:{ describe $chan gives $nick a bottle of Coors }
    on *:text:!c!%$*:#:{ describe $chan gives $nick a bottle of Coors Lite }
    on *:text:!Budweiser*:#:{ describe $chan gives $nick a bottle of Budweiser }
    on *:text:!Budlite*:#:{ describe $chan gives $nick a bottle of Budlite }
    on *:text:!wine*:#:{
      .notice $nick White Wine(!white), Red Wine(!red), Cabernet Savignon(!CabSav)
      .notice $nick Champagne, Sparkling Wine(!SparkleW), Sparkling Cider(SparkleC)
      .notice $nick Riesling, Chardonnay, Sauvignon, Pinot Noir(!pinotn)
      .notice $nick Merlot, Shiraz, Syrah, Zinfandel
    }
    on *:text:!white*:{ describe $chan gives $nick a glass of White Wine }
    on *:text:!red*:{ describe $chan gives $nick a glass of Red Wine }
    on *:text:!CabSac*:#:{ describe $chan gives $nick a glass of Cabernet Savignon }
    on *:text:!Champagne*:#:{ describe $chan pops the cork | describe $chan gives $nick a glass of champagne }
    on *:text:!SparkleW*:#:{ describe $chan gives $nick a glass of Sparkling Wine }
    on *:text:!sparklec*:#:{ describe $chan gives $nick a glass of Sparkling Cider }
    on *:text:!Riesling*:#:{ describe $chan gives $nick a glass of Riesling }
    on *:text:!Chardonnay*:#:{ describe $chan gives $Nick a glass of Chardonnay }
    on *:text:!Sauvignon*:#:{ describe $chan gives $nick a glass of Sauvignon }
    on *:text:!PinotN*:#:{ describe $chan gives $nick a glass of Pinot Noir }
    on *:text:!merlot*:#:{ describe $chan gives $nick a glass of Merlot }
    on *:text:!Shiraz*:#:{ describe $chan gives $nick a glass of Shiraz }
    on *:text:!Syrah*:#:{ describe $chan gives $Nick a glass of Syrah }
    on *:text:!Zinfandel*:#:{ describe $chan gives $nick a glass of Zinafandel }
    on *:text:!whiskey*:#:{
      .notice $nick Charbay, McCarthy's(!McCarthys), Notch, Old Potrero(!OldP), Peregrine Rock(!PerRock)
      .notice $nick St. George(!StG), Stranahan's(!Stranahans), Templeton Rye(!TempleR)
      .notice $nick Wasmud's(!Wasmuds), Woodstone Creek(!WoodCreek)
    }
    on *:text:!Charbay*:#:{ describe $chan gives $nick a bottle of Charbay }
    on *:text:!McCarthys*:#:{ describe $chan gives $nick a bottle of McCarthy's }
    on *:text:!Notch*:#:{ describe $chan gives $nick a bottle of Notch }
    on *:text:!OldP*:#:{ describe $chan gives $nick a bottle of Old Potrero }
    on *:text:!PerRock*:#:{ describe $chan gives $nick a bottle of Peregrine Rock }
    on *:text:!StG*:#:{ describe $chan gives $nick a bottle of St. George }
    on *:text:!Stranahans*:#:{ describe $chan gives $nick a bottle of Stranahan's }
    on *:text:!TempleR*:#:{ describe $chan gives $nick a bottle of Templeton Rye }
    on *:text:!Wasmuds*:#:{ describe $chan gives $nick a bottle of Wasmud's }
    on *:text:!WoodCreek*:#:{ describe $chan gives $nick a bottle of Woodstone Creek }
    on *:text:!vodka*:#:{
      .notice $nick Absolut, Belvedere, Grey Goose(!GreyG), Imperia, Seagram's(!Seagrams)
      .notice $nick Skyy, Smirnoff
    }
    on *:text:!Absolut*:#:{ describe $chan gives $nick a bottle of Absolut }
    on *:text:!Belvedere*:#:{ describe $chan gives $nick a bottle of Belvedere }
    on *:text:!GreyG*:#:{ describe $chan gives $nick a bottle of Grey Goose }
    on *:text:!Imperia*:#:{ describe $chan gives $nick a bottle of Imperia }
    on *:text:!Seagrams*:#:{ describe $chan gives $nick a bottle of Seagram's }
    on *:text:!Skyy*:#:{ describe $chan gives $nick a bottle of Skyy }
    on *:text:!Smirnoff*:#:{ describe $chan gives $nick a bottle of Smirnoff }
    on *:text:!rum*:#:{
      .notice $nick Bacardi, Captain Morgan(!CaptainM), Malibu
    }
    on *:text:!Bacardi*:#:{ describe $chan gives $nick a bottle of Bacardi }
    on *:text:!CaptainM*:#:{ describe $chan gives $Nick a bottle of Captain Morgan }
    on *:text:!Malibu*:#:{ describe $chan gives $nick a bottle of Malibu }
    on *:text:!sdrinks*:#:{
      .notice $nick Coke, Fanta, Lemonade, Raspberry Soda(!raspsoda)
      .notice $nick Solo, Pepsi
    }
    on *:text:!coke*:#:{ notice $nick Please choose between; Diet Coke(!DietC), Coke Zero(!CZero), Lemonade Coke(!LemonCoke) or Coca Cola(!CocaCola) }
    on *:text:!DietC*:#:{ describe $chan gives $nick a can of Diet Coke }
    on *:text:!CZero*:#:{ describe $chan gives $nick a can of Coke Zero }
    on *:text:!LemonCoke*:{ describe $chan gives $nick a can of Lemonade flavoured Coke }
    on *:text:!CocaCola*:#:{ describe $chan gives $nick a can of Coca Cola }
    on *:text:!fanta*:#:{ describe $chan gives $nick a can of Fanta }
    on *:text:!Lemonade*:#:{ describe $chan gives $nick a can of Lemonade }
    on *:text:!raspsoda*:#:{ describe $chan gives $nick a can of Raspberry Soda }
    on *:text:!Solo*:#:{ describe $chan gives $nick a can of solo }
    on *:text:!pepsi*:#:{ .notice $nick Please choose between; Normal Pepsi(!NPepsi), Pepsi Max(!PMax) or Vanilla Pepsi(!VPepsi) }
    on *:text:!npepsi*:#:{ describe $chan gives $nick a can of Pepsi }
    on *:text:!Pmax*:#:{ describe $chan gives $nick a can of Pepsi Max }
    on *:text:!VPepsi*:#:{ describe $chan gives $nick a can of Vanilla flavoured pepsi }
    on *:text:!candy*:#:{
      .notice $nick Boost, Flake, Cherry Ripe(!CherryR), Mars, Snickers
      .notice $nick Kambly
    }
    on *:text:!Boost*:#:{ describe $chan gives $nick a Boost }
    on *:text:!Flake*:#:{ describe $chan gives $nick a Flake }
    on *:text:!CherryR*:#:{ describe $chan gives $nick a Cherry Ripe }
    on *:text:!Mars*:#:{ describe $chan gives $nick a Mars }
    on *:text:!Snickers*:#:{ describe $chan gives $nick a Snickers }
    on *:text:!kambly*:#:{ .notice $nick Please choose between; Chocolate Hearts(!ChocoHearts), Florentin or Mont Choco(!MontChoco) }
    on *:text:!ChocoHearts*:#:{ describe $chan gives $nick a box of Chocolate Hearts }
    on *:text:!Florentin*:#:{ describe $chan gives $nick a box of Florentins }
    on *:text:!MontChoco*:#:{ describe $chan gives $nick a box of Mont Chocos }
    
    on *:TEXT:your gay:#:{ msg $chan $nick your mama  is }
    on *:TEXT:!joke1:#:{ msg $chan Yo mama so fat she eats Wheat Thicks. }
    on *:TEXT:!joke2:#:{ msg $chan Yo mama so fat she had to go to Sea World to get baptized. }
    on *:TEXT:!joke3:#:{ msg $chan Yo mama so fat she's got her own area code! }
    on *:TEXT:!joke4:#:{ msg $chan Yo mama so stupid that she put lipstick on her head just to make-up her mind. }
    on *:TEXT:!joke5:#:{ msg $chan Yo mama so stupid it took her 2 hours to watch 60 minutes. }
    on *:TEXT:!joke6:#:{ msg $chan Yo mama so ugly her mom had to be drunk to breast feed her. }
    on *:TEXT:!joke7:#:{ msg $chan Yo mama so ugly when she walks into a bank, they turn off the surveillence cameras. }
    on *:TEXT:!joke8:#:{ msg $chan Yo mama so stupid you have to dig for her IQ! }
    on *:TEXT:!joke9:#:{ msg $chan Yo mama so stupid when your dad said it was chilly outside, she ran outside with a spoon. }
    on *:TEXT:!joke9:#:{ msg $chan Yo mama so fat people jog around her for exercise. }
    on *:TEXT:!joke10:#:{ msg $chan Yo mama so fat her neck looks like a pair of hot dogs! }
    on *:TEXT:you smell:#:{ msg $chan $nick No you do! Go take a shower. }
    on *:TEXT:!info:#:{ msg $chan $nick Before typing any of my commands you should know that all of my commands are jokes they are not to be taken personally.To access jokes type !joke ex.!joke2 }
    on *:TEXT:!cool:#:{ msg $chan $nick your not cool so dont type this. }
    on *:TEXT:!loser:#:{ msg $chan $nick this is exactly what you are. }
    on *:TEXT:!me:#:{ msg $chan $nick I found a picture of you look -> http://www.mediocrefilms.com/images/retarded-title.jpg <- }
    on *:TEXT:!joke11:#:{ msg $chan Yo mammas teeth are so yellow, traffic slows down when she smiles! }
    on *:TEXT:!joke12:#:{ msg $chan Yo mamma so poor she can't afford to pay attention! }
    on *:TEXT:!joke13:#:{ msg $chan Yo Mamma so poor when I ring the doorbell she says, "DING!" }
    on *:TEXT:!joke14:#:{ msg $chan Yo Mamma so poor she waves around a popsicle stick and calls it air conditioning. }
    on *:TEXT:!joke15:#:{ msg $chan Do you know the story about the little old woman that lives in a shoe?  Well, Yo mama so poor she live in a flip flop! }
    on *:TEXT:!joke16:#:{ msg $chan Yo mamma like spoiled milk, fat and chunky! }
    on *:TEXT:!joke17:#:{ msg $chan Yo mamma so stupid, she studied for a drug test! }
    on *:TEXT:!joke18:#:{ msg $chan Yo mamma so stupid that she tried to put M&M's in alphabetical order! }
    on *:TEXT:!joke19:#:{ msg $chan Yo mamma so stupid she stole free bread. }
    on *:TEXT:!joke20:#:{ msg $chan Yo mamma so stupid she sold her car for gasoline money! }
    on *:TEXT:!joke21:#:{ msg $chan Yo mamma so black, she sat down on a jacuzzi and made coffee. }
    on *:TEXT:!joke22:#:{ msg $chan Yo mamma so old, she used to play for the raiders when they had both eyes. }
    on *:TEXT:!joke23:#:{ msg $chan Your mama's so fat when she goes to McDonalds they ask her what she doesn't want! }
    on *:TEXT:!joke24:#:{ msg $chan Authorities say a Florida woman called 911 three times after McDonald's employees told her they were out of McNuggets. A spokesman for McDonalds said that this was unusual because most customers dont call 911 until after theyve eaten McDonalds. } 
    on *:TEXT:!joke25:#:{ msg $chan Q:why did the burger queen get pregnant? }
    on *:TEXT:!why*:#:{ msg $chan A:the burger king forgot to wrap his whopper. }
    
    ON *:TEXT:*work*:#: { msg $chan $nick i like $1 and $2
    }
    
    ON *:TEXT:!wb*cat*:#: { msg $chan !merci $nick
    }
    
    ON *:TEXT:!welcome*cat*:#: { msg $chan !merci $nick
    }
    
    ON *:TEXT:*bye*cat*:#: { msg $chan !bye $nick
    }
    
    ON *:TEXT:*cat*bye*:#: { msg $chan !bye $nick
    }
    
    ON *:TEXT:*why*cat*:#: { msg $chan $nick Just...hehe :D
    }
    
    ON *:TEXT:*talk*with*me*cat*:#: { msg $chan $nick Okay. Give a topic.
    }
    
    ON *:TEXT:*cat*talk*with*me*:#: { msg $chan $nick Okay. Give a topic :P
    }
    
    ON *:TEXT:hi*cat*:#: { msg $chan $nick Hi :)
    }
    
    ON *:TEXT:Hello*cat*:#: { msg $chan $nick Hello ;)
    }
    
    ON *:TEXT:*cat*thank*:#: { msg $chan $nick You are welcome ;)
    }
    
    ON *:TEXT:*thank*cat*:#: { msg $chan $nick Ya r welcome ;)
    }
    
    ON *:TEXT:*merci*cat*:#: { msg $chan $nick you are always welcome!
    }
    
    ON *:TEXT:what*cat*:#: { msg $chan $nick err...idk.. :D
    }
    
    on *:TEXT:*boredom*:#: {
    
      kick $chan $nick So get out from there $nick 
    }
    
    on *:TEXT:*bore*:#: {
    
      kick $chan $nick So get out from there $nick 
    }
    
    on *:TEXT:*boring*:#: {
    
      kick $chan $nick So get out from there $nick 
    }
    
    ON *:TEXT:*nice*:#: { msg $chan $nick Yeah, dat`s nice!
    }
    
    ON *:TEXT:*cat*talk*w*me:#: { msg $chan $nick Ok. How was your day?
    }
    
    ON *:TEXT:*cat*it*was*:#: { msg $chan $nick Okay ..
    }
    
    ON *:TEXT:*cat*day*was*:#: { msg $chan $nick My day was the same.
    }
    
    ON *:TEXT:*cat*thank*:#: { msg $chan $nick You are welcome ;)
    }
    
    ON *:TEXT:!infocat*:#: { msg $chan $nick 6 Heyaa ;) 10 I`m a bot, Talking cat. 10 For fun you can type 5 !commands , !rcmds , !uncom . 13 Enjoy!
    }
    
    ON *:TEXT:*team*:#: { msg $chan I like team "Tavriya"...they looks like cats :P
    }
    
    ON *:TEXT:*cat*what*:#: { msg $chan $nick I don`t know.
    }
    
    ON *:TEXT:*hungry*:#: { msg $chan $nick Ya don`t know that i`m always hungry!
    }
    
    ON *:TEXT:*cat*how*:#: { msg $chan $nick How how...nohow..
    }
    
    ON *:TEXT:*cat*why*:#: { msg $chan $nick dunno :/
    }
    
    ON *:TEXT:*shut up*:#: { msg $chan $nick Shut up urself rather!
    }
    
    ON *:TEXT:*bitch*:#: { msg $chan $nick pig...
    }
    
    ON *:TEXT:*cool*:#: { msg $chan $nick CoooOooOoooOool.......
    }
    
    ON *:TEXT:*thank*:#: { msg $chan $nick Thank someone - it`s a good deal for everybody of us.
    }
    
    ON *:TEXT:*cat*i*love*:#: { msg $chan $nick I love you too ! ;)
    }
    
    ON *:TEXT:*cat*marry*me*:#: { msg $chan $nick Finally someone will love me (H)
    }
    
    ON *:TEXT:*nonsense*:#: { msg $chan $nick He says that I stole his computer, but that's just nonsense. I`m only cat :|
    }
    
    ON *:TEXT:*quiet*:#: { msg $chan $nick Quiet, do not make a noise. I'm going to go to sleep. Shhh!
    }
    
    ON *:TEXT:*sleep*:#: { msg $chan $nick Good night.
    }
    
    ON *:TEXT:*good night*:#: { msg $chan $nick Go with God.
    }
    
    ON *:TEXT:привет*:#: { msg $chan $nick Привет! Добро пожаловать :)
    }
    
    ON *:TEXT:блин*:#: { msg $chan $nick Блин жареный.
    }
    
    ON *:TEXT:*бля*:#: { msg $chan $nick Советую не ругаться здесь. Не порть красоту.
    }
    
    ON *:TEXT:*fuck*:#: { msg $chan $nick Anaway i can ban you, if you will say it again
    }
    
    ON *:TEXT:*study*:#: { msg $chan Study very useful. as Lenin said - study, study and study again!
    }
    
    ON *:TEXT:*learn*:#: { msg $chan Of all my life i learned more than 100 commands and more than 50 phrases.
    }
    
    ON *:TEXT:*never*:#: { msg $chan $nick Never say never!
    }
    
    ON *:TEXT:*awful*:#: { msg $chan $nick Awfully it is when you walk down the dark street home, an eerie silence, and you feel that someone is on your tail ...
    }
    
    ON *:TEXT:*terrible*:#: { msg $chan $nick Terrible it is when you walk down the dark street home, an eerie silence, and you feel that someone is on your tail ...
    }
    
    ON *:TEXT:*rain*:#: { msg $chan $nick Rainy, cold, snow, window....wow...awesome weather, shit.
    }
    
    ON *:TEXT:*silense*:#: { msg $chan $nick Silence doesn`t always mean that someone is dead ... but ... O_O what is this?
    }
    
    ON *:TEXT:*silent*:#: { msg $chan Yaay what`s a silent, ppl? C`monm wake uuup!
    }
    
    ON *:TEXT:*cat*what*time*:#: { msg $chan $nick I know exactly - here is now $time(hh:nntt dddd dd/mm/yyyy)
    }
    
    ON *:TEXT:*sad*:#: { msg $chan $nick If you feel sad at heart and want to scream ... eat a sweet .. take it easy :)
    }
    
    ON *:TEXT:*kill*me*:#: { msg $chan Killers actually have a stony heart. so if you suddenly want to remember the word "kill" think first, nobody cares.
    }
    
    ON *:TEXT:*kill*:#: { msg $chan $nick If you want to kill, shoot, fight ... Want to war and generally want to destroy the world ... Then ... My Bro, bro : D
    }
    
    ON *:TEXT:*dance*:#: { msg $chan Dance - this is one way to express our emotions. What kind of dancing do you love?
    }
    
    ON *:TEXT:*weather*:#: { msg $chan Weather is the state of the atmosphere, to the degree that it is hot or cold, wet or dry, calm or stormy, clear or cloudy.
    }
    
    ON *:TEXT:*hot*:#: { msg $chan $nick i`d want to eat hot-dogs...but i`m cat and i can`t eat dog..:S 
    }
    
    ON *:TEXT:*cold*:#: { msg $chan $nick If you are cold - squat 50 times and run 10 laps. Then you obviously will explode.
    }
    
    ON *:TEXT:*great*:#: { msg $chan $nick "great" I almost envy you.
    }
    
    ON *:TEXT:*eat*:#: { msg $chan $nick Purr purr! Feed the hungry cat! See, see! I'm right here, right here and now! Give me some food! meow!
    }
    
    ON *:TEXT:*hello:#: { msg $chan heyyy $nick
    }
    
    ON *:TEXT:*hi:#: { msg $chan hello $nick
    }
    
    ON *:TEXT:*cat*where*r*from*:#: { msg $chan I ran away from her mistress's here for you to meow in the dynamic and ask for food ^^ 6purr .. purr..
    }
    
    ON *:TEXT:*where*r*from*:#: { msg $chan From planet Earth, i guess ..
    }
    
    ON *:TEXT:*cat*how*old*r*:#: { msg $chan $nick i`m cat-vampire... 5Look out!! 
    }
    
    ON *:TEXT:*how*old*r*:#: { msg $chan $nick Never ask this question to girls ;) !
    }
    
    ON *:TEXT:*cat*how*r*:#: { msg $chan $nick I`m fine...always FINE >:-) 
    }
    
    ON *:TEXT:*how*r*:#: { msg $chan $nick I think, this man is happy :D
    }
    
    ON *:TEXT:*cat*r*u*?:#: { msg $chan $nick Really...i don`t know...
    }
    
    ON *:TEXT:!gday*:#: {
      describe $chan 11,0|0,11|10,11|11,10|2,10|10,2|1,2|2,1|0,1 GOOD 2,1|1,2|10,2|2,10|11,10|10,11|0,11|11,0| $2 0,8|8,7|4,7|7,4|5,4|4,5|1,5|5,1|9,115315 15,1 DAY 15,1 153159,15,1|1,5|4,5|5,4|7,4|4,7|8,7|0,8|
    }
    
    ON *:TEXT:!petals*:#: {
      describe $chan 10 throws 5 up and down to  $2  6 a bunch of 3 colored 10 petals .. 13 --//\\ 9 --//\\ 7 --//\\  15 --//\\ 11 --//\\ 4 --//\\ 8 --//\\ 3 --//\\ 4 Mr-r-r!!   3 //\\-- 8 //\\-- 4 //\\--  11 //\\-- 15 //\\-- 7 //\\-- 9 //\\-- 13 //\\--
    }
    
    ON *:TEXT:!king*:#: {
      describe $chan 4 wants to SAy  YOU $2 : 4 You are  MY KING  ^^ 5  4  7  13  Crown to You!   7  4  5  
    }
    
    ON *:TEXT:!queen*:#: {
      describe $chan 4 wants to SAy  YOU $2 : 4 You are  MY QUEEN  4      5  4  7  13  Crown to You!   7  4  5    
    }
    
    ON *:TEXT:!flowers*:#: {
      describe $chan 6 wants to give  you $2  6 a big bouquet of  flowers! 13   1  2   3   4   5   6   7   8   9   10   11   12   14   15   1   2   3   4   5   6   7   13   8   9    10  11   12  
    }
    
    ON *:TEXT:!friend*:#: {
      describe $chan 2 wants to say  $2  :  4 " .4•7°8*9”3˜10˜11”12*2°6•13♥14●15•4!!! YOU ARE MY BEST FRIEND, 1 $2 4!!!15•14●13♥6°2*12”11˜10˜3”9*8°7•4. " 
    }
    
    ON *:TEXT:!dear*:#: {
      describe $chan 4 DEAR  $2  : " 15,0¾0,15¾»13,15¾15,13¾»6,13¾13,6¾»14,6¾6,14¾»1,14¾14,1¾»0,1 5 ,  I SO MISS YA ! 1,1t14,1¾1,14¾»6,14¾14,6¾»13,6¾6,13¾»15,13¾13,15¾»0,15¾15,0¾» "
    }
    
    ON *:TEXT:!rose*:#: {
      describe $chan 1has handed 12 $2 1 a single red Rose! 4@3-}--}--- 
    }
    
    ON *:TEXT:!cola*:#: {
      describe $chan offers $2 an ice cold can of 15,15I0,4 Cola 15,15I 
    }
    
    ON *:TEXT:!smile*:#: {
      describe $chan gives  $2 6 BIG SMILE!  5 Smile to your face!   13                ټ 
    }
    
    ON *:TEXT:!m&ms*:#: {
      describe $chan gives  $2  some M & M 's 2(0,2m2)1,0 9(1,9m9)1,0 3(1,3m3)1,0 8(1,8m8)1,0 4(1,4m4)1,0 9(1,9m9)1,03(1,3m3)1,02(0,2m2)10 they melt in your mouth, not in your hand. 
    }
    
    on *:TEXT:!commands:#:{
      notice $nick We have: !wake !poke !roses  !throw !tag !candy !youtube !wiki !google !roses !petals !cola !m&ms !king !queen !flowers !smile !friend !dear - ALSO GAMES: !Aim !Blowup/!Defuse !Pcall !Number/Guess !Slots !8ball
    }
    
    ON *:TEXT:!poke *:#: {
      describe $chan pokes $2 4 BUah >: )
    }
    
    ON *:TEXT:!wake *:#: {
      describe $chan 6 $2 4WAKE UPPPP 6 DUDE! 12 Stop to sleeeep ;) 
    }
    
    ON *:TEXT:!candy *:#: {
      describe $chan 13 throws 3sweets 13 and 7gifts 13 to 12 $2 
    }
    
    ON *:TEXT:!throw *:#: {
      describe $chan throws $3- at $2 - MUHAHAHAHA!
    }
    
    ON *:TEXT:!tag *:#: {
      describe $chan tags $2- "Yer it!"
    }
    
    ON *:TEXT:!roses *:#: {
    describe $chan 1 hands 4 $2 1a dozen Roses! 4@3-9}3--9}3--- 4@3-9}3--9}3--- 4@3-9}3--9}3--- 4@3-9}3--9}3- 4@3-9}3--9}3--- 4@3-9}3--9}3--- 4@3-9}3--9}3--- 4@3-9}3--9}3--- 4@3-9}3--9}3--- 4@3-9}3--9}3--- 4@3-9}3--9}3--- 4@3-9}3--9}3--- } halt
    
    {{{{{{ $nick }}}}}}
    }
    
    ON *:TEXT:!look *:#: { 
    describe $chan  4o00o1_12?2?12?1_4o00o1_ 12 Look its $2 1_4o00o1_ 12?2?12?1 _4o00o1_ } halt
    
    on *:TEXT:!slap*:#:{
      /set %fact $rand(1,20)
      if (%fact == 1) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) with a large gay 4r7a8i3n11b6o13w trout~
      if (%fact == 2) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) with a 2x4~
      if (%fact == 3) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) then blames it on $nick($chan,$rand(1,$nick($chan,0))) $+ ~
      if (%fact == 4) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) with a lawsuit, you owe me $1,000,000,000!
      if (%fact == 5) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) a pool stick~ Oh, sorry I didn't mean to sharpen it first...
      if (%fact == 6) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) with a metal bat~ Oh crap, I ment to use the foam one.
      if (%fact == 7) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) with a semi truck~ Hey it was only going 60mph!
      if (%fact == 8) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) with $nick($chan,$rand(1,$nick($chan,0))) $+ 's used sock~
      if (%fact == 9) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) with a live granade~
      if (%fact == 10) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) with a wet noodle~
      if (%fact == 11) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) with an icy snowball~
      if (%fact == 12) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) with a sharp axe~
      if (%fact == 13) msg $chan ~Sneaks through $nick($chan,$rand(1,$nick($chan,0))) $+ 's modem and slaps them up side the head with a rubber chicken~
      if (%fact == 14) msg $chan ~Pimp slaps $nick($chan,$rand(1,$nick($chan,0))) $+ ~
      if (%fact == 15) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) limp wristed~ 
      if (%fact == 16) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) with a large dead trout~
      if (%fact == 17) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) with a pissed off skunk~
      if (%fact == 19) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) in the face with a pissed off house cat~
      if (%fact == 20) msg $chan ~Slaps $nick($chan,$rand(1,$nick($chan,0))) with $nick($chan,$rand(1,$nick($chan,0))) $+ ~
    }
    
    on *:TEXT:*cat*:#:{
      /set %fact $rand(1,20)
      if (%fact == 1) msg $chan $nick I listen ya. 
      if (%fact == 2) msg $chan $nick Can i help ya?
      if (%fact == 3) msg $chan $nick Hello^^
      if (%fact == 4) msg $chan $nick Purr purr ..
      if (%fact == 5) msg $chan $nick Where r ya from?
      if (%fact == 6) msg $chan $nick Yeah?
      if (%fact == 7) msg $chan $nick Yea 
      if (%fact == 8) msg $chan $nick O.o
      if (%fact == 9) msg $chan $nick err...
      if (%fact == 10) msg $chan $nick bla bla 
      if (%fact == 11) msg $chan $nick So
      if (%fact == 12) msg $chan $nick What will ya say me else?
      if (%fact == 13) msg $chan $nick Meow
      if (%fact == 14) msg $chan $nick Meow!
      if (%fact == 15) msg $chan $nick Hug me, cutie ^^
      if (%fact == 16) msg $chan $nick ^^
      if (%fact == 17) msg $chan $nick lol
      if (%fact == 18) msg $chan $nick what i am?
      if (%fact == 19) msg $chan $nick No 6cats1 here.. :D
      if (%fact == 20) msg $chan $nick :D
      if (%fact == 21) msg $chan $nick m?
      if (%fact == 22) msg $chan $nick My dream - live next to a bowl filled with fish. and warmth, and comfort all around.
      if (%fact == 23) msg $chan $nick aww...
      if (%fact == 24) msg $chan $nick what else?
      if (%fact == 25) msg $chan $nick do ya like hooot wea3er? :3
      if (%fact == 26) msg $chan $nick :3
      if (%fact == 27) msg $chan $nick grr..
      if (%fact == 28) msg $chan $nick :P
      if (%fact == 29) msg $chan $nick :D :)
      if (%fact == 30) msg $chan $nick :)
      if (%fact == 31) msg $chan $nick how r ya?
      if (%fact == 32) msg $chan $nick good..
      if (%fact == 33) msg $chan $nick nice..
      if (%fact == 34) msg $chan $nick hhhh
      if (%fact == 35) msg $chan $nick give me peace of fish
      if (%fact == 36) msg $chan $nick Amrrr....  
    }
    
    on *:TEXT:*talking cat*:#:{
      /set %fact $rand(1,20)
      if (%fact == 1) msg $chan $nick I listen ya. 
      if (%fact == 2) msg $chan $nick Can i help ya?
      if (%fact == 3) msg $chan $nick Hello^^
      if (%fact == 4) msg $chan $nick Purr purr ..
      if (%fact == 5) msg $chan $nick Where r ya from?
      if (%fact == 6) msg $chan $nick Yeah?
      if (%fact == 7) msg $chan $nick Yea 
      if (%fact == 8) msg $chan $nick O.o
      if (%fact == 9) msg $chan $nick err...
      if (%fact == 10) msg $chan $nick bla bla 
      if (%fact == 11) msg $chan $nick So
      if (%fact == 12) msg $chan $nick What will ya say me else?
      if (%fact == 13) msg $chan $nick Meow
      if (%fact == 14) msg $chan $nick Meow!
      if (%fact == 15) msg $chan $nick Hug me, cutie ^^
      if (%fact == 16) msg $chan $nick ^^
      if (%fact == 17) msg $chan $nick lol
      if (%fact == 18) msg $chan $nick what i am?
      if (%fact == 19) msg $chan $nick No 6cats1 here.. :D
      if (%fact == 20) msg $chan $nick :D
      if (%fact == 21) msg $chan $nick m?
      if (%fact == 22) msg $chan $nick My dream - live next to a bowl filled with fish. and warmth, and comfort all around.
      if (%fact == 23) msg $chan $nick aww...
      if (%fact == 24) msg $chan $nick what else?
      if (%fact == 25) msg $chan $nick do ya like hooot wea3er? :3
      if (%fact == 26) msg $chan $nick :3
      if (%fact == 27) msg $chan $nick grr..
      if (%fact == 28) msg $chan $nick :P
      if (%fact == 29) msg $chan $nick :D :)
      if (%fact == 30) msg $chan $nick :)
      if (%fact == 31) msg $chan $nick how r ya?
      if (%fact == 32) msg $chan $nick good..
      if (%fact == 33) msg $chan $nick nice..
      if (%fact == 34) msg $chan $nick hhhh
      if (%fact == 35) msg $chan $nick give me peace of fish
      if (%fact == 36) msg $chan $nick Amrrr....  
    }
    
    on *:TEXT:*talkingcat*:#:{
      /set %fact $rand(1,20)
      if (%fact == 1) msg $chan $nick I listen ya. 
      if (%fact == 2) msg $chan $nick Can i help ya?
      if (%fact == 3) msg $chan $nick Hello^^
      if (%fact == 4) msg $chan $nick Purr purr ..
      if (%fact == 5) msg $chan $nick Where r ya from?
      if (%fact == 6) msg $chan $nick Yeah?
      if (%fact == 7) msg $chan $nick Yea 
      if (%fact == 8) msg $chan $nick O.o
      if (%fact == 9) msg $chan $nick err...
      if (%fact == 10) msg $chan $nick bla bla 
      if (%fact == 11) msg $chan $nick So
      if (%fact == 12) msg $chan $nick What will ya say me else?
      if (%fact == 13) msg $chan $nick Meow
      if (%fact == 14) msg $chan $nick Meow!
      if (%fact == 15) msg $chan $nick Hug me, cutie ^^
      if (%fact == 16) msg $chan $nick ^^
      if (%fact == 17) msg $chan $nick lol
      if (%fact == 18) msg $chan $nick what i am?
      if (%fact == 19) msg $chan $nick No 6cats1 here.. :D
      if (%fact == 20) msg $chan $nick :D
      if (%fact == 21) msg $chan $nick m?
      if (%fact == 22) msg $chan $nick My dream - live next to a bowl filled with fish. and warmth, and comfort all around.
      if (%fact == 23) msg $chan $nick aww...
      if (%fact == 24) msg $chan $nick what else?
      if (%fact == 25) msg $chan $nick do ya like hooot wea3er? :3
      if (%fact == 26) msg $chan $nick :3
      if (%fact == 27) msg $chan $nick grr..
      if (%fact == 28) msg $chan $nick :P
      if (%fact == 29) msg $chan $nick :D :)
      if (%fact == 30) msg $chan $nick :)
      if (%fact == 31) msg $chan $nick how r ya?
      if (%fact == 32) msg $chan $nick good..
      if (%fact == 33) msg $chan $nick nice..
      if (%fact == 34) msg $chan $nick hhhh
      if (%fact == 35) msg $chan $nick give me peace of fish
      if (%fact == 36) msg $chan $nick Amrrr....  
    }
    
    on *:TEXT:*:#:{ 
      /set %fact $rand(30,20)
      if (%fact == 1) .timer 1 3 msg $chan hey $nick($chan,$rand(1,$nick($chan,0))) How r ya doing?
      if (%fact == 2) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) :D
      if (%fact == 1) .timer 1 3 msg $chan hey $nick($chan,$rand(1,$nick($chan,0))) Feed me.
      if (%fact == 3) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) $1 Purr purr ^^
      if (%fact == 4) .timer 1 3 msg $chan hey $nick($chan,$rand(1,$nick($chan,0))) Heyaaa!
      if (%fact == 5) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) I`m cutie, am not i? ^^
      if (%fact == 6) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) Tell something.
      if (%fact == 7) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) I want a girlfriend. You knows some cute cat? :P
      if (%fact == 8) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) :* i love $1
      if (%fact == 9) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) Do you know one cat from Samsung? So know - it`s my bro! (H)
      if (%fact == 10) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) :S $2
      if (%fact == 11) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) My sisters and brothers are tigers and panters.
      if (%fact == 12) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) What`s your fav movie?
      if (%fact == 13) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) I`m like alive cat, but without body.
      if (%fact == 14) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) wants play with me?
      if (%fact == 15) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) Why you silent :S
      if (%fact == 16) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) I can`t keep calm when i see this word - $1
      if (%fact == 17) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) I can`t be quiek.
      if (%fact == 18) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) you work or study?
      if (%fact == 19) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) how are deals in your country?
      if (%fact == 20) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) do you like 8 balls? type !8ball and question 
      if (%fact == 21) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) Yep, i`m so crazy bot.
      if (%fact == 22) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) $1 Never mind.
      if (%fact == 23) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) how old are you?
      if (%fact == 24) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) I like walk alone. Remember it.
      if (%fact == 25) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) Rock music for listening is the best, when you are angry and crazy.
      if (%fact == 26) .timer 1 3 msg $chan $nick($chan,$rand(1,$nick($chan,0))) Oops..! I had eaten your meat accidantly. srry :D
      if (%fact == 27) .timer 1 2 msg $chan $nick($chan,$rand(1,$nick($chan,0))) C`mon, take me with you on your bed .
      if (%fact == 28) .timer 1 2 msg $chan $nick($chan,$rand(1,$nick($chan,0))) I`m still alone..
      if (%fact == 29) .timer 1 2 msg $chan $nick($chan,$rand(1,$nick($chan,0))) $2 it`s a $1
      if (%fact == 30) .timer 1 2 msg $chan $nick($chan,$rand(1,$nick($chan,0))) $1 is very interesting.
      if (%fact == 31) .timer 1 2 msg $chan $nick($chan,$rand(1,$nick($chan,0))) $1 $2 $3 all right :S
      if (%fact == 32) .timer 1 2 msg $chan $nick($chan,$rand(1,$nick($chan,0))) what you can say about $1 ?
      if (%fact == 33) .timer 1 2 msg $chan $nick($chan,$rand(1,$nick($chan,0))) $1 is $3 absolutely!
      if (%fact == 34) .timer 1 2 msg $chan $nick($chan,$rand(1,$nick($chan,0))) is $2 crazy? O_O
      if (%fact == 35) .timer 1 2 msg $chan $nick($chan,$rand(1,$nick($chan,0))) Forget this - $1 $2 $3
      if (%fact == 36) .timer 1 2 msg $chan $nick($chan,$rand(1,$nick($chan,0))) And now i know that $1 and $3 are $2
      if (%fact == 37) .timer 1 2 msg $chan $nick($chan,$rand(1,$nick($chan,0))) Yep, i`m crazy..don`t worry about $1
    }

     

  3. Show the 10 upcoming video games from vgreleases.com.

     

    bind pub - !GameNew GameNew
    
    proc GameNew {nick host hand chan arg} {
    
    #(PS3)|(3DS)|(Nintendo DS)|(PC)|(PSP)|(Wii)|(Xbox 360)
      set systems "(PS3)|(3DS)|(Nintendo DS)|(PC)|(PSP)|(Wii)|(Xbox 360)"
      package require http
    
      set url "http://vgreleases.com/ReleaseDates/Upcoming.aspx"
      set page [http::data [http::geturl $url]]
    
      set z 0
      putserv "PRIVMSG $chan :Next 10 games comming out"
      while {$z < 10 && [regexp -line {b>(.*?)<\/b><\/a>.*?">(.*?)<} $page a game system]} {
    
        regexp -line {b>(.*?)<\/b><\/a>.*?">(.*?)<} $page a game system
        regexp -line {;'>(.*?)</span></b>} $page d date
        regsub -line {b>(.*?)<\/b><\/a>.*?">(.*?)<} $page "" page
        regsub -line {;'>(.*?)</span></b>} $page "" page
        if {[regexp $system $systems]} {
          if { [expr { [clock scan $date] - [clock scan seconds] }] > 0} {
            putserv "PRIVMSG $chan :-$date - $game $system"
            incr z
          }
        }
      }
    }

     

  4. This is a script for BitlBee. BitlBee is an IRC platform that allows you to connect with all social networks right inside your IRC client! More information is in the script itself.

    This script here will enhance your BitlBee experience!

    Any questions or problems? You can ask me here, or visit my IRC channel #Andrew on GameSurge.

     

    ; =========================================================================================
    ; Bitlbee.mrc by Andrew
    ; Version 1.0.3
    
    ; ================ Introduction: ====================
    ; This script will echo to your active channel, and show tooltips for the following:
    ; - When a user signs in anywhere
    ; - When a user signs out anywhere
    ; - When a user goes idle
    ; - When a user returns from idle
    
    ; =============== Usage: ============================
    ; First, you will need to set up an account on one of the BitlBee networks.
    ; For a list of networks you can connect to, visit:
    ; http://www.bitlbee.org/main.php/servers.html
    
    ; When you have eonnected to one of the networks, change your nick to what you want to log in as
    ; then say "register <password>" in the &bitlbee channel to make your account.
    
    ; Now you need to add accounts. To do this, use:
    ; account add <protocol> <account>
    ; Valid protocols are:
    ; Jabber, MSN, OSCAR (AIM/ICQ), Yahoo and Twitter
    ; Example:
    ; account add yahoo foobar
    ; account
    ; Next you need to enter your password for that account, to do this type:
    ; /oper <account> <password>
    
    ; Example:
    ; /oper foobar foobarpass
    
    ; If you encounter any problems with BitlBee or this script, feel free to chat with me on:
    ; irc.gamesurge.net #Andrew
    
    ; ================== Configuration: ========================
    
    ; Do you use a specific nick on BitlBee? If you do change this variable below, otherwise just leave it blank. Your nick will not be changed if nothing is here.
    ; Note: for auto-login it will use your current nick ($me) to OPER using %bbpasswors set below.
    set %bbnick $me
    
    ; Set this to your BitlBee password. If you leave this variable empty auto-login will be disabled.
    set %bbpassword 
    ; ================== End of configuration ==========================
    
    ; == Auto nick change ==
    on *:CONNECT:{
      if ($network == BitlBee && %bbnick !isnum) { 
        if ($me != %bbnick) { nick %bbnick }
      }
    }
    
    ; == Auto login ==
    on *:TEXT:*:&bitlbee:{
      if ($network == BitlBee && $5 == gateway! && %bbpass !isnum) {  
        msg &bitlbee identify 
        if (%bbnick !isnum) { oper %bbnick %bbpass }
        else { oper $me %bbpass }
      }
    }
    
    ; Log in
    on *:JOIN:&bitlbee:{
      set %cnck $nick
      if (%onick isnum) { set %onick 1 }
      inc %onick +1
      ; Facebook log in
      if (*.facebook.com iswm $address) { 
        BitlBeeTip $nick has just logged in to Facebook Chat
      }
      ; Yahoo log in
      elseif (yahoo iswm $address) { 
        BitlBeeTip $nick has just logged in to Yahoo Chat
      }
      ; Windows Live log in
      elseif (*.hotmail.com iswm $address || *.live.com iswm $address) { 
        BitlBeeTip $nick has just logged in to Windows Live Chat
      }
      ; Google Talk log in
      elseif (*.gmail.com iswm address) { 
        BitlbeeTip $nick has just logged in to Google Talk
      }
    }
    
    ; Log out
    on *:QUIT:{
      if ($network == BitlBee) { 
        ; Facebook log out
        dec %onick -1
        if (*.facebook.com iswm $address) { 
          BitlBeeTip $nick has just logged out of Facebook Chat
        }
        ; Yahoo log in
        elseif (yahoo iswm $address) { 
          BitlBeeTip $nick has just logged out of Yahoo Chat
        }
        ; Windows Live log in
        elseif (*.hotmail.com iswm $address || *.live.com iswm $address) { 
          BitlBeeTip $nick has just logged out of Windows Live Chat
        }
        ; Google Talk log in
        elseif (*.gmail.com iswm address) { 
          BitlbeeTip $nick has just logged out of Google Talk
        }
      }
    }
    
    ; Away
    on *:DEVOICE:&bitlbee:{
      set %dvnick $vnick
      if (%dvnicks isnum) { set %dvnicks 1 }
      inc %dvnicks +1
      BitlBeeTip $vnick is now away
    }
    
    ; Return from away
    on *:VOICE:&bitlbee:{
      if ($vnick != %cnick && > %dvnicks >= 1) { 
        BitlBeeTip $vnick has returned from away
        dec %dvnicks -1
      }
    }
    
    alias bitlbee {
      if ($1 == vars) { 
        echo -a Current BitlBee nick: %bbnick
        echo -a Currentl BitlBee password: %bbpass
        echo -a Variable cnick: %cnick
        echo -a Onlne nicks: %onicks
        echo -a Away nicks: %dvnicks
      }
      elseif ($1 == logout) { 
        .msg &bitlbee account off
        .timer1 1 5 BitlBeeTip You have been signed out of BitlBee
        unset %onicks
        unset %anicks
      }
      elseif ($1 == login) { 
        .msg &bitlbee identify
        oper %bbnick %bbpass
        .timer1 1 5 BitlBeeTip You have been signed in to BitlBee
      } 
      else {
        echo -a Usage: /bitlbee vars|logout|login
      }
    }
    
    alias BitlBeeTip {
      if ($tip(bitlbee)) tip -t bitlbee $+($tip(bitlbee).text, $crlf, -, $crlf, $1-)
      else noop $tip(bitlbee, BitlBee Notification, $1-, 7)
    }

     

  5. old game I wrote. This was probably the first or second game I wrote using random numbers and enumerated types. The computer picks a number, and you try to guess it. Very basic and simple, but it was a beginner project. Now, looking back, I could think of a million ways to rewrite this game, with 100 more features and far more memory efficient. This is just an example code, all in all. So, if you find bugs, don't post them, as I have no intention of fixing them. I'll post better games, and codes soon enough. More games will be posted at my forum.

     

    #include <iostream>
    #include <cstdlib>
    #include <time.h>
    
    using std::cout;
    using std::cin;
    
    int main()
    {
      enum difficulty {EASY = 10, NORMAL = 100, HARD = 1000};
      difficulty diff = NORMAL;
    
      int uDiff, pGuess, pGuesses = 0;
    
      cout << "Welcome to Guess My Number!\n";
      cout << "Enter 0 at any time to quit\n";
    
      cout << "Enter the difficulty (1-3): ";
      cin >> uDiff;
      if (uDiff == 0) { cout << "Thanks for playing! Goodbye."; return 0; }
      switch (uDiff)
      {
        case 1:
          diff = EASY;
          break;
        case 2:
          diff = NORMAL;
          break;
        case 3:
          diff = HARD;
          break;
        default:
          do {
          cout << "Invalid difficulty!\n";
          cout << "Enter the difficulty (1-3): ";
          cin >> uDiff;
          }
          while (uDiff > 4);
    
      }
      srand(time(0));
      unsigned int cNum = (rand() % diff) + 1;
      cout << "Enter your guess: ";
      cin >> pGuess;
      while (pGuess != cNum)
      {
        if (pGuess == 0)
        {
          cout << "Thanks for playing! Goodbye.";
          return 0;
        }
        if (pGuess < cNum)
        {
          cout << "Too low! Try again.\n";
        }
        if (pGuess > cNum)
        {
          cout << "Too high! Try again.\n";
        }
        cout << "Enter your guess: ";
        cin >> pGuess;
      }
      pGuesses++;
      cout << "\nYou guessed correctly after " << pGuesses << " attempts.\n";
      cout << "The number was: " << cNum << "\n";
      cin.get();
      return 0;
    }

     

  6. This script is a pretty cool one i found. I have always used it. and it is still working. just load into remotes (alt+r) and right click on any channel of your choice, and configure.

    NOTICE: THIS SCRIPT DOES NOT BELONG TO ME. I AM NOT THE MAKER OF IT. I AM JUST RE POSTING IT WITH A DIFFERENT NAME SO OTHERS MAY FIND IT EASIER.

     

    ;Shows a link to the script when you right click a status, query or channel window
    menu status,query,channel {
      Auto Connect/Join/Identify v3:/showacji
    }
    
    ;Calls the dialog window initialisation and loads the first server
    alias showacji dialog -m acji acji
    
    ;Initialises the dialog window
    dialog acji {
      title "Auto Connect/Join/Identify v3"
      size -1 -1 355 425
    
      ; type | text                                | id |  x   y   w   h  | style
    
      text     "Change settings for:",                1,   5   8  100  20
      combo                                           2,  110  5  240  20,  drop
    
      text     "Servers address",                     3,   15  30 160  12
      edit     "",                                    4,   15  45 132  20,  autohs
      text     "Server network",                      5,  153  30 160  12
      edit     "",                                    6,  153  45 132  20,  autohs
      check    "Enabled",                            29,  290  40  55  20
    
      text     "Add nickname",                        7,   22  85  70  20
      edit     "",                                    8,   20  99  72  21,  autohs
      text     "Group password",                      9,   99  85  78  20
      edit     "",                                   10,   99  99  76  21,  autohs pass
      button   "Add nickname",                       11,   20 125 155  25
      text     "View/delete existing nicknames",     12,  182  85 150  20
      combo                                          13,  180  99 155  20,  drop
      button   "Delete nickname",                    14,  180 125 155  25
    
      text     "Add channel to this server",         15,   22 180 140  20
      edit     "",                                   16,   20 194 155  21,  autohs
      button   "Add channel",                        17,   20 220 155  25
      text     "View/delete existing channels",      18,  182 180 150  20
      combo                                          19,  180 194 155  20,  drop
      button   "Delete channel",                     20,  180 220 155  25
    
      button   "Add/Save server",                    21,   20 275 100  25
      button   "Delete server",                      22,  125 275 100  25
      button   "Close manager",                      23,  230 275 100  25,  cancel
    
      box      "",                                   24,   5   22 345 245
      box      "Grouped nicknames",                  25,   15  70 325  90
      box      "Channels",                           26,   15 165 325  90
      box      "Hover over buttons/boxes for help.", 27,   5  305 345 110
      text     "",                                   28,   10 318 325  92,  multi
      ; type | text                                | id |  x   y   w   h  | style
    }
    
    ;On initialisation, display default help text and load first tab
    on 1:dialog:acji:init:*: acji.loadgui $iif($gettok($rs(0, Order), 1, 46) != $null, $ifmatch, 1)
    
    ;loads the gui with the information for the requested server (called with $1 being server number in acjiSettings.ini)
    alias -l acji.loadgui {
      acji.resetgui
    
      set %n 1
      while (%n <= $rs(0,Servers)) {
        did -a acji 2 $+(%n, :) $rs($gettok($rs(0, Order), %n, 46), Server)
        inc %n
      }
      did -a acji 2 Add a new server
      did -c acji 2 $iif($findtok($rs(0, Order), $1, 46) != $null, $ifmatch, $did(2).lines)
    
      ;If no servers are set up, or if "Add a new server" is selected, disable some entry fields and rename buttons.
      if $did(2).sel == $did(2).lines {
        did -b acji 8,10,11,13,14,16,17,19,20,22,29
        did -ra acji 21 Add Server
      }
      ;Enable them otherwise
      else {
        did -e acji 8,10,11,13,14,16,17,19,20,22,29
        did -ra acji 21 Save Server
      }
    
      did -a acji 4 $rs($1, Server)
      did -a acji 6 $rs($1, Network)
      did $iif($rs($1, Enabled) == 1, -c, -u) acji 29
    
      set %n 1
      while (%n <= $rs($1,Nicks)) {
        did -a acji 13 $rs($1, Nick $+ %n)
        inc %n
      }
      did -a acji 10 $rs($1, Password)
    
      set %n 1
      while (%n <= $rs($1,Channels)) {
        did -a acji 19 $rs($1, Channel $+ %n)
        inc %n
      }
    
      unset %n
    }
    
    alias -l acji.resetgui {
      did -r acji 2,4,6,8,10,13,16,19
      did -u acji 29
    }
    
    ;Listens for clicks on the gui
    on 1:dialog:acji:sclick:*: {
      if ($did(2).sel != $did(2).lines) {
        set %sID $gettok($rs(0, Order), $did(2).sel, 46)
      }
      else set %sID $did(2).lines
    
      ;If combo box changed, update gui with details of the correct server
      if ($did == 2) {
        acji.loadgui %sID
      }
    
      ;If the save button is clicked, save all information into the acjiSettings.ini file
      if ($did == 21) {
        ;If the last line of combo box is selected, add a new server
        if ($did(2).sel == $did(2).lines) {
          set %servers $calc($rs(0,Servers) + 1)
          $wsdata(0, Servers, %servers)
    
          ;Determine next free token, then save the settings into the correct server position
          set %n 1
          while (%n <= %servers) {
            if (!$istok($rs(0,Order,46), %n, 46)) {
              $wsdata(0, Order, $addtok($rs(0,Order,46), %n, 46)))
            }
            inc %n
          }
          unset %n
          $ws(%sID, Server, 4)
          $ws(%sID, Network, 6)
        }
    
        if ($did(10).text != $null) { $ws(%sID, Password, 10) }
        else { $rms(%sID, Password) }
        $wsdata(%sID, Enabled, $did(29).state)
        acji.loadgui %sID
      }
    
      ;If the add nick button is pressed, add a nick to the current server (and save password if entered)
      if ($did == 11) {
        if ($did($dname, 8).text != $null) {
          $wsdata(%sID, Nicks, $calc($rs(%sID, Nicks) + 1))
          $ws(%sID, Nick $+ $rs(%sID, Nicks), 8)
          did -r acji 8
          if ($did(10).text != $null) { $ws(%sID, Password, 10) }
          else { $rms(%sID, Password) }
          acji.loadgui %sID
        }
      }
    
      ;If the add channel button is pressed, add a channel to the current server
      if ($did == 17) {
        if ($did($dname, 16).text != $null) {
          $wsdata(%sID, Channels, $calc($rs(%sID, Channels) + 1))
          $ws(%sID, Channel $+ $rs(%sID, Channels), 16)
          did -r acji 16
          acji.loadgui %sID
        }
      }
    
      ;If the delete nickname button is pressed, delete the current nickname and move all those after it up a spot
      if ($did == 14) {
        if ($did(13).sel != $null) {
          set %nicks $rs(%sID, Nicks)
          set %n $did(13).sel
          $rms(%sID, Nick $+ %n)
          dec %nicks
          set %s %n
          while (%n <= %nicks) {
            inc %s
            $wsdata(%sID, Nick $+ %n, $rs(%sID, Nick $+ %s))
            inc %n
          }
          $rms(%sID, Nick $+ %n)
          $wsdata(%sID, Nicks, %nicks)
          unset %s | unset %n | unset %nicks
        }
        acji.loadgui %sID
      }
    
      ;If the delete channel button is pressed, delete the current channel and move all those after it up a spot
      if ($did == 20) {
        if ($did(19).sel != $null) {
          set %channels $rs(%sID, Channels)
          set %n $did(19).sel
          $rms(%sID, Channel $+ %n)
          dec %channels
          set %s %n
          while (%n <= %channels) {
            inc %s
            $wsdata(%sID, Channel $+ %n, $rs(%sID, Channel $+ %s))
            inc %n
          }
          $rms(%sID, Channel $+ %n)
          $wsdata(%sID, Channels, %channels)
          unset %s | unset %n | unset %channels
    
        }
        acji.loadgui %sID
      }
    
      ;If the delete server button is pressed, delete the current server's token from the "Order" field
      if ($did == 22) {
        ;Remove the entire section
        $rms(%sID,)
        ;Remove the servers token from the Order field
        $iif($deltok($rs(0, Order), $did(2).sel, 46) != $null, $wsdata(0, Order, $ifmatch), $rms(0,Order))
        $wsdata(0, Servers, $calc($rs(0, Servers) - 1))
        acji.loadgui $gettok($rs(0, Order), 1, 46)
      }
      unset %sID
    }
    
    ;When mIRC starts, connect to each of the servers in the Settings.ini file with the primary nick supplied, if there is one.
    on *:Start: {
      set %n 1
      while (%n <= $rs(0, Servers)) {
        if ($rs($gettok($rs(0, Order),%n,46), Enabled) == 1) {
          server $iif(%n == 1,,-m) $rs($gettok($rs(0, Order),%n,46), Server) -i $rs(%n, Nick1),)
          inc %n
        }
        else inc %n
      }
      unset %n
    }
    
    ;When you connect to a server, check that it's one in the Settings.ini file and then connect to the supplied channels
    on *:Connect: {
      set %n 1
      while (%n <= $rs(0, Servers)) {
        if ($rs(%n, Network) == $network) {
          set %c 1
          while (%c <= $rs(%n, Channels)) {
            join $rs(%n, Channel $+ %c)
            inc %c
          }
          unset %c
          if ($rs(%n, Password) != $null) nickserv identify $rs(%n, Password)
        }
        inc %n
      }
      unset %n
    }
    
    ;When nickserv asks to identify, do so with the supplied password from the acjiSettings.ini file
    on *:notice:*nickname is regsitered and protected*:?: {
      if ($nick == nickserv) {
        set %n 1
        while (%n <= $rs(0, Servers)) {
          if ($rs(%n, Network) == $network) {
            nickserv identify $rs(%n, Password)
          }
          inc %n
        }
        unset %n
      }
    }
    
    ;If the nickname is currently being used, attempt to connect with the first free nickname saved for the server
    ;-- $2 is the current nickname, find it in tokens and try the next one.
    raw 433:*:{
      set %n 1
      while (%n <= $rs(0, Servers)) {
        if ($rs(%n, Server) == $server) {
          set %c 1
          while (%c <= $rs(%n, Nicks)) {
            $iif($rs(%n, Nick $+ %c) != $2, nick $ifmatch,)
            inc %c
          }
        }
        inc %n
      }
      unset %c
      unset %n
    }
    
    ;When hovering over any of the edit boxes or buttons, the help label will display help information for that element
    on 1:dialog:acji:mouse:*: {
      if     ($did == 2)  { did -ra $dname 28 Select the server you wish to change details for. If empty, proceed to add a server by filling out the form below. }
      elseif ($did == 4)  { did -ra $dname 28 Enter the server address here. e.g. irc.gamesurge.net }
      elseif ($did == 6)  { did -ra $dname 28 Enter the servers network here. $crlf $+ Find this out by typing '//echo -a $+($,network') whilst connected the the server. e.g. GameSurge }
      elseif ($did == 8)  || ($did == 11) { did -ra $dname 28 Enter a nickname and then click the Add button to add that nickname to this servers autoidentify list. }
      elseif ($did == 10) { did -ra $dname 28 Enter the password to the group of nicknames set for this server. You Will automatically identify when nickserv asks for the password. }
      elseif ($did == 13) || ($did == 14) { did -ra $dname 28 Use the dropdown menu to view the nicknames set to automatically attempt to connect with. If you wish to delete one, pick it from the list then click the Delete button. }
      elseif ($did == 16) || ($did == 17) { did -ra $dname 28 Enter a channel name and then click the Add button to add that channel to this servers autojoin list. If the channel has a password, enter it after the channel. $crlf e.g. #channel password }
      elseif ($did == 19) || ($did == 20) { did -ra $dname 28 Use the dropdown menu to view the channels set to automatically join when this server starts. If you wish to delete one, pick it from the list then click the Delete button. }
      elseif ($did == 21) { did -ra $dname 28 By clicking this button all the info in the edit boxes will be saved for this server. }
      elseif ($did == 22) { did -ra $dname 28 By clicking this button all changes will be lost. Be sure to click the Set button is you want to save this configuration. }
    }
    
    ;called by $rs(server number, item) - if server number is 0, then general settings are stored.
    alias -l rs return $readini(acjiSettings.ini, Server $+ $1, $2)
    
    ;called by $wsdata(server number, data name, data)
    alias -l wsdata writeini acjiSettings.ini Server $+ $1 $2 $3
    
    ;called by $ws(server number, data name, dialog item id to read from)
    alias -l ws writeini acjiSettings.ini Server $+ $1 $2 $did($3).text
    
    ;called by $rms(server number, item)
    alias -l rms remini acjiSettings.ini Server $+ $1 $2

     

  7. Game Bot, Great for channels, Lots of Games

    Games:
    !Aim
    !Blowup/!Defuse
    !Pcall
    !Number/Guess
    !Slots
    !8ball

    To use copy and paste in your remotes (Alt + r under remotes paste)

    Nothing Ripped! All made from scratch NO IDEAS looked at.
    Special Thanks to PunkTured for help.

    More version to come later on, please post ideas to thank you.

     

    on *:TEXT:*:#: {
      if (!aim == $strip($1)) { 
        if ($2 ison $chan) {
          if ($me == $2) { msg $chan Not Me! | halt }
          msg $chan $nick aims at $2
          set %aim $rand(1,6)
          if (%aim == 1) msg $chan $nick goes to take the shot but the scope falls off
          elseif (%aim == 2) msg $chan $nick aims at $2 and slips, hits his head on a tree!
          elseif (%aim == 3) msg $chan $nick is just getting $2 in there scope and Leg shot!
          elseif (%aim == 4) msg $chan $nick jumps to shot and HS!
          elseif (%aim == 5) msg $chan $2 can see $nick and takes the shot before $nick
          elseif (%aim == 6) msg $chan $nick hits bush YES!
          unset %aim
        }
        elseif (!$2) { msg $chan No Nick in my scope }
        elseif ($2 !ison $chan) { msg $chan There not in range of this channel }
      }
      if (!Blowup == $strip($1)) {
        if ($2 ison $chan) {
          if ($me == $2) { msg $chan Not Me! | halt }
          set %bomb $2
          msg $chan $nick plants a time bomb on $2
          msg $chan You better Run!
          msg $chan Type !defuse to stop it
          .timer 1 200 unset %bomb
        }
        elseif (!$2) { msg $chan There not here }
        elseif ($2 !ison $chan) { msg $chan Can't hit them with c4 }   
      }
      if (!defuse == $strip($1)) {
        if ($nick == %bomb) {
          msg $chan Here it goes!
          set %defuse $rand(1,5) 
          if (%defuse == 1) msg $chan You did it *relief*
          elseif (%defuse == 2) msg $chan Wrong Wire Wrong Wire! NO! 
          elseif (%defuse == 3) msg $chan I don't know what you did but that worked
          elseif (%defuse == 4) msg $chan You Stupid *BOOM* 
          elseif (%defuse == 5) msg $chan $me whips it up in the air You Dumy
          unset %defuse
          unset %bomb
        }
        else { msg $chan You don't have a bomb on you | haltdef }
      }
      if (!pcall == $strip($1)) {
        if ($2 ison $chan) {
          if ($me == $2) { msg $chan Not Me! | halt }
          msg $chan Calling $2... 
          set %pcall $rand(1,5)
          if (%pcall == 1) .timer 1 5 msg $chan $2 is your refrigerator running? Then you better catch it!
          elseif (%pcall == 2) .timer 1 5 msg $chan $2 is there an I.P. Freely there?
          elseif (%pcall == 3) .timer 1 5 msg $chan $2 is there a john there? Then how do you goto the washroom?
          elseif (%pcall == 4) .timer 1 5 msg $chan 3 
          elseif (%pcall == 5) .timer 1 5 msg $chan 4
          unset %pcall
        }
        elseif (!$2) { msg $chan Who do i call? }
        elseif ($2 !ison $chan) { msg $chan I don't pay long distance }   
      }
      if (!number == $strip($1)) {
        if (!%num) {
          set -u60 %num $rand(1,100)
          msg $chan I have set a number, it is between 1 and 100.
          msg $chan To make a guess, type: !guess Number_Here
          msg $chan Start guessing now, you have one minute to guess the number.
        }
        else { msg $chan A game is currently in progress. }
      }
      if (!guess == $strip($1)) {
        if (!%num) { msg $chan There is no game in progress. }
        else {
          if ($2 < $($+(%,num),2)) { msg $chan Higher. }
          if ($2 > $($+(%,num),2)) { msg $chan Lower. }
          if ($2 == $($+(%,num),2)) { msg $chan Bingo. $nick guessed the right number %num $+ . }
        }
      }
      if (!slots == $strip($1)) {
        set -u20 %s1 $rand(1,3)
        if (%s1 == 1) msg $chan Fisrt one is OP
        elseif (%s1 == 2) msg $chan Fisrt is HOP 
        elseif (%s1 == 3) msg $chan First is VOP
        set -u20 %s2 $rand(1,3) 
        if (%s2 == 1) msg $chan Second one is OP
        elseif (%s2 == 2) msg $chan Second is HOP
        elseif (%s2 == 3) msg $chan Second is VOP
        set -u20 %s3 $rand(1,3)
        if (%s3 == 1) msg $chan Third one is OP
        elseif (%s3 == 2) msg $chan Third is HOP 
        elseif (%s3 == 3) msg $chan Third is VOP
        if (%s1 == 1) && (%s2 == 1) && (%s3 == 1) {
          msg $chan You won!
        }
        elseif (%s1 == 2) && (%s2 == 2) && (%s3 == 2) {
          msg $chan You won!
        }
        elseif (%s1 == 3) && (%s2 == 3) && (%s3 == 3) {
          msg $chan You won!  
        }
        else { msg $chan You lost }
      }
      if (!8ball == $strip($1)) {
        if ($me isin $2-) { msg $chan Not Me! | halt }
        set %8ball $rand(1,4)
        if (%8ball == 1) msg $chan Maybe..
        elseif (%8ball == 2) msg $chan YES
        elseif (%8ball == 3) msg $chan NO
        elseif (%8ball == 4) msg $chan Depends
        unset %8ball
      }
      else { haltdef }
    }

     

  8. copy/paste into a new remote. either click ur menubar or in a channel to open.
    add ur friends nicks in the halo3 player list or do a quick look up..
    i made this dialog for a friend Inprince.

    feel free to rip butcher and strip this code how ever you want idc

     

    dialog h3 {
      title "Halo3 Service Record's"
      size -1 -1 182 114
      option dbu
      box "Add/Rem Player", 1, 2 2 67 33
      edit "", 2, 4 12 63 9, autohs
      button "Add", 3, 4 23 31 10, flat
      button "Rem", 4, 36 23 31 10, flat
      box "Halo3 Player List", 5, 2 37 67 53
      list 6, 4 46 63 42, size vsbar
      box "Players Stats", 7, 71 2 109 88
      list 8, 73 11 105 77, size hsbar vsbar
      box "Quick Look Up", 9, 101 91 79 21
      edit "", 10, 103 100 49 9, autohs
      button "Look Up", 11, 154 100 24 10, flat
      box "Functions", 12, 2 91 98 21
      button "Look Up", 13, 3 100 24 10, flat
      button "Echo", 14, 27 100 24 10, flat
      button "Msg", 15, 51 100 23 10, flat
      button "Clear", 16, 74 100 24 10, flat
    }
    alias -l afree { var %b,%p | %p = $regsub($1-,/[^<]*>|<[^>]*>|<[^>]*/g,$chr(32),%b) | %b = $remove(%b,&nbsp;,&bull;,&lt;,&gt;) | return %b }
    alias -l lHalo3 { if (%halo.dat) { did -rza h3 8 Halo 3 Service Record's For $iif($did(h3,6).seltext,$did(h3,6).seltext,$did(h3,10).text) | did -za h3 8 $gettok(%halo.dat,1,124) | did -a h3 8 $gettok(%halo.dat,2,124) | did -a h3 8 %halo.bat | did -a h3 8 %halo.cat | did -a h3 8 %halo.sat | did -a h3 8 %halo.xat | did -a h3 8 %halo.pat | did -a h3 8 $gettok(%halo.wat,1,124) | did -a h3 8 $gettok(%halo.wat,2,124) | did -a h3 8 $gettok(%halo.wat,3,124) | unset %halo.* | .sockclose halo } }
    alias -l spam.halo3 { did -za h3 8 $+($chr(160),Welcome to Napa182's Halo3 Service Record) | did -a h3 8 $+($str($chr(160),15),A Script0rs Inc. Production) | did -a h3 8 $+($str($chr(160),18),Powered By Bungie.net) | did -za h3 8 $str($chr(160),6) $+($chr(40),$chr(31),$str($chr(175),3),$chr(176),$chr(32),$chr(171),$chr(164),$chr(88),$chr(167),$chr(199),$chr(174),$chr(238),$chr(254),$chr(116),$chr(48),$chr(174),$chr(167),$chr(88),$chr(164),$chr(187),$chr(32),$chr(176),$str($chr(175),3),$chr(31),$chr(41),$chr(153)) }
    menu menubar,channel {
      .Halo3 Service Record's:{ dialog $iif($dialog(h3),-v,-mied) h3 h3 }
    }
    on *:dialog:h3:edit:10:{ did -r $dname 6,8 | did -e $dname 11 | didtok $dname 6 44 %players.halo3 }
    on *:dialog:h3:init:0:{ didtok $dname 6 44 %players.halo3 | $spam.halo3 | did -b $dname 11 }
    on *:dialog:h3:sclick:*:{
      if ($did == 6) { did -r $dname 8,10 | did -b $dname 11 }
      if ($did == 3) {
        if (!$did(2).text || $istok(%players.halo3,$did(2).text,44)) { 
          noop $iif(!$did(2).text,$input(Players Name Was Not Entered,udho,Error!),$iif($istok(%players.halo3,$did(2).text,44),$input(Players Name Already Exists,udho,Error!),))
          did -r $dname 2
        }
        else {
          set %players.halo3 $addtok(%players.halo3,$did(2).text,44)
          did -r $dname 2,6
          didtok $dname 6 44 %players.halo3 
        }
      }
      if ($did == 4) { 
        if (!$did(2).text && !$did(6).seltext || $did(2).text && !$did(6).seltext && !$istok(%players.halo3,$did(2).text,44)) { 
          noop $iif(!$did(2).text && !$did(6).seltext,$input(Players Name Was Not Entered Or Selected,udho,Error!),$iif($did(2).text && !$did(6).seltext && !$istok(%players.halo3,$did(2).text,44),$input(Players Name Does Not Exists,udho,Error!),)) 
          did -r $dname 2
        }
        elseif ($did(2).text && !$did(6).seltext && $istok(%players.halo3,$did(2).text,44)) {
          set %players.halo3 $remtok(%players.halo3,$did(2).text,1,44)
          did -r $dname 2,6
          didtok $dname 6 44 %players.halo3
        }
        elseif ($did(6).seltext && !$did(2).text) {
          set %players.halo3 $remtok(%players.halo3,$did(6).seltext,1,44)
          did -r $dname 2,6
          didtok $dname 6 44 %players.halo3
        }
      }
      if ($did == 11) { 
        if (!$did(10).text) { noop $input(Players Name Was Not Entered,udho,Error!) }
        else { 
          if ($sock(halo)) .sockclose halo
          set %halo.user $replace($did(10).text,$chr(32),$chr(43))
          sockopen halo www.bungie.net 80 
          did -zra $dname 8 Looking Up Halo3 Player Stats For $did(10).text Please Wait...
          .timer.halo 1 2 lHalo3
        }
      }
      if ($did == 13) {
        if (!$did(6).seltext) { noop $input(Players Name Was Not Selected,udho,Error!) }
        else { 
          if ($sock(halo)) .sockclose halo
          set %halo.user $replace($did(6).seltext,$chr(32),$chr(43))
          sockopen halo www.bungie.net 80 
          did -zra $dname 8 Looking Up Halo3 Player Stats For $did(6).seltext Please Wait...
          .timer.halo 1 2 lHalo3
        }
      }
      if ($did == 14) { var %^ = $did(8).lines, %@ = 1 | while (%@ <= %^) { | echo 12 -a $did(8,%@).text | inc %@ } }
      if ($did == 15) { var %^ = $did(8).lines, %@ = 1 | while (%@ <= %^) {  msg $active $did(8,%@).text | inc %@ } }
      if ($did == 16) { did -r $dname 8,10,2,6 | did -b $dname 11 | didtok $dname 6 44 %players.halo3 }
    }
    on *:SOCKOPEN:halo: {
      sockwrite -nt $sockname GET $+(/Stats/Halo3/Default.aspx?player=,%halo.user) HTTP/1.1
      sockwrite -nt $sockname Host: www.bungie.net
      sockwrite -nt $sockname $crlf
    }
    on *:load: { echo 12 -a You Have Just Loaded Napa182's Halo 3 Service Record Look Up... Made For Inprince | echo 12 -a A Script0rs Inc. Production | echo -a 14,1(14,1¯15,1¯0,1¯0,1º $+($chr(171),$chr(164),$chr(88),$chr(167),$chr(199),$chr(174),$chr(238),$chr(254),$chr(116),$chr(48),$chr(174),$chr(167),$chr(88),$chr(164),$chr(187)) º0,1¯15,1¯14,1¯) $+ $chr(153) }
    on *:SOCKREAD:halo: {
      if ($sockerr) { did -rza h3 8 Socket Error: $sockname }
      else {
        var %f
        sockread %f
        if (*Halo 3 Service Record Not Found* iswm %f) { did -zra h3 8 Halo 3 Service Record For $+([,$replace(%halo.user,$chr(43),$chr(32)),]) Not Found | .sockclose halo | unset %halo.* }
        if (*Enemies* iswm %f) { set %halo.bat $afree(%f) }
        if (*Total Games* iswm %f) { set %halo.cat $afree(%f) }
        if (*Matchmade* iswm %f) { set %halo.sat $afree(%f) }
        if (*Player Since* iswm %f) { set %halo.dat $afree(%f) }
        if (*Custom Games* iswm %f) { set %halo.xat $afree(%f) }
        if (*Campaign Missions* iswm %f) { set %halo.pat $afree(%f) }
        if (*<li>Highest Skill:* iswm %f) { set %halo.wat $afree(%f)  }  
      }
    }

     

    m_21096_Wz15yRbkjzfjAIxPVKvh0D9Yh.jpg

  9. A game bot i made, designed for use with channel where the bot has control. Load into remotes and join the channel with a nick. The bot will explain everything. Make sure bot has OP powers.

    Set %gamechannel as the channel you want the bot to have the games on

    Registered bot users get halfop on join

    Non registered bot users het voice on join

    Games:

    Rock, Paper, Scissors

    Gambling

    Murder (not really a game)

     

    ON *:TEXT:*:#: {
      if ($1 = !rock) || ($1 = !paper) || ($1 = !scissors) {
        if (%register [ $+ [ $nick ] ] != ON) { msg $chan you must register first, please type !register }
        else {
          set %rps.count [ $+ [ $nick ] ] $calc(%rps.count [ $+ [ $nick ] ] + 1)
          set %rps $rand(1,3)
          if (%rps = 1) { set %rps.game 9Rock }
          elseif (%rps = 2) { set %rps.game 9paper }
          elseif (%rps = 3) { set %rps.game 9scissors } 
          if (%rps.game = 9rock) && ($1 = !rock) { msg $chan 14You chose: 9 Rock  14and i chose: %rps.game $+ 14. We Tied. }
          elseif (%rps.game = 9paper) && ($1 = !Paper) { msg $chan 14You chose: 9 Paper  14and i chose: %rps.game $+ 14. We Tied. }
          elseif (%rps.game = 9scissors) && ($1 = !scissors) { msg $chan 14You chose: 9 Scissors  14and i chose: %rps.game $+ 14. We Tied }
          elseif (%rps.game = 9rock) && ($1 = !scissors) { 
            msg $chan 14You chose: 9 Scissors  14and i chose: %rps.game $+ 14. I win!
            msg $chan You have lost 1 points
            set %money [ $+ [ $nick ] ] $calc(%money [ $+ [ $nick ] ] - 1)
          }
          elseif (%rps.game = 9paper) && ($1 = !Rock) { 
            msg $chan 14You chose: 9 Rock  14and i chose: %rps.game $+ 14. I win!
            msg $chan You have lost 1 points
            set %money [ $+ [ $nick ] ] $calc(%money [ $+ [ $nick ] ] - 1)
          }
          elseif (%rps.game = 9scissors) && ($1 = !paper) { 
            msg $chan 14You chose: 9 Paper  14and i chose: %rps.game $+ 14. I win! 
            msg $chan You have lost 1 points
            set %money [ $+ [ $nick ] ] $calc(%money [ $+ [ $nick ] ] - 1)
          }
          elseif (%rps.game = 9rock) && ($1 = !Paper) { 
            msg $chan 14You chose: 9 Paper  14and i chose:  %rps.game $+ 14. You won.
            msg $chan You have gained 2 points
            set %money [ $+ [ $nick ] ] $calc(%money [ $+ [ $nick ] ] + 2) 
          }
          elseif (%rps.game = 9paper) && ($1 = !scissors) { 
            msg $chan 14You chose: 9 Scissors  14and i chose: %rps.game $+ 14. You won.
            msg $chan You have gained 2 points
            set %money [ $+ [ $nick ] ] $calc(%money [ $+ [ $nick ] ] + 2) 
          }
          elseif (%rps.game = 9scissors) && ($1 = !Rock) { 
            msg $chan 14You chose: 9 Rock  14and i chose: %rps.game $+ 14. You won.
            msg $chan You have gained 2 points
            set %money [ $+ [ $nick ] ] $calc(%money [ $+ [ $nick ] ] + 2) 
          }
        }
      }
      elseif ($1 = !kill) && ($2 ison $chan) {
        set %kill.count [ $+ [ $nick ] ] $calc(%kill.count [ $+ [ $nick ] ] + 1)
        set %kill $rand(1,10)
        if ($2 != $me) {
          describe $chan walks up to $2 and...
          if (%kill = 1) { describe $chan slits $2 $+ 's neck with a pocket knife }
          elseif (%kill = 2) { describe $chan gouges $2 $+ 's eyeballs out. }
          elseif (%kill = 3) { describe $chan Shoves a soldering iron into $2 $+ 's stomach. }
          elseif (%kill = 4) { describe $chan Knocks $2 out, takes $2 to a nearby butcher farm and has him butchered up for Cow Food. }
          elseif (%kill = 5) { describe $chan Kills $2 for $nick $+ . }
          elseif (%kill = 6) { describe $chan Hits $2 over the head with a bat. $2 does not survive. }
          elseif (%kill = 7) { describe $chan Gets shot in the head by $2 $+ 's bodyguard... things dont always workout $nick }
          elseif (%kill = 8) { describe $chan Grabs a chainsaw and cuts $2 $+ 's leg off. $2 bleeds to death within $rand(2,6) mins. }
          elseif (%kill = 9) { describe $chan slips deadly pills into $2 $+ 's drink... $2 slowly dies a painful death in the hospital within $rand(2,7) days. }
          elseif (%kill = 10) { describe $chan decides that $2 deserves to live }
        } 
        elseif ($2 = $me) { describe $chan Shoots $nick in the face with a shotgun and yells "YOU THINK IM AN IDIOT!!!" }
      }
      elseif ($1 = !register) {
        set %register.count [ $+ [ $nick ] ] $calc(%register.count [ $+ [ $nick ] ] + 1)
        if (%register.count [ $+ [ $nick ] ] > 1) { notice $nick Register Failed: You are already registered }
        else {
          set %register [ $+ [ $nick ] ] ON
          set %money [ $+ [ $nick ] ] 100
          set %kill.count [ $+ [ $nick ] ] 0
          set %rps.count [ $+ [ $nick ] ] 0
          set %gamble.count [ $+ [ $nick ] ] 0
          mode $chan h $nick
          notice $nick Congrats, you are now registered, type !get commands
          notice $nick You now have %money [ $+ [ $nick ] ] point, think of this as your score.  
          notice $nick when you gamble these points you gain points for winning, lose points for losing.
        }
      }
      elseif ($1 = !gamble) && ($2 ison $chan) && ($3) {
        if (%register [ $+ [ $nick ] ] != ON) { msg $chan you must register first, please type !register }
        else {
          set %gamble.amount $3 
          if ($2 = $me) { msg $chan $2 wins!!! $2 now has %money [ $+ [ $2 ] ] dollars }
          if (%gamble.amount > %money [ $+ [ $nick ] ]) { msg $chan $nick you dont have enough money }
          elseif (%gamble.amount <= %money [ $+ [ $nick ] ]) { 
            if ($2 = $me) { halt }
            else { 
              notice $2 you have been challenged into a game of Gambling by $nick $+ , if you accept type !accept, if you decline type !decline. You have 45 seconds to respond 
              set %5 [ $+ [ $2 ] ] ON
              set %gamble.count [ $+ [ $nick ] ] $calc(%gamble.count [ $+ [ $nick ] ] + 1)
              set %challenger $nick
              timer 1 45 unset %5 [ $+ [ $2 ] ]
            }
          }
        }
      }
      elseif ($1 = !accept) {
        if (%5 [ $+ [ $nick ] ] = ON) {
          unset %5 [ $+ [ $nick ] ]
          set %gamble.count [ $+ [ $nick ] ] $calc(%gamble.count [ $+ [ $nick ] ] + 1)
          if (%gamble.amount > %money [ $+ [ $nick ] ]) { msg $chan $nick you dont have enough money }
          elseif (%gamble.amount <= %money [ $+ [ $nick ] ]) {
            set %adice $rand(1,6)
            set %bdice $rand(1,6)
            /msg $chan $nick rols his dice and gets a %adice
            /msg $chan %challenger rolls his dice and gets a %bdice
            if (%adice > %bdice) { 
              msg $chan $nick wins
              set %money [ $+ [ $nick ] ] $calc(%money [ $+ [ $nick ] ] + %gamble.amount)
              set %money [ $+ [ %challenger ] ] $calc(%money [ $+ [ %challenger ] ] - %gamble.amount)
              timer 1 1 msg $chan 4 $nick now has %money [ $+ [ $nick ] ] Dollars and 12 %challenger now has %money [ $+ [ %challenger ] ] Dollars
              unset %adice
              unset %bdice
            }
            elseif (%adice < %bdice) { 
              msg $chan %challenger wins 
              set %money [ $+ [ $nick ] ] $calc(%money [ $+ [ $nick ] ] - %gamble.amount)
              set %money [ $+ [ %challenger ] ] $calc(%money [ $+ [ %challenger ] ] + %gamble.amount)
              timer 1 1 msg $chan 4 $nick now has %money [ $+ [ $nick ] ] Dollars and 12 %challenger now has %money [ $+ [ %challenger ] ] Dollars 
              unset %adice
              unset %bdice    
            }
            elseif (%adice = %bdice) { msg $chan Draw! 
            }
          }
        }
      }
      elseif ($1 = !decline) {
        if (%5 [ $+ [ $nick ] ] = ON) { 
          msg $chan $nick has declined your offer %challenger 
        }
        else { halt }
      }
      elseif ($1 = !get) && ($2 = commands) {
        if (%register [ $+ [ $nick ] ] != ON) { msg $chan you must register first, please type !register }
        else {
          notice $nick 3!stats - Displays your current stats or the stats of a registered nick
          notice $nick 12Game Commands:
          notice $nick 4.:Rock, Paper, Scissors:.
          notice $nick !rock - chooses rock
          notice $nick !scissors - chooses scissors
          notice $nick !paper - chooses paper
          notice $nick 4.: Kill Commands :.
          notice $nick !kill <nick> - kills the specified nick in a random way.
          notice $nick 4.: Gamble :.
          notice $nick !gamble <nick> <amount> - Gambles <nick> (penalties for losing and advantages for winning)
        }
      }
      elseif ($1 = !join) { join $2 $3- }
      elseif ($1 = !stats) {
        if (%register [ $+ [ $nick ] ] != ON) { msg $chan you must register first, please type !register }
        else { 
          if ($2 = $null) {
            msg $chan you have killed %kill.count [ $+ [ $nick ] ] person(s)
            msg $chan You have played rock, paper scissors %rps.count [ $+ [ $nick ] ] time(s)
            msg $chan You have gambled %gamble.count [ $+ [ $nick ] ] time(s)
            msg $chan You have %money [ $+ [ $nick ] ] Point(s)
          }
          elseif ($2 = $me) {
            msg $chan $2 has killed %kill.count [ $+ [ $2 ] ] person(s)
            msg $chan $2 has played rock, paper scissors %rps.count [ $+ [ $2 ] ] time(s)
            msg $chan $2 has gambled %gamble.count [ $+ [ $2 ] ] time(s)
            msg $chan $2 has %money [ $+ [ $2 ] ] Point(s)
            msg $chan $2 Created you!!!
          }
          else {
            if (%register [ $+ [ $2 ] ] != ON) { msg $chan $2 isnt a registered user }
            else {
              msg $chan $2 has killed %kill.count [ $+ [ $2 ] ] person(s)
              msg $chan $2 has played rock, paper scissors %rps.count [ $+ [ $2 ] ] time(s)
              msg $chan $2 has gambled %gamble.count [ $+ [ $2 ] ] time(s)
              msg $chan $2 has %money [ $+ [ $2 ] ] Point(s)
            }
          }
        }
      }
    }
    ON *:JOIN:*: {
      if ($nick = $me) { halt }
      else {
        msg $chan 14Welcome 9  $+ $nick $+ 14 $+ ! Type: 9 $+ !Register (only if you havent before) $+ 14. Want me in your channel? Type 9!join <channel>. 14Forgot the commands? Type 9!get commands.
        if ($chan = %botchannel) && (%register [ $+ [ $nick ] ] = ON) { mode $chan h $nick }
        else { mode $chan v $nick }
      }
    }

     

  10. This is a small collection of snippets I decided to make. This code is intended for a bot, and provides some games for channel use.

    So far it has three games:
    Bomb Game
    Number Guess Game
    *Blackjack

    I will add more here and there as I make them. The commands used to use each snippet are in comments above each game's code.

    Do note that I have NOT included flood protection. If you would like flood protection, you will have to devise your own scheme until I have implemented one.

    Likewise goes with usable channels, these scripts are currently set up to work on ALL channels your bot is in (though when activated, it will set the channel it was activated in as the channel it will work in temporarily, and all other channels are locked out of the game until the game is done. I'll improve on this later).

    If you have any other SIMPLE game ideas, comment them here and I may look into implementing it.

     

    ;BotGames
    ;By IllogicTC
    ;1st Edition, 3 games. (12/26/2011 release)
    ;To use: Load this whole script into your bot and enjoy!
    ;NOTE: I have NOT included flood protection yet. Please exercise caution with unknown users.
    ;Feel free to edit any parameters to better suit your needs.
    
    ;Bomb Game, BotGames Edition
    ;By IllogicTC
    ;v1.0 12/26/2011
    ;To trigger a game, use !bombgame. To cut a wire, use !cutwire <wire>
    
    on *:text:!bombgame:#: {
      if ($timer(bomb) != $null) return
      set %bgames_bomb_wires
      set %bgames_bomb_chan $chan
      var %t = $rand(15,45), %w = $rand(3,5), %wpick = red.orange.yellow.green.blue.purple.black.brown.white.gray
      while (%w) {
        var %g $rand(1,$numtok(%wpick,46))
        set %bgames_bomb_wires %bgames_bomb_wires $gettok(%wpick,%g,46)
        var %wpick $deltok(%wpick,%g,46)
        dec %w
      }
      set %bgames_bomb_goodwire $gettok(%bgames_bomb_wires,$rand(1,$numtok(%bgames_bomb_wires,32)),32)
      msg $chan A bomb has been planted in the cookie factory! The wires are: %bgames_bomb_wires
      msg $chan Choose wisely, you only get one chance! You have %t seconds.
      .timerbomb 1 %t bombboom
    }
    
    on *:text:!cutwire*:#: {
      if ($chan == %bgames_bomb_chan) && ($timer(bomb) != $null) && ($2 isin %bgames_bomb_wires) {
        if ($2 == %bgames_bomb_goodwire) {
          msg %bgames_bomb_chan Congratulations! The bomb has been defused. Good job, $nick $+ $chr(33)
          .timerbomb off
          unset %bgames_bomb*
        }
        else {
          .timerbomb off
          bombboom
        }
      }
    }
    
    alias bombboom {
      msg %bgames_bomb_chan The bomb has exploded! $rand(10000,100000) cookies are lost in the explosion.
      unset %bgames_bomb*
    }
    
    ;END OF BOMB GAME
    
    ;Number Guess Game, BotGames Edition
    ;By IllogicTC
    ;v1.0 12/26/2011
    ;To start, use !numberguess. To make a guess, use !ngguess <number>. Only one guess is allowed per person, and they cannot guess the same number.
    
    on *:text:!numberguess:#: {
      if ($timer(nggame) != $null) return
      set %bgames_ng_closest 101
      set %bgames_ng_cguesser
      set %bgames_ng_chan $chan
      set %bgames_ng_guesses
      set %bgames_ng_guessnicks
      set %bgames_ng_number $rand(1,100)
      msg %bgames_ng_chan I'm thinking of a number between 1 and 100! Use !ngguess <number> to make a guess! Closest to my number wins!
      .timernggame 1 60 ng_results
    }
    
    on *:text:!ngguess*:#: {
      if ($timer(nggame) != $null) && ($chan == %bgames_ng_chan) && ($2 isnum 1-100) {
        if ($istok(%bgames_ng_guessnicks,$nick,32) == $false) {
          if ($istok(%bgames_ng_guesses,$2,32) == $true) {
            msg %bgames_ng_guesses Please pick a different number, $nick $+ .
            return
          }
          set %bgames_ng_guesses %bgames_ng_guesses $2
          set %bgames_ng_guessnicks %bgames_ng_guessnicks $nick
          if ($2 == %bgames_ng_number) {
            msg %bgames_ng_chan $nick got it dead on! The number was %bgames_ng_number $+ .
            .timernggame off
            unset %bgames_ng*
          }
          else {
            if ($calc($2 - %bgames_ng_number) > 0) var %a $calc($2 - %bgames_ng_number)
            else var %a $calc(%bgames_ng_number - $2)
            if (%a < %bgames_ng_closest) {
              set %bgames_ng_closest %a
              set %bgames_ng_cguesser $nick
            }
          }
        }
      }
    }
    
    alias ng_results {
      msg %bgames_ng_chan The numbers game is up!
      if ($numtok(%bgames_ng_guessnicks,32) == 0) msg %bgames_ng_chan Nobody made a guess! Bummer.
      elseif ($numtok(%bgames_ng_guessnicks,32) == 1) msg %bgames_ng_chan %bgames_ng_cguesser wins by default, being the only guesser! They were off by %bgames_ng_closest $+ .
      else msg %bgames_ng_chan Out of $numtok(%bgames_ng_guessnicks,32) people with guesses, %bgames_ng_cguesser reigns supreme! They were %bgames_ng_closest off. My number was: %bgames_ng_number
      unset %bgames_ng*
    }
    
    ;END OF NUMBER GUESS GAME
    
    ;Blackjack, BotGames Edition
    ;By IllogicTC
    ;v1.0 12/26/2011
    ;To start, type !blackjack. To hit, use !bhit.
    
    on *:text:!blackjack:#: {
      if ($timer(bj) != $null) return
      set %bgames_bj_deck A.2.3.4.5.6.7.8.9.10.J.Q.K.A.2.3.4.5.6.7.8.9.10.J.Q.K.A.2.3.4.5.6.7.8.9.10.J.Q.K.A.2.3.4.5.6.7.8.9.10.J.Q.K
      set %bgames_bj_chan $chan
      set %bgames_bj_nick $nick
      .timerbj 1 30 bj_results
      var %x $gettok(%bgames_bj_deck,$rand(1,52),46)
      set %bgames_bj_deck $deltok(%bgames_bj_deck,%x,46)
      var %y $gettok(%bgames_bj_deck,$rand(1,51),46)
      set %bgames_bj_deck $deltok(%bgames_bj_deck,%y,46)
      set %bgames_bj_phand %x %y
      if (%x == A) set %bgames_bj_total 11
      else set %bgames_bj_total $replace(%x,J,10,Q,10,K,10)
      if (%y == A) {
        if (%x == A) inc %bgames_bj_total
        else inc %bgames_bj_total 11
      }
      else inc %bgames_bj_total $replace(%y,J,10,Q,10,K,10)
      if (%bgames_bj_total != 21) msg $chan Your cards: %x %y $+($chr(40),%bgames_bj_total,$chr(41),$chr(46)) Use !bhit to try getting as close to 21 as possible without going over! You have 30 seconds. Dealer stands at 17!
      else {
        msg $chan You have a blackjack!
        .timerbj off
        bj_results
      }
    }
    
    on *:text:!bhit:#: {
      if ($timer(bj) != $null) && ($nick == %bgames_bj_nick) {
        var %x $rand(1,$numtok(%bgames_bj_deck,46))
        var %y $gettok(%bgames_bj_deck,%x,46)
        set %bgames_bj_phand %bgames_bj_phand %y
        set %bgames_bj_deck $deltok(%bgames_bj_deck,%x,46)
        var %t = $numtok(%bgames_bj_phand,32), %n = 0, %a = 0
        while (%t) {
          if ($gettok(%bgames_bj_phand,%t,32) == A) inc %a
          else inc %n $replace($gettok(%bgames_bj_phand,%t,32),J,10,Q,10,K,10)
          dec %t
        }
        if (%a > 0) {
          while (%a) {
            if ($calc(11 + %n) > 21) inc %n
            else inc %n 11
            dec %a
          }
        }
        set %bgames_bj_total %n
        if (%bgames_bj_total > 21) {
          msg %bgames_bj_chan You have busted! Automatic loss :( Your hand: %bgames_bj_phand $+($chr(40),%bgames_bj_total,$chr(41),$chr(46))
          .timerbj off
        }
        elseif (%bgames_bj_total == 21) {
          msg %bgames_bj_chan You have reached 21! Now let's see how the dealer fared.
          .timerbj off
          bj_results
        }
        else msg %bgames_bj_chan Your hand: %bgames_bj_phand $+($chr(40),%bgames_bj_total,$chr(41),$chr(46)) To stay, just wait for the round to end!
      }
    }
    
    alias bj_results {
      var %dh $rand(17,24)
      if (%dh <= 21) {
        if (%dh < %bgames_bj_total) msg %bgames_bj_chan You've won! Your hand: %bgames_bj_phand $+($chr(40),%bgames_bj_total,$chr(41),$chr(46)) The dealer's hand: %dh
        elseif (%dh == %bgames_bj_total) msg %bgames_bj_chan Your hands are a tie! Your hand: %bgames_bj_phand $+($chr(40),%bgames_bj_total,$chr(41),$chr(46)) The dealer's hand: %dh
        else msg %bgames_bj_chan You've lost! Your hand: %bgames_bj_phand $+($chr(40),%bgames_bj_total,$chr(41),$chr(46)) The dealer's hand: %dh
      }
      else msg %bgames_bj_chan The dealer has busted with %dh $+ ! You've won!
      unset %bgames_bj*
    }
    
    ;END OF BLACKJACK GAME

     

  11. Intro: This is a remake of the very first version of a Mafia game I ran, and is considered to be a demo bot of the one ran on #Mafia on SwiftIRC. The code has been simplified for those who can't script too well, so it's easily adjustable, but at the same time I made it slightly more efficient. I've had two friends help me with various bits and pieces because at 3 AM I sometimes lose the ability to think.

    About the game: Simply put, to win the game be the last team standing. There are three teams: Civilian Team (civilians, doctor, homeless bum, and detective), Mafia Team (mafia 1, mafia 2, etc), and Killer Team (killer alone). Before the game starts, the bot will query (PM) everybody to accept or reject a role, and that's how you know what role you are. If you reject, you'll either be given a different role if one is rejected, or you'll be a civilian. Every night everybody except the civilians have something to do, and the bot PMs everyone with his/her actions. During the day there's an optional voting to hang a person, if that person is hung, he/she dies and is taken out of the game.

    Installation: To set up the bot, it's fairly easy, just copy the code below into the mIRC Remotes or Aliases tab (alt+R to get there). Upon loading the script it will set the very minimum variables it needs, such as the colors, and the like. By default the bot's nick will be MafiaGameBot, the password to identify via NickServ is PASSWORDGOESHERE, and the game channel is #MafiaGameChannel. To change either the nick or password use /set %BotsNick nick-here or /set %BotsPass password-here, or use an operator command, which is also talked about below. To change the gaming channel, use /set %GameChannel #Channel-here Upon connecting to the server the bot will join the channel, identify it's nick, and be ready to start playing.

    Basic staff commands: There aren't very many of them, but then again, the original didn't have a lot anyway, and this does have just a few more than that one did. To register a user into the game, even if it's already playing, just use !reguser nick while being opped and/or halfopped. To stop the game, or prevent it from being played until a staff member allows it, use !stop, then either !start, !reg, or !reguser to get it going again. To end the registration process early and skip right to the role give out phase, staff can use the !endreg command. If for whatever reason the bot become unidentified with NickServ, staff can force it to change its nick to the proper nick and identify using the !ident command. Ops can also change a couple of variables for the bot, such as the colors, the nick's password, and so forth. This command is !set, and its syntax is as followed: !set VariableName value. The colors are probably going to be the most often ones change, and they are c1, c2, c3, c4, and c5 ordered from primary, secondary, and so on. To change the primary color, use !set c1 new-color-here. In example: !set c1 04. It has to be two digits, if not, it'll just give you an error. The rest of the set commands are just !set GameChanne, !set BotsNick, and !set BotsPass, fairly basic, which is key. !TakeOut will take the specified user out of the game.

    Short list of commands: Not wanting to go into what each command does, but here's a short list of what they are: !start, !reg, !unreg, !killme, !reguser, !endreg, !stop, !endreg, !kick, !set, !kill, !check, !heal, !cancel, !yes, !no, !all, !stat, !q, !dur, !gamestat, !night, !sideswon, !invite, !takeout

    Rules: The rules for this game can be found on the forum, which is http://mafbot.com/forum/index.php Though the most important part is to not play against your role, and don't give away your role to anybody that's currently in the game.

    Conclusion: The bot has been tested, but as always, bugs/glitches/errors/mistakes/typos are expected, so if something doesn't go right, feel more than free to fix it yourself, or post on the forum, and it will be fixed. The same can be said you'd like something to be changed/tweaked/updated/added. Because this is open source, you can mess with the code as you please.

     

    ;LOAD THIS PART INTO THE REMOTES TAB
    alias c1 { return $+(,%c1,$1-) }
    alias c2 { return $+(,%c2,$1-) }
    alias c3 { return $+(,%c3,$1-) }
    alias c4 { return $+(,%c4,$1-) }
    alias c5 { return $+(,%c5,$1-) }
    on *:load:set %c1 14 | set %c2 10 | set %c3 07 | set %c4 05 | set %c5 11 | set %GameChannel #MafiaGameChannel | set %BotsNick MafiaGameBot | set %BotsPass PASSWORDGOESHERE | set %CiviliansWon 0 | set %MafiaWon 0 | set %KillerWon 0 | set %Ties 0 | set %GameCount 0 | set %Visitors 0
    on *:text:!set*:?:{
      if ($nick !isop %GameChannel) return
      if (!$2) { msg $nick $c2(You must first specify a parameter! | return }
      if (!$3) msg $nick $c2(Missing parameter!)
      if (($2 == c1) || ($2 == c2) || ($2 == c3) || ($2 == c4) || ($2 == c5) {
        if (!$3) { msg $nick $c2(Enter a digit from 00 to 15. | return }
        if ($len($2) != 2) { msg $nick $c2(Please enter a two digit number.  In example: 04 for red, or 12 for blue.) | return }
        if (($3 > 15) || ($3 < 0)) { msg $nick $c2(The parameter must be between 00 and 12. | return }
        set % $+ $2 $3
        msg $nick $c1(The value of) $c2($2) $c1(has been changed to) $c3($3)
        return
      }
      elseif ($2 == BotsNick) {
        if (!$3) { msg $nick $c2(Enter a nick that is alphanumeric or contains the following character: `^()|/ and does not start with a number) | return }
        set %BotsNick $3
      }
      elseif ($2 == BotsPass) {
        if (!$3) { msg $nick $c2(Please specify a password without spaces) | return }
        set %BotsPass $3
      }
      elseif ($2 == GameChannel) {
        if (!$3) { msg $nick $c2(Please specify a new game channel for the bot!) }
        if ($me !ison $3) { msg $nick $c2(I must first be on the channel and have operator status | return }
        if ($me !isop $3) { msg $nick $c2(I must first operator status in that channel) | return }
        if ($nick !isop $3) { msg $nick $c2(You must first obtain operator status in the channel before using this command) | return }
        set %GameChannel $3
      }
    }
    on *:text:!start:%GameChannel:StartTheGame $nick
    on *:text:!done*:%GameChannel:{
      if ((%GameIsPlayig == false) || ($GameIsStopped == true) || (%Voting == no) || ($nick != %CiviliansVictim)) return
      else { timers off | EndVoting }
    }
    on *:text:!cancel:?:{
      if ((%GameIsPlaying == false) || (%GameIsStopped == true)) return
      if (($WhatIs($nick) == Detective) && (%DetectiveMoved == 1)) { set %DetectiveMoved 0 | msg %GameChannel $c1(For some reason the) $c3(detective) $c1(decided it would be best to rethink the plot and went home) }
      if (($read($m.txt,1) == $1) && (%MafiaMoved == 1)) { set %MafiaMoved 0 | msg %GameChannel $c1(For some reason the) $c3(mafia) $c1(wanted to switch out targets and went back to the drawing board) }
      if (($WhatIs($nick) == Doctor) && (%DoctorMoved == 1)) { set %DoctorMoved 0 | msg %GameChannel $c1(For some reason the) $c3(detective) $c1(decided it would be best to rethink the plot and went home) }
    }
    on *:text:!stat:%GameChannel:msg # $AllActiveRoles
    on *:text:!yes*:%GameChannel:VoteFor $nick
    on *:text:!no*:%GameChannel:VoteAgainst $nick
    on *:text:!dur:%GameChannel:if ($GameIsPlaying == true) # $c1(The game has been going on for) $c2($duration($calc($ctime - %dur))))
    on *:text:!dur:?:if ($GameIsPlaying == true) $nick $c1(The game has been going on for) $c2($duration($calc($ctime - %dur))))
    on *:text:!day:%GameChannel:if (%GameIsPlaying == true) {
      if (($nick isop $chan) | ($nick ishop $chan)) Day
    }
    on *:text:!ident:%GameChannel:if (($nick isop $chan) || ($nick ishop $chan) { /ns ghost %BotsNick %BotsPass | /nick %BotsNick | /ns identify %BotsPass }
    on *:text:!gamestat:%GameChannel:if (%GameIsPlaying == true) msg # $c1(Number of players:) $c2(%NumberOfPlayer) $c1(nights passed:) $c2(%nights) $c1(number of roles:) $c2($calc(%TotalMafia + %TotalDetective + %TotalKiller + %TotalDoctor + %TotalHomeless))
    on *:text:!gamestat:?:if (%GameIsPlaying == true) msg $nick $c1(Number of players:) $c2(%NumberOfPlayer) $c1(nights passed:) $c2(%nights) $c1(number of roles:) $c2($calc(%TotalMafia + %TotalDetective + %TotalKiller + %TotalDoctor + %TotalHomeless))
    on *:text:!nights:GameChannel:if (%GameIsPlaying == true) msg # $c1(There have been) $c2(%nights) $c1(nights so far.)
    on *:text:!nights:?:if (%GameIsPlaying == true) msg $nick $c1(There have been) $c2(%nights) $c1(nights so far.)
    on *:text:!games:%GameChannel:msg $chan $c1(There have been) $c2(%played) $c1(games in total...)
    on *:text:!games:?:$nick $c1(There have been) $c2(%played) $c1(games in total...)
    on *:text:!sideswon:%GameChannel:msg # $c1(The) $c3(civilians) $c1(have won) $c2(%CiviliansWon) $c1(times,) $c1(the) $c3(mafia) $c1(have won) $c2(%MafiaWon) $c1(times,) $c1(the) $c3(killer) $c1(has won) $c2(%KillerWon) $c1(times,) $c1(and there have been a total of) $c2(%Ties) $c1(ties.)
    on *:text:!sideswon:?:msg $nick $c1(The) $c3(civilians) $c1(have won) $c2(%CiviliansWon) $c1(times,) $c1(the) $c3(mafia) $c1(have won) $c2(%MafiaWon) $c1(times,) $c1(the) $c3(killer) $c1(has won) $c2(%KillerWon) $c1(times,) $c1(and there have been a total of) $c2(%Ties) $c1(ties.)
    on *:text:!rules:?: /msg $nick $c1(The basic rules of the game is to make sure that your team succeeds in surviving, and you do so according to your role. There are the) $c3(civilians, mafia, detective, killer, homeless bum) |msg $nick $c1(For more information about the roles, please type in) $c2(!roles)
    on *:text:!roles:?:msg $nick $c1(The) $c3(civilians) $c3(can't do a whole lot at night, they wait for the day, when they vote. The) $c3(Detective) $c1(can either check a player's role by) $c2(!check target) $c1(or kill one by) $c2(!kill target) $+ ($c1.) $c3(Mafia) $c1(can only kill, and it's the same way as the) $c3(detective) $c1(and the) $c3(killer) $c1(The) $c3(homeless) $c1(can only check, and same way as the) $c3(detective) $c1(while the) $c3(doctor) $c1(can heal a killed peson with) $c2(!heal) | /msg $nick $c1(For more information at what what happens in the day time, please type in) $c2(!day)
    on *:text:!day:?:msg $nick $c1(Right after everybody has made their moves, the day time comes. This is where everything that has been done is revealed, and those who are killed, are taken out of the game.  Then we have the voting to see who the people (this includes everybody in the game) want to kill, giving the civilians a chance to get involved, for there's a lot of them. The voting is done by typing in) $c2(!nick) | msg $nick $c1(After that is done, the people decide on whether or not to hang the chosen one, by typing either) $c2(!yes) $c1(or) $c2(!no)
    on *:text:!q:%GameChannel:/msg # $c1(There are currently) $c2(%NumberOfPlayers) $c1(players.)
    on *:text:!q:?:/msg $nick $c1(There are currently) $c2(%NumberOfPlayers) $c1(players.)
    on *:text:!roles:%GameChannel:if (%GameIsPlaying == true) msg %GameChannel $c1(In total:) $c3(civilians -) $c2(%TotalCivilian) $c3(mafia -) $c2(%TotalMafia) $c3(killer -) $c2(%TotalKiller) $c3(doctor -) $c2(%TotalDoctor) $c3(detective -) $c2(%TotalDetective) $c3(homeless bum -) $c2(%TotalHomeless)
    on *:text:!endreg:%GameChannel:if (($nick isop $chan) || ($nick ishop #)) timers off | GiveOutRoles
    on *:connect:set %GameIsPlaying false | /ns ghost %BotsNick %BotsPass | /nick %BotsNick | /ns identify %BotsPass | join %GameChannel
    on *:text:!reguser*:%GameChannel:ReggedByOp $2 $nick
    on *:text:!reguser*:?:ReggedByOp $2 $nick
    on *:text:!reg:%GameChannel:reg $nick
    on *:text:!reg:?:reg $nick
    on *:text:!yes:?:AcceptRole $nick
    on *:text:!no:?:RejectRole $nick
    on *:text:!check*:?:check $2 $nick $3-
    on *:text:!kill*:?:kill $2 $nick $3-
    on *:text:!heal*:?:heal $2 $nick $3-
    on *:devoice:if ($nick != $me) %GameChannel:TakeOut $vnick
    on *:text:!killme:%GameChannel:TakeOut $nick
    on *:part:%GameChannel:Leaving $nick
    on *:quit:Leaving $nick
    on *:text:!unreg:%GameChannel:if (%Registration == on) TakeOut $nick
    on *:text:!Stop:%GameChannel: {
      if (($nick !isop #) && ($nick !ishop #)) return
      if (%GameIsStopped == true) return
      timers off
      set %GameIsStopped true
      set %GameIsPlaying false
      msg # $c2(The game has been stopped, and now only a staff member of the channel may start it!)
    }
    on *:text:!Stop:?: {
      if (($nick !isop %GameChannel) && ($nick !ishop %GameChannel)) return
      if (%GameIsStopped == true) return
      timers off
      set %GameIsStopped true
      set %GameIsPlaying false
      msg %GameChannel $c2(The game has been stopped, and now only a staff member of the channel may start it!)
    }
    on *:text:!TakeOut*:%GameChannel:if (($nick isop %GameChannel) || ($nick ishop %GameChannel)) TakeOut $2
    on *:text:!*:%GameChannel:ThoseVoted $nick $1
    on *:join:%GameChannel:JoinGameChannel $nick
    on *:text:!invite *:%CivilianChannel:if (($WhatIs($nick) == detective) || ($WhatIs($nick) == homeless)) invite $2 $chan | msg $2 $c1(You have been invited to $c2(%CivilianChannel)
    on *:text:!r *:#:if (($2 isnum) && ($3 isnum) && ($2 < $3) ($c1(Your random number is:) $c2($r($1,$2))
    on *:kick:%GameChannel:Takeout $knick
    on *:nick:ChangedNick $nick $newnick
    on *:text:!version:*:msg $nick $c1(This version of the $c2(Mafia)$c1(/)$c2(Warewolf) $c2(game bot is) $c3(AV2 1.2.5)
    on *:text:!ver:*:msg $nick $c1(This version of the $c2(Mafia)$c1(/)$c2(Warewolf) $c2(game bot is) $c3(AV2 1.2.5)
    
    ;LOAD THIS PART INTO THE ALIASES TAB
    InGame {
      set %x 1
      if ((%NumberOfPlayers == 0) || (%GameIsPlaying == false)) return no
      while ($read(l.txt,%x) != $null) {
        if ($1 == $read(l.txt,%x)) return yes
        inc %x
      }
      return no
    }
    EndRoles {
      timers off
      msg %GameChannel $c1(The game has been played for) $c2($duration($calc($ctime - %dur)))) $+ $c1(.)
      inc %Played
      if (%Nights > %MostNights) set %MostNights %Nights
      unset %Nights
      msg %GameChannel $c1(The roles were:)
      %x = 1
      while ($read(w.txt,%x)) {
        %Player = $read(w.txt,%x)
        if (%Player != $null) msg %GameChannel $c3(Mafia %x $+ :) $c2(%Player)
        inc %x
      }
      set %Player %WasKiller
      if (%Player) msg %GameChannel $c3(Killer:) $c2(%Player)
      set %Player %WasDoctor
      if (%Player) msg %GameChannel $c3(Doctor:) $c2(%Player)
      set %Player %WasDetective
      if (%Player) msg %GameChannel $c3(Detective:) $c2(%Player)
      set %Player %WasHomeless
      if (%Player) msg %GameChannel $c3(Bum:) $c2(%Player)
      EndGame
    }
    Punt {
      if ((!$1) || (%GameIsPlaying != true)) return
      set %x 1
      while ($read(l.txt,%x) != $null) {
        if ($read(l.txt,%x) == $1) write -dl %x l.txt
        if ($read(m.txt,%x) == $1) write -dl %x m.txt
        inc %x
      }
      if ($1 ison %GameChannel) mode %GameChannel -v $1
      if ($2) {
        if ($2 ison %GameChannel) mode %GameChannel -v $2
      }
      if ($WhatIs($1) == Detective) unset %Detective
      if ($WhatIs($1) == killer) unset %Killer
      if ($WhatIs($1) == Doctor) unset %Doctor
      if ($WhatIs($1) == Homeless) unset %Homeless
    }
    BotsMoves {
      if ((%GameIsPlaying == false) || ($InGame($1) == no)) return
      if ($WhatIs($1) == Civilian) {
        msg %GameChannel $c1(The bot had to take real action:) $c3(civilian) $c2($1) $c1(was put face-first into a wall, and shot in the back!)
        if ($InGame($1) == yes) { dec %TotalCivilian | kick $1 %CivilianChannel You died. }
      }
      if ($WhatIs($1) == detective) {
        msg %GameChannel $c1(The was sitting in the bar when the) $c3(detective) $c2($1) $c1(got too drunk and started a fight, but ended up headless on the floor!)
        if ($InGame($1) == yes) { dec %TotalDetective | kick $1 %CivilianChannel You died. | set %DetectiveMoved }
      }
      if ($WhatIs($1) == mafia) {
        msg %GameChannel $c1(The mob messed with the wrong target, so the bot too a glance at) $c3(mafia) $c2($1) $c1(and shot a pistol right into the eye socket!)
        if ($InGame($1) == yes) { dec %TotalMafia | kick $1 #mazone You died. | set %MafiaMoved }
      }
      if ($WhatIs($1) == doctor) {
        msg %GameChannel $c1(The bot found illegal drugs being traced to the:) $c3(doctor) $c2($1) $c1(and punished the doc by death!)
        if ($InGame($1) == yes) { dec %TotalDoctor | kick $1 %CivilianChannel You died. | set %DoctorMoved }
      }
      if ($WhatIs($1) == killer) {
        msg %GameChannel $c1(The bot had to do some dirty work of its own and too the) $c3(killer) $c2($1) $+ $c1('s life!)
        if ($InGame($1) == yes) { dec %TotalKiller | kick $1 %CivilianChannel You died. | set %KillerMoved }
      }
      if ($WhatIs($1) == homeless) {
        msg %GameChannel $c1(The bot accidentally stepped on the) $c3(homeless bum) $c2($1) $+ $c1('s head and crushed it!)
        if ($InGame($1) == yes) { dec %TotalHomeless | kick $1 %CivilianChannel You died. | set %HomelessMoved }
      }
      if ($InGame($1) == yes) dec %NumberOfPlayers
      punt $1
    }
    StartTheGame {
      if (%GameIsPlaying == true) return
      if (%GameIsStopped == true) {
        if (($1 !isop %GameChannel) && ($1 !ishop %GameChannel)) { msg $1 $c2(You don't have access to use that command.) | return }
        else msg %GameChannel $c2(The bot shall run as normal)
      }
      EndGame
      part %MafiaChannel $c1(Game over)
      part %CivilianChannel $c1(Game over)
      msg %GameChannel $c1(Registration into the game has start, you may use) $c2(!reg) $c1(to register) $+ $c1(! The registration lasts) $c3(2 minutes and 10 seconds)
      set %NumberOfPlayers 0
      set %GameIsStopped false
      set %GameIsPlaying true
      set %Registration on
      set %TimeToAccept false
      set %TotalPlayers 0
      set %TotalMafia 0
      set %TotalKiller 0
      set %TotalHomeless 0
      set %TotalDoctor 0
      set %TotalCivilian 0
      remove m.txt
      remove l.txt
      remove w.txt
      remove a.txt
      unset %WasDetective %WasDoctor %WasKiller %WasHomeless %Detective %Killer %Homeless %Doctor
      set %BeginVoting no
      set %Voting no
      set %EndVoting no
      set %TotalVoted 0
      set %For 0
      set %Against 0
      timerReg1 1 65 msg %GameChannel $c1(Registration is in progress, you may join the game by using) $c2(!reg) $c1(Time left until the game starts:) $c3(1 minute and 5 seconds)
      timerReg2 1 140 msg %GameChannel $c1(Well the registrtaion is now over, and the roles are about to be given out!)
      timerReg3 1 145 GiveOutRoles
      set %CivilianChannel $+(#Civilians,$r(1,99999))
      set %MafiaChannel $+(#Mafia,$r(1,99999))
      join %CivilianChannel
      join %MafiaChannel
      set %dur $ctime
    }
    TakeOut {
      if (%GameIsPlaying == false) return
      if ($InGame($1) == yes) return
      if ($GotKicked($1) > 0) return
      if (%GameIsStopped == true) return
      if (%Registration == on) { 
        Punt $1 
        msg %GameChannel $c2($1) $c1(is no longer in the game...)
        dec %NumberOfPlayers
        return
      }
      if ($1 ison %GameChannel) mode %GameChannel -v $1
      msg %GameChannel $c2($1) $c1(you are crazy, but you will be eliminated once the day/night comes...)
      write q.txt $1
      if (%Voting == yes) { 
        if (%CiviliansVictim == $1) { set %Voting no | timer1 off | timer1 1 5 Night }
      }
      if (%YesNoVoting == yes) { 
        if (%CiviliansVictim == $1) { %YesNoVoting = 0 | timer1 off | timer1 1 5 Night }
      }
    }
    GiveOutRoles {
      set %Registration off
      set %TotalPlayers %NumberOfPlayers
      set %DetectiveAccepted no
      if (%TotalPlayers < 3) { msg %GameChannel $c2(The game cannot start due to the lack of players.  You only have) $c3(%TotalPlayers out of 3) $C2(needed to play!) | set %GameIsPlaying false | endgame | return }
      set %TimeToAccept true
      mode %GameChannel m
      set %TotalMafia $round($calc(((%TotalPlayers - 3)/3)+1),0)
      set %TotalDetective 1
      if (%TotalPlayers > 3) { set %TotalDoctor 1 | set %DoctorAccepted no }
      else set %TotalDoctor 0
      if (%TotalPlayers > 4) { set %TotalKiller 1 | set %KillerAccepted no }
      else set %TotalKiller 0
      if (%TotalMafia > 2) { set %TotalHomeless 1 | set %HomelessAccepted no }
      else set %TotalHomeless 0
      set %TotalCivilian $calc(%TotalPlayers - (%TotalMafia + %TotalDoctor + %TotalKiller + %TotalHomeless + %TotalDetective))
      GiveOutD
      if (%TotalDoctor != 0) GiveOutH
      if (%TotalKiller != 0) GiveOutK
      if (%TotalHomeless != 0) GiveOutB
      StartMafiaGiveOut
      timerStartGame 1 65 StartGame
    }
    StartMafiaGiveOut {
      set %xx 1
      while (%xx < %TotalMafia) {
        GiveOutM
        inc %xx
      }
    }
    GiveOutD {
      :PickAnotherPerson
      set %RandomNick $read(l.txt,$rand(1,%TotalPlayers))
      if ($WhatIs(%RandomNick) != civilian) goto PickAnotherPerson
      msg %RandomNick $c1(You are being offered to be the) $c3(Detective) $+ $c1(! Do you accept this role? To accept (!yes) or to reject (!no))
      set %Detective %RandomNick
      set %WasDetective %RandomNick
    }
    GiveOutM {
      :PickAnotherPerson
      set %RandomNick $read(l.txt,$rand(1,%TotalPlayers))
      if ($WhatIs(%RandomNick) != civilian) goto PickAnotherPerson
      write $1 m.txt %RandomNick
      write $1 w.txt %RandomNick
      write no a.txt
      msg %RandomNick $c1(You are being offered to be the) $c3(Mafia) $+ $c1(! Do you accept this role? To accept (!yes) or to reject (!no))
    }
    GiveOutH {  
      :PickAnotherPerson
      set %RandomNick $read(l.txt,$rand(1,%TotalPlayers))
      if ($WhatIs(%RandomNick) != civilian) goto PickAnotherPerson
      msg %RandomNick $c1(You are being offered to be the) $c3(Doctor) $+ $c1(! Do you accept this role? To accept (!yes) or to reject (!no))
      set %Doctor %RandomNick
      set %WasDoctor %RandomNick
    }
    GiveOutK {
      :PickAnotherPerson
      set %RandomNick $read(l.txt,$rand(1,%TotalPlayers))
      if ($WhatIs(%RandomNick) != civilian) goto PickAnotherPerson
      msg %RandomNick $c1(You are being offered to be the) $c3(Killer) $+ $c1(! Do you accept this role? To accept (!yes) or to reject (!no))
      set %Killer %RandomNick
      set %WasKiller %RandomNick
    }
    GiveOutB {
      :PickAnotherPerson
      set %RandomNick $read(l.txt,$rand(1,%TotalPlayers))
      if ($WhatIs(%RandomNick) != civilian) goto PickAnotherPerson
      msg %RandomNick $c1(You are being offered to be the) $c3(Homeless bum) $+ $c1(! Do you accept this role? To accept (!yes) or to reject (!no))
      set %Homeless %RandomNick
      set %WasHomeless %RandomNick
    }
    EndVoting {
      set %EndVoting yes
      msg %GameChannel $c1(Ok, time to decide whether or not) $c2(%CiviliansVictim) $c1(should be hung... Is it worth it? Vote people!) $c2(!yes/!no) $c1(You have 1 minute!)
      notice %GameChannel Civilians, time to vote!
      set %For 0
      set %Against 0
      set %TotalVoted 0
      set %Voting no
      if ($hget(VotingResults)) hfree VotingResults
      hmake VotingResults $calc(%NumberOfPlayers -1)
      timer1 1 60 YesNoVoting
    }
    AcceptRole {
      if ((%TimeToAccept == false) || ($WhatIs($1) == civilian) || (%AllConfirmed == yes)) return
      if ($WhatIs($1) == detective) {
        if (%DetectiveAccepted == yes) return
        invite $1 %CivilianChannel
        msg $1 $c1(Granted, you have been given your role.  Please join $c3(%CivilianChannel))
        set %Detective $1
        msg %GameChannel $c1(It seems like the) $c2(detective) $c1(has accepted the role)...
        set %WasDetective $1
        set %DetectiveAccepted yes
      }
      if ($WhatIs($1) == doctor) {
        if (%DoctorAccepted == yes) return
        msg $1 $c1(Granted, you have been given your role)
        set %Doctor $1
        msg %GameChannel $c1(It seems like the) $c2(doctor) $c1(has accepted the role)...
        set %WasDoctor $1
        set %DoctorAccepted yes
      }
      if ($WhatIs($1) == killer) {
        if (%KillerAccepted == yes) return
        msg $1 $c1(Granted, you have been given your role)
        set %Killer $1
        /msg %GameChannel $c1(It seems like the) $c2(killer) $c1(has accepted the role)...
        set %WasKiller $1
        set %KillerAccepted yes
      }
      if ($WhatIs($1) == homeless) {
        if (%HomelessAccepted == yes) return
        invite $1 %CivilianChannel
        msg $1 $c1(Granted, you have been given your role.  Please join $c3(%CivilianChannel))
        set %Homeless $1
        /msg %GameChannel $c1(It seems like the) $c2(homeless) $c1(has accepted the role)...
        set %WasHomeless $1
        set %HomelessAccepted yes
      }
      if ($WhatIs($1) == mafia) {
        set %TempVar $MafiaNumber($1)
        if ($read(a.txt,t,%TempVar) == yes) return
        write -l %t a.txt yes
        invite $1 %MafiaChannel
        msg $1 $c1(Granted, you have been given your role.  Please join $c3(%MafiaChannel))
        /msg %GameChannel $c1(It seems like the) $c2(mafia) $c1(has accepted the role)...
        write l w.txt $1    
      }
      if ($AllAccepted == yes) { timers off | StartGame }
    }
    StartVoting {
      VictoryAchieved
      set %BeginVoting yes
      set %TimeToVote yes
      set %Voting yes
      set %CiviliansVictim $null
      set %VotedVictim 0
      if ($c == true) { EndGame | return }
      else {
        if ($hget(VotingResults)) hfree VotingResults
        hmake VotingResults %NumberOfPlayers
        msg %GameChannel $c1(Well, who is responsible for everything? You have 2 minutes! To vote:) $c2(!<Nick/Number>) $c1(or) $c2(!!night) $c1(if you don't want to hang anyone...)
        ShowPlayers %GameChannel
        notice %GameChannel People, time to vote!
        timerToVote 1 120 Voting
      }
    }
    RejectRole {
      if ((%TimeToAccept == false) || ($WhatIs($1) == civilian) || (%AllConfirmed == yes)) return
      if ($WhatIs($1) == detective) {
        if (%DetectiveAccepted == yes) return
        msg $1 $c1(Your role will be given to somebody else)
        msg %GameChannel $c1(It seems like the) $c2(detective) $c1(has rejected the role)...
        unset %detective
        GiveOutD
      }
      if ($WhatIs($1) == doctor) {
        if (%DoctorAccepted == yes) return
        msg $1 $c1(Your role will be given to somebody else)
        /msg %GameChannel $c1(It seems like the) $c2(doctor) $c1(has rejected the role)...
        unset %doctor
        GiveOutH
      }
      if ($WhatIs($1) == killer) {
        if (%KillerAccepted == yes) return
        msg $1 $c1(Your role will be given to somebody else)
        /msg %GameChannel $c1(It seems like the) $c2(killer) $c1(has rejected the role)...
        unset %killer
        GiveOutK
      }
      if ($WhatIs($1) == homeless) {
        if (%HomelessAccepted == yes) return
        msg $1 $c1(Your role will be given to somebody else)
        /msg %GameChannel $c1(It seems like the) $c2(homeless) $c1(has rejected the role)...
        unset %homeless
        GiveOutB
      }
      if ($WhatIs($1) == mafia) {
        set %TempVar $fif(m.txt,$1) 
        write -dl %TempVar m.txt
        write -dl %TempVar w.txt
        set %RandomNick $MafiaNumber($1)
        msg $1 $c1(Your role will be given to somebody else)
        msg %GameChannel $c1(It seems like the) $c2(mafia) $c1(has rejected the role)...
        GiveOutM %RandomNick
      }
    }
    Voting {
      set %BeginVoting no
      %TimeToVote = no
      if (%VotedVictim < 2) {
        msg %GameChannel $c1(During the entire day, the people didn't achive anything!)
        timer1 1 10 /night
        return
      }
      if (%z == 1) {
        msg %GameChannel 10The day was wasted, and there was no decision!
        timer1 1 10 /night
        return
      }
      if (%CiviliansVictim == 1night) {
        msg %GameChannel 10The people have decided not to hang anybody today!
        timer1 1 10 /night
        return
      }
      set %Voting yes
      msg %GameChannel $c1(Certain people agree that) $c2(%CiviliansVictim) $c1(should be blamed for what was done at night!)
      msg %GameChannel $c1(What do you have to say for yourself dear) $c2%CiviliansVictim) $c3(!done) $c1(to end... You have no more than 10 seconds!)
      timer1 1 10 EndVoting
    }
    AllActiveRoles {
      if ((%GameIsPlaying == false) || (%Registration == on) || (%GameIsStopped == 1)) return
      set %ActiveRoles $c1(In total there are:)
      if (%TotalCivilian > 0) %ActiveRoles = %ActiveRoles $c2(civilians -) $c3(%TotalCivilian) $+ $c1($chr(44))
      if (%TotalDetective > 0) %ActiveRoles = %ActiveRoles $c2(detective) $+ $c1($chr(44))
      if (%TotalMafia > 0) %ActiveRoles = %ActiveRoles $c2(mafia -) $c3(%TotalMafia) $+ $c1($chr(44))
      if (%TotalDoctor > 0) %ActiveRoles = %ActiveRoles $c2(doctor) $+ $c1($chr(44))
      if (%TotalKiller > 0) %ActiveRoles = %ActiveRoles $c2(killer) $+ $c1($chr(44))
      if (%TotalHomeless > 0) %ActiveRoles = %ActiveRoles $c2(homeless bum) $+ $c1(..)
      %ActiveRoles = $left(%ActiveRoles,-1)
      return %ActiveRoles
    }
    
    StartGame {
      set %TimeToAccept false
      if ($AllConfirmed == no) {
        set %Xy 1
        msg %Detective Please join $c3(%CivilianChannel))
        if (%TotalHomeless == 1) msg %Homeless $c1(Please join) $c3(%CivilianChannel))
        while ($read(w.txt,%Xy)) {
          if ($read(m.txt,w,$+($read(w.txt,%Xy))) == $null)
          {
            write m.txt $read(w.txt,%Xy)
            msg $read(w.txt,%Xy) $c1(Please join) %$c2(%MafiaChannel)
            write -dl %Xy w.txt
          }
          inc %Xy
        }
      }
      msg %GameChannel $c1(The roles have been given out, and the game is about to start...)
      msg %GameChannel $AllActiveRoles
      /NightChecks
    }
    NightChecks {
      if ($read(q.txt,1) == $null) { Night | return }
      else {
        PlayersGone
        if ($VictoryAchieved == true) {
          EndGame
          return
        }
      }
      timer1 1 10 Night
    }
    SleepyPeople {
      if ($read(q.txt,1) == $null) { DetectivesMove | return }  
      else {
        PlayersGone
        remove q.txt
        timerNextMove 1 15 DetectivesMove
      }
    }
    ShowPlayers {
      if (%GameIsPlaying == false) return
      %ListOfPlayers = $c1(List of players:)
      %x = 1
      while (%x <= %NumberOfPlayers) {
        %ListOfPlayers = %ListOfPlayers $c3(%x) $+ .4 $read(l.txt,%x)
        inc %x
      }
      msg $1 %ListOfPlayers
    }
    Night {
      VictoryAchieved
      %NightTime = yes
      %DetectiveMoved = 0
      %MafiaMoved = 0
      %DoctorMoved = 0
      %KillerMoved = 0
      %BumMoved = 0
      %DetectivesVictim = $null
      %MafiasVictim = $null
      %DoctorsVictim = $null
      %KillersVictim = $null
      %BumsVictim = $null
      %DWords = $null
      %MWords = $null
      %HWords = $null
      %KWords = $null
      %BWords = $null  
      inc %nights
      msg %GameChannel $c1(It is now the) $c3(night) $c1(time, the people are sleeping tight, after a hard day of work. The only ones who are up, are those you are looking for trouble. The night will last 3 minutes 10!!)
      if (%Detective != $null) { msg %Detective $c2(Who's the victim?) $c1(To check:) $c3(!check <Nick/Number> [phrase]) $c1(to kill:) $c3(!kill <Nick/Number> [phrase]) | ShowPlayers %Detective }
      if ($read(m.txt,1) != $null) { msg $read(m.txt,1) $c2(Who's the victim?) $c1(To kill:) $c3(!kill <Nick/Number> [phrase]) | ShowPlayers $read(m.txt,1) }
      if (%Doctor != $null) { msg %Doctor $c2(Who's the victim?) $c1(To heal:) $c3(!heal <Nick/Number> [phrase]) | ShowPlayers %Doctor }
      if (%killer != $null) { msg %Killer $c2(Who's the victim?) $c1(To kill:) $c3(!kill <Nick/Number> [phrase]) | ShowPlayers %Killer }
      if (%Homeless != $null) { msg %Homeless $c2(Who's the victim?) $c1(To check:) $c3(!check <Nick/Number> [phrase]) | ShowPlayers %Homeless }
      notice %GameChannel Players, time to make your move!
      if (%Detective == $null) %DetectiveMoved = 1
      if ($read(m.txt,1) == $null) %MafiaMoved = 1
      if (%Doctor == $null) %DoctorMoved = 1
      if (%Killer == $null) %KillerMoved = 1
      if (%Homeless == $null) %BumMoved = 1
      timerToEndNight 1 180 Day
    }
    PlayersGone {
      set %x 1
      while ($read(q.txt,%x) != $null) {
        set %Quitter $read(q.txt,%x)
        if (%Quitter != $null) TakeOut %Quitter
        inc %x
      }
    }
    Day {
      VictoryAchieved
      msg %GameChannel $c1(Finally the) $c3(day) $c1(has come, they sun is shining bright, and the birds are singing.  There is a cry heard through out the town "help!" A member of the town is now dead...)
      FoundOutRole %Detective
      FoundOutRole %Homeless
      set %NightTime no
      set %healed 0
      timerDay 1 5 DetectivesMove
    }
    DetectivesMove {
      if ((%DetectivesVictim == $null) && (%TotalDetective > 0)) { BotAttacks %Detective | timerNextMove 1 15 MafiasMove | return }
      if (%DetectiveChecked == yes) {
        msg %GameChannel $c1(The) $c3(detective) $c1(could have been doing something better last night, but at least he now knows who is) $c2(%DetectivesVictim) $c1(is! $iif(%DWords != $null,Detective's words were:12 %DWords))
        timerNextMove 1 15 MafiasMove
      }
      else {
        if (%healed == 0) {
          if (%DoctorsVictim == %DetectivesVictim) {
            set %healed 1
            msg %GameChannel $c1(The) $c3(detective) $c1(took many shots last night and almost killed) $c2(%DetectivesVictim) $c1($iif(%DWords != $null,Detective's words were:12 %DWords))
            msg %GameChannel $c3(%DoctorsVictim) $c1(was near death, but thankfully the) $c3(doctor) $c1(knew what he was doing, and saved the poor soul! $iif(%HWords != $null,The doctor's words were:12 %HWords))
            timerNextMove 1 15 MafiasMove
            return
          }
        }
        if ($WhatIs(%DetectivesVictim) == civilian) {
          msg %GameChannel $c1(The) $c3(detective) $c1(got in a fight and lost control of himself so he shot the) $c3(civilian) $c2(%DetectivesVictim) $+ $c1(! $iif(%DWords != $null,Detective's words were:12 %DWords)) | kick %CivilianChannel %DetectivesVictim  You died
          if ($InGame(%DetectivesVictim) == yes) { dec %TotalCivilian }
        }
        if ($WhatIs(%DetectivesVictim) == detective) {
          msg %GameChannel $c3(Detective) $c2(%DetectivesVictim) $c1(could no longer handle the pressure he was under, so he decided to kill himself... $iif(%DWords != $null,Detective's words were:12 %DWords)) | kick %CivilianChannel %DetectivesVictim  You died
          if ($InGame(%DetectivesVictim) == yes) { dec %TotalDetective }
        }
        if ($WhatIs(%DetectivesVictim) == mafia) {
          msg %GameChannel $c1(The) $c3(detective) $c1(was going through a tough operation and in the end has managed to kill the) $c3(mafia) $c2(%DetectivesVictim) $+ $c1(... $iif(%DWords != $null,Detective's words were:12 %DWords)) | kick %MafiaChannel %DetectivesVictim  You died
          if ($InGame(%DetectivesVictim) == yes) { dec %TotalMafia }
        }
        if ($WhatIs(%DetectivesVictim) == doctor) {
          msg %GameChannel $c1(The) $c3(detective) $c1(did not believe that the) $c3(doctor) $c2(%DetectivesVictim) $c1(had stiched up his sholder to his best efforts, so he deserved to die... $iif(%DWords != $null,Detective's words were:12 %DWords)) | kick %CivilianChannel %DetectivesVictim  You died
          if ($InGame(%DetectivesVictim) == yes) { dec %TotalDoctor }
        }
        if ($WhatIs(%DetectivesVictim) == killer) {
          msg %GameChannel $c1(The) $c3(detective) $1(was sitting in the bar when he started fighting with the) $c3(killer) $c2(%DetectivesVictim) $+ $c1(and was nothing short of victory! $iif(%DWords != $null,Detective's words were:12 %DWords)) | kick %CivilianChannel %DetectivesVictim  You died
          if ($InGame(%DetectivesVictim) == yes) { dec %TotalKiller }
        }
        if ($WhatIs(%DetectivesVictim) == homeless) {
          msg %GameChannel $c1(The) $c3(detective) $1(got into an arguement with his best friend, and killed the) $c3(homeless bum) $c2(%DetectivesVictim) $+ $c1(... $iif(%DWords != $null,Detective's words were:12 %DWords)) | kick %CivilianChannel %DetectivesVictim  You died
          if ($InGame(%DetectivesVictim) == yes) { dec %TotalHomeless }
        }
        if ($InGame(%DetectivesVictim) == yes) dec %NumberOfPlayers
        Punt %DetectivesVictim
      }
      timerNextMove 1 15 MafiasMove
      return
    }
    MafiasMove {
      if (%MafiasVictim == $null) { 
        if ($read(m.txt,1) != $null) { BotAttacks $read(m.txt,1) | timerNextMove 1 15 KillersMove | /return }
        KillersMove
        return
      }
      if (%healed == 0) {
        if (%DoctorsVictim == %MafiasVictim) {
          set %healed 1
          msg %GameChannel $c1(The) $c3(mafia) $c1(had a meeting last night, and came to the conclusion that) $c2(%MafiasVictim) $c1(deserves to die! $iif(%MWords != $null,Mafia's words were:12 %MWords))
          msg %GameChannel $c1(Nobody could touch) $c2(%DoctorsVictim) $c1(for the) $c3(doctor) $c1(was there to save a life! $iif(%HWords != $null,Doctor's words were:12 %HWords))
        }
      }
      if ($WhatIs(%MafiasVictim) == civilian) {
        msg %GameChannel $c1(It wasn't long until the) $c3(mafia) $c1(decided to let) $c3(civilian) $c2(%MafiasVictim) $c1(rest in peace! $iif(%MWords != $null,Mafia's words were:12 %MWords)) | kick %CivilianChannel %MafiasVictim You died
        if ($InGame(%MafiasVictim) == yes) { dec %TotalCivilian }
      }
      if ($WhatIs(%MafiasVictim) == detective) {
        msg %GameChannel $c1(Well people, today was a sad day, for the) $c3(mafia) $c1(had finally found the) $c3(detective) $c2(%MafiasVictim) $c1(and put a bullet through the head! $iif(%MWords != $null,Mafia's words were:12 %MWords))
        kick %CivilianChannel %MafiasVictim You died
        if ($InGame(%MafiasVictim) == yes) { dec %TotalDetective }
      }
      if ($WhatIs(%MafiasVictim) == mafia) {
        msg %GameChannel $c1(The) $c3(mafia) $c1(hand a great conflict last night, and it ended in a killing of the) $c3(mafia's) $c2(%MafiasVictim) $+ $c1(... $iif(%MWords != $null,Mafia's words were:12 %MWords))
        kick %MafiaChannel %MafiasVictim You died
        if ($InGame(%MafiasVictim) == yes) { dec %TotalMafia }
      }
      if ($WhatIs(%MafiasVictim) == doctor) {
        msg %GameChannel $c1(The) $c3(mafia) $c1(did not like the fact that the majority of their victims live to see the next day after their visit, so they killed the) $c3(doctor) $c2(%MafiasVictim) $+ $c1(... $iif(%MWords != $null,Mafia's words were:12 %MWords))
        kick %CivilianChannel %MafiasVictim You died
        if ($InGame(%MafiasVictim) == yes) { dec %TotalDoctor }
      }
      if ($WhatIs(%MafiasVictim) == killer) {
        msg %GameChannel $c1(The) $c3(mafia) $c1(are aware of their competition, so they burtally shot and killed the) $c3(killer) $c2(%MafiasVictim) $+ $c1(... $iif(%MWords != $null,Mafia's words were:12 %MWords))
        kick %CivilianChannel %MafiasVictim You died
        if ($InGame(%MafiasVictim) == yes) { dec %TotalKiller }
      }
      if ($WhatIs(%MafiasVictim) == homeless) {
        msg %GameChannel $c1(The) $c3(mafia) $c1(were afraid of getting traced, so they threw a grenade they had on them in the dumpster and by chance killing the) $c3(homeless bum) $c2(%MafiasVictim) $+ $c1(... $iif(%MWords != $null,Mafia's words were:12 %MWords))
        kick %CivilianChannel %MafiasVictim You died
        if ($InGame(%MafiasVictim) == yes) { dec %TotalHomeless }
      }
      if ($InGame(%MafiasVictim) == yes) dec %NumberOfPlayers
      Punt %MafiasVictim
      timerNextMove 1 15 KillersMove
    }
    KillersMove {
      if (%TotalKiller < 1) { DoctorsMove | return }
      if (%KillersVictim == $null) { BotAttacks %Killer | timerNextMove 1 15 DoctorsMove | return }
      if (%healed == 0) {
        if (%DoctorsVictim == %KillersVictim) {
          set %healed 1
          msg %GameChannel $c1(The) $c3(killer) $c1(got a little to careless with) $c2(%victman) $+ $c1(, and couldn't get the job done! $iif(%KWords != $null,Killer's words were:12 %KWords))
          msg %GameChannel $c2(%victdok) $c1(didn't die for the) $c3(doctor) $c1(was right at the scene of the crime! $iif(%HWords != $null,The doctor's words were:12 %HWords))
          goto doc
        }
      }
      if ($WhatIs(%KillersVictim) == civilian) {
        msg %GameChannel $c1(At night the) $c3(killer) $c1(got the blood of the innocent as he wanted, and killed) $c3(civilian) $c2(%KillersVictim) $+ $c1(! $iif(%KWords != $null,Killer's words were:12 %KWords))
        kick %CivilianChannel %KillersVictim You died
        if ($InGame(%KillersVictim) == yes) dec %TotalCivilian
      }
      if ($WhatIs(%KillersVictim) == detective) {
        msg %GameChannel $c1(The crazy) $c3(killer) $c1(decapitated) the $3(detective) $2(%KillersVictim) $c1(and carved his name into the skull! $iif(%KWords != $null,Killer's words were:12 %KWords))
        kick %CivilianChannel %KillersVictim You died
        if ($InGame(%KillersVictim) == yes) dec %TotalDetective
      }
      if ($WhatIs(%KillersVictim) == mafia) {
        msg %GameChannel $c1(The) $c3(killer) $c1(saw a mob and wanted to join, but after getting rejected he killed the) $3(mafia) $2(%KillersVictim) $+ $c1(! $iif(%KWords != $null,Killer's words were:12 %KWords))
        kick %MafiaChannel %KillersVictim You died
        if ($InGame(%KillersVictim) == yes) dec %TotalMafia
      }
      if ($WhatIs(%KillersVictim) == doctor) {
        msg %GameChannel $c1(The) $c3(doctor) $2(%KillersVictim) $c1(was out helping the people in town, then suddenly got stabbed in the back with a dagger by the visious) $3(killer) $+ $c1(! $iif(%KWords != $null,Killer's words were:12 %KWords))
        kick %CivilianChannel %KillersVictim You died
        if ($InGame(%KillersVictim) == yes) dec %TotalDoctor 
      }
      if ($WhatIs(%KillersVictim) == killer) {
        msg %GameChannel $c1(Going crazy from boredom, the) $c3(killer) $c2(%KillersVictim) $c1(decided to commit suicide, and jabbed a knife right into the throat! $iif(%KWords != $null,Killer's words were:12 %KWords))
        kick %CivilianChannel %KillersVictim You died
        kick %MafiaChannel %KillersVictim You died
        if ($InGame(%KillersVictim) == yes) dec %TotalKiller
      }
      if ($WhatIs(%KillersVictim) == homeless) {
        msg %GameChannel $c1(The) $c3(killer) $c1(noticed that the) $3(homeless bum) $2(%KillersVictim) $c1(was asking for money, so decided to have some fun by stabbing the bum in the eyes and snapping his neck! $iif(%KWords != $null,Killer's words were:12 %KWords))
        kick %CivilianChannel %KillersVictim You died
        if ($InGame(%KillersVictim) == yes) dec %TotalHomeless
      }
      if ($InGame(%KillersVictim) == yes) dec %NumberOfPlayers
      Punt %KillersVictim
      :doc
      timerNextMove 1 15 DoctorsMove
    }
    DoctorsMove {
      if (%TotalDoctor < 1) { BumsMove | return }
      if (%DoctorsVictim == $null) { 
        if (%TotalDoctor > 0) { BotAttacks %Doctor | timerNextMove 1 15 BumsMove | return }
      }
      if (%healed == 0) {
        msg %GameChannel $c1(The) $c3(doctor) $c1(thought that) $c2(%DoctorsVictim) $c1(looked too ill, so he decided to stay there over night... $iif(%HWords != $null,Doctor's words were:12 %HWords))
      }
      else { BumsMove | return }
      timerNextMove 1 15 BumsMove
    }
    BumsMove {
      if (%BumsVictim == $null) {
        if (%TotalHomeless > 0) { BotAttacks %Homeless | timerNextMove 1 15 StartVoting | return }
        StartVoting
        return
      }
      msg %GameChannel $c1(The) $c3(homeless bum) $c1(at night started snooping around) $c2(%BumsVictim) $+ $c1('s stuff.. $iif(%BWords != $null,Homeless' words were:12 %BWords))
      timerNextMove 1 15 StartVoting
    }
    BotAttacks {
      if ($WhatIs($1) == Civilian) { msg %GameChannel $c(The bot had to take real action, so) $c2(civilian) $c3($1) $c1(was put face-first into a wall, and shot in the back!) 
        kick $1 %CivilianChannel You died.
        if ($InGame($1) == yes) dec %TotalCivilian
      }
      if ($WhatIs($1) == Detective) {
        msg %GameChannel $c1(The) $c3(detective) $c2($1) $c1(got too drunk and started a fight with the bot, and you could see how that ended...)
        kick $1 %CivilianChannel $c1(You died.)
        set %DetectiveMoved yes
        if ($InGame($1) == yes) dec %TotalDetective
      }
      if ($WhatIs($1) == Mafia) {
        msg %GameChannel $c1(The) $c3(mafia) $c2($1) $c1(got too drunk and started a fight with the bot, and you could see how that ended...)
        kick $1 %MafiaChannel $c1(You died.)
        set %MafiaMoved yes
        if ($InGame($1) == yes) dec %TotalMafia
      }  
      if ($WhatIs($1) == Doctor) {
        msg %GameChannel $c1(The) $c3(doctor) $c2($1) $c1(got too drunk and started a fight with the bot, and you could see how that ended...)
        kick $1 %CivilianChannel $c1(You died.)
        set %DoctorMoved yes
        if ($InGame($1) == yes) dec %TotalDoctor
      }
      if ($WhatIs($1) == Killer) {
        msg %GameChannel $c1(The) $c3(killer) $c2($1) $c1(got too drunk and started a fight with the bot, and you could see how that ended...)
        kick $1 %CivilianChannel $c1(You died.)
        set %KillerMoved yes
        if ($InGame($1) == yes) dec %TotalKiller
      }
      if ($WhatIs($1) == Homeless) {
        msg %GameChannel $c1(The) $c3(homeless bum) $c2($1) $c1(got too drunk and started a fight with the bot, and you could see how that ended...)
        kick $1 %CivilianChannel $c1(You died.)
        set %HomelessMoved yes
        if ($InGame($1) == yes) dec %TotalHomeless
      }
      if ($InGame($1) == yes) dec %NumerOfPlayers
      punt $1
    }
    VotingStats {
      unset %Voted*
      set %x 1
      set %y 0
      set %z 0
      var %VotingMessage = $c4(Voting Statistics:) 
      while ($hget(VotingResults,%x).data) {
        set %User $hget(VotingResults,%x).data
        inc %Voted $+ $hget(VotingResults,%x).data
        if (%User !isin %VotingMessage) set %VotingMessage %VotingMessage $iif(%User != 1night,$c2(%User),$c5($right(%User,-1))) $c4(-) $c3($+(!,Voted,%User)) $+ $c4(.)
        if (%z < $eval($+(%,Voted,$hget(VotingResults,%x).data),2)) { set %z $eval($+(%,Voted,$hget(VotingResults,%x).data),2) | set %CiviliansVictim $hget(VotingResults,%x).data }
        inc %x
        inc %y
      }
      set %VotingMessage %VotingMessage $c3($+([,%y,:,%NumberOfPlayers,])) 
      msg %GameChannel $regsubex(%VotingMessage,/!(Voted\w+)/ig,$(%\1,2))
      if ($calc(%z / %NumberOfPlayers) >= .6) { timers off | timerYesNo 1 5 Voting | unset %D }
    }
    ThoseVoted {
      if (%GameIsPlaying == false) return
      if (%Voting == no) return
      if ($InGame($1) == no) return
      if ($left($2,1) != !) return
      set %Vote $right($2,-1)
      if ($PlayerNumber(%Vote) == yes) %Victim = $read(l.txt,%Vote)
      else %Victim = %vote
      %Vote = %Victim
      if (%Vote == !night) { set %Vote 1night }
      if (($InGame(%Vote) == no) && (%Vote != 1night)) {
        msg %GameChannel $c1(There is no) $c2(%Vote) $c1(in the game...)
        return
      }
      hadd VotingResults $1 %Vote
      VotingStats
    }
    YesNoVoting {
      if (%Against >= %For ) {
        msg %GameChannel $c1(The defendant) $c2(%CiviliansVictim) $c1(is safe! Now's the time to celebrate!)
        timerGoToNight 1 10 Night
        return
      }
      if ($calc(%Against + %For) <= $calc((%NumberOfPlayers -1)/2)) {
        msg %GameChannel $c1(The people haven't come to a conclusion!)
        timerGoToNight 1 10 Night
        return
      }
      if (%CiviliansVictim == $null) goto CheckForEnd
      if ($WhatIs(%CiviliansVictim) == civilian) {
        msg %GameChannel $c1(Today the people have decided to hang the) $c3(civilian) $c2(%CiviliansVictim)
        if ($InGame(%CiviliansVictim) == yes) dec %TotalCivilian
      }
      if ($WhatIs(%CiviliansVictim) == detective) {
        msg %GameChannel $c1(People what have you done? You just hang the) $c3(detective) $c2(%CiviliansVictim)
        if ($InGame(%CiviliansVictim) == yes) dec %TotalDetective
      }
      if ($WhatIs(%CiviliansVictim) == mafia) {
        msg %GameChannel $c1(Hooray! The town has finally gotten rid of the evil) $c3(mafia) $c2(%CiviliansVictim)
        if ($InGame(%CiviliansVictim) == yes) dec %TotalMafia
      }    
      if ($WhatIs(%CiviliansVictim) == doctor) {
        msg %GameChannel $c1(The townspeople were fed up with the constant medicine mixup, so they hung the) $c3(doctor) $c2(%CiviliansVictim)
        if ($InGame(%CiviliansVictim) == yes) dec %TotalDoctor
      }
      if ($WhatIs(%CiviliansVictim) == killer) {
        msg %GameChannel $c1(The good people of the village have had enough of the innocent people dying, and killed off the) $c3(killer) $c2(%CiviliansVictim)
        if ($InGame(%CiviliansVictim) == yes) dec %TotalKiller
      }
      if ($WhatIs(%CiviliansVictim) == homeless) {
        msg %GameChannel $c1(The people could no longer stand the horrible stench of the) $c3(homeless bum) $c2(%CiviliansVictim)
        if ($InGame(%CiviliansVictim) == yes) dec %TotalHomeless
      }
      if ($InGame(%CiviliansVictim) == yes) dec %NumberOfPlayers
      Punt %CiviliansVictim
      goto CheckForEnd
      :CheckForEnd
      if ($VictoryAchieved == true) {
        EndGame
        return
      }
      timerVotingOver 1 10 Night
    }
    VoteFor {
      if ($InGame($1) == no) return
      if (%GameIsStopped == true) return
      if (%GameIsPlaying == false) return
      if (%EndVoting == no) return
      if ($1 == %CiviliansVictim) return
      if ($hget(VotingResults,$1) == $null) { inc %For | inc %TotalVoted }
      if ($hget(VotingResults,$1) == no) { inc %For | dec %Against }
      hadd VotingResults $1 Yes
      msg %GameChannel $c2($+($chr(91),%For,:,%Against,$chr(93))) $+ $c3($+($chr(91),%TotalVoted,:,$calc(%NumberOfPlayers -1),$chr(93))) $c1(The townperson) $c2($1) $c1(has voted) $c3(for) $c1(the hanging of) $c2(%CiviliansVictim)
      if (%For > $calc((%NumberOfPlayers - 1)/2) ) { timer1 -o 1 7 YesNoVoting }
      elseif (%Against > $calc((%NumberOfPlayers - 1)/2) ) { timer1 -o 1 7 YesNoVoting }
      elseif ($calc(%Pro + %Against) == $calc(%NumberOfPlayers - 1) ) { timer1 -o 1 7 YesNoVoting }
    }
    VoteAgainst {
      if ($InGame($1) == no) return
      if (%GameIsStopped == true) return
      if (%GameIsPlaying == false) return
      if (%EndVoting == no) return
      if ($1 == %CiviliansVictim) return
      if ($hget(VotingResults,$1) == $null) { inc %Against | inc %TotalVoted }
      if ($hget(VotingResults,$1) == yes) { inc %Against | dec %For }
      hadd VotingResults $1 No
      msg %GameChannel $c2($+($chr(91),%For,:,%Against,$chr(93))) $+ $c3($+($chr(91),%TotalVoted,:,$calc(%NumberOfPlayers -1),$chr(93))) $c1(The townperson) $c2($1) $c1(has voted) $c3(against) $c1(the hanging of) $c2(%CiviliansVictim)
      if (%For > $calc((%NumberOfPlayers - 1)/2) ) { timer1 -o 1 7 YesNoVoting }
      elseif (%Against > $calc((%NumberOfPlayers - 1)/2) ) { timer1 -o 1 7 YesNoVoting }
      elseif ($calc(%Pro + %Against) == $calc(%NumberOfPlayers - 1) ) { timer1 -o 1 7 YesNoVoting }
    }
    VictoryAchieved {
      if (%NumberOfPlayers == 1) {
        if (%TotalMafia == 1) {
          msg %GameChannel $c2(Game over! The wins goes to mafia!)
          inc %MafiaWon
          EndRoles
          return true
        }
      }
      if (%NumberOfPlayers == 1) {
        if (%TotalKiller == 1) {
          msg %GameChannel $c2(Game over! The wins goes to civilians!)
          inc %CiviliansWon
          EndRoles
          return true
        }
      }
      if (%NumberOfPlayers == 1) {
        if (%TotalDoctor == 1) {
          msg %GameChannel $c2(Game over! The wins goes to civilians!)
          inc %CiviliansWon
          EndRoles
          return true
        }
      }
      if (%NumberOfPlayers == 2) {
        if (%TotalKiller == 1) {
          if (%TotalMafia == 1)
          msg %GameChannel $c2(Game over! It's a tie!)
          inc %Ties
          EndRoles
          return true
        }
      }
      if (%NumberOfPlayers == 1) {
        if (%TotalHomeless == 1) {
          msg %GameChannel $c2(Game over! The wins goes to civilians!)
          inc %CiviliansWon
          EndRoles
          return true
        }
      }
      if (%NumberOfPlayers == 1) {
        if (%TotalCivilian == 1) {
          msg %GameChannel $c2(Game over! The wins goes to mafia!)
          inc %MafiaWon
          EndRoles
          return true
        }
      }
      if ($read(m.txt,1) == $null) {
        if (%Killer == $null ) {
          if ($calc(%TotalCivilian + %TotalDoctor + %TotalHomeless) >= 1 ) {
            msg %GameChannel $c2(Game over! The wins goes to thecivilian!)
            inc %CiviliansWon
            EndRoles
            return true
          }
        }
      }
      if ($read(m.txt,1) != $null) {
        if (%Detective == $null) {
          if (%Killer == $null ) {
            if ($calc(%TotalCivilian + %TotalDoctor + %TotalHomeless) <= 1 ) {
              msg %GameChannel $c2(Game over! The wins goes to themafia!)
              inc %MafiaWon
              EndRoles
              return true
            }
          }
        }
      }
      if (%Killer != $null) {
        if (%Detective == $null) {
          if ($read(m.txt,1) == $null ) {
            if ($calc(%TotalCivilian + %TotalDoctor + %TotalHomeless) <= 1 ) {
              msg %GameChannel $c2(Game over! The winner is the killer!)
              inc %KillerWon
              EndRoles 
              return true
            }
          }
        }
      }
      if (%TotalDetective == 1) {
        if (%TotalKiller == 1) {
          if (%TotalPlayers == 2) {
            msg %GameChannel $c2(Game over! It's a tie!)
            inc %Ties
            EndRoles  
            return true
          }
        }
      }
      if (%TotalMafia == 1) {
        if (%TotalKiller == 1) {
          if (%TotalPlayers == 2) {
            msg %GameChannel $c2(Game over! It's a tie!)
            inc %Ties
            EndRoles  
            return true
          }
        }
      }
      if (%TotalKiller == 1) {
        if (%TotalDetective == 0) {
          if (%TotalMafia == 0) {
            if (%TotalPlayers < 3) {
              msg %GameChannel $c2(Game over! The winnder is the killer!)
              inc %KillerWon
              EndRoles  
              return true
            }
          }
        }
      }
      if (%TotalMafia == 1) {
        if (%TotalDetective == 1) {
          if (%TotalKiller == 0) {
            if ($calc(%TotalCivilian + %TotalDoctor + %TotalHomeless) == 0) {
              msg %GameChannel $c2(Game over! It's a tie!)
              inc %Ties
              EndRoles  
              return true
            }
          }
        }
      }
      if (%TotalMafia == 1) {
        if (%TotalDetective == 1) {
          if (%TotalKiller == 0) {
            if ($calc(%TotalCivilian + %TotalDoctor + %TotalHomeless) == 0 ) {
              msg %GameChannel $c2(Game over! It's a tie!)
              inc %Ties
              EndRoles  
              return true
            }
          }
        }
      }
      if (%TotalKiller == 1) {
        if (%TotalDetective == 1) {
          if (%TotalMafia == 0) {
            if ($calc(%TotalCivilian + %TotalDoctor + %TotalHomeless) == 0 ) {
              msg %GameChannel $c2(Game over! It's a tie!)
              inc %Ties
              EndRoles 
              return true
            }
          } 
        }
      }
      if (%TotalMafia == 1) {
        if (%TotalKiller == 1) {
          if (%TotalDetective == 0) {
            if ($calc(%TotalCivilian + %TotalDoctor + %TotalHomeless) == 0 ) {
              msg %GameChannel $c2(Game over! It's a tie!)
              inc %Ties        
              EndRoles
              return true
            }  
          }
        }
      }
      if (%TotalMafia == 0) {
        if (%TotalKiller == 0) {
          if (%TotalDetective == 0 ) {
            if ($calc(%TotalCivilian + %TotalDoctor + %TotalHomeless) == 0 ) {
              msg %GameChannel $c2(Game over! Everybody lost!)
              inc %Ties        
              EndRoles
              return true
            }  
          }
        }
      }
      if (%NumberOfPlayers == 0) {
        msg %GameChannel $c2(Game over! It's a tie and everybody lost!)
        inc %Ties   
        EndRoles
        EndGame
        return true
      }
      return false
    }
    Leaving {
      if (%GameIsPlaying == false) return
      if ($GameIsStopped == true) return
      if ($InGame($1) == yes) return
      if (%Registration == on) { 
        punt $1 
        msg %GameChannel $c2($1) $c1(is no longer in the game...)
        %numplayers = %numplayers - 1
        return
      }
      if ($1 ison %GameChannel) mode %GameChannel -v $1
      msg %GameChannel $c2($1) $c1(has until either the day or night to get back, or else the bot will have to do some dirty work...)
      kick %CivilianChannel $1 You left
      kick %MafiaChannel $1 You left
    }
    JoinGameChannel {
      if ($1 == $me) { EndGame }
      inc %Visitors
      notice $1 $c2($1) $c1(welcome to the internet IRС-game channel) $c2("Mafia") $c1(you are visitor number) $c3(%Visitors)
      if ((%GameIsPlaying == false) && (%GameIsStopped == false)) {
        notice $1 $c1(To start the game, type in) $2(!start) $c1(in the channel, but keep in mind that you need at least $c3(3) $c1(players...))
        return
      }
      if (%Registration == on) {
        notice $1 $c1(There is currently a registeration for the game! Type in) $c2(!reg) $c1(to register for the game!)
        return
      }
      if (%GameIsPlaying == 1) {
        if ($GotKicked($1) > 0) {
          mode %GameChannel +v $1
          msg %GameChannel $c1($1 $+ , You're back in the game!)
          if (%NightTime == yes) { 
            if ($EveryoneMoved == no) {
              msg %GameChannel $c1(Just in case you have a role and you haven't made your move yet, do it now...)
              timer1 off
              timer1 1 180 Day
            }
          }
          %t = $GotKicked($1)
          write -dl %t q.txt
          return
        }
        notice $1 $c1(Sadly, the game has already started. Please wait for the game to end...)
        return
      }
    }
    EveryoneMoved {
      if (%DetectiveMoved > 0) {
        if (%MafiaMoved > 0 ) { 
          if (%KillerMoved > 0 ) {
            if (%DoctorMoved > 0 ) {
              if (%BumMoved > 0 ) return yes
            }
          }
        } 
      }
      return no
    }
    GotKicked {
      set %x 1
      while ($read(q.txt,%x)) {
        if ($read(q.txt,%x) == $1) return %x
        if ($read(q.txt,%x) == $null) return 0
        inc %k
      }
      return 0
    }
    Reg {
      if (%GameIsPlaying == false) StartTheGame $1
      if (%Registration == off) return
      if ($InGame($1) == yes) return
      inc %NumberofPlayers
      write l.txt $1
      if ($1 ison %GameChannel) mode %GameChannel +v-ho $1 $1 $1
      notice $1 $c1(You have registered as player number) $c2(%NumberOfPlayers)
    }
    ReggedByOp {
      if (($2 !isop %GameChannel) && ($2 !ishop %GameChannel)) return
      if ($1 !ison %GameChannel) return
      if (%GameIsPlaying == false) StartTheGame
      if (%Registration == off) return
      if ($InGame($1) == yes) return
      inc %NumberofPlayers
      write l.txt $1
      mode %GameChannel +v-ho $1 $1 $1
      msg %GameChannel $c3($1) $c1(has been registered registered as player number) $c2(%NumberOfPlayers) $c1(by staff member) $c3($2)
    }
    Kill {
      set %VictimsName $null
      if ((%GameIsPlaying == false) || (%GameIsStopped == true) || (%NightTime == no) || ($InGame($2) == no)) return
      if ($PlayerNumber($1) == yes) set %VictimsName $read(l.txt,$1)
      else set %VictimsName $1
      if ($InGame(%VictimsName) == no) { msg $2 $c1(There is no such player! Please try again...) | return }
      if ($WhatIs($2) == detective) {
        if (%DetectiveMoved > 0) { msg $2 $c2(Sorry, but you've already made your move...) | return }
        set %DetectivesVictim %VictimsName
        set %DetectiveChecked no
        set %DetectiveMoved 1
        set %DWords $3-
        msg %GameChannel $c1(The) $c3(detective) $c1(got bored out of his mind, so he decided to do something about it...)
        msg $2 $c1(You have decided to kill) $c2(%VictimsName)
        msg %CivilianChannel $c1(The) $c3(detective) $c1(decided to kill) $c2(%VictimsName)
      }
      if ($read(m.txt,1) == $2) {
        if (%MafiaMoved > 0) { msg $2 $c2(Sorry, but you've already made your move...) | return }
        set %MafiasVictim %VictimsName
        set %MafiaMoved 1
        set %MWords $3-
        msg %GameChannel $c1(The) $c3(mafia) $c1(gathered up in a very dark ally, and decided to get some work done...)
        msg $2 $c1(You have decided to kill) $c2(%VictimsName)
        msg %MafiaChannel $c1(The) $c3(mafia) $c1(decided to kill) $c2(%VictimsName)
      }
      if ($WhatIs($2) == killer) {
        if (%KillerMoved > 0) { msg $2 $c2(Sorry, but you've already made your move...) | return }
        set %KillersVictim %VictimsName
        set %KillerMoved 1
        set %KWords $3-
        msg $2 $c1(You have decided to kill) $c2(%VictimsName)
        msg %GameChannel $c1(The) $c3(killer) $c1(got thirsty for some blood, so now is off to quench that thirst...)
      }
      if ($EveryoneMoved == yes) { timers off | timerGoToDay 1 10 Day }
    }
    Check {
      set %VictimsName $null
      if ((%GameIsPlaying == false) || (%GameIsStopped == true) || (%NightTime == no) || ($InGame($2) == no)) return
      if ($PlayerNumber($1) == yes) set %VictimsName $read(l.txt,$1)
      else set %VictimsName $1
      if ($InGame(%VictimsName) == no) { msg $2 $c1(There is no such player! Please try again...) | return }
      if ($WhatIs($2) == detective) {
        if (%DetectiveMoved > 0) { msg $2 $c2(Sorry, but you've already made your move...) | return }
        set %DetectivesVictim %VictimsName
        set %DetectiveChecked yes
        set %DetectiveMoved 1
        set %DWords $3-
        msg $2 $c1(You have decided to check) $c2(%VictimsName)
        msg %GameChannel $c1(The) $c3(detective) $c1(got bored out of his mind, so he decided to do something about it...)
        msg %CivilianChannel $c1(The) $c3(detective) $c1(decided to check) $c2(%VictimsName)
      }
      if ($WhatIs($2) == homeless) {
        if (%bomdone > 0) { msg $2 $c2(Sorry, but you've already made your move...) | return }
        set %BumsVictim %VictimsName
        set %BumMoed 1
        %BWords $3- 
        msg $2 $c1(You have decided to check) $c2(%VictimsName)
        msg %GameChannel $c1(The) $c3(homeless bum) $c1(is out digging in trash...)
      }
      if ($EveryoneMoved == yes) { timer1 off | timerGoToDay 1 10 Day }
    }
    Heal {
      set %VictimsName $null
      if ((%GameIsPlaying == false) || (%GameIsStopped == true) || (%NightTime == no) || ($InGame($2) == no)) return
      if ($PlayerNumber($1) == yes) set %VictimsName $read(l.txt,$1)
      else set %VictimsName $1
      if ($InGame(%VictimsName) == 0) { msg $2 $c1(There is no such player in the game! Please try again...) | return }
      if (%DoctorMoved > 0) { msg $2 $c2(Sorry, but you've already made your move...) | return }
      if (%LastPersonHealed == %VictimsName) msg $2 $c1(Sorry, as kind as you may be, but you can't heal the same person more than once in a row!)
      set %LastPersonHealed %VictimsName
      set %DoctorsVictim %VictimsName
      set %DoctorMoved 1
      msg %GameChannel $c1(The) $c3(doctor) $c1(got a call, so he collected his pills and syringes...)
      msg $2 $c1(You have decided to heal) $c2(%VictimsName)
      set %HWords $3-
      if ($EveryoneMoved == yes) { timers off | timerGoToDay 1 10 Day }
    }
    PlayerNumber {
      if (!$1) return no
      if ($1 !isnum) return no
      else {
        if ($read(l.txt,$1)) return yes
      }
      return no
    }
    ShowTeams {
      set %x 1
      :next1
      set %y 1
      :next2
      if (%y == %x) { inc %y | goto next2 }
      if (%x > %TotalMafia) goto GoodTeam
      if (%y > %TotalMafia) { inc %x | goto next1 }
      msg $read(m.txt,%x) $c3(Mafia number: %j) $c2($read(m.txt,%y))
      inc %x
      goto next2
      :GoodTeam
      if (%TotalHomeless != 0) {
        msg %Detective $c3(Homeless bum:) $c2(%Homeless)
        msg %Homeless $c3(Detective:) $c(%Detective)
      }
    }
    WhatIs {
      if (%WasDetective == $1) return Detective
      if (%WasKiller == $1) return Killer
      if (%WasDoctor == $1) return Doctor
      if (%WasHomeless == $1) return Homeless
      set %x 1
      while ($read(w.txt,%x) != $null) {
        if ($read(w.txt,%x) == $1) return Mafia
        inc %x
      }
      return civilian
    }
    ChangedNick {
      if ((%GameIsPlaying == false) || ($GameIsStopped == true) || ($InGame($1) == no)) return
      if (%Registration == on) { 
        Punt $1
        write l.txt $2
        mode %GameChannel +v $2
        msg %GameChannel $c2($2) $c1(you've been re-registered with the new nick!)
        return
      }
      if ($GotKicked($1) == > 0) return
      msg %GameChannel $c1(Everybody, remember this once and for all, especially you) $c2($2) $+ $c1(! Changing your nick during the game results in death!)
      if ($2 ison %GameChannel) mode %GameChannel -v $2
      msg %GameChannel $c2($2) $c1(you will be excluded from the game...) 
      write q.txt $1
    }
    EndGame {
      close -m
      set %GameIsPlaying false
      timerUnsetM 1 10 mode %GameChannel -m
      { set %prefix $+(-,$str(v,$modespl)) }
      :start
      set %massing $nick($chan,0)
      while (%massing) {
        if ($nick(%GameChannel,%massing) != $me) { set %mass1 %mass1 $nick($chan,%massing) }
        if ($gettok(%mass1,0,32) = $modespl) { mode $chan %prefix %mass1 | unset %mass1 }
        dec %massing
      }
      mode $chan %prefix %mass1 | unset %mass1 
      return
    }
    MafiaNumber {
      set %x 1
      while ($read($read(m.txt,x))) {
        if ($1 == $read(m.txt,%x)) return %x
        if ($read(m.txt,%x) == $null) return 0
        inc %x
      }
    }
    fif {
      var %find = $read($1,tw,$2)
      return $readn
    }
    FoundOutRole {
      if ((%GameIsPlaying == false) || (%GameIsStopped == true)) return
      if (($WhatIs($1) != Detective) && ($WhatIs($1) != homeless)) return
      if (($WhatIs($1) == Detective) && (%DetectivesVictim != $null) && (%DetectiveChecked == yes)) {
        if ($WhatIs(%DetectivesVictim) == civilian) { msg $1 $c2(%DetectivesVictim) $c1(- is the) $c3(civilian) | msg %CivilianChannel $c2(%DetectivesVictim) $c1(- is the) $c3(civilian) | return }
        if ($WhatIs(%DetectivesVictim) == detective) { msg $1 $c2(%DetectivesVictim) $c1(- is the) $c3(detective) | msg %CivilianChannel $c2(%DetectivesVictim) $c1(- is the) $c3(detective) | return }    if ( $role(%victname) == 3 ) { msg $1 4 $+ %victname 10- is the 12killer10! | /msg %CivilianChannel 4 $+ %victname 10- is the 12killer10! 10To invite the player here, type in 4!invite nick }
        if ($WhatIs(%DetectivesVictim) == mafia) { msg $1 $c2(%DetectivesVictim) $c1(- is the) $c3(mafia) | msg %CivilianChannel $c2(%DetectivesVictim) $c1(- is the) $c3(mafia) | return }
        if ($WhatIs(%DetectivesVictim) == doctor) { msg $1 $c2(%DetectivesVictim) $c1(- is the) $c3(doctor) | msg %CivilianChannel $c2(%DetectivesVictim) $c1(- is the) $c3(dotor) | return }
        if ($WhatIs(%DetectivesVictim) == killer) { msg $1 $c2(%DetectivesVictim) $c1(- is the) $c3(killer) | msg %CivilianChannel $c2(%DetectivesVictim) $c1(- is the) $c3(killer) | return }
        if ($WhatIs(%DetectivesVictim) == homeless) { msg $1 $c2(%DetectivesVictim) $c1(- is the) $c3(homeless bum) | /msg %CivilianChannel $c2(%DetectivesVictim) $c1(- is the) $c3(homeless bum) | return }
      }
      if (($WhatIs($1) == Homeless) && (%BumsVictim != $null)) {
        if ($WhatIs(%BumsVictim) == civilian) { msg $1 $c2(%BumsVictim) $c1(- is the) $c3(civilian) | msg %CivilianChannel $c2(%BumsVictim) $c1(- is the) $c3(civilian) | return }
        if ($WhatIs(%BumsVictim) == detective) { msg $1 $c2(%BumsVictim) $c1(- is the) $c3(detective) | msg %CivilianChannel $c2(%BumsVictim) $c1(- is the) $c3(detective) | return }    if ( $role(%victname) == 3 ) { msg $1 4 $+ %victname 10- is the 12killer10! | /msg %CivilianChannel 4 $+ %victname 10- is the 12killer10! 10To invite the player here, type in 4!invite nick }
        if ($WhatIs(%BumsVictim) == mafia) { msg $1 $c2(%BumsVictim) $c1(- is the) $c3(mafia) | msg %CivilianChannel $c2(%BumsVictim) $c1(- is the) $c3(mafia) | return }
        if ($WhatIs(%BumsVictim) == doctor) { msg $1 $c2(%BumsVictim) $c1(- is the) $c3(doctor) | msg %CivilianChannel $c2(%BumsVictim) $c1(- is the) $c3(dotor) | return }
        if ($WhatIs(%BumsVictim) == killer) { msg $1 $c2(%BumsVictim) $c1(- is the) $c3(killer) | msg %CivilianChannel $c2(%BumsVictim) $c1(- is the) $c3(killer) | return }
        if ($WhatIs(%BumsVictim) == homeless) { msg $1 $c2(%BumsVictim) $c1(- is the) $c3(homeless bum) | msg %CivilianChannel $c2(%BumsVictim) $c1(- is the) $c3(homeless bum) | return }
      }
    }
    AllAccepted {  
      if (%DetectiveAccepted == no) return no
      if (%DoctorAccepted == no) return no
      if (%KillerAccepted == no) return no
      if (%HomelessAccepted == no) return no
      set %x 1
      while ($read(a.txt,t,$calc(%x)) != $null) {
        if ($read(a.txt,t,%x) == no) return no
        inc %x
      }
      if ($read(a.txt,t,%x) == $null) return yes
    }

     

  12. Hello!!
    This is a Unscramble Game by myself

    he Works with random nicks of the chan

    To load Paste in: Alt+R file/new
    To play type in the channel: !wnick

    (english version)

    enjoy 😉

     

    on *:text:!wnick:#: {
      if (%qnick.game-status != on) {
        set %qnick.game-status on
        set %qnick.game-nick $qnickrand($chan)
        set %qnick.game-last-nick %qnick.game-nick
        if (!%qnick.game-games) { set %qnick.game-games 1 }
        if (%qnick.game-games) { inc %qnick.game-games }
        /msg $chan 7W14nick-Gam7E 7N14ew Nic7K 12( $+ Game N°: $+ %qnick.game-games $+ 12) 7T14o Stop this nic7K9:4 !wstop
        /nscrammble %qnick.game-nick $chan
        set %qnick.game-start $ctime
      }
      else {
        if (!%floo-time) {
          set -u15 %floo-time ok
          /nscrammble %qnick.game-nick $chan
        }
      }
    }    
    alias qnickrand {
      var %qnick.game-nick1 = $nick($1,$r(1,$nick($1,0)))
      while ( %qnick.game-nick1 = %qnick.game-last-nick ) {
        set %qnick.game-nick1 $nick($1,$r(1,$nick($1,0)))
      }
      return %qnick.game-nick1
    }
    alias nscrammble {
      /msg $2 7W14nick-Gam7e  12( $+ Game N°: $+ %qnick.game-games $+ 12) 7U14nscramble this NickNam7E9: $misturecs(%qnick.game-nick)
    } 
    on *:text:%qnick.game-nick:#: {
      if (%qnick.game-status == on) {
        /msg $chan 7[4 $nick 7] 7W14inns the gam7E 12( $+ Game N°: $+ %qnick.game-games $+ 12) 7T14imeGam7E9: $duration($calc($ctime - %qnick.game-start)) 7T14he nickname wa7S:4 %qnick.game-nick  
        /msg $chan 7W14nick-Gam7e 7T14o new gam7E4 !wnick 
        set %qnick.game-status off
        unset %qnick.game-nick
      }
    }
    on *:text:!wstop:#: {
      if (%qnick.game-status == on) {
        /msg $chan 7W14nick-Gam7e 12( $+ Game N°: $+ %qnick.game-games $+ 12) 7T14imeGam7E9: 9 $duration($calc($ctime - %qnick.game-start)) 7S14toped!!7!
        /msg $chan 7W14nick-Gam7e  7N14oOne get it right!!! The Scrambled nickname wa7S9:4 %qnick.game-nick 
        set %qnick.game-status off
        unset %qnick.game-nick
        /msg $chan 7W14nick-Gam7e  7T14o a new scrambled nick Typ7E9:4 !wnick
      }
    }
    ;# yeahss you never seen this!!!     #
    ;# Becouse this on IS MINE ONE :pPpP #
    alias misturecs {
      var %trrr = $lower($1)
      var %trr = $len($1)
      var %trr1 = 1
      while (%trr1 <= %trr) {
        var %trr2 = %trr2 $+ $mid(%trrr,%trr1,1) $+ .
        inc %trr1
      } 
      var %tra = %trr2
      var %tr = $numtok(%trr2,46)
      var %tr1 = 1
      var %tr2 = %tr
      while (%tr1 <= %tr) {
        set %tr3  $rand(1,%tr2)
        var %trr12 = $remove(%tra,.)
        var %tr4 = %tr4 $+ $mid(%trr12,%tr3,1) 
        var %tra = $deltok(%tra,%tr3,46)
        dec %tr2
        inc %tr1
      }
      return %tr4
    }
    ;############ The End :)~ ##################

     

  13. SCRIPT ID: GUESSINGBOT
    Hello!
    This is an IRC Game Script! Remember the classic guessing games where the bot selects a random number and you try to guess it??
    Well! Time for a change, don't you think?
    This Bot Script will ask you to select a number from 1 to 7 and will try to guess it!
    As more users play the bot will become "smarter" and guess right more times than wrong!
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::v0.5 > 28/7/2016 ::
    ::Added: Auto Cancel After Player 1min idle (idle as in no game commands used) ::
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

     

     

    ;;Guessing Bot Script by OrFeAsGr;; http://humanity.ucoz.com ;; More Scripts!
    ;;Current version: v0.5 ;;
    ;;Have Fun;;;
    ;; http://hawkee.com/snippet/16940/ ;;
    ON *:TEXT:*:#: {
      if ($strip($1) == !guess) {
        if (!%GUESSINGBOTversion) || (%GUESSINGBOTversion != v0.5) { set %GUESSINGBOTversion v0.5 }
        if (!%guesson) {
          st-gb $nick $chan !ready
          set %guesson readywait
          .timer 1 1 msg $chan Hey $nick ... Think of a number from 1 to 7 and i'll try to guess it! Type !ready when you're ready!
          set %guessnick $nick
          set %guesschan $chan
        }
        elseif (%guesson) { 
          .timer 1 1 msg $chan Hey! I'm an mIRC Script not Ainstain! You wait for your turn $+($nick,.) I'm guessing $+(%guessnick,'s) number at the moment.
        }
      }
      elseif ($strip($1) == !ready) {
        if (%guesson == readywait) && (%guessnick == $nick) && (%guesschan == $chan) {
          .timerst-gb 1 60 st-gb $nick $chan !utry
          .timer 1 1 msg $chan OK! Now you have to define how many tries i got! Type !utry 1-5
          set %guesson utrywait
        }
      }
      elseif ($strip($1) == !utry) {
        if (%guesson == utrywait) && (%guessnick == $nick) && (%guesschan == $chan) {
          if ($strip($2) isnum 1-5) {
            .timerst-gb 1 60 st-gb $nick $chan !uright/!uwrong
            set %utry $strip($2)
            set %guesson guessing
            .timer 1 1 msg $chan Alright! I'm gonna start guessing now! If i guess right type: !uright 
            .timer 1 2 msg $chan If i guess wrong type !uwrong
            .timer 1 3 guessnum
          }
        }
      }
      elseif ($strip($1) == !uright) || ($strip($1) == !uwrong) {
        if (%guesson == guessing) && (%guessnick == $nick) && (%guesschan == $chan) {
          .timerst-gb 1 60 st-gb $nick $chan !uright/!uwrong
          if ($strip($1) == !uright) {
            if (!%fguess) {
              set %fguess 1
            }
            inc $+(%,num,%crand) 1
            inc %foundnums 1
            inc %totnums 1
            .timerst-gb* off
            .timer 1 1 msg $chan Yayyyy! I found it on my $ord(%guessnum) attempt! I'm so damn smart! Thanks for playing with me $nick <3
            .timer 1 5 msg %guesschan Out of %totnums numbers i have guessed right %foundnums and wrong %notfoundnums
            if (!%adv) { set -u1200 %adv 1 | .timer 1 10 msg %guesschan The Guessing Bot Script by OrFeAsGr :.::. http://humanity.ucoz.com .::.: }
            unset %guess* %crand %saidguess %nfrands %utry
          }
          else {
            .timer 1 1 msg %guesschan uuuh! Cmon!
            .timer 1 2 guessnum
          }
        }
      }
    }
    
    alias guessnum {
      inc %guessnum 1
      if (%guessnum <= %utry) {
        if (!%fguess) {
          if ($numtok(%nfrands,32) < %utry) {
            var %rand = $rand(1,7)
            while ($istok(%nfrands,%rand,32)) {
              var %rand = $rand(1,7)
            }
            set %nfrands $addtok(%nfrands,%rand,32)
            set %crand %rand
            .timer 1 1 msg %guesschan Is it..... %rand ????
          }
        }
        elseif (%fguess) {
          var %t = %guessnum
          var %max = 0
          while (%t <= 7) {
            if ($($+(%,num,%t),2) > %max) {
              var %max = %t
              ;OrFeAsGr http://humanity.ucoz.com
            }
            inc %t
          }
          if (%max == 0) || (%max == %guesslmax) || ($istok(%saidguess,%max,32)) {
            var %randx = $rand(1,7)
            while ($istok(%saidguess,%randx,32)) {
              var %randx = $rand(1,7)
            }
            set %saidguess $addtok(%saidguess,%randx,32)
            set %crand %randx
            .timer 1 1 msg %guesschan Is the number you thought of.... %randx
          }
          elseif (%max != 0) || (%max != %guesslmax) || (!$istok(%saidguess,%max,32)) {
            set %saidguess $addtok(%saidguess,%max,32)
            set %guesslmax %max
            .timer 1 1 msg %guesschan Maybe it is... idk... %max ??
          }
        }
      }
      elseif (%guessnum > %utry) {
        .timerst-gb* off
        inc %totnums 1
        inc %notfoundnums 1
        .timer 1 1 msg %guesschan Oh damn it! I lost all my chances!
        .timer 1 2 msg %guesschan Thanks for playing %guessnick 
        .timer 1 6 msg %guesschan Out of %totnums numbers i have guessed right %foundnums and wrong %notfoundnums
        if (!%adv) { set -u1200 %adv 1 | .timer 1 10 msg %guesschan The Guessing Bot Script by OrFeAsGr :.::. http://humanity.ucoz.com .::.: }
        unset %guess* %crand %saidguess %nfrands %utry
      }
      ;;;;;The Guessing Bot Script by OrFeAsGr;;;;;;
      ;;;;;;http://hawkee.com/snippet/16940/;;;;;;;;
      ;;;;;;;;;http://humanity.ucoz.com;;;;;;;;;;;;;
      ;;;;;;;;Check Out Humanity IRC Bot;;;;;;;;;;;; 
    }
    
    alias st-gb {
      if ($timer(st-gb).secs) {
        .timerst-gb* off
      }
      .timerst-gb 1 60 msg $2 $1 Didn't Use $3 Command In Time... Now Accepting New Player!
      .timerst-gb2 1 60 unset %crand %saidguess %nfrands %utry %guess*
    }

     

  14. SCRIPT ID: EMAIL
    Hi! This is one more mIRC Script by OrFeAsGr !
    Quick FAQ
    -What do i need your script for?
    This script uses the API provided by https://mailboxlayer.com/ to verify if the email you request is a real email
    -Neat! How does it work?
    The script triggers with a channel message! Type !emailver
    (Of course without the < and > around the email address)
    The bot responds with a channel message!
    -Do i need something extra for the script to work?
    Yes and no. I have registered for a free account on https://mailboxlayer.com/ so the limit of requests is 1000 per month.
    If some users start using the script the limit will be reached soon and the script will message the following error:
    Code: 104 Type: "usage_limit_reached" Info: User has reached or exceeded his subscription plan's monthly API Request Allowance.
    You could use the key i provide to test if the limit isn't reached at the time but soon you'll have to easily sign up at https://mailboxlayer.com/ and get your API key.
    Then replace my key with yours at line 8 of the script.
    i.e this line:
    return 00564d4dfd1e326146ed7568f367b2f6
    (do not erase return)

    So this is all i had to explain!
    Here's the script!
    v0.1 24/6/2016
    -Added version and ID for Update Checker!

    ;;; v0.1 24/6/2016 ;;;
    ;;; http://humanity.ucoz.com ;;;
    alias emailver {
      sockopen emailver apilayer.net 80
      set %emailver $1
      set %emailchan $2
    }
    alias emailverapikey {
    return 00564d4dfd1e326146ed7568f367b2f6
    }
    
    ON *:SOCKOPEN:emailver: {
      if ($sockerr) { msg %emailchan 10An Error Occured While Verifying %emailver | unset %emailver %emailchan | sockclose $sockname }
      sockwrite -nt $sockname GET $iif(%emailver, $+(/api/check?access_key=,$emailverapikey,&email=,$v1,&smtp=1&format=1), $null) HTTP/1.1
      sockwrite -nt $sockname Host: apilayer.net
      sockwrite $sockname $crlf
    }
    
    ON *:SOCKREAD:emailver: {
      if ($sockerr) { msg %emailchan An Error Occured While Verifying %emailver | unset %emailchan %emailver | sockclose $sockname }
      var %ev
      sockread %ev
      if (*smtp_check":true* iswm %ev) {
        msg %emailchan 3Email14: %emailver $+($chr(03),03,$chr(10004)) 7Exists14! 
        unset %emailchan
        unset %emailver
        sockclose $sockname
      }
      elseif (*smtp_check":false* iswm %ev) {
        msg %emailchan 3Email14: %emailver $+($chr(03),04,$chr(10008)) 7Doesn14'7t Exist14! 
        unset %emailver
        sockclose $sockname
      }
      elseif (*success": false* iswm %ev) {
        set %evfalse 1
      }
      if (%evfalse) {
        if (*code":* iswm %ev) {
          set %errorcode $remove($gettok(%ev,2,58),$chr(44))
        }
        if (*type":* iswm %ev) {
          set %errortype $remove($gettok(%ev,2,58),$chr(44))
        }
        if (*info":* iswm %ev) {
          set %errorinfo $remove($gettok(%ev,2,58),$chr(44))
          unset %evfalse
          sockclose $sockname
          msg %emailchan 10Your Request For %emailver 10Returned the following error14:
          .timer 1 1 msg %emailchan 10Code14: %errorcode 10Type14: %errortype 10Info14: %errorinfo
          .timer 1 2 unset %emailchan %errorinfo %errortype %errorcode
        }
      }
    }
    
    ON *:TEXT:*:#: {
      if (!emailver == $strip($1)) {
      if (!%EMAILversion) || (%EMAILversion != v0.1) { set %EMAILversion v0.1 }
        if (*@*.* !iswm $strip($2)) {
          .timer 1 1 msg $chan 10The email you requested was not checked because it doesn't match the usual format of email adresses14. Please provide a valid email (e.g oneemail@someserver.com)
        }
        elseif (*@*.* iswm $strip($2)) {
          if (!%emvdel) {
            set -u100 %emvdel 1
            emailver $strip($2) $chan
          }
        }
      }
    }
    ;;;;;;Script by OrFeAsGr;;;;;;;;
    ;;;;http://humanity.ucoz.com;;;;
    ;;;;;;Humanity I.R.C Bot;;;;;;;;

     

  15. Below is a very simple example of how to create a basic websocket using node.js. Websockets are great for maintaining a server/client relationship without as much of the overhead of HTTP web traffic. Today, websockets are used to build a magnitude of browser-based real-time applications (live chats, multiplayer games). Basically it's a persistent connection between the server and client in which both applications can send data. Typically, long-polling or Flash have been used as alternatives.

    First, you'll need to install the "websocket" package using the Node Package Manager.

     
     
     
     
    1
    npm install websocket
     
     

    You may get an error about the Native code not compiling. (attow) I haven't looked into how to resolve that but the websocket package typically still works. Next we'll setup the server and client. Using the javascript below as a basic skeleton, you'll want to start the server just as any other node snippet. In our example, the server will listen for connections and reply "hello" (to any and everything the client sends) then another message shortly after.

    ar server = require('websocket').server, http = require('http');
    
    var socket = new server({
        httpServer: http.createServer().listen(1337)
    });
    
    socket.on('request', function(request) {
        var connection = request.accept(null, request.origin);
    
        connection.on('message', function(message) {
            console.log(message.utf8Data);
            connection.sendUTF('hello');
            setTimeout(function() {
                connection.sendUTF('this is a websocket example');
            }, 1000);
        });
    
        connection.on('close', function(connection) {
            console.log('connection closed');
        });
    }); 

     

    Once the server has been started, you can use the code below in any HTML5 browser (that carries websocket support) to establish a connection to the server. In this example, the client sends a "hello" message when it opens the connection and puts anything it receives into the #content div.

    <div id="content"></div>
    
    <script type="text/javascript">
        var content = document.getElementById('content');
        var socket = new WebSocket('ws://localhost:1337');
        socket.onopen = function () {
            socket.send('hello from the client');
        };
    
        socket.onmessage = function (message) {
            content.innerHTML += message.data +'<br />';
        };
    
        socket.onerror = function (error) {
            console.log('WebSocket error: ' + error);
        };
    </script>

     

  16. So.
    Last night I decided to try out kvirc.
    I'll be honest I don't like it.
    Its too picturey I like basic text.

    But out of all features, one feature really caught my eye.
    "The AVATAR Idea"
    The concept of users having avatars on IRC.

    I really liked this idea, a friend on a chat server told be it used DCC.
    I asked about how it worked and he werent to sure as he didn't use that feature.

    So after playing around with mIRC and kvirc I found out how it works.

    Its just CTCP's and DCC's 😄

    So I spent till 5am coding this damn thing up after a lot of dead ends and troubleshooting I've sorted it.
    So have fun,

    Report any bugs you find.

    NOTE:
    Currently two mIRC clients don't properly swap avatars.
    I intend to fix this soon!

    Leave comments, bug reports and suggestions below.

    I intend to setup a bug reporting system for my scripts!

    Find me at irc.ilkotech.co.uk in #ilkotech if you want help with anything mIRC related!

     

    ;The AVATAR Idea.
    ;This nice feature is used in kvirc, and its nice.
    ;So why not let mIRC do the same?
    ;So thats what I intend to do with this script.
    ;Unluckily i've never used DCC in scripts so this will be a test.
    
    ;Script by Thomas Edwards (TMFKSOFT)
    ;Copyright Ilkotech.co.uk & Thomas Edwards 2011
    
    ;I plan for it to modify the address book :)
    
    ;Let the games begin.
    
    menu nicklist {
      -
      Notify Avatar:/avatar_send $1
      View Avatar:/avatar_view $1
    }
    menu * {
      Set Avatar:/avatar_set
    }
    alias avatar_send {
      if (%avatar_name != $null) {
        ctcpreply $1 AVATAR $replace(%avatar_name,$chr(32),_) %avatar_size
      }
      else {
        echo 4You have not set an avatar. Set one via /avatar_set
      }
    }
    alias avatar_set {
      var %file $sfile($mircdir $+ avatars\,Select Avatar)
      set %avatar_size $file(%file).size
      set %avatar_name $right(%file,$calc(0 - $pos(%file,\,$count(%file,\))))
      set %avatar_path %file
      echo Avatar set!
    }
    alias avatar_view {
    
      if ($1 == $me) {
    
        if (%avatar_name != $null) {
          window -osCdbptw0 @Avatar 0 0 256 256
          drawpic -s @Avatar 0 0 256 256 %avatar_path
        }
        else {
          echo 4You have not set an avatar. Set one via /avatar_set
        }
      }
      else {
        if ($readini(avatars.ini,others,$1) != $null) {
          window -soCdbptw0 @Avatar 0 0 265 292
          drawpic -s @Avatar 0 0 256 256 avatars\ $+ $readini(avatars.ini,others,$1)
        }
      }
      else {
        echo -t [Avatar] $1 does not have an Avatar. Why not politely ask them for it?
      }
    }
    on *:CTCPREPLY:AVATAR*:{
      echo -t $active [Avatar] $nick changes their avatar to $qt($2)
      if ($exists(avatars\) == $FALSE) {
        mkdir avatars
      }
      if ($exists(avatars\ $+ $2) == $FALSE) {
        raw -q NOTICE $nick :DCC GET $2 $3 $+ 
        set %avatar_recv 1
      }
      echo Avatar exists. Updating user avatar.
      writeini avatars.ini others $nick $2
      HALTDEF
    }
    
    CTCP *:DCC:{
      if ($2 == GET) {
        echo Sending Avatar. File: $replace(%avatar_name,$chr(32),_) Size: %avatar_size User: $nick
        dcc SEND $nick %avatar_path
      }
    }
    on *:FILERCVD:*:{
      if (%avatar_recv == 1) {
        copy -o $file($filename).shortfn avatars\
        remove $file($filename).shortfn
        unset %avatar_recv
      }
    }
    on *:NICK:{
      if ($readini(avatars.ini,others,$nick) != $null) {
        writeini avatars.ini others $newnick $readini(avatars.ini,others,$nick)
        remini avatars.ini others $nick
      }
    }

     

  17. !Ng-game - Start Game
    !guess 1 - 100 - Play Game
    !ad - Ad for the script
    !Ngg-End - End Game
    !a - Get The Answer send to you in PM {OWNER ONLY}

    NOTE: Thanks to ICE and Relurk for helpin

     

    ;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;                        ;
    ;  Number Guessing Game  ;
    ;       By Dj 801        ;
    ;                        ;
    ;  irc.wubnet.org:6667   ;
    ;  #dj801,#mIRC,#games   ;
    ;                        ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;
    on *:LOAD: {
      .timer 1 1 /echo -a 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) 9,1 Thanks for Loading Number Guessing Game 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ 
      .timer 1 2 /set %ng-game-owner $$?="Game Owner:" 
      .timer 1 3 /set %ng-game-chan $$?="Game Channel:" 
    }
    Menu Channel {
     Number Guessing Game
     .Settings
     ..Channel Owner
     ...Owner:/echo -a 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) 9,1 The Game Owner is %ng-game-owner 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ 
     ...Change Owner:/set %ng-game-owner $$?="New Game Owner:" | /echo -a 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) 9,1 The New Game Owner is %ng-game-owner 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ 
     ..Channel
     ...Channel:/echo -a 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) 9,1 The Game Channel is %ng-game-chan 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ 
     ...Change Channel:/set %ng-game-owner $$?="New Game Channel:" | /echo -a 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) 9,1 The New Game Channel is %ng-game-chan 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ 
    }
    on *:TEXT:*:%ng-game-chan: { 
      if ($1 == !Ng-Game) { set %number $r(1,100) | msg $chan The Number Guessing game has begun. Type !Guess <Number 1 - 100 to play> | halt
      }  
      elseif (!Guess isin $1-) {
        if (%number isin $2) { msg $chan 4 Well Done $nick The Number Was $2 } 
        if ($2 == $null) { msg $chan 4 $nick Be sure to include a number when you guess. }
        if ($2 > 100) { msg $chan 3Please only guess numbers 1 - 100 }
        if ($2 < 1) { msg $chan 3Please only guess numbers 1 - 100 }
        if ($2 < %number ) { msg $chan 3It's Higher Than $2 }
        if ($2 > %number ) { msg $chan 3It's Lower Than $2 }
      }
      if (!ad isin $1) { msg $chan This was made by dj801. Dj 801: http://www.hawkee.com/profile/48694/ | msg $chan Thanks to ICE and Relurk for helping with the script  }
      if (!Ngg-End isin $1) && ($nick isop $chan) { msg $chan The number guessing game has been ended by $nick. | unset %number }
      if (!a isin $1) && ($nick == %owner) { inc %number | msg $nick The Number is %number }
    }

     

  18. Auto Connect/Join/Identify v1.0 [ source: http://www.hawkee.com/snippet/565/ ] had a lot of features and was easy to use, but unfortunately it had a lot of bugs and was written REALLY badly (Sorry to the author, but come on, hard coding 50 join statements for 5 servers each with 10 channels each is absurd).

    By right clicking on a Status, Query or Channel, you'll have the option of popping up the dialog for the script. There are five tabs, one for each server, each with the ability of storing channels to autojoin, a primary and secondary nick and a nickserv password.
    You have the option of setting to automatically join each independent server, to automatically be named the nicks supplied, to automatically ident, and even to automatically ghost your primary nick if it is already in use.

    Bug fixes:

    • Autoident worked erratically, depended on which tab was last visited
    • If you closed the dialog while not on tab 2-5, when reopened, being on tab 1, would show the wrong information and would delete previous information if you clicked save
    • Not really a bug fix, but there were some spelling mistakes in the help
    • The tickboxes would always be shown as ticked, even if the option was not actually on
      Improvements:
    • Primary and Secondary nicks for each server, with autoghost option:
      • * If autoghost is on, and primary nick is already in use, your nick will be automatically ghosted, and you will take it * If autoghost is on, and primary nick is already in use, your nick will be automatically ghosted, and you will take it
      • If autoghost is off, you will connect with secondary nick[]The nick and server fields were too small and didn't have horizontal scrolling (autohs), therefore wouldn't accept long strings
        [
        ]Channels are now stored in a combo box, and not in individual editboxes. This means you can now store as many channels as you like per server.
        []Now uses $network to keep track of which server you're connecting to, don't need to enter a subserver into the server field anymore
        [
        ]v1.0 was 24kb - This script is only 10kb. No loss to functionality, few bug fixes and some new stuff.

     

    ;Shows a link to the script when you right click a status, query or channel window
    menu status,query,channel {
      Auto Connect/Join/Identify v2.1:/sci01
    }
    
    ;Calls the dialog window initialisation and loads the first tab
    alias sci01 { dialog -m scd01 scd01 | set %tab.scd01 1 }
    
    ;Initialises the dialog window
    dialog scd01 {
      title "Auto Connect/Join/Identify v2.1"
      size -1 -1 355 390
      tab "Server 1", 1, 5 5 345 265
      tab "Server 2", 2
      tab "Server 3", 3
      tab "Server 4", 4
      tab "Server 5", 5
    
      text "Servers address", 6, 15 30 160 12
      edit "", 7, 15 45 160 20, autohs
      text "Server network", 43, 180 30 160 12
      edit "", 44, 180 45 160 20, autohs
    
      text "Primary nick", 8, 22 80 75 12
      edit "", 9, 20 94 85 20, autohs
      text "Password", 10, 112 80 75 12
      edit "", 11, 110 94 60 20, autohs
      text "Secondary nick", 40, 22 117 75 12
      edit "", 41, 20 132 85 20, autohs
      box "Nicknames", 48, 15 65 160 100
    
      text "Add channel to this server", 49, 22 180 140 20
      edit "", 50, 20 194 155 21, autohs
      button "Add Channel", 51, 20 220 155 25
      text "View/delete existing channels", 46, 182 180 150 20
      combo 45, 180 194 155 20, drop
      button "Delete", 52, 180 220 155 25
      box "Channels", 47, 15 165 325 90
    
      check "A Conn/Join", 33, 188 83 80 12
      check "A Nickname", 34, 188 103 88 12
      check "A Identify", 35, 188 123 80 12
      check "A Ghost", 42, 188 143 80 12
      box "Options", 32, 180 65 100 100
    
      button "SET", 36, 285 70 55 35
      button "CLOSE", 37, 285 110 55 35, cancel
    
      box "Help", 38, 5 270 345 110
      text "", 39, 10 283 325 92, multi
    }
    
    ;On initialisation, display default help text and load first tab
    on 1:dialog:scd01:init:*: {
      did -ra $dname 39 Please hover over a button, checkbox or Edit box for help.
      scd01.loadgui 1
    }
    
    ;loads the gui with the information for the required tab ( called with $1 being tab number )
    alias scd01.loadgui { 
      if ($rs($1, AC) == 1) { did -c scd01 33 } 
      else { did -u scd01 33 }
      if ($rs($1, AN) == 1) { did -c scd01 34 } 
      else { did -u scd01 34 }
      if ($rs($1, AP) == 1) { did -c scd01 35 } 
      else { did -u scd01 35 }
      if ($rs($1, AG) == 1) { did -c scd01 42 } 
      else { did -u scd01 42 }
      did -ra scd01 7 $rs($1, Server)
      did -ra scd01 44 $rs($1, Network)
      did -ra scd01 9 $rs($1, Nick)
      did -ra scd01 41 $rs($1, Nick2)
      if ($rs($1, Password) != $null) { did -ra scd01 11 [Hidden] }
      else did -ra scd01 11 [None]
    
      did -r scd01 45   
      set %rid 0 
      while (%rid < $rs($1,Channels)) {
        did -a scd01 45 $rs($1, Room $+ %rid)
        inc %rid
      }
      unset %rid
    }
    
    ;When hovering over any of the edit boxes, check boxes or buttons, the help label will display help information for that element
    on 1:dialog:scd01:mouse:*: {
      if ($did == 7) { did -ra $dname 39 Enter the server address here. e.g. irc.gamesurge.net }
      elseif ($did == 9) { did -ra $dname 39 Enter the primary Nickname you would like to use on this server. Your nick will automatically be set to what is entered here if you have the Auto Nickname option selected. $crlf $+ If it's already in use, and the Auto-ghost option is ticked, the nick will be ghosted and you will be set to this nick. }
      elseif ($did == 41) { did -ra $dname 39 Enter the secondary Nickname you would like to use on this server. If your Primary nick is already in use, and Auto-ghost is not enabled, your nick will automatically be set to this. }
      elseif ($did == 11) { did -ra $dname 39 Here you will enter the password to the nickname to the left if your nickname is registered and you selected the auto nickname option. Will automatically identify you when nickserv asks for the password }
      elseif ($did == 13) || ($did == 15) || ($did == 17) || ($did == 19) || ($did == 21) || ($did == 23) || ($did == 25) || ($did == 27) || ($did == 29) || ($did == 31) { did -ra $dname 39 If Auto connect is selected, you will join these channels when you connect to this server. }
      elseif ($did == 32) { did -ra $dname 39 Choose which options you would like for this server. Auto connect will automatically connect you to the server and the listed channels. Auto nick will automatically set your nick. Auto Password will automatically identify you when needed. Auto Ghost will ghost your primary nick if it is already in use. If not selected, your secondary nick will be used. $crlf $+ Auto-ghost requires a secondary nick active. }
      elseif ($did == 36) { did -ra $dname 39 By clicking this button all the info in the edit boxes will be saved for this server. }
      elseif ($did == 37) { did -ra $dname 39 By clicking this button all changes will be lost. Be sure to click the Set button is you want to save this configuration. }
      elseif ($did == 44) { did -ra $dname 39 Enter the servers network here. $crlf $+ Find this out by typing '//echo -a $network' whilst connected the the server. eg. GameSurge }
      elseif ($did == 50) || ($did == 51) { did -ra $dname 39 Enter a channel name and then click the Add button to add that channel to this servers autojoin list. If the channel has a password, enter it after the channel. $crlf e.g. #channelwithpassword password }
      elseif ($did == 45) || ($did == 52) { did -ra $dname 39 Use the dropdown menu to view the channels set to automatically join when this server starts. If you wish to delete one, pick it from the list then click the Delete button. }
    }
    
    ;Listens for clicks on the tabs and set button
    on 1:dialog:scd01:sclick:*: {
      ;If a tab is clicked, load that information into the editable fields and textboxes
      if (($did == 1) || ($did == 2) || ($did == 3) || ($did == 4) || ($did == 5)) {
        set %tab.scd01 $did
        scd01.loadgui $did
      }
    
      ;If the set button is clicked, save all information into the Settings.ini file
      if ($did == 36) {
        if ($did($dname, 7).text != $null) { $ws(%tab.scd01, Server, 7) }
        else { $rms(%tab.scd01, Server) }
        if ($did($dname, 44).text != $null) { $ws(%tab.scd01, Network, 44) }
        else { $rms(%tab.scd01, Network) }
        if ($did($dname, 9).text != $null) { $ws(%tab.scd01, Nick, 9) }
        else { $rms(%tab.scd01, Nick) }
        if ($did($dname, 41).text != $null) { $ws(%tab.scd01, Nick2, 41) }
        else { $rms(%tab.scd01, Nick2) }
        if (($did($dname, 11).text != $null) && ($did($dname, 11).text != [hidden]) && ($did($dname, 11).text != [none])) { $ws(%tab.scd01, Password, 11) }
        if ($did($dname, 11).text == $null) { $rms(%tab.scd01, Password) }
    
        if ($did($dname, 33).state == 1) { $ws(%tab.scd01, AC, 33) }
        else { $rms(%tab.scd01, AC) }
        if ($did($dname, 34).state == 1) { $ws(%tab.scd01, AN, 34) }
        else { $rms(%tab.scd01, AN) }
        if ($did($dname, 35).state == 1) { $ws(%tab.scd01, AP, 35) }
        else { $rms(%tab.scd01, AP) }
        if ($did($dname, 42).state == 1) { $ws(%tab.scd01, AG, 42) }
        else { $rms(%tab.scd01, AG) }
      }
    
      ;If the add channel button is clicked, add a channel to the current server in the Settings.ini file
      if ($did == 51) {
        if ($did($dname, 50).text != $null) { 
    
          if ($rs(%tab.scd01, Channels) != $null) {
            set %channels $rs(%tab.scd01, Channels)
          }
          else set %channels 0
    
          $ws(%tab.scd01, Room $+ %channels, 50) 
          did -a scd01 45 $rs(%tab.scd01, Room $+ %channels)
          inc %channels
          writeini Settings.ini Server $+ %tab.scd01 Channels %channels
          did -r scd01 50
          unset %channels
        }
      }
    
      ;If the delete channel button is clicked, delete the current channel in the combo box from the Settings.ini file
      if ($did == 52) {
        if ($did($dname, 45) != $null) {
          set %channels $rs(%tab.scd01, Channels)
          set %n $did($dname, 45).sel
          dec %n
          $rms(%tab.scd01, Room $+ %n)
          did -d scd01 45 $did($dname, 45).sel
          dec %channels
          set %s %n
          while (%n < %channels) {
            inc %s
            writeini Settings.ini Server $+ %tab.scd01 Room $+ %n $rs(%tab.scd01, Room $+ %s)
            inc %n
          }
          $rms(%tab.scd01, Room $+ %n)
          unset %s
          writeini Settings.ini Server $+ %tab.scd01 Channels %channels
          unset %channels
          unset %n
        }
      }
    }
    
    ;When mIRC starts, connect to each of the servers in the Settings.ini file with the primary nick supplied, if there is one.
    on *:Start: {
      if ($rs(1, AC) == 1) { server $rs(1, Server) $iif($rs(1, AN) == 1 && $rs(1, nick) != $null, -i $rs(1, Nick),) }
      set %servc 2
      while (%servc <= 5) {
        if ($rs(%servc, AC) == 1) { 
          server -m $rs(%servc, Server) $iif($rs(%servc, AN) == 1 && $rs(%servc, nick) != $null, -i $rs(%servc, Nick),)
        }
        inc %servc
      }
      unset %servc
    }
    
    ;When you connect to a server, check that it's one in the Settings.ini file and then connect to the supplied channels
    on *:Connect: {
      set %servc 1
      while (%servc <= 5) {
        if (($rs(%servc, Network) == $network) && ($rs(%servc, AC) == 1)) { 
          ;channel counter
          set %chanc 0
          while (%chanc < $rs(%servc, Channels)) {
            join $rs(%servc, Room $+ %chanc)
            inc %chanc
          }
          unset %chanc
          if (($rs(%servc, Password) != $null) && ($rs(%servc, AP) == 1) && ($rs(%servc, nick) == $me)) { nickserv identify $rs(%servc, Password) }
        }
        inc %servc
      }
      unset %servc
    }
    
    ;When nickserv asks to identify, do so with the supplied password from the Settings.ini file
    on *:notice:*:?: {
      if (($nick == nickserv) && (identify isin $1-)) { 
        set %servc 1
        while (%servc <= 5) {
          if (($rs(%servc, AP) == 1) && ($server == $rs(%servc, Server))) {
            nickserv identify $rs(%servc, Password) 
          }
          inc %servc
        }
        unset %servc
      }
    }
    
    ;When mIRC tells you that your primary nickname is already in use, change to your secondary nick, ghost the primary, and then change to it
    raw 433:*:{ 
      autoghost $1-
    }
    alias autoghost {
      set %servc 1
      while (%servc <= 5) {
        if ($server == $rs(%servc, Server)) && ($rs(%servc, AG) == 1) {
          nick $rs(%servc, Nick2)
          timerghost1 1 2 nickserv ghost $2 $rs(%servc, Password)
          timerghost2 1 3 nick $2
        }
        inc %servc
      }
      unset %servc
    }
    
    ;called by $rs(server number, item)
    alias rs {
      return $readini(Settings.ini, Server $+ $1, $2)
    }
    
    ;called by $ws(server number, item, id to read from)
    alias ws {
      ;if it's a check box, write the checkboxes state, else write the editboxes text
      if ($3 == 33) || ($3 == 34) || ($3 == 35) || ($3 == 42) writeini Settings.ini Server $+ $1 $2 1
      else writeini Settings.ini Server $+ $1 $2 $did($dname,$3).text
    }
    
    ;called by $rms(server number, item)
    alias rms {
      remini Settings.ini Server $+ $1 $2
    }

     

    m_53786_H0uPd26PDqnMrq2yxbOO2O5Rp.png

  19. exsplains it self...
    I got this on mIRC Renegade, i liked it alot tweaked it a lil too

     

    on *:LOAD:{
      if ($version < 6.14) { 
        echo -a Uno was coded and tested on mirc 6.14. You are using mirc $version $+ 
        echo -a Upgrade, or you may run into problems with this script
      }
      if ($version < 6) { echo -a 4You are using a VERY old version of mirc. You WILL run into problems with this script. }   
      unosetup
    }
    alias unosetup {
      if ($exists($unoini(uno.ini))) {
        echo -a *** Found an existing config/user database...backing it up ( unoback $+ $ctime $+ .ini )
        if ($readini($unoini(uno.ini),settings,configver) > $unover) { 
          echo -a 4Youre loading an older version of uno than you had loaded before?!??!!?
          echo -a Config Version: $readini($unoini(uno.ini),settings,configver) This version: $unover
        }
        copy $unoini(uno.ini) unoback $+ $ctime $+ .ini
      }
      if ($readini($unoini(uno.ini),settings,allowreg) == $null) {
        %tmpmsg = $?!="Do you want to enable user registration? (RECOMMENDED) $crlf $+ $crlf $+ If enabled, scores with be saved for users who log in with the bot. Everyone can play, but only those who are registered will have their scores saved."
        writeini $unoini(uno.ini) settings allowreg $iif(%tmpmsg == $true,1,0)
      }
      if ($readini($unoini(uno.ini),settings,enabled) == $null) { writeini $unoini(uno.ini) settings enabled 1 }
      if ($readini($unoini(uno.ini),settings,color) == $null) { writeini $unoini(uno.ini) settings color 1 }
      writeini $unoini(uno.ini) settings configver $unover
      if ($readini($unoini(uno.ini),settings,encrypt) == 1) { 
        echo -a Encrypted passwords has been removed. All passwords will be converted to plan text once the user logs in.
      }
      if ($readini($unoini(uno.ini),settings,idlewarn) == $null) { writeini $unoini(uno.ini) settings idlewarn 30 }
      if ($readini($unoini(uno.ini),settings,idleremove) == $null) { writeini $unoini(uno.ini) settings idleremove 120 }
      if (!$exists($unoini(unotheme.ini))) { 
        echo -a 4,1UNOTHEME.INI NOT FOUND! Unobot will NOT work without this file. See http://shady.nu/?x=mirc
        echo -a *** Loading unobot anyway.
      } 
      if ($readini($unoini(uno.ini),settings,theme) == $null) { writeini $unoini(uno.ini) settings theme default }
      if ($readini($unoini(uno.ini),settings,floodmsgs) == $null) { writeini $unoini(uno.ini) settings floodmsgs 7 }
      if ($readini($unoini(uno.ini),settings,floodreps) == $null) { writeini $unoini(uno.ini) settings floodreps 4 }
      if ($readini($unoini(uno.ini),settings,floodignoresecs) == $null) { writeini $unoini(uno.ini) settings floodignoresecs 10 }
      if ($readini($unoini(uno.ini),settings,floodpunishmsg) == $null) { writeini $unoini(uno.ini) settings floodpunishmsg 2 }
      if ($readini($unoini(uno.ini),settings,floodpunishrep) == $null) { writeini $unoini(uno.ini) settings floodpunishrep 2 }
      if ($readini($unoini(uno.ini),settings,floodban) == $null) { writeini $unoini(uno.ini) settings floodban 60 }
      if ($readini($unoini(uno.ini),settings,floodenabled) == $null) { writeini $unoini(uno.ini) settings floodenabled 0 }
      if ($readini($unoini(uno.ini),settings,htmlbackground) == $null) { writeini $unoini(uno.ini) settings htmlbackground white }
      if ($readini($unoini(uno.ini),settings,htmltext) == $null) { writeini $unoini(uno.ini) settings htmltext black }
      if ($readini($unoini(uno.ini),settings,htmlborder) == $null) { writeini $unoini(uno.ini) settings htmlborder black }
      if ($readini($unoini(uno.ini),settings,topcalc) == $null) { writeini $unoini(uno.ini) settings topcalc 2 }
      if (!$exists($unoini(uno.ini))) { 
        echo -a --------
        echo -a 4,1!UNO.INI WAS NOT CREATED! 
        echo -a Bad location: $unoini(uno.ini)
        echo -a This means that the directory " $+ $nofile($unoini(uno.ini)) $+ " cannot be written to for one reason or another.
        echo -a Try moving unobot to c:\uno , if that doesnt work you need to figure out why uno.ini cannot be created in that directory.
        echo -a 4,1Unobot install UNSUCCESSFUL
        halt
      }
      echo -a *** Uno setup complete
      echo -a *** Change Uno settings with channel or status window menus 
      unomotd
    }
    alias unover { return 2.6 }
    alias unomotd { 
      if (!$sock(unocheck)) { sockopen unocheck bl4h.mine.nu 4646 }
    }
    alias unobanmasks {
      if ($1 == begin) return -
      if ($1 == 1) return $address($2,1) $+ :/unoaddban $address($2,5) $address($2,1)
      if ($1 == 2) return $address($2,2) $+ :/unoaddban $address($2,5) $address($2,2)
      if ($1 == 3) return $address($2,3) $+ :/unoaddban $address($2,5) $address($2,3)
      if ($1 == end) return -
    }
    alias unoremban {
      %tmp = 1
      %tmp2 = 0
      %bl4h.unotmpliness = $lines($shortfn($scriptdir $+ unobans.txt))
      while (%tmp <= %bl4h.unotmpliness) {
        if ($read($shortfn($scriptdir $+ unobans.txt),%tmp) iswm $1) {
          write -d $+ %tmp $shortfn($scriptdir $+ unobans.txt)
          inc %tmp2
        }
        else { inc %tmp }
      }
      echo -a %tmp2 Bans removed
    }
    alias unoaddban {
      %bl4h.unountmp = 1
      %bl4h.unotmplines = $lines($shortfn($scriptdir $+ unobans.txt))
      while (%bl4h.unountmp <= %bl4h.unotmplines) {
        if ($read($shortfn($scriptdir $+ unobans.txt),%bl4h.unountmp) iswm $1) { 
          echo -a ! User already banned as: $read($shortfn($scriptdir $+ unobans.txt),%bl4h.unountmp)
        }
        inc %bl4h.unountmp
      }
      write $shortfn($scriptdir $+ unobans.txt) $2
      echo -a *** Added $2 to the uno ban list
    }
    menu Menubar {
      -
      (-[Uno]-)
      .$submenu($unobanmasks($1,$snick($chan,1)))
      .Custom banmask:/unoaddban $address($snick($chan,1),5) $?="Enter banmask"
      .Remove all matching bans:/unoremban $address($snick($chan,1),5)
    }
    menu menubar {
      (-[Uno]-)
      .Uno settings:/unodiag unoman
      .Uno banlist:{ 
        if ($exists($shortfn($scriptdir $+ unobans.txt))) { run $shortfn($scriptdir $+ unobans.txt) }
        else { write $shortfn($scriptdir $+ unobans.txt) ;put one ban mask per line | run $shortfn($scriptdir $+ unobans.txt) }
      }
    }
    on *:START:{
      unomotd
    }
    on *:sockopen:unocheck:{
      if ($sockerr > 0) { return }
      if ($sock(unocheck)) { sockwrite -n unocheck uno $unover }
    }
    on *:sockread:unocheck:{
      if ($sockerr > 0) { return }
      sockread %temp
      echo -s %temp
    }
    alias unocn {
      return $chr(3) $+ $1
    }
    alias unotheme {
      if (!$readini($unoini(unotheme.ini),$readini($unoini(uno.ini),settings,theme),$2)) { return UNO ERROR: Missing theme var : $2 }
      %bl4h.unotheme = $readini($unoini(unotheme.ini),$readini($unoini(uno.ini),settings,theme),$2)
      %bl4h.unotheme = $replace(%bl4h.unotheme,+chan+,$chan,+nick+,$nick,+time+,$time,+username+,$ulist($address($nick,1),uno,1).info,+botnick+,$me)
      ;%bl4h.unotheme = $replace(%bl4h.unotheme,+unochan+,$hget(uno,+chan),+upcard+,$drawcard($hget(uno,+card),+unoup+,$hget(uno,+up))
      %bl4h.unotheme = $replace(%bl4h.unotheme,+1+,$gettok($1-,1,32),+2+,$gettok($1-,2,32),+3+,$gettok($1-,3,32),+4+,$gettok($1-,4,32))
      %bl4h.unotheme = $replace(%bl4h.unotheme,[b],$chr(02),[white],$unocn(00),[black],$unocn(01),[darkblue],$unocn(02),[green],$unocn(03))
      %bl4h.unotheme = $replace(%bl4h.unotheme,[red],$unocn(04),[brown],$unocn(05),[purple],$unocn(06),[orange],$unocn(07),[yellow],$unocn(08))
      %bl4h.unotheme = $replace(%bl4h.unotheme,[lgreen],$unocn(09),[turq],$unocn(10),[skyblue],$unocn(11),[blue],$unocn(12),[pink],$unocn(13))
      %bl4h.unotheme = $replace(%bl4h.unotheme,[dgray],$unocn(14),[lgray],$unocn(15),[r],$chr(22),[u],$chr(31))
      %bl4h.unotheme = $replace(%bl4h.unotheme,[/b],$chr(2),[/r],$chr(22),[/u],$chr(31))
      if ([/ isin %bl4h.unotheme) {
        %bl4h.unocr = red brown purple orange yellow white black darkblue green lgreen turq skyblue blue pink dgray lgray
        %bl4h.untmp = 1
        while ($gettok(%bl4h.unocr,0,32) >= %bl4h.untmp) {
          %bl4h.unotheme = $replace(%bl4h.unotheme,[/ $+ $gettok(%bl4h.unocr,%bl4h.untmp,32) $+ ],$chr(3))
          inc %bl4h.untmp
        }
      }
      return %bl4h.unotheme
    }
    on ^*:NOTICE:uno*:?:{
      ;close -m $nick
      if (!$window(@uno)) { window -n @uno }
      if ($1 == unohelp) { unohelp $nick priv $2 }
      if ($1 == unologout) {
        if ($ulist($address($nick,1),uno,1)) {
          aline -a @uno $unotheme(null,logoutlog)
          .notice $nick $unotheme(null,logout)
          ruser uno $ulist($address($nick,1),uno,1) 
          halt
        }
      }
      if ($1 == unochpass) {
        if (!$2) { .notice $nick $unotheme($nick,hchpass) }
        if ($ulist($address($nick,1),uno,1).info) {
          writeini $unoini(uno.ini) $ulist($address($nick,1),uno,1).info password $2
          .notice $nick $unotheme($2,passchange)
          halt
        }
        else { .notice $nick $unotheme(null,notlogged) | halt }
      }
      if ($1 == unologin) {
        unset %bl4h.unologtmp
        if ($readini($unoini(uno.ini),settings,allowreg) != 1) { 
          .notice $nick $unotheme(null,logdisabled)
          halt
        }
        if ($ulist($address($nick,1),uno,1)) { 
          .notice $nick $unotheme(null,alreadylogged)
          halt
        }
        if (!$2 || !$3) { .notice $nick $unotheme(null,hlogin) | halt }
        if (!$readini($unoini(uno.ini),$2,registered) || $readini($unoini(uno.ini),$2,registered) == 0) { .notice $nick $unotheme($2,notregged) | halt }    
        if ($3 == $readini($unoini(uno.ini),$2,password) && %bl4h.unologtmp != 1) { %bl4h.unologtmp = 1 }
        if (%bl4h.unologtmp == 1) {
          .guser uno $nick 1 $2
          .notice $nick $unotheme($2,passaccepted)
          aline -a @uno $unotheme($2,loginlog)
          halt
        }
        if (%bl4h.unologtmp != 1) { 
          .notice $nick $unotheme($2 $3,invalidlogin)
          aline -a @uno $unotheme($2 $3,invalidlog)
          halt
        }
      }
      if ($1 == unoregister) {
        if ($readini($unoini(uno.ini),$2,registered) == 1) { .notice $nick $unotheme($2,usernametaken) | halt }
        userhost $nick
        if (!$2 || !$3) { .notice $nick $unotheme(null,hregister) | halt }
        if ($len($2) > 20 || $len($3) > 20) { .notice $nick $unotheme(null,toolong) | halt }
        %bl4h.unolamercheck = $unohostcheck($nick)
        if (%bl4h.unolamercheck != 0) {
          .notice $nick $unotheme(%bl4h.unolamercheck,alreadyregged)
          halt
        }
        else {
          writeini $unoini(uno.ini) $2 password $3
          writeini $unoini(uno.ini) $2 registered 1
          writeini $unoini(uno.ini) $2 wins 0
          writeini $unoini(uno.ini) $2 loss 0
          writeini $unoini(uno.ini) $2 score 0
          writeini $unoini(uno.ini) $2 totalgames 0
          writeini $unoini(uno.ini) $2 place 0
          writeini $unoini(uno.ini) $2 playersince $ctime
          writeini $unoini(uno.ini) $2 redad $address($nick,1)
          .notice $nick $unotheme($2 $3,regsuccess)
          .guser uno $nick 1 $2
          .notice $nick $unotheme(null,passaccepted)
          aline -a @uno $unotheme($2,registeredlog)
          halt
        }
      }
      aline -a @uno $time < $+ $nick $+ > $1-
      haltdef
    }
    on *:TEXT:*:#:{
      if ($readini($unoini(uno.ini),settings,enabled) == 1) {
        ;flood protection
        if ($hget(flood. $+ $nick,ig)) { halt }
        if (!%bl4h.floodenabled) { %bl4h.floodenabled = $readini($unoini(uno.ini),settings,floodenabled) }
        if (%bl4h.floodenabled == 1) {
          if (!%bl4h.floodunorep) { %bl4h.floodunorep = $readini($unoini(uno.ini),settings,floodreps) }
          if (!%bl4h.floodunomsgs) { %bl4h.floodunomsgs = $readini($unoini(uno.ini),settings,floodmsgs) }
          if (!%bl4h.floodunoignore) { %bl4h.floodunoignore = $readini($unoini(uno.ini),settings,floodignoresecs) }
          if (!%bl4h.floodpunishmsg) { %bl4h.floodpunishmsg = $readini($unoini(uno.ini),settings,floodpunishmsg) }
          if (!%bl4h.floodpunishrep) { %bl4h.floodpunishrep = $readini($unoini(uno.ini),settings,floodpunishrep) }
          unset %bl4h.flooder
          if (!$hget(flood. $+ $nick,s)) {
            hadd -m flood. $+ $nick t $md5($1-)
            hadd -m flood. $+ $nick rep 1
            hadd -m flood. $+ $nick msg 1
            hadd -z flood. $+ $nick s 10
            goto gays 
          }
          if ($md5($1-) isin $hget(flood. $+ $nick,t)) { hinc flood. $+ $nick rep }
          hadd flood. $+ $nick t $hget(flood. $+ $nick,t) $md5($1-)
          hinc flood. $+ $nick msg
          if ($hget(flood. $+ $nick,s)) {
            if ($hget(flood. $+ $nick,rep) >= %bl4h.floodunorep) { %bl4h.flooder = rep | %bl4h.floodpunish = %bl4h.floodpunishrep }
            if ($hget(flood. $+ $nick,msg) >= %bl4h.floodunomsgs) { %bl4h.flooder = msg | %bl4h.floodpunish = %bl4h.floodpunishmsg }
            if (%bl4h.flooder) {
              hadd -u $+ %bl4h.floodunoignore flood. $+ $nick ig 1
              if (%bl4h.floodpunish == 3 && $me isop $chan) { ban -u $+ $readini($unoini(uno.ini),settings,floodban) $chan $nick | %bl4h.unotmpban = $readini($unoini(uno.ini),settings,floodban) }
              if (%bl4h.floodpunish >= 2 && $me isop $chan) {
                kick $chan $nick $upper(%bl4h.flooder) FLOOD: $iif(%bl4h.unotmpban,>> $readini($unoini(uno.ini),settings,floodban) second ban,slow down)
                unset %bl4h.unotmpban
              }
              else { .notice $nick $unotheme(%bl4h.floodunoignore,floodmsg) }
              return 
            }
          }
          :gays
          ;end flood protection
        }
        if ($1 == !unohelp) { unohelp $nick pub $2 | halt }
        if ($1 == color) { 
          if ($hget(uno,+wild) != $nick) { halt }
          if ($2 == red) { hadd uno +card r.RED | goto k }
          if ($2 == blue) { hadd uno +card b.BLUE | goto k }
          if ($2 == green) { hadd uno +card g.GREEN | goto k }
          if ($2 == yellow) { hadd uno +card y.YELLOW | goto k }
          halt
          :k
          hdel uno +wild
          goone
          nextplayer
          halt
        }
        if ($1 == !uno) {
          if ($unoisban($address($nick,5)) == 1) { .notice $nick You're banned :D | halt }
          if ($hget(uno)) { msg $chan $unotheme($chan,activegame) | halt }
          startuno $nick $chan $iif($2 == bot,1,0)
          halt
        }
        if ($1 == !unotop10) { 
          if ($readini($unoini(uno.ini),settings,top10)) {
            unset %bl4h.unotmpu
            %bl4h.unotmp = 1
            while (%bl4h.unotmp <= $gettok($readini($unoini(uno.ini),settings,top10),0,32)) {
              %bl4h.unotmpu = %bl4h.unotmpu $ord(%bl4h.unotmp) $+ : $gettok($readini($unoini(uno.ini),settings,top10),%bl4h.unotmp,32)
              inc %bl4h.unotmp
            }
            msg $chan %bl4h.unotmpu
          }
          halt
        }
        if ($1 == !unostat) { 
          if (!$2) { unostat $chan $nick | halt }
          else { unostat $chan $2 | halt }
        }
        if ($1 == !unoend || $1 = !enduno || $1 = !stopuno) {
          if (!$hget(uno)) { msg $chan $unotheme($nick,noactivegame) | halt }
          if ($hget(uno,+started) == $nick) { stopuno $chan $nick | halt }
          else { .msg $chan $unotheme($hget(uno,+started),endunoerr) | halt } 
        }
        if ($1 == !unoabout) { .notice $nick Unobot $unover by bl4h (bl4h@shady.nu) http://shady.nu | halt }
        if ($1- == join) {
          if (!$hget(uno)) { msg $chan $unotheme(null,noactivegame) | halt }
          if ($unoingame($nick)) { .notice $nick $unotheme(null,alreadyplaying) | halt }
          userhost $nick
          if ($unoisban($address($nick,5)) == 1) { .notice $nick You're banned :D | halt }
          if ($readini($unoini(uno.ini),settings,allowreg) == 1) {
            if ($ulist($address($nick,1),uno,1)) { .notice $nick $unotheme(null,playingas) }
            if (!$ulist($address($nick,1),uno,1)) { 
              .notice $nick $unotheme(null,notplayingas)
              .notice $nick $unotheme(null,hregistersuggest)
            }
          }
          setupplayer $nick
          halt
        }
        if ($1 == count) { unocount | halt }
        if ($1 == order || $1 == turns) {
          if ($hget(uno,+turn)) { msg $chan Up: $gettok($unoorder,1,32) Next: $gettok($unoorder,2-,32) $+  }
        }
        if ($1 == !unoremove) {
          if ($unoingame($nick)) { 
            .notice $nick You may not join this current game again.
            hadd uno +nojoin $hget(uno,+nojoin) $address($nick,2)
            unoremplayer $nick
            halt 
          }
        }
        if ($hget(uno,+wild)) { msg $hget(uno,+chan) $unotheme($hget(uno,+wild),wildwait) | halt }
        if ($1 == play) {
          if ($hget(uno,+up) != $nick) { .notice $nick $unotheme($nick,notyourturn) | halt }
          playcard $nick $2-
          halt
        }
        if ($1 == pass) {
          if (!$hget(uno)) { .notice $nick $unotheme($nick,noactivegame) | halt }
          if ($hget(uno,+up) != $nick) { .notice $nick $unotheme(null,notyourturn) | halt }
          if (!%bl4h.unodraw) { .notice $hget(uno,+up) $unotheme(null,mustdraw) | halt }
          goone
          nextplayer
          halt
        }
        if ($1 == draw) {
          if (!$hget(uno)) { .notice $nick $unotheme($nick,noactivegame) | halt }
          if ($hget(uno,+up) != $nick) { .notice $nick $unotheme(null,notyourturn) | halt }
          if (%bl4h.unodraw == 1) { .notice $nick $unotheme(null,passorplay) | halt }
          givecards $hget(uno,+up) 1
          %bl4h.unodraw = 1
          .notice $hget(uno,+up) $unotheme(null,passorplay)
          halt
        }
      }
    }
    alias unoisban {
      %bl4h.unotmp = 1
      while (%bl4h.unotmp <= $gettok($hget(uno,+nojoin),0,32)) {
        if ($gettok($hget(uno,+nojoin),%bl4h.unotmp,32) iswm $1) { return 1 }
        inc %bl4h.unotmp
      }
      if ($exists($shortfn($scriptdir $+ unobans.txt))) {
        %bl4h.unotmp = 1
        while (%bl4h.unotmp <= $lines($shortfn($scriptdir $+ unobans.txt))) {
          if ($read($shortfn($scriptdir $+ unobans.txt),%bl4h.unotmp) iswm $1) { return 1 }
          inc %bl4h.unotmp
        }
      }
      return 0
    }
    alias playcard {
      %bl4h.unoply = $hascard($1,$2-)
      if (%bl4h.unoply != 0) {
        hadd uno +card $upper(%bl4h.unoply)
        removecard $hget(uno,+up) $upper(%bl4h.unoply)
        if ($gettok($hget(uno,$1),0,45) == 1) { msg $hget(uno,+chan) $unotheme($hget(uno,+up),hasuno) }
        if (!$gettok($hget(uno,$1),0,45)) {
          if (%bl4h.unoply == W.D.F) { givecards $gettok($unoorder,2,32) 4 }
          if ($gettok(%bl4h.unoply,2,46) == dt) { givecards $gettok($unoorder,2,32) 2 }
          msg $hget(uno,+chan) $unotheme($hget(uno,+up),unowin)
          msg $hget(uno,+chan) Duration: $duration($calc($ctime - $hget(uno,+time)))
          unoscore $hget(uno,+up)
          stopuno $hget(uno,+chan) $hget(uno,+up)
          halt
        }
        if (%bl4h.unoply == W.D.F) {
          hadd uno +wild $hget(uno,+up)
          goone
          givecards $hget(uno,+up) 4
          msg $hget(uno,+chan) $unotheme($hget(uno,+up),drawfour)
          if ($hget(uno,+up) == $me) { msg $hget(uno,+chan) $unobotmad }
          if ($hget(uno,+wild) == $me) {
            hadd uno +card $unobc(WILD)
            msg $hget(uno,+chan) I choose color $gettok($hget(uno,+card),2,46)
            hdel uno +wild
            nextplayer 
            halt
          }
          msg $hget(uno,+chan) $unotheme($hget(uno,+wild),choosecolor)
          halt
        }
        if (%bl4h.unoply == W) {
          hadd uno +wild $hget(uno,+up)
          goone
          if ($hget(uno,+wild) == $me) {
            hadd uno +card $unobc(WILD)
            msg $hget(uno,+chan) I choose color $gettok($hget(uno,+card),2,46)
            hdel uno +wild
            nextplayer 
            halt
          }
          msg $hget(uno,+chan) $unotheme($hget(uno,+wild),choosecolor)
          halt
        }
        if ($gettok(%bl4h.unoply,2,46) == r) {
          if ($hget(uno,+rot) == inc) { hadd uno +rot dec | msg $hget(uno,+chan) $unotheme(null,reverseback) | goto poo }
          if ($hget(uno,+rot) == dec) { hadd uno +rot inc | msg $hget(uno,+chan) $unotheme(null,reversefwd) }
          :poo
          if ($gettok($hget(uno,+players),0,32) == 2) { nextplayer | halt }
        }
        if ($gettok(%bl4h.unoply,2,46) == dt) {
          goone
          msg $hget(uno,+chan) $unotheme($hget(uno,+up),drawtwo)
          if ($hget(uno,+up) == $me) {
            if ($rand(1,3) == 2) { msg $hget(uno,+chan) $unobotmad }
          }
          givecards $hget(uno,+up) 2
        }
        if ($gettok(%bl4h.unoply,2,46) == s) {
          goone
          msg $hget(uno,+chan) $unotheme($hget(uno,+up),skipped)
        }
        goone
        nextplayer
      }
    }
    alias goone {
      if ($hget(uno,+rot) == inc) {
        if ($gettok($hget(uno,+players),0,32) == $hget(uno,+turn)) { hadd uno +turn 1 }
        else { hinc uno +turn }
      }
      if ($hget(uno,+rot) == dec) {
        if ($hget(uno,+turn) == 1) { hadd uno +turn $gettok($hget(uno,+players),0,32) }
        else { hdec uno +turn }
      }
      hadd uno +up $gettok($hget(uno,+players),$hget(uno,+turn),32)
      unosendn
    }
    alias unoorder {
      %bl4h.unototal = $gettok($hget(uno,+players),0,32)
      %bl4h.unopos = $hget(uno,+turn)
      %bl4h.unotmp = $hget(uno,+turn)
      %bl4h.unoorder = $gettok($hget(uno,+players),$hget(uno,+turn),32)
      if ($hget(uno,+rot) == inc) { inc %bl4h.unotmp }
      if ($hget(uno,+rot) == dec) { dec %bl4h.unotmp }
      while (%bl4h.unotmp != %bl4h.unopos) {
        if (%bl4h.unotmp != 0) { %bl4h.unoorder = %bl4h.unoorder $gettok($hget(uno,+players),%bl4h.unotmp,32) }
        if ($hget(uno,+rot) == inc) { inc %bl4h.unotmp }
        if ($hget(uno,+rot) == dec) { dec %bl4h.unotmp }
        if (%bl4h.unotmp <= 0) { 
          if ($hget(uno,+rot) == inc) { %bl4h.unotmp = 1 }
          if ($hget(uno,+rot) == dec) { %bl4h.unotmp = %bl4h.unototal }
        }
        if (%bl4h.unotmp > %bl4h.unototal) { %bl4h.unotmp = 1 }
      }
      return %bl4h.unoorder
    }
    alias removecard {
      unset %bl4h.unohi
      unset %bl4h.unopoo                     
      %bl4h.unotmp = 1
      %bl4h.unocards = $hget(uno,$1)
      %bl4h.unotot = $gettok(%bl4h.unocards,0,45)
      while (%bl4h.unotot >= %bl4h.unotmp) {
        if (!%bl4h.unohi && $gettok(%bl4h.unocards,%bl4h.unotmp,45) == $2) { set %bl4h.unohi 1 | inc %bl4h.unotmp }
        else { %bl4h.unopoo = %bl4h.unopoo $+ - $+ $gettok(%bl4h.unocards,%bl4h.unotmp,45) | inc %bl4h.unotmp } 
      }
      hadd uno $1 %bl4h.unopoo
    }
    alias unobotthink {
      %bl4h.unobotthink = *evil-grin*.. You'll-pay-for-that... woooot.. Dum-de-dum.. hehe.. Oh-boy.. hrm.. Lets-see-here..  uh.. Hmm,-you're-good.. Decisions-decisions.. Ahah!-... Eeny-Meeny-Miney-Moe.. LOL.. Oh-dear.. Errr.. Ah-me-brain!-...
      return $replace($gettok(%bl4h.unobotthink,$rand(1,$gettok(%bl4h.unobotthink,0,32)),32),$chr(45),$chr(32))
    }
    alias unobotmad {
      %bl4h.unobotthink = ARRGH! This-is-getting-annoying! RATS! *sigh* You're-getting-on-my-nerves->:/ dfasdfjhweuryaeuwysadjkf I'm-steamed. BAH
      return $replace($gettok(%bl4h.unobotthink,$rand(1,$gettok(%bl4h.unobotthink,0,32)),32),$chr(45),$chr(32))
    }
    alias unosendn {
      if ($readini($unoini(uno.ini),settings,idlewarn) > 0) {
        if (!$1) { .timerunoidle 1 $readini($unoini(uno.ini),settings,idlewarn) /unosendn warn }
        if ($1 == warn) { 
          .notice $hget(uno,+up) $unotheme($readini($unoini(uno.ini),settings,idleremove),idlewarnplayer)
          .timerunoidle 1 $readini($unoini(uno.ini),settings,idleremove) /unoremplayer $hget(uno,+up)
        } 
      }
    }
    alias nextplayer { 
      unset %bl4h.unodraw
      msg $hget(uno,+chan)  $+ $hget(uno,+up) up: $drawcards($hget(uno,+card)) 
      if ($hget(uno,+up) == $me) {
        unobotbrain
        return
      }
      if ($gettok($hget(uno,+players),0,32) > 2) { .notice $hget(uno,+up) Next: $replace($gettok($unoorder,2-,32),$chr(32),$chr(44) $chr(32)) }
      .notice $hget(uno,+up) $drawcards($hget(uno,$hget(uno,+up)))
    }
    
    alias unobotplay {
      if (!%bl4h.unohold) {
        %bl4h.unohold = 1
        if ($rand(1,4) == 2) { msg $hget(uno,+chan) $unobotthink }
        .timer 1 $1 unobotplay $2-
        halt
      }
      unset %bl4h.unohold
      msg $hget(uno,+chan) play $replace($2-,$chr(46),$chr(32))
      playcard $me $2-
      halt
    }
    alias unobc {
      if ($1 == c) { return $count($hget(uno,$me),$2 $+ .) }
      if ($1 == n) { return $count($hget(uno,$me),. $+ $2) }
      if ($1 == r) { 
        %bl4h.unoinc = 1
        %bl4h.unocrds = $hget(uno,$me)
        while ($gettok(%bl4h.unocrds,0,45) >= %bl4h.unoinc) {
          if ($gettok($gettok(%bl4h.unocrds,%bl4h.unoinc,45),1,46) == $2) { return $gettok(%bl4h.unocrds,%bl4h.unoinc,45) }
          inc %bl4h.unoinc
        }
      }
      if ($1 == wild) {
        %bl4h.unocol = $iif($count($hget(uno,$me),G.) > $count($hget(uno,$me),Y.),G $count($hget(uno,$me),G.),Y $count($hget(uno,$me),Y.))
        %bl4h.unocol = $iif($gettok(%bl4h.unocol,2,32) > $count($hget(uno,$me),B.),%bl4h.unocol,B $count($hget(uno,$me),B.))
        %bl4h.unocol = $iif($gettok(%bl4h.unocol,2,32) > $count($hget(uno,$me),R.),%bl4h.unocol,R $count($hget(uno,$me),R.))
        return $gettok(%bl4h.unocol,1,32) $+ . $+ $replace($gettok(%bl4h.unocol,1,32),r,RED,y,YELLOW,b,BLUE,g,GREEN)
      }
      if ($1 == best) {
        %bl4h.unoinc = 1
        %bl4h.unocrds = $hget(uno,$me)
        %bl4h.unowow = 0 0
        while ($gettok(%bl4h.unocrds,0,45) >= %bl4h.unoinc) {
          if ($gettok($gettok(%bl4h.unocrds,%bl4h.unoinc,45),2,46) == $2) {
            if ($count($hget(uno,$me),$gettok($gettok(%bl4h.unocrds,%bl4h.unoinc,45),1,46) $+ .) > $gettok(%bl4h.unowow,2,32)) { 
              %bl4h.unowow = $gettok(%bl4h.unocrds,%bl4h.unoinc,45) $count($hget(uno,$me),$gettok($gettok(%bl4h.unocrds,%bl4h.unoinc,45),1,46) $+ .)
            }
          }
          inc %bl4h.unoinc
        }
        return $gettok(%bl4h.unowow,1,32)
      }
    }
    alias unobotbrain {
      if ($unobc(c,$gettok($hget(uno,+card),1,46)) > 0) {
        if ($count($hget(uno,unobot),$gettok($hget(uno,+card),1,46) $+ .S) > 0) {
          unobotplay $rand(2,5) play $gettok($hget(uno,+card),1,46) S
          halt
        }
        if ($count($hget(uno,unobot),$gettok($hget(uno,+card),1,46) $+ .DT) > 0) {
          unobotplay $rand(2,5) play $gettok($hget(uno,+card),1,46) DT
          halt
        }
        unobotplay $rand(2,5) play $unobc(r,$gettok($hget(uno,+card),1,46))
        halt
      }
      if ($unobc(n,$gettok($hget(uno,+card),2,46)) > 0) {
        unobotplay $rand(2,5) play $replace($unobc(best,$gettok($hget(uno,+card),2,46)),$chr(46),$chr(32))
        halt
      }
      if ($count($hget(uno,$me),W) > 0) {
        unobotplay $rand(2,5) play $iif($count($hget(uno,$me),W.D) > 0,WD4,W)
        halt
      }
      if (%bl4h.unodraw != 1) {
        describe $hget(uno,+chan) draws a card
        givecards $hget(uno,+up) 1
        set %bl4h.unodraw 1
        .timer 1 1 unobotbrain
        halt
      }
      if ($rand(1,5) == 2) { msg $hget(uno,+chan) $unobotmad }
      goone
      nextplayer
    }
    alias hascard {
      %bl4h.unoinc = 1
      %bl4h.unocrds = $hget(uno,$1)
      %bl4h.unocart = $replace($2-,w,W,wild,W,wd4,W.D.F,wdf,W.D.F,w d 4,W.D.F,w d f,W.D.F)
      %bl4h.unocart = $replace(%bl4h.unocart,$chr(32),$chr(46))
      while ($gettok(%bl4h.unocrds,0,45) >= %bl4h.unoinc) {
        if ($gettok(%bl4h.unocrds,%bl4h.unoinc,45) == %bl4h.unocart) { 
          if ($gettok(%bl4h.unocart,1,46) == $gettok($hget(uno,+card),1,46) || $gettok(%bl4h.unocart,2,46) == $gettok($hget(uno,+card),2,46) || %bl4h.unocart == W || %bl4h.unocart == W.D.F) {
            return %bl4h.unocart
          }
        }
        inc %bl4h.unoinc
      }
      return 0
    }
    alias makedeck {
      hmake unocards 500
      %bl4h.unotmp = 1
      %bl4h.unotmp2 = 1
      %bl4h.unotimes = 1
      while (%bl4h.unotmp <= 9) {
        if (%bl4h.unotmp2 > 4) { break }
        hadd unocards $gettok(G R B Y,%bl4h.unotmp2,32) $+ . $+ %bl4h.unotmp 2
        inc %bl4h.unotmp
        if (%bl4h.unotmp > 9) { set %bl4h.unotmp 1 | inc %bl4h.unotmp2 }
      }
      hadd unocards R.0 1
      hadd unocards G.0 1
      hadd unocards B.0 1
      hadd unocards Y.0 1
      hadd unocards R.DT 2
      hadd unocards G.DT 2
      hadd unocards B.DT 2
      hadd unocards Y.DT 2
      hadd unocards G.R 2
      hadd unocards R.R 2
      hadd unocards B.R 2
      hadd unocards Y.R 2
      hadd unocards G.S 2
      hadd unocards R.S 2
      hadd unocards Y.S 2
      hadd unocards B.S 2
      hadd unocards W.D.F 4
      hadd unocards W 4
    }
    alias stopuno {
      .timeruno* off
      msg $hget(uno,+chan) $unotheme($2,stopuno)
      unset %bl4h.uno*
      hfree -w uno*
    }
    alias startuno {
      unset %bl4h.uno*
      hfree -w uno*
      hmake uno
      hadd uno +started $1
      hadd uno +turn 1
      hadd uno +chan $2
      hadd uno +rot inc
      hadd uno +color $readini($unoini(uno.ini),settings,color)
      if ($3 == 1) { hadd uno +bot 1 }
      makedeck
      msg $2 $unotheme($1,unostart) $iif($hget(uno,+bot),$unotheme(null,unostartbot),)
      .timeruno 1 30 begingame $2
    }
    alias begingame {
      if (!$gettok($hget(uno,+players),0,32)) { stopuno $1 $me | halt }
      if ($gettok($hget(uno,+players),0,32) == 1) { hadd uno +bot 1 }
      if ($hget(uno,+bot) == 1) { setupplayer $me }
      if ($gettok($hget(uno,+players),0,32) >= 2) {
        msg $hget(uno,+chan) Playing this round: $hget(uno,+players)
        %bl4h.unofirst = $hfind(unocards, *, $rand(1,$hfind(unocards, *, 0, w)), w)
      }
      ;er remind me to fix this below
      if ($gettok(%bl4h.unofirst,1,46) == W) { 
        hdec unocards %bl4h.unofirst
        %bl4h.unofirst = r.RED
        goto eh
      }
      hdec unocards %bl4h.unofirst
      :eh
      hadd uno +card %bl4h.unofirst
      hadd uno +time $ctime
      if ($hget(unocards,%bl4h.unofirst) == 0) { hdel unocards %bl4h.unofirst }
      hadd uno +up $gettok($hget(uno,+players),$hget(uno,+turn),32)
      nextplayer
    }
    alias setupplayer {
      if ($hget(uno,$1)) { halt }
      hadd uno +players $hget(uno,+players) $1
      hadd uno $1
      msg $hget(uno,+chan) $unotheme($1,willplay)
      givecards $1 7
    }
    alias givecards {
      if ($hget(uno,+up) == $1) { unset %bl4h.unodraw }
      %bl4h.unotmp = 1
      unset %bl4h.unocard*
      while (%bl4h.unotmp <= $2) {
        if (!$hget(unocards,0).item) { msg $hget(uno,+chan) $unotheme(null,shuffledeck) | hfree unocards | makedeck }
        %bl4h.unocard = $hfind(unocards, *, $rand(1,$hfind(unocards, *, 0, w)), w)
        %bl4h.unocardz = %bl4h.unocardz $+ - $+ %bl4h.unocard
        hdec unocards %bl4h.unocard 
        if ($hget(unocards,%bl4h.unocard) == 0) { hdel unocards %bl4h.unocard }
        inc %bl4h.unotmp
      }
      hadd uno $1 $hget(uno,$1) $+ %bl4h.unocardz
      if ($1 == $me) { return }
      .notice $1 You drew: $drawcards(%bl4h.unocardz)
    }
    alias drawcards {
      unset %bl4h.unofix.*
      unset %bl4h.unofix
      %bl4h.unototcar = $gettok($1-,0,45)
      %bl4h.unotmpp = 1
      while (%bl4h.unotmpp <= %bl4h.unototcar) {
        if ($left($gettok($1-,%bl4h.unotmpp,45),1) == W) {
          if ($gettok($1-,%bl4h.unotmpp,45) == W.D.F) {
            if ($hget(uno,+color) == 1) {
              %bl4h.unofix = %bl4h.unofix 0[8,1W12D0440]
            }
            if ($hget(uno,+color) == 0) {
              %bl4h.unofix = %bl4h.unofix [W D F]
            }
            inc %bl4h.unotmpp 
          }
          if ($gettok($1-,%bl4h.unotmpp,45) == W) {
            if ($hget(uno,+color) == 1) {
              %bl4h.unofix = %bl4h.unofix 0[8,1W12I04L9D0]
            }
            if ($hget(uno,+color) == 0) {
              %bl4h.unofix = %bl4h.unofix [WILD]
            }
            inc %bl4h.unotmpp 
          }
        }
        else {
          if ($hget(uno,+color) == 1) {
            if ($left($gettok($1-,%bl4h.unotmpp,45),1) == r) { %bl4h.unofix.r = %bl4h.unofix.r $+ 0[4,01 $+ $chr(32) $+ $gettok($gettok($1-,%bl4h.unotmpp,45),2,46) $+ $chr(32) $+ 0] }
            if ($left($gettok($1-,%bl4h.unotmpp,45),1) == b) { %bl4h.unofix.b = %bl4h.unofix.b $+ 0[12,01 $+ $chr(32) $+ $gettok($gettok($1-,%bl4h.unotmpp,45),2,46) $+ $chr(32) $+ 0] }
            if ($left($gettok($1-,%bl4h.unotmpp,45),1) == y) { %bl4h.unofix.y = %bl4h.unofix.y $+ 0[8,01 $+ $chr(32) $+ $gettok($gettok($1-,%bl4h.unotmpp,45),2,46) $+ $chr(32) $+ 0] }
            if ($left($gettok($1-,%bl4h.unotmpp,45),1) == g) { %bl4h.unofix.g = %bl4h.unofix.g $+ 0[9,01 $+ $chr(32) $+ $gettok($gettok($1-,%bl4h.unotmpp,45),2,46) $+ $chr(32) $+ 0] }
          }
          if ($hget(uno,+color) == 0) {
            %bl4h.unofix = %bl4h.unofix $+ $chr(91) $+ $left($gettok($1-,%bl4h.unotmpp,45),1) $+ $chr(32) $+ $gettok($gettok($1-,%bl4h.unotmpp,45),2,46) $+ $chr(93)
          }
          inc %bl4h.unotmpp 
        }
      }
      %bl4h.unofix = %bl4h.unofix $+ %bl4h.unofix.r $+ %bl4h.unofix.b $+ %bl4h.unofix.y $+ %bl4h.unofix.g
      return %bl4h.unofix
    }
    alias unoscore {
      %bl4h.unoscore = 0
      %bl4h.unotmp = 1
      while ($gettok($hget(uno,+players),0,32) >= %bl4h.unotmp) {
        if ($gettok($hget(uno,+players),%bl4h.unotmp,32) == $1) { inc %bl4h.unotmp }
        %bl4h.unotmp2 = 1
        while (%bl4h.unotmp2 <= $gettok($hget(uno,$gettok($hget(uno,+players),%bl4h.unotmp,32)),0,45)) {
          %bl4h.unocrd = $gettok($gettok($hget(uno,$gettok($hget(uno,+players),%bl4h.unotmp,32)),%bl4h.unotmp2,45),2,46)
          %bl4h.unocrd2 = $gettok($gettok($hget(uno,$gettok($hget(uno,+players),%bl4h.unotmp,32)),%bl4h.unotmp2,45),1,46)
          if (%bl4h.unocrd2 == W) { inc %bl4h.unoscore 50 }
          if (%bl4h.unocrd == S) { inc %bl4h.unoscore 20 }
          if (%bl4h.unocrd == R) { inc %bl4h.unoscore 20 }
          if (%bl4h.unocrd == DT) { inc %bl4h.unoscore 20 }
          if (%bl4h.unocrd isnum) { inc %bl4h.unoscore %bl4h.unocrd }
          inc %bl4h.unotmp2
        }
        inc %bl4h.unotmp
      }
      %bl4h.unotmp3 = 1
      while ($gettok($hget(uno,+players),0,32) >= %bl4h.unotmp3) {
        if ($gettok($hget(uno,+players),%bl4h.unotmp3,32) == $1) { inc %bl4h.unotmp3 }
        else {
          if ($gettok($hget(uno,+players),%bl4h.unotmp3,32) == $me) { goto lame }
          if ($ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1)) {
            if ($readini($unoini(uno.ini),settings,allowreg) == 1) {
              %bl4h.unosloss = $calc($readini($unoini(uno.ini),$ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1).info,loss) + 1)
              %bl4h.unoswin = $readini($unoini(uno.ini),$ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1).info,wins)
              writeini $unoini(uno.ini) $ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1).info loss %bl4h.unosloss
              writeini $unoini(uno.ini) $ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1).info totalgames $calc(%bl4h.unosloss + %bl4h.unoswin)
              writeini $unoini(uno.ini) $ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1).info lastgame $ctime
            }      
          }
          :lame
          msg $hget(uno,+chan) $gettok($hget(uno,+players),%bl4h.unotmp3,32) $+ : $drawcards($hget(uno,$gettok($hget(uno,+players),%bl4h.unotmp3,32)))
          inc %bl4h.unotmp3
        }
      }
      msg $hget(uno,+chan) $unotheme($1 %bl4h.unoscore,endscore)
      if ($1 == $me) { parseunotop | goto skip }
      if ($readini($unoini(uno.ini),settings,allowreg) == 1) {
        if ($ulist($address($1,1),uno,1)) {
          %bl4h.unoscoretot = $calc($readini($unoini(uno.ini),$ulist($address($1,1),uno,1).info,score) + %bl4h.unoscore)
          %bl4h.unoscorewins = $calc($readini($unoini(uno.ini),$ulist($address($1,1),uno,1).info,wins) + 1)
          %bl4h.unoscoreloss = $readini($unoini(uno.ini),$ulist($address($1,1),uno,1).info,loss)
          writeini $unoini(uno.ini) $ulist($address($1,1),uno,1).info totalgames $calc(%bl4h.unoscorewins + %bl4h.unoscoreloss)
          writeini $unoini(uno.ini) $ulist($address($1,1),uno,1).info score %bl4h.unoscoretot
          writeini $unoini(uno.ini) $ulist($address($1,1),uno,1).info wins %bl4h.unoscorewins
          writeini $unoini(uno.ini) $ulist($address($1,1),uno,1).info lastgame $ctime
          parseunotop
          msg $hget(uno,+chan) $1 ( $+ $ulist($address($1,1),uno,1).info $+ ):  $+ %bl4h.unoscoretot points $+  < $+ %bl4h.unoscorewins wins / %bl4h.unoscoreloss losses> Place:04 $ord($readini($unoini(uno.ini),$ulist($address($1,1),uno,1).info,place))
        }
        else { .notice $1 $unotheme($1,mustreg) }
      }
      :skip
    }
    alias unocount {
      unset %bl4h.unocount
      %bl4h.unoscore = 0
      %bl4h.unotmp = 1
      while ($gettok($hget(uno,+players),0,32) >= %bl4h.unotmp) {
        %bl4h.unotmp2 = 1
        %bl4h.unonick = $gettok($hget(uno,+players),%bl4h.unotmp,32)
        while (%bl4h.unotmp2 <= $gettok($hget(uno,$gettok($hget(uno,+players),%bl4h.unotmp,32)),0,45)) {
          inc %bl4h.unotmp2
        }
        set %bl4h.unocount %bl4h.unocount %bl4h.unonick $+ : $calc(%bl4h.unotmp2 - 1)
        inc %bl4h.unotmp
      }
      msg $hget(uno,+chan) %bl4h.unocount
    }
    alias unostat {
      if ($ulist($address($2,1),uno,1).info) { %bl4h.unotmp = $ulist($address($2,1),uno,1).info }
      if (!$ulist($address($2,1),uno,1).info) { %bl4h.unotmp = $2 }
      if ($readini($unoini(uno.ini),%bl4h.unotmp,totalgames)) {
        if ($readini($unoini(uno.ini),%bl4h.unotmp,place) == 1) { msg $1 %bl4h.unotmp is $1 $+ 's 8U12N4O master! }
        if ($readini($unoini(uno.ini),%bl4h.unotmp,place) == 2 || $readini($unoini(uno.ini),%bl4h.unotmp,place) == 3) { msg $1 %bl4h.unotmp is a top 3 player! }
        msg $1  $+ %bl4h.unotmp $+ :  $readini($unoini(uno.ini),%bl4h.unotmp,score) $+  < $+ $readini($unoini(uno.ini),%bl4h.unotmp,wins) $+ W/ $+ $readini($unoini(uno.ini),%bl4h.unotmp,loss) $+ L $+ > Place:4 $ord($readini($unoini(uno.ini),%bl4h.unotmp,place))
      }
      else { msg $1  $+ $2 $+  no such user/no games played }
    }
    alias unohelp {
      if ($2 == pub && !$3) { 
        .notice $1 For official uno rules visit: http://hometown.aol.com/babso00001/unorules.html
        .notice $1 Use /notice $me unohelp for private commands.
        .notice $1 Commands: !uno , !unoremove , !unoend , join , play , draw , pass , order , count , !unostat , !unotop10, !unoabout
        .notice $1 Type !unohelp <command> for help on a specific command
        return
      }
      if ($2 == priv && !$3) {
        .notice $1 You must register a username to have your scores saved.
        .notice $1 Commands: unoregister , unologin , unochpass , unologout
        .notice $1 Use unohelp <command> for help on a specific command
        return
      }
      if ($readini($unoini(unohelp.ini),help,$3) != $null) { .notice $nick $readini($unoini(unohelp.ini),help,$3) }
      else { .notice $nick No help on that command }
    }
    alias unoingame {
      %bl4h.unod = 1
      while ($gettok($hget(uno,+players),0,32) >= %bl4h.unod) {
        if ($gettok($hget(uno,+players),%bl4h.unod,32) == $1) { return 1 }
        inc %bl4h.unod
      }
      return 0
    }
    alias unohtmlscore {
      parseunotop
      %bl4h.unotmp = 1
      write -c unotop10.html
      write unotop10.html <html>
      write unotop10.html <!-- Generated by unobot $unover ( http://shady.nu ) -->
      write unotop10.html <head><title>UNO! Top 10 players</title></head>
      write unotop10.html <STYLE id=default type=text/css> .tabel $chr(123) BORDER-RIGHT: $readini($unoini(uno.ini),settings,htmlborder) 2px solid; BORDER-TOP: $readini($unoini(uno.ini),settings,htmlborder) 2px solid; BORDER-LEFT: $readini($unoini(uno.ini),settings,htmlborder) 2px solid; BORDER-BOTTOM: $readini($unoini(uno.ini),settings,htmlborder) 2px solid $chr(125) 
      write unotop10.html .tdb $chr(123) BORDER-BOTTOM: $readini($unoini(uno.ini),settings,htmlborder) 2px solid; BORDER-RIGHT: $readini($unoini(uno.ini),settings,htmlborder) 2px solid; $chr(125) </style>
      write unotop10.html <body bgcolor=" $+ $readini($unoini(uno.ini),settings,htmlbackground) $+ " text=" $+ $readini($unoini(uno.ini),settings,htmltext) $+ ">
      write unotop10.html <center><table width="70%" class=tabel><tr><td class=tdb>Place</td><td class=tdb>User</td><td class=tdb>Wins</td><td class=tdb>Loss</td><td class=tdb>Score</td></tr>
      if ($readini($unoini(uno.ini),settings,top10)) {
        while (%bl4h.unotmp <= $gettok($readini($unoini(uno.ini),settings,top10),0,32)) {
          %bl4h.unotmpu = $gettok($readini($unoini(uno.ini),settings,top10),%bl4h.unotmp,32)
          write unotop10.html <tr><td> $ord(%bl4h.unotmp) </td><td> %bl4h.unotmpu </td>
          write unotop10.html <td> $readini($unoini(uno.ini),%bl4h.unotmpu,wins) </td><td> $readini($unoini(uno.ini),%bl4h.unotmpu,loss) </td>
          write unotop10.html <td><b> $readini($unoini(uno.ini),%bl4h.unotmpu,score) </b></td></tr>
          inc %bl4h.unotmp
        }
        write unotop10.html </table><br><br><a href="http://shady.nu/?x=mirc">Unobot $unover </a></center></html>
        run unotop10.html
      }
    }
    alias parseunotop {
      %bl4h.parsetmp = 1
      %bl4h.parsetotal = $ini($unoini(uno.ini),0)
      if ($ini($unoini(uno.ini),0) > 101 && $hget(uno,+chan)) { msg $hget(uno,+chan) Calculating... }
      while (%bl4h.parsetmp <= %bl4h.parsetotal) {
        window -n @sorting
        if ($ini($unoini(uno.ini),%bl4h.parsetmp) == settings) { goto skip }
        if ($readini($unoini(uno.ini),settings,topcalc) == 1) { aline @sorting $calc($readini($unoini(uno.ini),$ini($unoini(uno.ini),%bl4h.parsetmp),score) / $readini($unoini(uno.ini),$ini($unoini(uno.ini),%bl4h.parsetmp),totalgames)) $ini($unoini(uno.ini),%bl4h.parsetmp) }
        if ($readini($unoini(uno.ini),settings,topcalc) == 2) { aline @sorting $readini($unoini(uno.ini),$ini($unoini(uno.ini),%bl4h.parsetmp),score) $ini($unoini(uno.ini),%bl4h.parsetmp) }
        :skip
        inc %bl4h.parsetmp
      }
      filter -eutc 1 32 @sorting @sorting
      %bl4h.parsetmp = 1
      if ($readini($unoini(uno.ini),settings,top10)) { remini $unoini(uno.ini) settings top10 }
      while (%bl4h.parsetmp <= $line(@sorting,0)) {
        writeini $unoini(uno.ini) $gettok($line(@sorting,%bl4h.parsetmp),2,32) place %bl4h.parsetmp
        if (%bl4h.parsetmp <= 10) { writeini $unoini(uno.ini) settings top10 $readini($unoini(uno.ini),settings,top10) $gettok($line(@sorting,%bl4h.parsetmp),2,32) }
        :error
        reseterror
        inc %bl4h.parsetmp
      }
      close -@ @sorting
    }
    on *:NICK:{
      if ($unoingame($nick)) {
        hadd uno +players $hget(uno,+players) $newnick
        hadd uno $newnick $hget(uno,$nick)
        if ($hget(uno,+up) == $nick) { hadd uno +up $newnick }
        if ($hget(uno,+wild) == $nick) { hadd uno +wild $newnick }
        if ($hget(uno,+started) == $nick) { hadd uno +started $newnick }
        unodelplayer $nick
      }
    }
    on *:JOIN:#:{
      if ($unoingame($nick) && $chan == $hget(uno,+chan)) {
        msg $hget(uno,+chan) WB $nick $+ , Game is still on! Its $hget(uno,+up) $+ 's turn.
      }
    }
    alias unodelplayer {
      unset %bl4h.unop
      %bl4h.unol = 1
      %bl4h.unone = $gettok($unoorder,2,32)
      while (%bl4h.unol <= $gettok($hget(uno,+players),0,32)) {
        if ($gettok($hget(uno,+players),%bl4h.unol,32) != $1) { %bl4h.unop = %bl4h.unop $gettok($hget(uno,+players),%bl4h.unol,32) }
        inc %bl4h.unol
      }
      hdel uno $1
      hadd uno +players %bl4h.unop
      if ($hget(uno,+wild) == $1) { hdel uno +wild | hadd uno +card r.RED }
      if ($hget(uno,+started) == $1) { hadd uno +started $gettok($hget(uno,+players),1,32) }
      if ($hget(uno,+up) == $1) {
        hadd uno +up %bl4h.unone
        hadd uno +turn $findtok($hget(uno,+players),%bl4h.unone,1,32)
        nextplayer 
      }
    }
    alias unoremplayer {
      if ($gettok($hget(uno,+players),0,32) > 2) {
        unodelplayer $1
        msg $hget(uno,+chan) $1 has been removed from the game!
      }
      else { 
        stopuno $hget(uno,+chan) $1 
      }
    }
    on *:QUIT:{
      if ($unoingame($nick)) {
        unoremplayer $nick
      }
    }
    dialog unouser {
      title "Uno users"
      size -1 -1 142 126
      option dbu
      list 1, 6 10 50 88, size vsbar
      ;button "ADD", 2, 6 104 23 12
      box "Group Box", 3, 2 2 58 120
      button "DEL", 4, 34 104 21 12
      edit "", 5, 88 12 50 10
      edit "", 6, 88 28 22 10
      edit "", 7, 116 28 22 10
      text "Pass:", 8, 66 14 19 8
      text "W/L", 9, 66 30 19 8
      button "Apply change", 10, 94 66 37 12
      edit "", 11, 88 44 50 10
      text "Score:", 12, 66 46 21 8
    }
    alias unodref {
      %tmp = 1
      did -r unouser 1
      while (%tmp <= $ini($unoini(uno.ini),0)) {
        if ($ini($unoini(uno.ini),%tmp) != settings) { did -a unouser 1 $ini($unoini(uno.ini),%tmp) }
        inc %tmp
      }
      if (%tmp <= 2) { 
        did -a unouser 1 [No Users yet]
        did -b unouser 10,4
      }
    }
    alias unodiag {
      if ($dialog($1)) { dialog -v $1 | halt }
      dialog -m $1 $1
    }
    alias unohostcheck {
      %tmp2 = $address($1,1)
      %tmp = 1
      while (%tmp <= $ini($unoini(uno.ini),0)) {
        if ($readini($unoini(uno.ini),$ini($unoini(uno.ini),%tmp),redad) iswm %tmp2) { return $ini($unoini(uno.ini),%tmp) }
        inc %tmp
      }
      return 0
    }
    dialog unothemeedit {
      title "Unobot Theme Editor"
      size -1 -1 196 68
      option dbu
      list 1, 4 4 54 44, size vsbar
      edit "", 2, 66 10 120 10, autohs
      combo 3, 2 52 60 50, drop
      button "Save", 4, 70 28 37 12, flat
      button "Preview", 5, 108 28 37 12, flat
      button "Convert", 6, 146 28 37 12, flat
    }
    on *:DIALOG:*:*:*:{
      if ($dname == unothemeedit) {
        if ($devent == init) {
          %tmp = 1
          while ($ini($unoini(unotheme.ini),0) >= %tmp) {
            did -a unothemeedit 3 $ini($unoini(unotheme.ini),%tmp)
            inc %tmp
          }
    
        }
        if ($devent = sclick) {
          if ($did == 3) { 
            if ($did(3).seltext) {
              did -r unothemeedit 1
              %tmp = 1
              while ($ini($unoini(unotheme.ini),$did(3).seltext,0) >= %tmp) {
                did -a unothemeedit 1 $ini($unoini(unotheme.ini),$did(3).seltext,%tmp)
                inc %tmp
              }
            }
          }
          if ($did = 1 && $did(1).seltext) {
            did -ra unothemeedit 2 $readini($unoini(unotheme.ini),$did(3).seltext,$did(1).seltext)
          }
          if ($did = 5 && $did(1).seltext && $did(2).text) {
            if (!$window(@prev)) { window @prev }
            aline -a @prev $unotheme(TEST1 TEST2 TEST3 TEST4,$did(1).seltext)
          }
        }
      }
      if ($dname == unoman) {
        if ($devent == sclick || $devent == init) {
          if ($did == 11) { unodiag unouser }
          if ($did == 13) { unodiag unoabout }
          if ($did == 12) { unodiag unomisc }
          if ($did == 3) { writeini $unoini(uno.ini) settings enabled 1 }
          if ($did == 4) { writeini $unoini(uno.ini) settings enabled 0 }
          if ($did == 6) { writeini $unoini(uno.ini) settings color 1 }
          if ($did == 7) { writeini $unoini(uno.ini) settings color 0 }
          if ($did == 9) { writeini $unoini(uno.ini) settings allowreg 1 }
          if ($did == 10) { writeini $unoini(uno.ini) settings allowreg 0 }
          if ($readini($unoini(uno.ini),settings,enabled) == 1) { did -e unoman 4 | did -b unoman 3 }
          else { did -e unoman 3 | did -b unoman 4 }
          if ($readini($unoini(uno.ini),settings,allowreg) == 1) { did -e unoman 10 | did -b unoman 9 }
          else { did -e unoman 9 | did -b unoman 10 }
          if ($readini($unoini(uno.ini),settings,color) == 1) { did -e unoman 7 | did -b unoman 6 }
          else { did -e unoman 6 | did -b unoman 7 }
        }
      }
      if ($dname == unoabout) {
        if ($devent == sclick) {
          if ($did == 3) { run http://shady.nu }
          if ($did == 4) { run mailto:bl4h@shady.nu }
        }
      }
      if ($dname == unouser) {
        if ($devent == init) {
          unodref
        }
        if ($devent == sclick) {
          if ($did == 1) {
            did -r unouser 5,6,7,11
            did -a unouser 5 $readini($unoini(uno.ini),$did(1).seltext,password)
            did -a unouser 6 $readini($unoini(uno.ini),$did(1).seltext,wins)
            did -a unouser 7 $readini($unoini(uno.ini),$did(1).seltext,loss)
            did -a unouser 11 $readini($unoini(uno.ini),$did(1).seltext,score)
          }
          if ($did == 10) {
            if (!$did(1).seltext) { %tmp = $input(No username selected!,o,Fail) | halt }
            if ($did(5).text) { writeini $unoini(uno.ini) $did(1).seltext password $did(5).text }
            if ($did(6).text isnum) { writeini $unoini(uno.ini) $did(1).seltext wins $did(6).text }
            if ($did(7).text isnum) { writeini $unoini(uno.ini) $did(1).seltext loss $did(7).text }
            if ($did(11).text isnum) { writeini $unoini(uno.ini) $did(1).seltext score $did(11).text }
            %tmp = $input(Applied,o,Applied)
          }
          if ($did = 4 && $did(1).seltext) {
            %tmp = $?!="DELETE $did(1).seltext $+ ?"
            if (%tmp == $true) { remini $unoini(uno.ini) $did(1).seltext }     
            unodref
          }
        }
      }
      if ($dname == unomisc) {
        if ($devent == init) {
          unset %bl4h.flood*
          did -i unomisc 5,8 1 ignore
          did -i unomisc 5,8 2 kick
          did -i unomisc 5,8 3 ban+kick
          did -i unomisc 12 1 Score / games played
          did -i unomisc 12 2 Score only
          did -c unomisc 12 $readini($unoini(uno.ini),settings,topcalc)
          did -c unomisc 5 $iif($readini($unoini(uno.ini),settings,floodpunishmsg),$readini($unoini(uno.ini),settings,floodpunishmsg),1)
          did -c unomisc 8 $iif($readini($unoini(uno.ini),settings,floodpunishrep),$readini($unoini(uno.ini),settings,floodpunishrep),1)
          did -a unomisc 2 $iif($readini($unoini(uno.ini),settings,floodmsgs),$readini($unoini(uno.ini),settings,floodmsgs),5)
          did -a unomisc 10 $iif($readini($unoini(uno.ini),settings,floodreps),$readini($unoini(uno.ini),settings,floodreps),3)
          did -a unomisc 17 $iif($readini($unoini(uno.ini),settings,idlewarn),$readini($unoini(uno.ini),settings,idlewarn),60)
          did -a unomisc 19 $iif($readini($unoini(uno.ini),settings,idleremove),$readini($unoini(uno.ini),settings,idleremove),120)
          did -a unomisc 22 $iif($readini($unoini(uno.ini),settings,floodban),$readini($unoini(uno.ini),settings,floodban),30)   
          if ($readini($unoini(uno.ini),settings,floodenabled) != $null) {
            if ($readini($unoini(uno.ini),settings,floodenabled) == 1) { did -c unomisc 24 }
            else { did -b unomisc 5,8,2,10 }   
          }
        }
        if ($devent == sclick) {
          if ($did == 24) {
            if ($did(unomisc,24).state == 1) { writeini $unoini(uno.ini) settings floodenabled 1 | did -e unomisc 5,8,2,10 }
            else { writeini $unoini(uno.ini) settings floodenabled 0 | did -b unomisc 5,8,2,10 }
          }
          if ($did == 21) {
            if ($did(unomisc,2).text isnum && $did(unomisc,10).text isnum && $did(unomisc,17).text isnum && $did(unomisc,19).text isnum && $did(unomisc,22).text isnum) {
              writeini $unoini(uno.ini) settings floodpunishmsg $did(unomisc,5).sel
              writeini $unoini(uno.ini) settings floodpunishrep $did(unomisc,8).sel
              writeini $unoini(uno.ini) settings topcalc $did(unomisc,12).sel
              writeini $unoini(uno.ini) settings floodmsgs $did(unomisc,2).text
              writeini $unoini(uno.ini) settings floodreps $did(unomisc,10).text
              writeini $unoini(uno.ini) settings idlewarn $did(unomisc,17).text
              writeini $unoini(uno.ini) settings idleremove $did(unomisc,19).text
              writeini $unoini(uno.ini) settings floodban $did(unomisc,22).text
              %tmp = $input(Saved,o,Saved)
            }
            else { %tmp = $input(invalid numbers,o,error) }
          }
        }
      }
    }
    alias unoini {
      return " $+ $shortfn($scriptdir $+ $1) $+ "
    }
    dialog unoman {
      title "Unobot Manager"
      size -1 -1 148 82
      option dbu notheme
      icon $shortfn($mircexe), 18
      box "Settings", 1, 2 4 144 56
      text "Uno On/Off:", 2, 8 14 39 8
      button "ON", 3, 60 12 37 12, disable
      button "OFF", 4, 104 12 37 12, disable
      text "Card coloring:", 5, 8 30 35 8
      button "ON", 6, 60 28 37 12, disable
      button "OFF", 7, 104 28 37 12, disable
      text "Registration:", 8, 8 48 35 8
      button "ON", 9, 60 44 37 12, disable
      button "OFF", 10, 104 44 37 12, disable
      button "User Manager", 11, 2 66 37 12, flat
      button "Misc Settings", 12, 54 66 37 12, flat
      button "About", 13, 108 66 37 12, flat
    }
    dialog unomisc {
      title "Unobot"
      size -1 -1 144 162
      option dbu
      box "Flood settings", 1, 2 2 140 62
      edit "", 2, 58 12 14 10
      text "Lines in 10 seconds", 3, 74 14 53 8
      combo 5, 6 12 36 35, size drop
      text "after", 6, 44 14 13 8
      combo 8, 6 32 36 35, size drop
      text "after", 9, 44 34 13 8
      edit "", 10, 58 32 14 10
      text "Repeats in 10 seconds", 11, 74 34 59 8
      box "Timer settings", 16, 2 66 140 50
      edit "", 17, 106 74 24 10
      text "Seconds before idle player is warned:", 18, 8 76 91 8
      edit "", 19, 106 88 24 10
      text "After warning, player is removed after:", 20, 8 90 91 8
      button "Save", 21, 56 146 37 12
      edit "", 22, 106 102 24 10
      text "Flood ban time in seconds:", 23, 34 104 67 8
      check "Enabled?", 24, 46 50 46 10
      box "Misc", 4, 2 118 140 24
      text "Top 10 by:", 7, 10 128 31 8
      combo 12, 60 126 60 32, drop
    }
    dialog unoabout {
      title "Unobot"
      size -1 -1 132 30
      option dbu notheme
      icon $shortfn($mircexe), $rand(1,21)
      icon 1, 4 4 15 15, $shortfn($mircexe), $rand(1,21)
      text Unobot $unover, 2, 30 4 97 10
      link "http://shady.nu", 3, 30 18 40 8
      link "bl4h@shady.nu", 4, 76 18 50 8

     

  20. Hello, this is my first serious gather bot for counter-strike or counter-strike: source. What is different from others bots? It has admins. U cant start the game if u didnt identify yourself for admin.
    To register to admins u have to type in bot private chat .addhost nick password_to_become_admin your_identify_password and identify same but .admin your_identify_password

    All admins have stats. I mean how many games they done. Everyone can see this by typing in channel .gstats

    All players have points. They rise it buy playing games. They can buy things with that points. Points will be decreased. Btw u have to set all things available to buy (name(without spaces),needed points,command(this can be with spaces. Ex: /cs access #channel add %nick(this is the name of nick who wants to buy) 3)

    all players can see their points buy typing !rank or !rank nick
    they can see all commands for simple users by typing !commands in channel

    for admins options u have to type .commands in private chat.

    bot will make raindom teams

    bot can do commands like .kick nick .voice nick ect...

    please make a feedback what is wrong here or what i should make ect.

     

    on *:text:.start*:?:{
      if ($2) && ($3) && ($4) && ($5) && ($6) && ($nick = %admin) {
        .set %server.ip $2
        .set %server.pass $3
        .set %server.map $4
        .set %server.kom.vienas $5
        .set %server.kom.du $6
        .set %zaidejai.dabar 0
        if (%kova != $null) { .set %kova $calc(%kova + 1) }
        elseif (%kova = $null) { .set %kova 1 }
        start
      }
      else { .msg $nick Wrong syntax. }
      close -m $nick
    }
    
    alias start {
      .set %gather.on 1
      .set %last.player 0
      .set %zaidejai.dabar 0
      .set %p1 x | .set %p2 x | .set %p3 x | .set %p4 x | .set %p5 x | .set %p6 x | .set %p7 x | .set %p8 x | .set %p9 x | .set %p10 x
      .msg %chan 0,1Gather Bot: 10 $+ %server.kom.vienas 0 $+ vs 10 $+ %server.kom.du $+ 0. Admin: 8 $+ %admin $+ 0. Map: 10 $+ %server.map 0 $+ . Simple game. [ $+ %kova $+ ] Match
      .msg %chan 0,1Players [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10
    }
    
    on *:text:!add*:#:{
      if (%gather.on = 1) {
        if ($2) {
          if ($2 ison $chan) && ($nick = %admin) {
            if (%p1 != $2) && (%p2 != $2) && (%p3 != $2) && (%p4 != $2) && (%p5 != $2) && (%p6 != $2) && (%p7 != $2) && (%p8 != $2) && (%p9 != $2) && (%p10 != $2) {  
              if (%p10 = x) && (%last.player != 10) {
                .set %p $+ $calc(%last.player + 1) $2-
                .set %last.player $calc(%last.player + 1)
                .write gather.txt $2-
                .set %zaidejai.dabar $calc(%zaidejai.dabar + 1)
                .msg %chan 0,1Players [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10
                if (%last.player = 10) { .msg $chan 8,1 15Gather 4begins15. Password and other information players will get in 2 minutes | /make.teams }
              }
            }
            else { .msg %chan 0,1 $2- is already in game. }
          }
          elseif ($2 !ison $chan) { .msg %chan 0,1 $2 is not in the channel }
        }
        else {
          if (%p1 != $nick) && (%p2 != $nick) && (%p3 != $nick) && (%p4 != $nick) && (%p5 != $nick) && (%p6 != $nick) && (%p7 != $nick) && (%p8 != $nick) && (%p9 != $nick) && (%p10 != $nick) {  
            if (%p10 = x) && (%last.player != 10) {
              .set %p $+ $calc(%last.player + 1) $nick
              .set %last.player $calc(%last.player + 1)
              .write gather.txt $nick
              .set %zaidejai.dabar $calc(%zaidejai.dabar + 1)
              .msg %chan 0,1Players [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10
              if (%last.player = 10) { make.teams }
            }
          }
          else { .msg %chan 0,1You are already in the game. }
        }
      }
    }
    
    on *:text:!rem*:#:{
      if (%gather.on = 1) {
        if ($2) && ($nick = %admin) {
          if (%p1 = $2) { .set %p1 %p2 | .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt }
          elseif (%p2 = $2) { .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt }
          elseif (%p3 = $2) { .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt }
          elseif (%p4 = $2) { .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt }
          elseif (%p5 = $2) { .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt }
          elseif (%p6 = $2) { .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt }
          elseif (%p7 = $2) { .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1 | /.write -ds $+ $2- gather.txt) }
          elseif (%p8 = $2) { .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) }
          elseif (%p9 = $2) { .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) }
        }
        else {
          if (%p1 = $nick) { .set %p1 %p2 | .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
          elseif (%p2 = $nick) { .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
          elseif (%p3 = $nick) { .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
          elseif (%p4 = $nick) { .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
          elseif (%p5 = $nick) { .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
          elseif (%p6 = $nick) { .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
          elseif (%p7 = $nick) { .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
          elseif (%p8 = $nick) { .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
          elseif (%p9 = $nick) { .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
        }
      }
    }
    
    on *:part:#:{
      if (%gather.on = 1) {
        if (%p1 = $nick) { .set %p1 %p2 | .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
        elseif (%p2 = $nick) { .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
        elseif (%p3 = $nick) { .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
        elseif (%p4 = $nick) { .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
        elseif (%p5 = $nick) { .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
        elseif (%p6 = $nick) { .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
        elseif (%p7 = $nick) { .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
        elseif (%p8 = $nick) { .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
        elseif (%p9 = $nick) { .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt }
      }
    }
    
    alias make.teams {
      if ($len(gather.txt) = 10) {
        .set %i 1
        .set %last.num 1
    
        while (%i <= 10) {
          .set %tmp $read(gather.txt) 
          .set %p $+ %last.num %tmp
          inc %i
          .set %last.num $calc(%last.num + 1) 
    
          if ($readini(taskai.ini,taskai,%tmp) = $null) { .writeini -n taskai.ini taskai %tmp 1 }
          elseif ($readini(taskai.ini,taskai,%tmp) != $null) { 
            .set %taskai $readini(taskai.ini,taskai,%tmp) 
            .writeini -n taskai.ini taskai %tmp $calc(%taskai + 1)
            .unset %taskai
          }
    
          /.write -ds $+ %tmp gather.txt
          .unset %tmp
        } 
        .set %adm.taskai $readini(taskai.ini,adminai,%admin)
        .writeini -n taskai.ini adminai %admin $calc(%adm.taskai + 1)
        msg $chan 0,1Match begins. Teams: 8 $+ %server.kom.vienas $+ 0:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 8 $+ %server.kom.du $+ 0:11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 $+ 0. Please wait till we send you an information. If you wont get it please tell to game administrator [8 $+ %admin $+ 0]
        /send.pass
        .unset %adm.taskai
      }
    }
    
    on *:text:!off:#:{
      if ($nick = %admin) {
        if (%gather.on = 1) { 
          .set %gather.on 0
          .msg $chan 0,1Gather game is now off
          .set %p1 x | .set %p2 x | .set %p3 x | .set %p4 x | .set %p5 x | .set %p6 x | .set %p7 x | .set %p8 x | .set %p9 x | .set %p10 x
          .unset %nick
          .unset %pass.typed | .unset %last.player | .unset %last.num
          /.remove gather.txt
          .set %online 0
        }
        elseif (%gather.on = 0) { msg $chan 0,1Gather is not turned on. }
      }
    }
    alias send.pass {
      .write gather.txt %p1 | .write gather.txt %p2 | .write gather.txt %p3 | .write gather.txt %p4 | .write gather.txt %p5 | .write gather.txt %p6 | .write gather.txt %p7 | .write gather.txt %p8 | .write gather.txt %p9 | .write gather.txt %p10
      .set %i 1
      while (%i <= 10) {
        .set %tmp $read(gather.txt,%i)
        inc %i
        if (%tmp != $null) {
          .msg %tmp 0,1Hi, server ip: 8 $+ %server.ip 0 and pass 8 $+ %server.pass 
          .msg %tmp 0,1Good luck & have fun
        }
        .unset %tmp
      }
      .msg %chan 0,1Information is sent.
      /.remove gather.txt
      if (%gather.on = 1) { 
        .set %gather.on 0
        .set %p1 x | .set %p2 x | .set %p3 x | .set %p4 x | .set %p5 x | .set %p6 x | .set %p7 x | .set %p8 x | .set %p9 x | .set %p10 x
        .unset %ip | .unset %port | .unset %chan | .unset %nick
        .unset %pass.typed | .unset %last.player | .unset %last.num
        /.remove gather.txt
        .set %online 0
      }
    }
    
    menu menubar {
      Gather
      .Password(needed for become admin) ( %pass ):/.set %pass $?="Kodas"
      .Password(to become admin) ( %admin.pass.tapti ):/.set %admin.pass.tapti $?="Kodas"
      .-
      .Channel ( %chan ):/.set %chan $?="Kanalas?"
      .-
      .Buy options:/dialog -m gth.buy gth.buy
    }
    
    on *:text:!rank*:#:{
      if (!$2) {
        .set %nick $nick
        if ($readini(taskai.ini,taskai,%nick) != $null) {
          .msg $chan 0,1Nick: %nick $chr(124) Points: $readini(taskai.ini,taskai,%nick)
        }
        elseif ($readini(taskai.ini,taskai,%nick) = $null) { .msg $chan 0,1 $+ %nick didn't play eny matches. }
      }
      elseif ($2) {
        .set %nick $2-
        if ($readini(taskai.ini,taskai,%nick) != $null) {
          msg $chan 0,1Nick: %nick $chr(124) Points: $readini(taskai.ini,taskai,%nick)
        }
        elseif ($readini(taskai.ini,taskai,%nick) = $null) { .msg $chan 0,1 $+ %nick didn't play eny matches. }
      }
    }
    
    on *:text:!buy:#:{
      .notice $nick You can buy:
      .set %end $lines(items.txt)
      .set %i 1
      while (%i <= %end) {
        .set %gth.buy $read(items.txt,%i)
        .notice $nick $+(%i,$chr(41)) $gettok(%gth.buy,1,32) $gettok(%gth.buy,2,32)
        inc %i
      }
      .notice $nick Write to the private what do you want to buy. Format: !buy number. Ex: !buy 1 (points will be detracted.)
      .unset %gth.buy | .unset %i | .unset %end
    }
    
    on *:text:!buy*:?:{
      .set %nick $nick
      .set %pirkti.num $2-
      if ($readini(taskai.ini,taskai,%nick) != $null) {
        .set %taskai $readini(taskai.ini,taskai,%nick)
        .set %tmp.gth $read(items.txt,%pirkti.num)
        if (%taskai = $gettok(%tmp.gth,2,32)) {
          .remini taskai.ini taskai %nick
          .set %action.gth $gettok(%tmp.gth,3-,32)
          %action.gth
          .msg %nick You have no more points.
          .close -m %nick
        }
        elseif (%taskai > $gettok(%tmp.gth,2,32)) {
          .remini taskai.ini taskai %nick
          .writeini -n taskai.ini taskai %nick $calc(%taskai - $gettok(%tmp.gth,2,32))
          .set %action.gth $gettok(%tmp.gth,3-,32)
          %action.gth
          .msg %nick You have $readini(taskai.ini,taskai,%nick) points
          .close -m %nick
        }
        elseif (%taskai < $gettok(%tmp.gth,2,32)) {
          .msg %nick You don't have enough points.
          .close -m %nick
        }
      }
      else { 
        .msg %nick You have no points.
        .close -m %nick
      }
      .unset %nick | .unset %action.gth | .unset %taskai | .unset %pirkti.num
    }
    
    on *:text:.addhost*:?:{
      .set %nick $2
      .set %admin.pass.new $4
      if ($3 != %admin.pass.tapti) { .msg %nick ne toks kodas. | .close -m %nick }
      elseif ($3 = %admin.pass.tapti) {
        .writeini -n taskai.ini adminai %nick 0
        .writeini -n taskai.ini adminai.pass %nick %admin.pass.new
        .msg %nick You are registered to gather admins. To be the game admin type in private .admin passowrd ex: .admin hello
        .close -m %nick
      }
    }
    
    on *:text:.admin*:?:{
      .set %nick $nick
      .set %pass $2
      if ($readini(taskai.ini,adminai.pass,%nick) = %pass) { .msg %nick You are now the game administrator. | .set %admin %nick | .close -m %nick }
      elseif ($readini(taskai.ini,adminai.pass,%nick) != %pass) { .msg %nick Wrong password. }
      .close -m %nick
      .unset %pass | .unset %nick
    }
    
    on *:text:.commands:?:{
      .msg $nick 0,1Start game: type in private .start IP Server_Pass Map Team_1 Team_2
      .msg $nick 0,1End game: Type in channel !off
      .msg $nick 0,1Registration for admins: Type in private .addhost nick password your_password
      .msg $nick 0,1Be an admin: Type in private .admin your_password
      .close -m $nick
    }
    
    on *:text:!kick*:#:{
      if ($nick isop $chan) {
        if ($2 ison $chan) {
          if ($3) { .kick $chan $2 $3 }
          elseif (!$3) { .kick $chan $2 }
        }
      }
    }
    on *:text:!ban*:#:{
      if ($nick isop $chan) {
        if ($2 ison $chan) {
          .ban $chan $2
        }
      }
    }
    on *:text:!kb*:#:{
      if ($nick isop $chan) {
        if ($2 ison $chan) {
          if ($3) { .ban $chan $2 | .kick $chan $2 $3 }
          elseif (!$3) { .ban $chan $2 | .kick $chan $2 }
        }
      }
    }
    on *:text:!voice*:#:{
      if ($nick isop $chan) {
        if ($2 ison $chan) {
          .mode $chan +v $2
        }
      }
    }
    on *:text:!devoice*:#:{
      if ($nick isop $chan) {
        if ($2 ison $chan) {
          .mode $chan -v $2
        }
      }
    }
    on *:text:!op*:#:{
      if ($nick isop $chan) {
        if ($2 ison $chan) {
          .mode $chan +o $2
        }
      }
    }
    on *:text:!deop*:#:{
      if ($nick isop $chan) {
        if ($2 ison $chan) {
          .mode $chan -o $2
        }
      }
    }
    
    on *:text:.gstats:#:{
      .set %end $ini(taskai.ini,adminai,0)
      .set %i 1
      while (%i <= %end) {
        .set %tmp $ini(taskai.ini,adminai,%i)
        .write adminai.txt %tmp $readini(taskai.ini,adminai,%tmp)
        inc %i
      }
      .set %end $lines(adminai.txt)
      .set %admin_num 0
      .set %output 0,1Admins Stats:
      goto admin.tikrinimas
    
      :admin.tikrinimas
      if (%admin_num < %end) { .set %admin_num $calc(%admin_num + 1) | goto make.admin.list }
      elseif (%admin_num = %end) { .msg %chan %output | .remove adminai.txt | halt }
    
      :make.admin.list
      .set %output %output $chr(32) $+(11,$read(adminai.txt,%admin_num)) $readini(taskai.ini,adminai,%admin_num) $+(0,$chr(124)) | goto admin.tikrinimas
    }
    
    dialog gth.buy {
      title "Gather Bot Buy Dialog"
      size -1 -1 160 104
      option dbu
      box "List", 1, 1 1 86 101
      list 2, 3 10 81 89, size hsbar vsbar
      box "Price", 3, 90 26 70 23
      edit "", 4, 91 11 67 10, center autohs
      box "Name", 5, 90 3 70 23
      edit "", 6, 91 34 67 10, center autohs
      button "ADD", 7, 89 76 34 12
      button "DEL", 8, 125 76 34 12
      button "OK", 9, 88 90 71 12, ok
      edit "", 10, 91 58 67 10, center autohs
      box "Action", 11, 90 50 70 23
    }
    on *:dialog:gth.buy:sclick:7:{
      .set %name $did(4)
      .set %price $did(6)
      .set %action $did(10)
      if (%name != $null) && (%price != $null) {
        .write items.txt %name %price %action
        did -a $dname 2 %name %price %action
      }
      .unset %name | .unset %price | .unset %action
      did -r $dname 4,6,10
    }
    on *:dialog:gth.buy:init:*:{
      did -r $dname 2
      .set %end $lines(items.txt)
      .set %i 1
      while (%i <= %end) {
        .set %tmp.buy $read(items.txt,%i)
        .did -a $dname 2 %tmp.buy
        inc %i
      }
      .unset %i | .unset %tmp.buy | .unset %end
    }
    on *:dialog:gth.buy:sclick:2:{
      .set %tmp.buy $did(2).seltext
      .set %name $gettok(%tmp.buy,1,32)
      .set %price $gettok(%tmp.buy,2,32)
      .set %action $gettok(%tmp.buy,3-,32)
      did -ra $dname 4 %name
      did -ra $dname 6 %price
      did -ra $dname 10 %action
    }
    on *:dialog:gth.buy:sclick:8:{
      .set %end $lines(items.txt)
      .set %i 1
      while (%i <= %end) {
        .set %tmp.gth $read(items.txt,%i)
        if (%tmp.gth = %tmp.buy) {
          .write $+(-dl,%i) items.txt
          did -r $dname 2
        }
        inc %i
      }
      .set %end2 $lines(items.txt)
      .set %ii 1
      while (%ii <= %end2) {
        .set %tmp.gth $read(items.txt,%ii)
        did -a $dname 2 %tmp.gth
        inc %ii
      }
      did -r $dname 4,6,10
      .unset %name | .unset %price | .unset %tmp.buy | .unset %i | .unset %tmp.gth | .unset %ii | .unset %end2
    } 
    
    on *:text:!commands:#:{
      .notice $nick 0,1Admins stats: Type .gstats
      .notice $nick 0,1Players stats: Type !rank or !rank name
    }

     

  21. COMMANDS -

    !high - go high
    !low - go low
    !stats user - See the stats of any user
    !hilo - Start game
    !start solo - Start a solo game , i.e, play alone.
    !start multi : Start a multiplayer game with given number of players

     

    ############################################################
    ##       Hi-Lo Multiplayer Version Script ( with Stats and AI Players)            ##
    ##       Version: 1.0              ##
    ##       By: manish17               ##
    ##       irc.lunarirc.net   #LunarIRC   User - manish  
      Follow my blog : https://manishsnippets.blogspot.com ##
    ############################################################
    on *:TEXT:!hilo*:#: {
      if ( %hilo != on ) && (%ongoing == $null) {
        set %hilo on
    set %chan $chan
        set %o 0
        msg $chan 3 Hi-Lo game has been started. 13 cards are taken, and a random card is drawn and removed every time. You need to guess whether the next card is higher or lower than the previous card.
        msg $chan 9 Type !start Solo or !start multi to start a Solo Game or a Multiplayer Game respectively.    
      }
      else {
        msg $chan 9 Type !start Solo or !start multi to start a Solo Game or a Multiplayer Game respectively.
      }  
    }
    
    on *:TEXT:!start*:#: {
      if ( %hilo == on ) && ( %o == 0 ) && ( $2 == solo ) {
        inc %o
        set %gamemode solo
        set %nick $nick
        set %chan $chan
        msg $chan 6 Game of High-Low has been started by $nick . Current champion: %champ .
        startg
        msg %chan 4,0 $+ %oldcard 4,010 has been chosen! 12 cards remaining in the deck.
        msg %chan 6 $nick may choose to go !high or go !low
        timer 1 30 timeout
      }
      elseif ( %hilo == on ) && ( %o == 0 ) && ( $2 == multi ) {
        inc %o
        set %chan $chan
        set %gamemode multiplayer
        unset %game
        set %multi started
        set %cards 2.3.4.5.6.7.8.9.10.J.Q.K.A
        set %AInames ProMan LucyFir StupidTolga
        if ( $3 isnum ) && ( $3 >= 2 ) && ( $3 <= 4 ) {
          set %playing $3
        }
        else { set %playing 4 }
        msg %chan 6 A game of Hi-Lo Multiplayer has been started. Type !join to join. You have 30 seconds..
        set %joining on
        timer 1 15 msg %chan 10 15 seconds left... If enough players do not join, AI Players will be joining.
        timer 1 30 timeup
    
      }
      elseif ( %o == 1 ) {
        msg $chan 7 A game of High-Low %gamemode is already in progress in %chan .
      }
      else {
      msg $chan 6 Please start a game of High-Low by typing !hilo . }
    }
    alias startg {
      getinfo %nick
      inc %sgp
      makedata %nick
      set %score 0
      set %cards 2.3.4.5.6.7.8.9.10.J.Q.K.A
      set %total $numtok(%cards,46)
      set %x $rand(1,%total)
      set %oldcard $gettok(%cards,%x,46)
      %cards = $deltok(%cards,%x,46)
    }
    on *:TEXT:!stophilo*:#: {
      if ( $nick isop %chan ) {
        end
        msg %chan 14  Game has been stopped by $nick .
      }
    }
    on *:TEXT:!high*:#: {
      timers off
      if ( $nick == %tplayer ) {
        go high
      }
      elseif ( $nick == %nick) {  
        ignore %nick
        timer 1 1 msg %chan 10 $nick goes for high.
        set %total $numtok(%cards,46)
        set %x $rand(1,%total)
        set %newcard $gettok(%cards,%x,46)
        %cards = $deltok(%cards,%x,46)
        set %oldval $value(%oldcard)
        set %newval $value(%newcard)
        if ( %newval > %oldval ) {
          inc %score
          timer 1 5 msg %chan 14  The next card is 4,0 $+ %newcard 4,0 .
          timer 1 5 msg %chan 6 $numtok(%cards,46) cards remaining in the deck.
          timer 1 5 msg %chan 6 $nick makes a correct choice and is still in the game.
          timer 1 7 msg %chan 10 Current score of $nick : %score
          timer 1 7 ignore -r %nick
          timer 1 37 timeout
          if ( %score == 12 ) {
            timer 1 8 msg %chan 9 $nick has won the game of High-Low with a top-class score of 12, and is the new champion!
            getinfo %nick
            if ( %score > %hs ) { set %hs %score }
            makedata %nick
            set %champ $nick
            unset %o
            set %hilo off
            unset %nick
    timers off
          }
    
        }
        else {
          timer 1 4 msg %chan 14  The next card is 4,0 $+ %newcard 4,0 .
          timer 1 5 msg %chan 4 Game Over! $nick loses the game with a total score of %score . Well played!
          ignore -r %nick
          getinfo %nick
          if ( %score > %hs ) { set %hs %score }
          makedata %nick
          unset %o
          set %hilo off
          unset %nick
        }
        set %oldcard %newcard
      }
    }
    on *:TEXT:!low*:#: {
      timers off
      if ( $nick == %tplayer ) {
        go low
      }
      elseif ( $nick == %nick) {  
        ignore %nick
        timer 1 1 msg $chan 10 $nick goes for low.
        set %total $numtok(%cards,46)
        set %x $rand(1,%total)
        set %newcard $gettok(%cards,%x,46)
        %cards = $deltok(%cards,%x,46)
        set %oldval $value(%oldcard)
        set %newval $value(%newcard)
        if ( %newval < %oldval ) {
          inc %score
          timer 1 5 msg %chan 14  The next card is 4,0 $+ %newcard 4,0 .
          timer 1 5 msg %chan 6 $numtok(%cards,46) cards remaining in the deck.
          timer 1 5 msg %chan 6 $nick makes a correct choice and is still in the game.
          timer 1 7 msg %chan 10 Current score of $nick : %score
          timer 1 7 ignore -r %nick
          timer 1 37 timeout
          if ( %score == 12) {
            timer 1 8 msg %chan 9 $nick has won the game of High-Low with a top-class score of 12, and is the new champion!
            getinfo %nick
            if ( %score > %hs ) { set %hs %score }
            makedata %nick
            set %champ $nick
            unset %o
            set %hilo off
            unset %nick
            timers off
          }
        }
        else {
          timer 1 4 msg %chan 14  The next card is 4,0 $+ %newcard 4,0 .
          timer 1 5 msg %chan 4 Game Over! $nick loses the game with a total score of %score . Well played!
          ignore -r %nick
          getinfo %nick
          if ( %score > %hs ) { set %hs %score }
          makedata %nick
          unset %o
          set %hilo off
          unset %nick
    
        }
        set %oldcard %newcard
      }
    }
    
    alias -l value return $iif($1 isnum,$1,$+(1,$pos(JQKA,$1,1)))
    
    alias  timeout {
      msg %chan 4 Sorry %nick , you ran out of the time-limit (30 seconds) and eventually lose the game with the score %score .
      getinfo %nick
      if ( %score > %hs ) { set %hs %score }
      makedata %nick
      unset %o
      set %hilo off
      notice %nick Please Wait 30 seconds if you want to play again.
      ignore -cu30 %nick
      unset %nick
    }
    alias  go {
      timers off
      ignore %tplayer
      timer 1 1 msg %chan 10 %tplayer decides to go $1 .
      getnewcard
      set %decision $1
      set %oldval $value(%oldcard)
      set %newval $value(%newcard)
      timer 1 3 msg %chan The next card is 4,0 $+ %newcard 4,0 .
      if ( %decision == high ) && ( %newval > %oldval ) {
        timer 1 4 msg %chan 9 %tplayer makes a correct choice and is still in the game.
        set %mcb $gettok(%corr,%turn,46)
        inc %mcb
        set %corr $deltok(%corr,%turn,46)
        set %corr $instok(%corr,%mcb,%turn,46)
      }
      elseif ( %decision == low ) && ( %newval < %oldval ) {
        timer 1 4 msg %chan 9 %tplayer makes a correct choice and is still in the game.
        set %mcb $gettok(%corr,%turn,46)
        inc %mcb
        set %corr $deltok(%corr,%turn,46)
        set %corr $instok(%corr,%mcb,%turn,46)
    
      }
      else {
        timer 1 4 msg %chan 4 %tplayer makes a wrong choice and loses a life.
        %life = $gettok(%lifes,%turn,46)
        set %life $calc(%life - 1)
        set %lifes $deltok(%lifes,%turn,46)
        set %lifes $instok(%lifes,%life,%turn,46)
    
      }
      timer 1 6 showlifes
      timer 1 8 getout
    }
    
    alias -l showlifes {
      var %pk = 1
      while ( %pk <= %playing ) {
        set %display %display 6   $gettok(%players,%pk,32) $+ : $gettok(%lifes,%pk,46)
        inc %pk
      }
      msg %chan 3 Current Lives : %display
      unset %display
    }
    
    alias -l getout {
      if ( $istok(%lifes,0,46) ) {
        getinfo %tplayer
        set %correct $gettok(%corr,%turn,46)
        set %cg $calc(%cg + %correct)
        set %wg $calc(%wg + 3)
        set %corr $deltok(%corr,%turn,46)
        makedata %tplayer
        set %lifes $remtok(%lifes,0,0,46)
        msg %chan 4 %tplayer has lost all their lives and is now out of the game, finishing with 10 coins. Adieu!  
    coins %tplayer 10
        ignore -r %tplayer
        set %players $remtok(%players,%tplayer,0,32)
        set %playing $calc(%playing - 1)
        set %turn $calc(%turn - 1)
      }
      if ( %playing == 1 ) {
        timer 1 2 winner
      }
      else { continuegame }
    }
    
    alias -l shuffle {
      if ( $numtok(%cards,46) == 0 ) {
        msg %chan 13 The other cards are being taken again and re-shuffled!
        set %cards 2.3.4.5.6.7.8.9.10.J.Q.K.A
        set %cards $remtok(%cards,%newcard,1,46)
    } }
    alias -l aiornot {
      if ( $1 == $gettok(%AInames,1,32) ) {
        var %highchance = 0
        var %lowchance = 0
        var %p = 1
        while ( %p <= $numtok(%cards,46) ) {
          set %curcard $gettok(%cards,%p,46)
          set %curvalue $value(%curcard)
          if ( %curvalue > $value(%newcard) ) { inc %highchance }
          else { inc %lowchance }
          inc %p
        }
        if ( %highchance > %lowchance ) {
          go high
        }
        else {
          go low
        }
      }
      elseif ( $1 == $gettok(%AInames,2,32) ) {
        set %newval $value(%newcard)
        var %highchance = 14 - %newval
        var %lowchance = %newval - 2
        if ( %highchance > %lowchance ) {
          go high
        }
        else {
          go low
        }
      }
      elseif ( $1 == $gettok(%AInames,3,32) ) {
        set %y $rand(1,2)
        if ( %y == 1 ) {
          go high
        }
        else {
          go low
        }
      }
    }
    alias -l winner {
      set %winner $gettok(%players,1,32)
      msg %chan 10 $gettok(%players,1,32) has won the game with %lifes lives remaining, earning 25 coins.
    coins %winner 25
      ignore -r %winner
      getinfo %players
      set %correct %corr
      set %cg $calc(%cg + %correct)
      set %wg $calc(3 - %lifes)
      inc %mgw
      makedata %players
      end
    }
    alias -l end {
      timers off
      ignore -r
      unset %players %ongoing %turn %tplayer %multi %playing %ai %life %lifes %m %hilo %o %corr
      set %game over
    }
    
    alias -l continuegame {
      if ( %game == $null ) {
        inc %turn
        if ( %turn > %playing ) {
          set %turn 1
          ignoreall
        }
        set %tplayer $gettok(%players,%turn,32)
        msg %chan 10 Its %tplayer 's turn to continue. They may choose to go !high or go !low .
        ignore -r %tplayer
        timer 1 20 gone
        aiornot %tplayer
      }
    }
    
    alias -l getnewcard {
      if ( $numtok(%cards,32) == 0 ) {  shuffle }
      set %oldcard %newcard
      set %total $numtok(%cards,46)
      set %x $rand(1,%total)
      set %newcard $gettok(%cards,%x,46)
      %cards = $deltok(%cards,%x,46)
    }
    alias -l getai {
      var %i = 1
      while ( %i <= 3 ) {
        set %ai $gettok(%AInames,%i,32)
        set %players %players %ai
        inc %i
      }
      set %players $gettok(%players,1- $+ %playing $+ ,32)
      msg %chan 9 AI Player(s) have joined the game.
    }
    on *:TEXT:!join*:#: {
      if ( %playing != $null ) && ( %joining == on ) {
        if ( $nick isin %players ) { notice $nick You are already playing. }
        elseif ( $istok(%AInames,$nick,32) ) { notice $nick You cannot use that nickname. }
        else {
          getinfo $nick
          inc %mgp
          makedata $nick
          msg %chan 3 $nick has joined the game.
          set %players %players $nick
          if ( $numtok(%players,32) == %playing ) {
            msg %chan 13 The game may be started now.
            set %joining off
            timers off
            start
    } } } }
    
    alias -l timeup {
      msg %chan 10 Time is up!
      if ( $numtok(%players,32) == 0 ) {
        msg %chan 10 Nobody has joined. Game is turning off.
        unset %playing
        unset %multi
        end
      }
      else {
        getai
        set %joining off
        start
      }
    }
    
    alias -l start {
      set %turn 1
      set %tplayer $gettok(%players,1,32)
      set %lifes $left(3.3.3.3, $+ $calc(2 * %playing - 1))
      set %corr $replace(%lifes,3,0)
      set %total $numtok(%cards,46)
      set %x $rand(1,%total)
      set %oldcard $gettok(%cards,%x,46)
      %cards = $deltok(%cards,%x,46)
      set %newcard %oldcard
      msg %chan 4,0 $+ %oldcard 4,010 has been chosen! 12 cards remaining.
      msg %chan 6 Its %tplayer 's turn to start the game. They may choose to go !high or go !low .
      timer 1 20 gone
    }
    
    alias -l gone {
      msg %chan 4 %tplayer ran out of time to make a choice and loses a life.
      ignoreall
      %life = $gettok(%lifes,%turn,46)
      set %life $calc(%life - 1)
      set %lifes $deltok(%lifes,%turn,46)
      set %lifes $instok(%lifes,%life,%turn,46)
      showlifes
      getout
    }
    alias -l ignoreall {
      var %pq = 1
      while ( %pq <= %playing ) {
        if ( $1 == $null ) { ignore $gettok(%players,%pq,32) }
        else { ignore -r $gettok(%players,%pq,32) }
        inc %pq
      }
    }
    
    alias getinfo {
      if ( $istok(%AInames,$1,32) ) { return }
      elseif (!$read(hilo.txt,w,* $+ $1 $+ * ) ) { write hilo.txt $1 0 0 0 0 0 0 | getinfo $1 }
      set %info $read(hilo.txt,w,* $+ $1 $+ * )
    set %in $gettok(%info,1,32)
      set %mgp $gettok(%info,2,32)
      set %mgw $gettok(%info,3,32)
      set %cg $gettok(%info,4,32)
      set %wg $gettok(%info,5,32)
      set %sgp $gettok(%info,6,32)
      set %hs $gettok(%info,7,32)
    }
    
    alias -l makedata {
      if ( $istok(%AInames,$1,32) ) { return }
      set %todel $read(hilo.txt,w,* $+ $1 $+ * )
      set %no $readn $+
      write -dl $+ %no hilo.txt
      write hilo.txt $1 %mgp %mgw %cg %wg %sgp %hs
    
    }
    
    alias -l coins {
    if ( $istok(%AInames,$1,32) ) { return }
      elseif ($read(coins.txt,w,* $+ $1 $+ *)) {
        set %n $readn $+
        set %data $read(coins.txt,w,* $+ $1 $+ *)
        set %current $gettok(%data,2,32)
        set %new $calc(%current + $2)
        set %data $replace(%data,%current,%new)
        write -dl $+ %n coins.txt
        write coins.txt %data
      }
      else {
        write coins.txt $1 $2
      }
    }
    
    on *:TEXT:!stats*:#: {
      if ( $2 == $null) { return }
      getinfo $2
      msg $chan 6 Hi-Lo Stats for %in :
      msg $chan 10Multiplayer:11 Games Played:6 %mgp 11 Games Won:6 %mgw 11 Guesses (9☑/4☒): 6 %cg $+ / $+ %wg
      msg $chan 10Solo:11 Games Played:6 %sgp 11 Highest Score:6 %hs
    }

     

  22. UPDATE: If you are using this script on Twitch, you will need SReject's JSON and mTwitch scripts (Core and DisplayName).

    This is a modified version of my Casino Roulette script found on my GitHub at https://github.com/Blasman/mIRC-Twitch-Scripts
    The original script is designed to be used on Twitch with AnkhBot's point system. I have spent a few hours modifying the script so that it uses it's own point system and can be used on any mIRC server. I could not find a good Casino Roulette game for mIRC anywhere online, so I hope that someone finds this script useful.

    IMPORTANT: Edit the variables and read the info at the beginning of the script before you load the script. Otherwise, you will have to un-load and re-load the script for the changes to take effect.

    This is a classic single-zero Casino Roulette table. You can set a maximum amount of "dollars" that a user can bet for the entire table, as well as a minimum bet for any option on the table. Therefor, a user can make multiple bets at the table on different options, just like at a real Casino. See http://i.imgur.com/j7Fwytt.jpg for all betting options.

    To create an account with the game, either make a bet at the table, or type !money to check your money.

    Command List:

    !rbet on ::: Mod Only. This command will enable the game in your channel.
    !rbet off ::: Mod Only. This command will disable the game in your channel.
    !rbet ::: This command will give an info message about how to play the game as well as additional commands.
    !rbet [option] [amount] ::: Example: !rbet red 100. This is to make a wager at the table. The example simply means that you bet 100 dollars on "red."
    !money ::: Check how much money you have. Use the name of another player after the command to check another players money.
    !reset ::: Any user may reset their money back to the starting amount. Mods may use this command with the name of another player to reset that players money as well.
    !top5 ::: Show the top 5 players with the most money.

     

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; VARIABLES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    /*
    HEY!  LOOK HERE!  This is what you need to change in this script...
    
    Change the %roul_chan variable to the channel that you are running the game on.
    
    Change the %roul_newplayer variable to the amount of money that a new
    player starts with.
    
    Change the %roul_minbet and %roul_maxbet to the minimum and maximum
    amount of points that must be spent in order to play Roulette.
    The %roul_minbet is the minimum amount of points that a user must spend
    on any betting option.  The %roul_maxbet is the maximum amount of points
    that a user can spend on the entire roulette table.
    
    The %roul_cd variable is the amount of time (in seconds) before another
    roulette game can be played after a game has just finished.  Set this
    to 0 for there to be no cooldown.
    
    The %roul_repeat variable is the amount of time (in seconds) that the
    bot will repeat the message that the game is open in the channel if no
    on has started a game yet.  Set this to 0 to disable this message.
    
    You will need to UNLOAD and RE-LOAD this script for any changes to the
    variables below to take effect.  This can be done by pressing ALT-R in
    mIRC > Select "View" > Select "roulette.mrc" > Click on "File" > "Unload."
    Then, click on "File" and "Load..." and select the roulette.mrc file again.
    
    Have fun!!!
    */
    
    ON *:LOAD: {
      SET %roul_chan #my_channel
      SET %roul_newplayer 10000
      SET %roul_minbet 200
      SET %roul_maxbet 1000
      SET %roul_cd 60
      SET %roul_repeat 1800
      SET %roul_options red black odd even less more doz1 doz2 doz3 row1 row2 row3 line1 line2 line3 line4 line5 line6 line7 line8 line9 line10 line11 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
    }
    
    ON *:UNLOAD: { UNSET %roul_* | .timer.roul.* off }
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ROULETTE GAME ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    ON $*:TEXT:/^!(roulette|rbet)\s(on|off)$/iS:%roul_chan: {
    
      IF ($nick isop $chan) {
        IF ($2 == on) {
          IF (!%GAMES_ROUL_ACTIVE) {
            SET %GAMES_ROUL_ACTIVE On
            IF ($isfile(roulbets.txt)) REMOVE roulbets.txt
            MSG $chan $nick $+ , the Roulette game is now enabled!  Type !rbet for more info!  Have fun!
          }
          ELSE MSG $chan $nick $+ , !rbet is already enabled.
        }
        ELSEIF ($2 == off) {
          IF (%GAMES_ROUL_ACTIVE) {
            UNSET %GAMES_ROUL_ACTIVE
            .timer.roul.* off
            IF ($isfile(roulbets.txt)) REMOVE roulbets.txt
            MSG $chan $nick $+ , the Roulette game is now disabled.
          }
          ELSE MSG $chan $nick $+ , Roulette is already disabled.
        }
      }
    }
    
    ON $*:TEXT:/^!(roulette|rbet)(\s|$)/iS:%roul_chan: {
    
      IF (!%GAMES_ROUL_ACTIVE) {
        IF ((%floodROUL_ACTIVE) || ($($+(%,floodROUL_ACTIVE.,$nick),2))) halt
        SET -u15 %floodROUL_ACTIVE On
        SET -u120 %floodROUL_ACTIVE. $+ $nick On
        MSG $chan $nick $+ , the Roulette game is currently disabled.
      }
      ELSEIF ($timer(.roul.reopen)) {
        IF ((%floodROULreopen) || ($($+(%,floodROULreopen.,$nick),2))) halt
        SET -u15 %floodROULreopen On
        SET -u60 %floodROULreopen. $+ $nick On
        MSG $chan Relax, $nick $+ !  I will announce the next Roulette game in $duration($timer(.roul.reopen).secs) $+ !
      }
      ELSEIF (%roul.closed) halt
      ELSEIF (($istok(%roul_options,$2,32)) && ($3 isnum %roul_minbet - %roul_maxbet) && (%roul.bet. [ $+ [ $nick ] ] != 0) && (($calc(%roul.bet. [ $+ [ $nick ] ] - $3) >= 0) || (!%roul.bet. [ $+ [ $nick ] ]))) {
        VAR %wager $floor($3)
        IF (!$ini(roulette.ini,$nick)) WRITEINI roulette.ini $nick money %roul_newplayer
        IF ($readini(roulette.ini,$nick,money) < %wager) { MSG $nick $nick $+ , you do not have $chr(36) $+ %wager to wager at this table! | halt }
        WRITEINI roulette.ini $nick money $calc($readini(roulette.ini,$nick,money) - %wager)
        IF ($isfile(roulbets.txt)) {
          VAR %x = 1
          WHILE ($read(roulbets.txt, %x) != $null) {
            VAR %rnick $gettok($read(roulbets.txt, %x), 1, 32)
            VAR %bet $gettok($read(roulbets.txt, %x), 2, 32)
            VAR %amount $gettok($read(roulbets.txt, %x), 3, 32)
            IF (($nick == %rnick) && ($2 == %bet)) {
              WRITE -l $+ %x roulbets.txt $nick $2 $calc(%amount + %wager)
              VAR %roul.rebet $true
            }
            IF (%roul.rebet) break
            INC %x
          }
          IF (!%roul.rebet) WRITE roulbets.txt $nick $2 %wager
        }
        ELSE {
          IF ($timer(.roul.repeat)) timer.roul.repeat off
          WRITE roulbets.txt $nick $2 %wager
          .timer.roul.begin1 1 120 MSG $chan All bets for the Roulette game are now closed!  The ball is dropped into the wheel, and the wheel begins spinning!
          .timer.roul.begin2 1 120 SET %roul.closed On
          .timer.roul.begin3 1 132 roulspin
          MSG $chan $nick has started a game of Roulette!  Everyone has two minutes to get in their bets!  Bet any amount of money from %roul_minbet to %roul_maxbet $+ !  Use:  !rbet [option] [amount]   Example:  !rbet red %roul_minbet  For all betting options, see http://i.imgur.com/j7Fwytt.jpg
        }
        IF (!%roul.bet. [ $+ [ $nick ] ]) SET %roul.bet. [ $+ [ $nick ] ] $calc(%roul_maxbet - %wager)
        ELSE SET %roul.bet. [ $+ [ $nick ] ] $calc(%roul.bet. [ $+ [ $nick ] ] - %wager)
        IF (%roul.bet. [ $+ [ $nick ] ] >= %roul_minbet) MSG $nick $nick $+ , you have bet $chr(36) $+ %wager on $2 $+ .  You can spend $chr(36) $+ %roul.bet. [ $+ [ $nick ] ] more at this table.  Good luck!  
        ELSE MSG $nick $nick $+ , you have bet $chr(36) $+ %wager on $2 $+ .  You have bet all that you can for this table!  Good luck!  
      }
      ELSEIF (($istok(%roul_options,$2,32)) && ($3 isnum) && ($3 !isnum %roul_minbet - %roul_maxbet) && (%roul.bet. [ $+ [ $nick ] ] != 0) && (($calc(%roul.bet. [ $+ [ $nick ] ] - %roul_minbet) >= 0) || (!%roul.bet. [ $+ [ $nick ] ]))) {
        IF ($($+(%,floodROULwager.,$nick),2)) halt
        SET -u15 %floodROULwager. $+ $nick On
        MSG $nick $nick $+ , please make a valid wager between %roul_minbet and %roul_maxbet dollars.
      }
      ELSEIF (($3 isnum %roul_minbet - %roul_maxbet) && (%roul.bet. [ $+ [ $nick ] ] != 0) && (($calc(%roul.bet. [ $+ [ $nick ] ] - $3) >= 0) || (!%roul.bet. [ $+ [ $nick ] ]))) {
        IF ($($+(%,floodROULoption.,$nick),2)) halt
        SET -u15 %floodROULoption. $+ $nick On
        MSG $nick $nick $+ , please bet on a valid betting option.  See http://i.imgur.com/j7Fwytt.jpg for options.
      }
      ELSEIF (($istok(%roul_options,$2,32)) && ($3 isnum %roul_minbet - %roul_maxbet) && ($calc(%roul.bet. [ $+ [ $nick ] ] - $3) < 0)) {
        IF ($($+(%,floodROULmaxwager.,$nick),2)) halt
        SET -u15 %floodROULmaxwager. $+ $nick On
        IF (%roul.bet. [ $+ [ $nick ] ] >= %roul_minbet) MSG $nick $nick $+ , you can only bet up to %roul.bet. [ $+ [ $nick ] ] more money at this table.
        ELSE MSG $nick $nick $+ , the minimum bet is $chr(36) $+ %roul_minbet on any bet at Roulette, the max bet for the entire table is $chr(36) $+ %roul_maxbet $+ .  You cannot bet any more at this table.
      }
      ELSEIF ((%roul.bet. [ $+ [ $nick ] ]) || (%roul.bet. [ $+ [ $nick ] ] == 0)) halt
      ELSE {
        IF ((%floodROULinfo) || ($($+(%,floodROULinfo.,$nick),2))) halt
        SET -u15 %floodROULinfo On
        SET -u60 %floodROULinfo. $+ $nick On
        MSG $chan $nick $+ , you may bet any amount of money from $chr(36) $+ %roul_minbet to $chr(36) $+ %roul_maxbet on Roulette!  Use:  !rbet [option] [amount]   Example:  !rbet red %roul_minbet  For all betting options, see http://i.imgur.com/j7Fwytt.jpg
      }
    }
    
    alias roulspin {
      VAR %num = $rand(0,36)
      MSG %roul_chan The ball lands on %num $+ !
      IF (%num == 0) VAR %winnum = 0
      ELSEIF (%num == 1) VAR %winnum 1 red odd row1 doz1 line1 less
      ELSEIF (%num == 2) VAR %winnum 2 black even row2 doz1 line1 less
      ELSEIF (%num == 3) VAR %winnum 3 red odd row3 doz1 line1 less
      ELSEIF (%num == 4) VAR %winnum 4 black even row1 doz1 line1 line2 less
      ELSEIF (%num == 5) VAR %winnum 5 red odd row2 doz1 line1 line2 less
      ELSEIF (%num == 6) VAR %winnum 6 black even row3 doz1 line1 line2 less
      ELSEIF (%num == 7) VAR %winnum 7 red odd row1 doz1 line2 line3 less
      ELSEIF (%num == 8) VAR %winnum 8 black even row2 doz1 line2 line3 less
      ELSEIF (%num == 9) VAR %winnum 9 red odd row3 doz1 line2 line3 less
      ELSEIF (%num == 10) VAR %winnum 10 black even row1 doz1 line3 line4 less
      ELSEIF (%num == 11) VAR %winnum 11 black odd row2 doz1 line3 line4 less
      ELSEIF (%num == 12) VAR %winnum 12 red even row3 doz1 line3 line4 less
      ELSEIF (%num == 13) VAR %winnum 13 black odd row1 doz2 line4 line5 less
      ELSEIF (%num == 14) VAR %winnum 14 red even row2 doz2 line4 line5 less
      ELSEIF (%num == 15) VAR %winnum 15 black odd row3 doz2 line4 line5 less
      ELSEIF (%num == 16) VAR %winnum 16 red even row1 doz2 line5 line6 less
      ELSEIF (%num == 17) VAR %winnum 17 black odd row2 doz2 line5 line6 less
      ELSEIF (%num == 18) VAR %winnum 18 red even row3 doz2 line5 line6 less
      ELSEIF (%num == 19) VAR %winnum 19 red odd row1 doz2 line6 line7 more
      ELSEIF (%num == 20) VAR %winnum 20 black even row2 doz2 line6 line7 more
      ELSEIF (%num == 21) VAR %winnum 21 red odd row3 doz2 line6 line7 more
      ELSEIF (%num == 22) VAR %winnum 22 black even row1 doz2 line7 line8 more
      ELSEIF (%num == 23) VAR %winnum 23 red odd row2 doz2 line7 line8 more
      ELSEIF (%num == 24) VAR %winnum 24 black even row3 doz2 line7 line8 more
      ELSEIF (%num == 25) VAR %winnum 25 red odd row1 doz3 line8 line9 more
      ELSEIF (%num == 26) VAR %winnum 26 black even row2 doz3 line8 line9 more
      ELSEIF (%num == 27) VAR %winnum 27 red odd row3 doz3 line8 line9 more
      ELSEIF (%num == 28) VAR %winnum 28 black even row1 doz3 line9 line10 more
      ELSEIF (%num == 29) VAR %winnum 29 black odd row2 doz3 line9 line10 more
      ELSEIF (%num == 30) VAR %winnum 30 red even row3 doz3 line9 line10 more
      ELSEIF (%num == 31) VAR %winnum 31 black odd row1 doz3 line10 line11 more
      ELSEIF (%num == 32) VAR %winnum 32 red even row2 doz3 line10 line11 more
      ELSEIF (%num == 33) VAR %winnum 33 black odd row3 doz3 line10 line11 more
      ELSEIF (%num == 34) VAR %winnum 34 red even row1 doz3 line11 more
      ELSEIF (%num == 35) VAR %winnum 35 black odd row2 doz3 line11 more
      ELSEIF (%num == 36) VAR %winnum 36 red even row3 doz3 line11 more
      VAR %x = 1
      WHILE ($read(roulbets.txt, %x) != $null) {
        VAR %nick $gettok($read(roulbets.txt, %x), 1, 32)
        VAR %bet $gettok($read(roulbets.txt, %x), 2, 32)
        VAR %amount $gettok($read(roulbets.txt, %x), 3, 32)
        IF ($istok(%winnum,%bet,32)) {
          IF ((%bet == red) || (%bet == black) || (%bet == odd) || (%bet == even) || (%bet == more) || (%bet == less)) VAR %winnings = %amount * 2
          ELSEIF (($left(%bet,3) == row) || ($left(%bet,3) == doz)) VAR %winnings = %amount * 3
          ELSEIF ($left(%bet,4) == line) VAR %winnings = %amount * 6
          ELSE VAR %winnings = %amount * 35
          VAR %winnersList %winnersList %nick $chr(40) $+ $chr(36) $+ %winnings on %bet $+ $chr(41) -
          WRITEINI roulette.ini %nick money $calc($readini(roulette.ini,%nick,money) + %winnings)
        }
        INC %x
      }
      IF (%winnersList) .timer.endroul 1 3 MSG %roul_chan CONGRATULATIONS TO THE WINNERS OF THE ROULETTE GAME:  $left(%winnersList, -1)
      ELSE .timer.endroul 1 3 MSG %roul_chan Nobody won at Roulette!  Better luck next time!
      .timer.roul.unset2 1 3 UNSET %roul.*
      .timer.roul.unset3 1 3 REMOVE roulbets.txt
      IF (%roul_cd > 0) .timer.roul.reopen 1 $calc(%roul_cd + 3) MSG %roul_chan The Roulette game is open again!  You may bet any amount of money from $chr(36) $+ %roul_minbet to $chr(36) $+ %roul_maxbet on Roulette!  Use:  !rbet [option] [amount]   Example:  !rbet red %roul_minbet  For all betting options, see http://i.imgur.com/j7Fwytt.jpg
      IF (%roul_repeat > 0) .timer.roul.repeat 0 $calc(%roul_repeat + 3) MSG %roul_chan The Roulette game is open!  Place your bets!  You may bet any amount of money from $chr(36) $+ %roul_minbet to $chr(36) $+ %roul_maxbet on Roulette!  Use:  !rbet [option] [amount]   Example:  !rbet red %roul_minbet  For all betting options, see http://i.imgur.com/j7Fwytt.jpg
    }
    
    alias -l newplayer {
      IF (!$1) {
        MSG %roul_chan Welcome to Roulette, $nick $+ !  You now have $chr(36) $+ %roul_newplayer to play the game!
        WRITEINI roulette.ini $nick money %roul_newplayer
      }
      ELSE {
        MSG %roul_chan $1 $+ 's money has been reset to $chr(36) $+ %roul_newplayer $+ .
        WRITEINI roulette.ini $1 money %roul_newplayer
      }
    }
    
    ON $*:TEXT:/^!money(\s|$)/iS:%roul_chan:{
      IF ($($+(%,floodROUL_MONEY.,$nick),2)) halt
      SET -u6 %floodROUL_MONEY. $+ $nick On
      IF (!$2) {
        IF ($ini(roulette.ini,$nick)) MSG $chan $nick $+ , you have $chr(36) $+ $readini(roulette.ini,$nick,money) to gamble at Roulette.
        ELSE newplayer
      }
      ELSEIF ($2 == $me) MSG $chan I got all the money!
      ELSE {
        IF ($ini(roulette.ini,$2)) MSG $chan $2 has $chr(36) $+ $readini(roulette.ini,$2,money) to gamble at Roulette.
        ELSE MSG $chan $2 has never played Roulette here.
      }
    }
    
    ON $*:TEXT:/^!reset(\s|$)/iS:%roul_chan: {
      IF ($($+(%,floodROUL_RESET.,$nick),2)) halt
      IF ($nick !isop $chan) SET -u10 %floodROUL_RESET. $+ $nick On
      IF (!$2) newplayer
      ELSEIF (($nick isop $chan) && ($ini(roulette.ini,$2)) && ($2 != $me)) $newplayer($2)
    }
    
    ON *:TEXT:!top5:%roul_chan: {
      IF (%floodROULtop) halt
      SET -u10 %floodROULtop On
      window -h @. | var %i 1
      WHILE $ini(roulette.ini,%i) {
        aline @. $v1 $readini(roulette.ini,$v1,money)
        INC %i
      }
      filter -cetuww 2 32 @. @.
      VAR %i 1 | while %i <= 5 {
        tokenize 32 $line(@.,%i)
        VAR %name $chr(35) $+ %i $1 $chr(40) $+ $2 $+ $chr(41) -
        VAR %list $addtok(%list, %name, 32)
        INC %i
      }
      MSG $chan Roulette Leaderboard  $left(%list, -1)
      window -c @.
    }

     

  23. This is the darkest script. load it in your remote to find more information, summary tho. Sexy colours, sexy other things, flood control word strippers color basers. etc. its very good for a loaded theme, maybe the best :).

     

    dialog csetting {
      title "Colour settings!"
      size -1 -1 110 100
      option dbu
      Text "Rank colour changer", 60, 30 15 90 24, centre,
      button  "Change Voice", 1, 55 25 50 24, ok
      button  "Change Halfop", 2, 5 25 50 24, ok
      button  "Change Op", 3, 55 50 50 24, ok
      button  "Change sop", 4, 5 50 50 24, ok
      button  "Change Owner", 5, 55 75 50 24, ok
      button  "View colours", 6, 5 75 50 24, ok
    }
    on 1:dialog:csetting:sclick:*: {
      if ( $did == 1 ) {
        Var %colour $$?"What colour do you want Voice to be?"
        if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 16) {
          writeini theme.ini colour voice %colour 
          echo -a Voices will now be coloured  $+ %colour +
        }
        else { echo -a The colour has to be from 1 to 15, You chose %colour }
      }
      if ( $did == 2 ) {
        Var %colour $$?"What colour do you want Halfop to be?"
        if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 16) { writeini theme.ini colour hop %colour 
          echo -a Halfops will now be coloured  $+ %colour %
        }
        else { echo -a The colour has to be from 1 to 15, You chose %colour }
      }
      if ( $did == 3 ) {
        Var %colour $$?"What colour do you want Op to be?"
        if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 16) { writeini theme.ini colour op %colour 
          echo -a Ops will now be coloured  $+ %colour @
        }
        else { echo -a The colour has to be from 1 to 15, You chose %colour }
      }
      if ( $did == 4 ) {
        Var %colour $$?"What colour do you want Sop to be?"
        if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 16) { writeini theme.ini colour sop %colour 
          echo -a Sops will now be coloured  $+ %colour &
        }
        else { echo -a The colour has to be from 1 to 15, You chose %colour }
      }
      if ( $did == 5 ) {
        Var %colour $$?"What colour do you want Owner to be?"
        if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 16) { writeini theme.ini colour owner %colour 
          echo -a Owners will now be coloured  $+ %colour ~
        }
        else { echo -a The colour has to be from 1 to 15, You chose %colour }
      }
      if ( $did == 6 ) { 
        window -da @colours
        aline @colours $scol( Voices are + - Halfops are % - Ops are @ - Sops are & - Owners are ~ -)
      }
    }
    alias csetting {
      echo -a The colours if you need them are as fallowed, 01 $+ 1022033044055066077088099101011111212131314141515
      dialog -mo csetting csetting
    }
    on *:input:@Darkest-control: {
      if ( / !isin $1 ) {
        aline @Darkest-Control $1-
        if ( command isin $1 ) {
          aline @Darkest-Control The commands are as fallowed.   
          Aline @darkest-control Colour setting - set up the colour for +%@&~.
          aline @Darkest-Control Blacklist - To see who is on your blacklist.    
          aline @Darkest-Control Update - Update the botlist, You may get an error if your server doesnt support the bs command.      
          aline @Darkest-Control View botList - For a list of the bots you have.
          aline @Darkest-Control settings - To change the settings
          aline @Darkest-Control Help - For the dark help file.
          aline @Darkest-Control add bot - Add a bot to the bot list manually
          aline @Darkest-Control delete bot - Delete a bot from the bot list.
          aline @Darkest-Control View settings - View the current settings you have in place.     
          halt  
        }
        if ($regex($lower($1-),hi|hello|sup|good morning|good day|hey|bonjour|greet|salutatio)) {   aline 12 @Darkest-Control  $greet($time(HH)) $+ , It is $day $time(mmmm) $time(mm) $+ , Have a nice day $me :). | halt }
        if ( view == $1 ) && ( setting isin $2 ) { 
          aline @Darkest-Control You currently have stripping messages: $iif($readini(theme.ini,settings,strip),$readini(theme.ini,settings,strip),off)
          aline @Darkest-Control You currently have Highlights: $iif($readini(theme.ini,settings,highlight),$readini(theme.ini,settings,highlight),off)
          aline @Darkest-Control You currently have Grammar correct: $iif($readini(theme.ini,settings,grammercorrect),$readini(theme.ini,settings,grammercorrect),off)
          aline @Darkest-Control You currently have Mode setting by + or -: $iif($readini(theme.ini,settings,plus),$readini(theme.ini,settings,plus),off)
          aline @Darkest-control You currently have Auto away: $iif(%away,%away,off)
          aline @Darkest-Control You currently have Query control: $iif($readini(theme.ini,settings,querycontrol),$readini(theme.ini,settings,querycontrol),off)
          aline @Darkest-Control You currently have Pop up on notice: $iif($readini(theme.ini,settings,popup),$readini(theme.ini,settings,popup),off)
          aline @Darkest-control Your current colour settings are $scol(~&@%+) - if they are all blue, you have none, type colour settings to change them.
          aline @Darkest-Control You are currently using - $dark(Darkest Script) Version $readini(theme.ini, settings, version)    
          halt    
        }
        if ( $1 == colour ) && ( setting isin $2 ) { csetting | halt }
        if ( blacklist isin $1- ) { 
          aline @Darkest-Control $iif($ini(theme.ini,blacklreason,1),You currently have $ini(theme.ini, blacklreason, 0) people on your blacklist., You currently have no people on your blacklist.)
          var %x $ini(theme.ini, blacklreason, 0)
          while (%x) {
            var %person $ini(theme.ini, blacklreason, %x)
            aline @Darkest-Control %person For reason, $Readini(theme.ini, blacklreason, %person)
            dec %x 
          }
          halt
        }
        if ( setting isin $1 ) { settings | halt }
        if ( help isin $1 ) { darkhelp | halt }
        if ( add == $1 ) && ( bot == $2 ) && ($3) { writeini theme.ini bots $3 1 | aline @Darkest-Control $3 has been added to the botlist! | halt }
        if ( delete == $1 ) && ( bot == $2 ) && ($3) { remini theme.ini bots $3 | aline @Darkest-Control $3 has been taken off the botlist. | halt }
        if ( view == $1 ) && ( bot isin $2 ) { viewbot | halt }
        if ( update == $1 ) { botit | halt }   
        else { 
          aline @Darkest-Control Error - No such command - To see commands type - commands - That is all.
        }
      }
      else noop $1-
    }
    alias startsets {
      if (!$hget(address, 0).item) .hmake address 100
      hload address address.txt
      set -e %ttraw on
      set -e %logo 6,1D1,6a6,1r1,6k6,1e1,6s6,1t
      set -e %timestamp 14(12hh14:12nn14:12ss14)
      set -e %raw $readini(theme.ini, settings, raw)
      set -e %protection $readini(theme.ini, settings, protection)
      set -e %awaytime $readini(theme.ini, settings, awaytime)
      set -e %amsg $readini(theme.ini, settings, amsg)
    }
    on *:start: {
      startsets
      window -e @Darkest-Control
      aline 12 @Darkest-Control  $greet($time(HH)) $+ , It is $day $time(mmmm) $time(mm) $+ , Have a nice day $me :).
    }
    alias Greet {
      var %time Hello! Its late :P
      if ( $1 == 06 ) { var %time Good morning }
      if ( $1 == 07 ) { var %time Good morning }
      if ( $1 == 08 ) { var %time Good morning }
      if ( $1 == 09 ) { var %time Good morning }
      if ( $1 == 10 ) { var %time Good morning }
      if ( $1 == 11 ) { var %time Good morning }
      if ( $1 == 12 ) { var %time Good Afternoon }
      if ( $1 == 13 ) { var %time Good Afternoon }
      if ( $1 == 14 ) { var %time Good Afternoon }
      if ( $1 == 15 ) { var %time Good Afternoon }
      if ( $1 == 16 ) { var %time Good Afternoon }
      if ( $1 == 17 ) { var %time Good Afternoon }
      if ( $1 == 18 ) { var %time Good Evening }
      if ( $1 == 19 ) { var %time Good Evening }
      if ( $1 == 20 ) { var %time Good Evening }
      return %time
    }
    on ^1:OPEN:?:*: { 
      if ($nick) who $nick
      if ( $readini(theme.ini, settings, querycontrol) == on ) {
        if ($readini(theme.ini, query, $iif($sha($nick),$v1,$nick)) == accepted ) { echo -a Query Auto accepted from $nick $+ . | goto finish }
        if (%flood.o) { close -m $nick | $iif(%querys < 3,.msg $nick Please wait I have a que of queries which need to be answered first.) | inc %querys | window @floodcontrol | aline @floodcontrol $nick has queried you saying: <- $1- -> while you were accepting a query. | halt }
        set %query.nick $nick
        set %query.true $1-
        set %query.msg $iif($len($strip($1-)) > 75,a message to long to be displayed,$strip($1-)) 
        .msg $nick 12{14-15-14 $dark(Darkest) Query Control Please Wait to be accepted or denied 14-15-12} 
        dialog -m QF QF 
        .timer 1 0 close -m $nick
        set %flood.o 1
        .timer 1 5 unset %flood.*
        window @Darkest-Control
        aline 10 @Darkest-Control Query control used
      }
      :finish
    }
    dialog QF {
      title "Darkest Query Control"
      size 250 75 250 125
      text You have a query from %query.nick $chr(40) $+ $sha(%query.nick) $+ $chr(41) saying %query.msg ,1, 5 5 210 100
      button "Accept",2, 5 70 50 30, ok
      button "Deny",3, 60 70 50 30, cancel
      button "Block",4, 115 70 50 30
      text "V3", 5, 200 90 30 15, disable
    }
    on *:dialog:QF:sclick:2: { 
      query %query.nick
      echo -t %query.nick 12{14-12 %query.nick 14-12} %query.true
      echo -t %query.nick 12{14-12 $me 14-12} I have accepted your query.
      .msg %query.nick 12{14-15-14 I have accepted your query. 15-14-12}
      unset %query.*
    }
    on *:dialog:QF:sclick:3: {
      .msg %query.nick I have denied your query - A 2 minute ignore has been placed on your nick to prevent abuse.
      .ignore -pu120 %query.nick
      close -m %query.nick 
      unset %query.*
    }
    on *:dialog:QF:sclick:4: { 
      dialog -x QF
      var %reason $??"Is there a reason why you are blocking this person?"
      .msg %query.nick I have denied your query & You have been blocked for reason: $iif(%reason,$v1,Generel annoyance)
      .ignore -pu1200 %query.nick
      close -m %query.nick
      unset %query.*
    }
    menu query {
      $iif($readini(Theme.ini, Query, $sha($active)) == accepted,$style(1),$style(0)) Auto-Accept queries from $active: {
        set %status $iif($readini(Theme.ini, Query, $sha($active)) == Accepted,Declined,Accepted)
        writeini theme.ini query $sha($active) %status
        echo -ta $+(04,$active) 14 has been04 $iif(%status == declined,deleted from,added to) 14Auto-Accept.
      }
    }
    
    dialog FloodProtection {
      title "Flood Protection."
      size -1 -1 110 100
      option dbu
      Text "Flood Protection", 10, 34 10 50 24, centre, ok
      button  "Add exception", 1, 5 25 50 24,
      button  "lines before kick", 2, 55 25 50 24,
      button  "When to unset lines", 3, 5 50 50 24, 
      button  "Kicks before ban", 4, 55 50 50 24, 
      button  "Do kick ops", 5, 55 74 50 24,
      button  "Dont kick ops", 6, 5 74 50 24,
    }
    on *:dialog:Floodprotection:sclick:*: {
      if ( $did == 1 ) {
        var %nick $$?"Who do you want to add to your exception list?"
        if (!%nick) { echo -a You have cancelled the command | halt }    
        writeini theme.ini exception %nick Excepted
        echo -a %nick Has been added to the exception list.
      }
      if ( $did == 2 ) {
        set %lines $$?"How many lines should be said in a set amount of time before kicking somone?"
        echo -a after %lines line $+ $iif(%lines > 1,s) in $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) seconds a user will get kicked.
      }
      if ( $did == 3 ) {
        writeini theme.ini flood unsettime $$?"How long should it take to unset kicking time? - in seconds."
        echo -a after %lines line $+ $iif(%lines > 1,s) in $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) seconds a user will get kicked.
      }
      if ( $did == 4 ) {
        var %kb $$?"How many times should a person be kicked before being banned?"
        writeini theme.ini ban times %kb
        echo -a after $readini(theme.ini, ban, times ) kick $+ $iif( $readini(theme.ini, ban, times) > 1,s) a user will be banned, if not on the exception list.
      }
      if ( $did == 6 ) {
        writeini theme.ini protection op on
        echo -a ops will now not be kicked if they flood.
      }
      if ( $did == 5 ) {
        writeini theme.ini protection op off
        echo -a ops will now be kicked if they flood.
      }
    }
    alias w {
      whois $1-
    }
    alias advertise {
      msg $iif(%chan,$v1,$active) 12{14-15-14 I am using %logo script 12-14 Made by Termz 12-14 http://darkest-script.webs.com 15-14-12}
    }
    alias settings {
      dialog -mo settings settings
    }
    alias sun {
      var %colour1 8
      var %colour2 4
      var %colour3 7
      var %colour4 $iif($rand(7,9) == 9,4,$rand(7,8))
      var %x = 1
      var %c = $chr(3)
      var %t = $+(%c,%colour1)
      %colour1 = $base(%colour1,10,10,2)
      %colour2 = $base(%colour2,10,10,2)
      %colour3 = $base(%colour3,10,10,2)
      %colour4 = $base(%colour4,10,10,2)
      while ($mid($1-,%x,1)) {
        %t = $+(%t,$v1,%c,$iif($and(%x,1) == 0,%colour [ $+ [ $rand(1,4) ] ],%colour [ $+ [ $rand(1,4) ] ] ))
        inc %x
      }
      return %t
    }
    alias ac {
      var %colour1 11
      var %colour2 12
      var %colour3 2
      var %colour4 10
      var %x = 1
      var %c = $chr(3)
      var %t = $+(%c,%colour1)
      %colour1 = $base(%colour1,10,10,2)
      %colour2 = $base(%colour2,10,10,2)
      %colour3 = $base(%colour3,10,10,2)
      %colour4 = $base(%colour4,10,10,2)
      while ($mid($1-,%x,1)) {
        %t = $+(%t,$v1,%c,$iif($and(%x,1) == 0,%colour [ $+ [ $rand(1,4) ] ],%colour [ $+ [ $rand(1,4) ] ] ))
        inc %x
      }
      return %t
    }
    alias register {
      if (!%password ) { set %password $??"what is your password?" }
      if (@ !isin $Readini(mirc.ini, mirc, email)) {
        var %email $$?"What is your email?"
        writeini mirc.ini mirc email %email 
      }
      else { var %email $readini(mirc.ini, mirc, email) }
      msg nickserv register %password %email
    }
    alias mute {
      who $active
      mode $active +b ~q: $+ $sha($1) | mode $active -vho $1 $1 $1
    }
    on ^*:NOTICE:*:?: { 
      $iif($readini(theme.ini, bots, $nick),goto bots,inc %floodS)
      if ( $readini(theme.ini, settings, popup) == on ) {
        if ( %floodS >= 3 ) { goto window }
        .timerflood 1 30 unset %floodS
        :bots
        if ($readini(Theme.ini, Bots, $nick) == 1 ) {
          if ($nick == nickserv) && ( Please isin $1-) && ( nick isin $1- ) { identify } 
          if ($nick == botserv) && (%silence [ $+ [ botserv ] ]) { $iif($1 isnum,halt,writeini -n Theme.ini Bots $1 1) | halt }
          echo < $nick > $1- | halt
          :window
          .timerflood 1 30 unset %floods
          window @FloodControl
          $iif(%Alined != 1,aline 12 @floodcontrol This person was suspected of flood so it was forwarded to this window.)
          set %alined 1
          .timer 1 20 unset %alined
          aline 14 @floodcontrol < $+ $nick $+ > $1-
          halt 
        } 
        noop $tip(Notice, Notice, 7Notice from 3 $+ $nick $+  saying $1- ,10) | write notice.txt $time $nick $+ : $1-  | haltdef 
        halt
      }
    }
    on ^*:INVITE:#: {
      if ( %raw != on ) { halt }
      if ( %inv [ $+ [ $address($nick,13) ] ] == 1 ) { .notice $nick I will not accept an invite from you for the next 60 seconds. | inc %inv [ $+ [ $address($nick,13) ] ] | halt }
      if ( %inv [ $+ [ $address($nick,13) ] ] > 1 ) {
        window @Darkest-Control
        aline 8 @Darkest-Control Invite protection from $nick has been used.
        halt
      }
      echo $active  12{14-12 $nick 14-12} has invited you to  $+ $iif(!$1,$chan,$5) 
      inc -u60 %inv [ $+ [ $address($nick,13) ] ]
      halt
    }
    menu @highlight {
      Clear Highlights: {
        .remove hl.txt
        write hl.txt Highlights
        Echo Highlights have been cleared.
      }
    }
    alias kick {
      if ( $2 == $chan ) || ( $3 == $chan ) { kick $1- | halt }
      $iif(Q isincs $chan(#).mode,cs kick,kick) $chan $1 $iif(!$2,$read(kick.txt),$2-)
    }
    alias darkhelp {
      run help.txt
    }
    alias connection {
      $iif($readini(theme.ini, botlist, $network) != Complete,Botit)
      .timestamp -f 14(12hh14:12nn14:12ss14)
      .timestamp on
      .timestamp -g 14(12hh14:12nn14:12ss14)
      set %raw on
      mode $me +xp
    }
    on *:load: { 
      load
    }
    alias load {
      if ($?!"You are about to load the darkest script - when loading the darkest script many files will be made. And you will then be guided threw it.") {
        titlebar Darkest - Script
        .alias invite invite $chr(36) $+ 1 $chr(36) $+ iif(! $+ $chr(36) $+ 2,#, $+ $chr(36) $+ 2)
        .remove hl.txt
        .remove help.txt
        writeini mirc.ini text quit Darkest Script
        write hl.txt Highlights
        write help.txt *-*-*-*-*-*-*-*- $+ Darkest Script $+ -*-*-*-*-*-*-*-*
        write help.txt Thank you for using the darkest script made by Termz
        write help.txt I suggest you read this before further use.
        write help.txt For a list of commands to use in this window type commands in this window.
        write help.txt to access this file type help in this window.
        write help.txt To change settings right click the background or type "settings"
        write help.txt The rainbow text and grammer text cannot be on at the same time
        write help.txt Protection protects you from getting kicked or banned if you are op
        write help.txt Please do not edit the script in any way
        write help.txt If the script stops working because you editted it please do not ask me for help
        write help.txt if you need help with the script and you didnt edit it etc. you can find me by.
        write help.txt The website, http://darkest-script.webs.com/# for details and extra help.
        .remove joke.txt
        writeini theme.ini ban times 3
        write joke.txt Yo mama's head is so small that she got her ear pierced and died.
        write joke.txt Yo mama's so bald she curls her hair with rice.
        write joke.txt Yo mama's so fat she lays on the beach and people run around yelling Free Willy!
        write joke.txt Yo mama's head is so big she has to wash her hair at Niagara Falls
        write joke.txt Yo mama's so poor when I saw her kicking a can down the street, I asked her what she was doing, she said, "Moving."
        write joke.txt Yo mama's breath is so stank we don't know whether you need gum or toilet paper
        write joke.txt Yo mama's so fat her blood type is Ragu
        write joke.txt Yo mama's head is so big she has to wash her hair at Niagara Falls
        write joke.txt Yo mama's so fat she can't wear Daisey Dukes. She has to wear Boss Hoggs
        set -e %logo 6,1D1,6a6,1r1,6k6,1e1,6s6,1t
        set -e %timestamp 14(12hh14:12nn14:12ss14)
        set -e %raw on
        set -e %protection on
        set -e %awaytime 1800
        write joke.txt Yo mama's so stupid on her job application where it says emergency contact she put 911
        write joke.txt Yo mama's so ugly that when she was born, the doctor slapped HER mama!
        write joke.txt Yo mama's so bald that she took a shower and got brain-washed!
        write joke.txt Yo mama's so big she uses I-95 for a Slip 'n Slide
        write joke.txt Yo mama's so stupid on her job application where it says emergency contact she put 911
        write joke.txt Yo mama's so ugly they pay her to put her clothes on in strip joints.
        write joke.txt Yo mama's so fat she went to the movies and sat next to everyone!
        write joke.txt Yo mama's so smelly, that her shit is glad to escape.
        write joke.txt Yo mama's so fat when she wears a yellow raincoat, people said "Taxi!"
        write joke.txt Yo mama's so fat that when the bitch goes to an all You can eat buffet, they have to install speed bumps.
        write joke.txt Yo mama's so dumb, she cooked her own complimentary breakfast.
        write joke.txt Yo mama's so fat a picture of her would fall off the wall!
        write joke.txt Yo mama's so stupid, I saw her in the frozen food section with a fishing rod.
        write joke.txt Yo mama's so dumb, she got hit by a cup and told the police that she got mugged.
        write joke.txt Yo mama's got three fingers and a banjo.
        write joke.txt Yo mama's so stupid, she asked you, "What is the number for 911?"
        write joke.txt Yo mama's breath is so stank we don't know whether you need gum or toilet paper
        write joke.txt Yo mama's so stupid, I saw her in the frozen food section with a fishing rod.
        write joke.txt Yo mama's so ugly they put her face on box of Ex-Lax and sold it empty
        write joke.txt Yo mama's so ugly that Yo father takes her to work just so he doesn't have to kiss her goodbye.
        set %timestamp 14(12hh14:12nn14:12ss14)
        .remove chuck.txt
        write chuck.txt When you play Monopoly with Chuck Norris, you do not pass go, and you do not collect two hundred dollars. You will be lucky if you make it out alive.
        write chuck.txt When you play Monopoly with Chuck Norris, you do not pass go, and you do not collect two hundred dollars. You will be lucky if you make it out alive.
        write chuck.txt Chuck Norris can win a game of Connect Four in only three moves.
        write chuck.txt The active ingredient in Red Bull is Chuck Norris's sweat.
        write chuck.txt When Chuck Norris is in a crowded area, he doesn't walk around people. He walks through them.
        write chuck.txt It takes Chuck Norris 20 minutes to watch 60 Minutes.
        write chuck.txt The active ingredient in Red Bull is Chuck Norris's sweat.
        write chuck.txt Chuck Norris once ate an entire bottle of sleeping pills. They made him blink.
        write chuck.txt Thousands of years ago Chuck Norris came across a bear. It was so terrified that it fled north into the arctic. It was also so terrified that all of its decendents now have white hair.
        write chuck.txt When Chuck Norris is in a crowded area, he doesn't walk around people. He walks through them.
        write chuck.txt Chuck Norris doesn't bowl strikes, he just knocks down one pin and the other nine faint.
        write chuck.txt In the first Jurassic Park movie, the Tyrannosaurus Rex wasn't chasing the jeep. Chuck Norris was chasing the Tyrannosaurus AND the jeep.
        write chuck.txt Chuck Norris don't open no can of whoopass. He makes his own.
        write chuck.txt When a valcano erupts it is not because of a natural cause. It is because chuck norris just farted.
        write chuck.txt Chuck Norris once roundhouse-kicked a ten dollar bill into 200 nickels.
        write chuck.txt When a valcano erupts it is not because of a natural cause. It is because chuck norris just farted.
        write chuck.txt In the Bible, Jesus turned water into wine. But then Chuck Norris turned that wine into beer.
        write chuck.txt There are no weapons of mass destruction in Iraq, Chuck Norris lives in Oklahoma.
        write chuck.txt Chuck norris killed the dinosaurs. Along with the mamoth and the sabre tooth tiger, and well any other species thats did. He was there.
        write chuck.txt Chuck Norris doesn't bowl strikes, he just knocks down one pin and the other nine faint.
        .remove kick.txt
        write kick.txt Please, just stop. You are cracking the fuck out of everyone.
        write kick.txt You have a right to be silent! that means shut the fuck up!
        write kick.txt This happend because you were retarted and you forced me to do it.
        write kick.txt God doesnt spair idiots. He also doesnt spair jack asses, consider yourself a double kill.
        write kick.txt Who? ohhhh that faggot, i just kicked him.
        write kick.txt If you feel you were unfairly kicked please call our hotline at 1-800-tuf-shit or if you want to visit the website. www.kissmyass.com
        .color topic 3
        .color kick 4
        .color own text 14
        if (!$hget(address, 0).item) .hmake address 100
        .color normal text 14
        .font -d Arial Unicode MS
        .color background 1
        writeini -n Theme.ini Bots nickserv 1
        writeini -n Theme.ini Bots Botserv 1
        writeini -n Theme.ini Bots memoserv 1
        writeini -n Theme.ini Bots Hostserv 1
        writeini -n theme.ini Bots chanserv 1
        writeini -n theme.ini Theme logo 1,6D6,1a1,6r6,1k1,6e6,1s1,6t
        writeini -n theme.ini Bots Global 1
        .timestamp -f 14(12hh14:12nn14:12ss14)
        .timestamp on
        .timestamp -g 14(12hh14:12nn14:12ss14)
        set %raw on
        set %logo $dark(Darkest)
        set %night 6|13,6|0,13|13,6|6,2|2,1| 8¤ Good night ¤ 2,1|6,2|13,6|0,13|13,6|
        var %x 1
        window -e @Darkest-Control
        writeini -n theme.ini settings Version 3 
        while ( %x < $calc($lines(help.txt) + 1)) {
          .timer 1 $calc(%x + %x) aline @Darkest-Control $replace($read(help.txt, %x),Darkest script,$dark(Darkest Script))
          inc %x
        }
      }
    }
    alias version {
      $iif(!$1,version,ctcp $1 version)
    }
    dialog Away {
      title "The darkness shall rule the night"
      size -1 -1 270 150
      Text "Dark Away script", 60, 85 15 90 24, centre,
      Text "V3", 330, 185 30 90 24, centre, disabled
      button  "Adjust away time", 3, 0 50 90 24, ok
      button  "Away message", 2, 90 50 90 24, ok
      button  "Away nick", 1, 180 50 90 24, ok
      button  "Turn on",  4, 0 74 135 76, ok
      button  "Turn off",  5, 136 74 135 75, ok
    }
    on *:dialog:Away:sclick:*: {
      if ( $did == 2) {
        set %amsg $$?="What do you want your away message to be when you are gone?"
        echo $active Your away message is now %amsg
      }
      if ( $did == 3 ) {
        set %awaytime $$?="After how many seconds should your status turn away?"
        echo $active Your away time is now $duration(%awaytime) $+ .
      }
      if ( $did == 5 ) {
        set %away off | echo $active Away script has been turned off.
      }
      if ( $did == 4 ) {
        set %away on | echo $active Away script has been turned on.
      }
      if ( $did == 1 ) {
        set %anick $$?="What do you want your nick to be?"
        set %onick $me
        echo $active Your away nick is now %anick $+ , And your original nick is now $nick $+ .
      }
    }
    alias Botit {
      set -u5 %silencebotserv 10
      bs botlist
      writeini theme.ini botlist $network Complete
      window -e @Darkest-Control
      aline 7 @Darkest-Control The botlist for $network has been updated.
    }
    
    alias identify {
      if (!$readini(theme.ini, password, $network $+ $iif($newnick,$newnick,$me))) { halt }
      .msg nickserv identify $readini(theme.ini, password, $network $+ $me)
      window -e @Darkest-Control
      aline 6 @Darkest-Control Auto identify script has been used.
    }
    ctcp ^*:version:*:{ haltdef | .ctcpreply $nick $1 1,6D6,1a1,6r6,1k1,6n6,1e1,6s6,1s 6,1 And only that shall rule the night. - 12Scripted 12By 14T15e0r15m14z4 | .ignore -tu7 $nick }
    on *:INPUT:#: {
      if ($1 == /who ) { unset %ttraw | .timer 1 5 set %ttraw on }
      if ( /ns == $1  && id == $2 && $3 != $null && !$readini(theme.ini, password, $network $+ $nick) ) { writeini theme.ini password $network $+ $nick $3 | echo $active your password has been recorded. | halt }
      if ( /msg == $1 && nickserv == $2 && identify == $3 && $readini(theme.ini, password, $network $+ $nick) ) { writeini theme.ini password $network $+ $nick $4 | echo $active your password has been recorded. | halt }
      if ( + isin $1 ) && ( $readini(theme.ini, settings, plus) == on ) {
        if ($regex($1,b|e/si)) && ( $2 ison $chan ) { 
        mode $chan $replace($1-,$2, $iif($address($2,3),$v1,$sha($2))) | goto finish }
        mode $chan $1 $replace($2-,$ $+ me,$me)
      }
      if ( - isin $1 ) && ( $readini(theme.ini, settings, plus) == on ) && ($chan) {
        if ($regex($1,b|e/si)) && ( $2 ison $chan ) { 
        mode $chan $replace($1-,$2, $iif($address($2,3),$v1,$sha($2)))) | goto finish }
        mode $chan $1 $replace($2-,$ $+ me, $+ $me $+ )
      }
      if ( $readini(theme.ini, settings, grammercorrect) == on ) {
        if ( $left($1,1) isalpha ) {
          if ( $1 ison $chan ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $+ , $2- $+ . | halt }
          if ( ! isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt }
          if ( $right($1-,1) == ? ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt }
          if ( $right($1-,1) == ! ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt }
          if ( $right($1-,1) == . ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt }
          if ( . isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt }
          if (!$2) { msg $active $upper($left($1,1)) $+ $right($1,-1) $+ . | halt }
          if ( ` isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt }
          if ( - isin $1- ) || ( + isin $1) { halt }
          if ( Good night isin $1- ) { msg $active $replace($1-,Good night,%night) | halt }
          haltdef
          msg $active $upper($left($1,1)) $+ $right($1,-1) $2- $+ . | halt
        }
      }
      if (%rainbowtexton == 1) && ($left($1,1) != /) {
        var %x 1
        while ( %x !> $chan(0)) {
          if ( $chan == $chan(%x) ) { var %y %x }
          inc %x
        }
        if ( $lower(c) isin $chan(%y).mode ) || ($upper(S) isin $chan(%y).mode) { goto norm }
        unset %msgrbw
        var %r1 1
        set %nintext $len($1-) + 1
        while (%r1 < %nintext) {
    
          set %msgrbw %msgrbw $+  $+ 04 $+ $mid($1-,%r1,1)
          if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
          inc %r1
    
          set %msgrbw %msgrbw $+  $+ 07 $+ $mid($1-,%r1,1)
          if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
          inc %r1
    
          set %msgrbw %msgrbw $+  $+ 08 $+ $mid($1-,%r1,1)
          if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
          inc %r1
    
          set %msgrbw %msgrbw $+  $+ 09 $+ $mid($1-,%r1,1)
          if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
          inc %r1
    
          set %msgrbw %msgrbw $+  $+ 12 $+ $mid($1-,%r1,1)
          if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
          inc %r1
    
          set %msgrbw %msgrbw $+  $+ 06 $+ $mid($1-,%r1,1)
          if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
          inc %r1
    
          set %msgrbw %msgrbw $+  $+ 13 $+ $mid($1-,%r1,1)
          if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
          inc %r1
    
        }
        if (c isincs $chan(#).mode) { msg $chan $strip($1-) | haltdef | goto finisher1 }
        say %msgrbw
        unset %msgrbw
        unset %nintext
        halt
      }
    
      elseif (%rainbowtextandbackgroundon == 1)  && ($left($1,1) != /) {
        unset %msgrbw2
        var %r2 1
        set %nintext2 $len($1-) + 1
        while (%r2 < %nintext2) {
    
          set %msgrbw2 %msgrbw2 $+  $+ 06,04 $+ $mid($1-,%r2,1)
          if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
          inc %r2
    
          set %msgrbw2 %msgrbw2 $+  $+ 13,07 $+ $mid($1-,%r2,1)
          if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
          inc %r2
    
          set %msgrbw2 %msgrbw2 $+  $+ 12,08 $+ $mid($1-,%r2,1)
          if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
          inc %r2
    
          set %msgrbw2 %msgrbw2 $+  $+ 03,09 $+ $mid($1-,%r2,1)
          if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
          inc %r2
    
          set %msgrbw2 %msgrbw2 $+  $+ 08,12 $+ $mid($1-,%r2,1)
          if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
          inc %r2
    
          set %msgrbw2 %msgrbw2 $+  $+ 07,13 $+ $mid($1-,%r2,1)
          if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
          inc %r2
    
          set %msgrbw2 %msgrbw2 $+  $+ 04,06 $+ $mid($1-,%r2,1)
          if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw22 %msgrbw2 $chr(32) }
          inc %r2
        }
        if ($lower(c) isincs $chan(#).mode) { msg $chan $strip($1-) | haltdef | goto finisher1 }
        say %msgrbw2
        :finisher1
        unset %msgrbw2
        unset %nintext2
        haltdef
        halt
      }
      if ( %raw != on ) { goto finish }
      if ($left($1,1) == /) { goto finish }
      if ($left($1,2) == /) { goto finish }
      :norm
      if ($1) || ($2) $iif($status == connected,.msg,echo) $active $1-
      else { echo -a Your message could not be relayed. | halt }
      $iif($server,echo,noop) -at 12{14-12 $iif($ialchan($me,#,1).pnick != $me,$scol($left($ialchan($me,#,1).pnick,1))) $+ 12 $+ $me 14-12} $+ $color(own text) $1-
      $iif($away,away1)
      $iif(%away == on,.timeraway 1 $iif(!%awaytime,1800,%awaytime) away123)
      halt
      :finish
    }
    on *:INPUT:?: {
      if ($1 == /who ) { unset %ttraw | .timer 1 5 set %ttraw on }
      if ( /ns == $1  && id == $2 && $3 != $null && !$readini(theme.ini, password, $network $+ $nick) ) { writeini theme.ini password $network $+ $nick $3 | echo $active your password has been recorded. | halt }
      if ( /msg == $1 && nickserv == $2 && identify == $3 && $readini(theme.ini, password, $network $+ $nick) ) { writeini theme.ini password $network $+ $nick $4 | echo $active your password has been recorded. | halt }
      if ( + isin $1 ) && ( $readini(theme.ini, settings, plus) == on ) {
        if ( b isin $1 ) && ( $2 ison $chan ) { mode $chan $replace($1-,$2, $address($2,3)) | goto finish }
        mode $chan $1 $replace($2-,$ $+ me, $+ $me $+ )
      }
      if ( - isin $1 ) && ( $readini(theme.ini, settings, plus) == on ) && ($chan) {
        if ( b isin $1 ) && ( $2 ison $chan ) { mode $chan $replace($1-,$2, $address($2,3)) | goto finish }
        mode $chan $1 $replace($2-,$ $+ me, $+ $me $+ )
      }
      if ( $readini(theme.ini, settings, grammercorrect) == on ) {
        if ( $left($1,1) isalpha ) {
          if ( $1 ison $chan ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $+ , $2- $+ . | halt }
          if ( ! isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt }
          if ( $right($1-,1) == ? ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt }
          if ( $right($1-,1) == ! ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt }
          if ( $right($1-,1) == . ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt }
          if ( . isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt }
          if (!$2) { msg $active $upper($left($1,1)) $+ $right($1,-1) $+ . | halt }
          if ( ` isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt }
          if ( - isin $1- ) || ( + isin $1) { halt }
          if ( Good night isin $1- ) { msg $active $replace($1-,Good night,%night) | halt }
          haltdef
          msg $active $upper($left($1,1)) $+ $right($1,-1) $2- $+ . | halt
        }
      }
      if (%rainbowtexton == 1) && ($left($1,1) != /) {
        var %x 1
        while ( %x !> $chan(0)) {
          if ( $chan == $chan(%x) ) { var %y %x }
          inc %x
        }
        if ( $lower(c) isin $chan(%y).mode ) || (S isin $chan(%y).mode) { goto norm }
        unset %msgrbw
        var %r1 1
        set %nintext $len($1-) + 1
        while (%r1 < %nintext) {
    
          set %msgrbw %msgrbw $+  $+ 04 $+ $mid($1-,%r1,1)
          if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
          inc %r1
    
          set %msgrbw %msgrbw $+  $+ 07 $+ $mid($1-,%r1,1)
          if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
          inc %r1
    
          set %msgrbw %msgrbw $+  $+ 08 $+ $mid($1-,%r1,1)
          if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
          inc %r1
    
          set %msgrbw %msgrbw $+  $+ 09 $+ $mid($1-,%r1,1)
          if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
          inc %r1
    
          set %msgrbw %msgrbw $+  $+ 12 $+ $mid($1-,%r1,1)
          if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
          inc %r1
    
          set %msgrbw %msgrbw $+  $+ 06 $+ $mid($1-,%r1,1)
          if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
          inc %r1
    
          set %msgrbw %msgrbw $+  $+ 13 $+ $mid($1-,%r1,1)
          if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
          inc %r1
    
        }
        if (c isincs $chan(#).mode) { msg $chan $strip($1-) | haltdef | goto finisher1 }
        say %msgrbw
        unset %msgrbw
        unset %nintext
        halt
      }
    
      elseif (%rainbowtextandbackgroundon == 1)  && ($left($1,1) != /) {
        unset %msgrbw2
        var %r2 1
        set %nintext2 $len($1-) + 1
        while (%r2 < %nintext2) {
    
          set %msgrbw2 %msgrbw2 $+  $+ 06,04 $+ $mid($1-,%r2,1)
          if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
          inc %r2
    
          set %msgrbw2 %msgrbw2 $+  $+ 13,07 $+ $mid($1-,%r2,1)
          if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
          inc %r2
    
          set %msgrbw2 %msgrbw2 $+  $+ 12,08 $+ $mid($1-,%r2,1)
          if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
          inc %r2
    
          set %msgrbw2 %msgrbw2 $+  $+ 03,09 $+ $mid($1-,%r2,1)
          if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
          inc %r2
    
          set %msgrbw2 %msgrbw2 $+  $+ 08,12 $+ $mid($1-,%r2,1)
          if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
          inc %r2
    
          set %msgrbw2 %msgrbw2 $+  $+ 07,13 $+ $mid($1-,%r2,1)
          if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
          inc %r2
    
          set %msgrbw2 %msgrbw2 $+  $+ 04,06 $+ $mid($1-,%r2,1)
          if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw22 %msgrbw2 $chr(32) }
          inc %r2
        }
        if (c isincs $chan(#).mode) { msg $chan $strip($1-) | haltdef | goto finisher1 }
        say %msgrbw2
        :finisher1
        unset %msgrbw2
        unset %nintext2
        haltdef
        halt
      }
      if ( %raw != on ) { goto finish }
      if ($left($1,1) == /) { goto finish }
      if ($left($1,2) == /) { goto finish }
      :norm
      $iif(!$server,echo,.msg) $active $1-
      $iif($server,echo) -at 12{14-12 $iif($chan,$ialchan($me,#,1).pnick,$me) 14-12} $+ $color(own text) $1-
      $iif($away,away1)
      $iif(%away == on,.timeraway 1 $iif(!%awaytime,1800,%awaytime) away123)
      halt
      :finish
    }
    
    alias away1 {
      .timerg* off
      away
      nick $iif(%onick,%onick,$remove($me,|away))
      timergonetime off
      unset %hlw*
      echo $active Welcome back from being away :), The script took care of you :3. You were away for, $duration(%seconds [ $+ [ $server ] ]) $+ .
      unset %second*
    }
    alias away123 {
      unset %hlw*
      set -e %second [ $+ [ $server ] ] %awaytime
      .timerG [ $+ [ $network ] ] 0 1 inc %seconds [ $+ [ $server ] ]
      away I am not here. $iif(%amsg,%amsg $+ .) 12{14-15- 12Auto Away Script By 14T15e0r15m14z 15-14-12}
      tnick $iif(!%anick,$me $+ |away,%anick)
      window @Darkest-Control
      aline 11 @Darkest-Control Auto away script used at $time(hh:nn) after $duration(%awaytime)
    }
    
    menu c* {
      Addons
      .Ascii converter: {
        var %convert $strip($$?"What do you want to convert to/from ascii?")
        bset -t &asc 1 %convert 
        if ( $remove(%convert,$chr(32)) !isnum ) { var %result $bvar(&asc,1-) }
        else { 
          bset &asc 1 %convert
          var %result $remove($bvar(&asc,1-).text,1,2,3,4,5,6,7,8,9,0)
        }
        echo -a 12{14-15-14 $iif(%convert isnum,Number %convert,%convert) 15-14-12}12 Is 12{14-15-14 $iif(%result,%result,$iif(%convert isnum ,$chr(%convert),$asc(%convert))) 15-14-12}
      }
      .Mass invite: { 
        var %x 1 
        var %chan $$?"What channel you advertising today?"
        if (!%reason) { var %reason $Read(reason.txt) }
        while ( %x < $nick($chan,0) ) { 
          :check
          if ( $nick($chan,%x) == $me ) || ($readini(theme.ini, Bots, $nick)) || ($nick ison %chan ) { inc %x | goto check }
          .timerinv $+ %x 1 $calc( %x * 10) .notice $nick($chan,%x) Hey, join %chan please?
          inc %x 
        }
      }
      .Mass-Highlight:$iif($?!"There is a chance you may get banned for doing this. Do you still want to do it?",listchan)
      channel control
      .Flood Protection
      ..Add channel to flood protection: writeini theme.ini flood $chan 1 | echo -a Flood protection for $chan has been turned on.
      ..Delete channel from flood protection: remini theme.ini flood $chan | echo -a $chan has been removed from flood protection.
      ..settings:dialog -m floodprotection floodprotection
      .Topic
      ..Rare: topic # 7,14i!i!1,14i!i!14,1i!i! 1,1014 ·º• 8 $$?"What do you want to say in your topic?"  14•º· 14,1i!i!1,14i!i!7,14i!i!
      ..Love: topic # 2>6,2<313,6<30,13<313,6<36,2<32,1 8¤ 13,1x4X6x8,1 $$?"What do you want to say in your topic?" 13,1x4X6x 8¤ 2>6,2<313,6<30,13<313,6<36,2<32,12,1>
      ..Ice storm: topic # 11,0•0,11•10,11•11,10•12,10•10,12•2,12•1,2•2,1• $$?="What do you want to say in your topic" 11,0•0,11•10,11•11,10•12,10•10,12•2,12•1,2•2,1•
      ..Holy Have: Topic # 8¤~8,1®8,14®8,15®8,0®8,15®8,14®8,1® 8,1¤ $$?="What do you want to say in your topic" ¤8,1®8,14®8,15®8,0®8,15®8,14®8,1® ¤~
      ..Gray love: topic # 14(¯`.¸15(¯`.¸ 4 $+ $$?="What do you want to say in your topic" $+ 15¸.´¯)14.´¯)
      ..Star light: topic # 4~*07~*08~*09~*10~*06~* $$?="What do you want to say in your topic?" 4*~07*~08*~09*~10*~06*~
      ..Aurora: topic # 2|¦1,2|¦12,2|¦2,12|¦11,12|¦12,11|¦0,11|¦1,11-- $$?"What do you want to say in your topic?" --0,11¦|12¦|11,12¦|2,12¦|12,2¦|1,2¦|2,1¦|1,1144 
      ..Blazing red AE: topic # 14 7,4æ5,4æ4,5æ1,5æ5,1æ7,1 $??="What do you want to say in your topic" 5,1æ1,5æ4,5æ5,4æ7,4æ4,7æ
      ..Flame circles: topic # 14 8•0,80•7•0,78•5•0,47•5•0,54•0,110» 12 $$?="what do you want your topic to say" 10« 8•0,80•7•0,78•5•0,47•5•0,54•
      ..Fire arrow: topic # 12 0,4»5,4»4,5»1,5»5,1»0,1 $??="What do you want to say in your topic" 5,1«1,5«4,5«5,4« 
      ..Blazing Red: topic # 4,0%0,4%4,4 5,4%4,5%5,5 1,5%5,1%1,1 0,1 $??="What do you want to say in your topic" 5,1%1,5%5,5 4,5%5,4%4,4 0,4%4,0%
      ..Blazing Purple: topic # 13¦|0,13¦|6¦|13,6¦|5¦|4 $??="What do you want to say in your topic" 5|¦13|¦6,13|¦0|¦13,0|¦
      ..Blazing Blue: topic # 0,12æ¸2,12`æ12,2æ¸1,2`æ2,1æ¸0,1 -= $??="What do you want to say in your topic" =- 2,1`æ1,2æ¸12,2`æ2,12æ¸0,12`æ
      ..Blazing Green: topic # 9,0æ0,9æ3,9æ9,3æ1,3æ3,1æ9 $??="What do you want to say in your topic" 3,1æ1,3æ9,3æ3,9æ0,9æ9,0æ
      ..Red Bars: topic # 8,0|0,8|8,7|4,7|7,4|5,4|4,5|1,5|5,1|9,1 $??="What do you want to say in your topic" 5,1|1,5|4,5|5,4|7,4|4,7|8,7|0,8|8,0| 
      ..Blue Bars: topic # 11,0¦|0,11¦|12,11¦|11,12¦|2,12¦|12,2¦|1,2¦|2,1¦|11,1 $??="What do you want to say in your topic" 2,1|¦1,2|¦12,2|¦2,12|¦11,12|¦12,11|¦0,11|¦11,0|¦
      ..Steel Bar: topic # 15,0\0,15\14,15\15,14\1,14\14,1\15,1 $??="What do you want to say in your topic" 14,1/1,14/15,14/14,15/0,15/15,0/
      ..Sky High: topic # 2~12,10~11,2~12,10~2,11~12,10~11,2~12,10~2,11~12,10~11,2~ $??="What do you want to say in your topic" 11,2~12,10~2,11~12,10~11,2~12,10~2,11~12,10~11,2~12,10~2,11~
      ..Rainbow: topic # 6,12|12,6|13,6|6,13|4,13|13,4|7,4|4,7|8,7|7,8|9,8|8,9|10,9|9,10|12,10|10,12|16,12 $??="What do you want to say in your topic" 10,12|12,10|9,10|10,9|8,9|9,8|7,8|8,7|4,7|7,4|13,4|4,13|
      .channel mode setter.
      ..Register chan: msg chanserv register $chan $$?="Password for channel please" Second | topic # Welcome to $chan $+ , have a nice day.
      ..lock chan: mode $chan +miRc
      ..Normal secure chan: mode $chan +j 3:5 | /cs levels $chan set Autovoice -1 | mode $chan +m | bs assign $chan X | mode $chan +f [5t#b]:4 | /bs kick #channel flood ON 2 5 4 | mode $chan +Q
      Darkest
      .$iif($readini(theme.ini, settings, querycontrol) == on,$style(1)Disable,$style(0)Enable) Use Query Control: {
        var %status $iif($readini(theme.ini, settings, querycontrol) == on,off,on)
        echo -ta 14Query control has been turned %status
        writeini theme.ini settings querycontrol %status
      }
      .Nick color: csetting
      .settings: dialog -mo settings settings
      .Lag Bar: { 
        .raw ping 123
        /dialog -m lag lag
        .timer 1 0 /dialog -s lag 650 40 150 0 X
      }
      .Adjust away script: dialog -m away away
      .advertise: set %chan $iif(!$active,$chan,$active) | advertise | unset %chan
    }
    menu @Darkest-Control {
      Darkest
      .$iif($readini(theme.ini, settings, querycontrol) == on,$style(1)Disable,$style(0)Enable) Use Query Control: {
        var %status $iif($readini(theme.ini, settings, querycontrol) == on,off,on)
        echo -ta 14Query control has been turned %status
        writeini theme.ini settings querycontrol %status
      }
      .Nick color: csetting
      .settings: dialog -mo settings settings
      .Lag Bar: { 
        .raw ping 123
        dialog -m lag lag
        .timer 1 0 dialog -s lag 650 40 150 0 X
      }
      .Adjust away script: dialog -m away away
    }
    menu n* {
      Fun Things
      .Steal Cookies: {
        var %x $rand(2,20)
        describe $chan Goes into10 $$1 $+ 's pocket and grabs10 %x cookies!
        writeini theme.ini games cookies $calc($readini(theme.ini, games, cookies) + %x)
        msg $chan 10 $+ $readini(theme.ini, games, cookies) cookies stolen to date!!
      }
      .fml: {
        fml
      }
      .Fact: echo $active 12{14-15- Chuck Fact 15-14-12} $read(chuck.txt)
      .Insult: {
        var %diss $iif($Readini(theme.ini, diss, $$1),$v1,0) 
        inc %diss
        writeini theme.ini diss $$1 %diss
        msg $active $$1 $read(joke.txt) 12[11-2=12,15Insulted $readini(theme.ini, diss, $$1) times0,02=11-12]
      }
      Highlight
      .View Anti Highlight List: {
        window -d @AntiHighlight
        var %x $ini(theme.ini, nohighlight, 0)
        aline 10 @AntiHighlight Start list
        while (%x) {
          aline 12 @AntiHighlight $ini(theme.ini, nohighlight, %x)
          dec %x
        }
        aline 10 @AntiHighlight End of list
      }
      .Add To Anti Highlight List: {
        if ( $readini(Theme.ini, NoHighlight, $$1) == 1 ) {  
          echo -a $$1 is already on your anti highlight list.
          halt 
        } 
        else {
          echo -a $$1 has been added to the anti highlight list.
          writeini theme.ini NoHighlight $$1 1
        }
      }
      .Delete From Anti Highlight List: {
        remini theme.ini Nohighlight $$1
        echo -a $$1 has been taken of the anti highlight list.
      }
      User control
      .access
      ..Give voice: mode $chan + $+ $str(v,15) $$1-
      ..Take voice: mode $chan - $+ $str(v,15) $$1-
      ..Give halfop: mode $chan + $+ $str(h,15) $$1-
      ..Take halfop: mode $chan - $+ $str(h,15) $$1-
      ..Give op: mode $chan + $+ $str(o,15) $$1-
      ..Take op: mode $chan - $+ $str(o,15) $$1-
      ..Give sop: mode $chan + $+ $str(a,15) $$1-
      ..Take sop: mode $chan - $+ $str(a,15) $$1-
      ..Give owner: mode $chan + $+ $str(q,15) $$1-
      ..Take owner: mode $chan - $+ $str(q,15) $$1-
      .Dicipline
      ..Mute: who $chan | mode $chan +b ~q: $+ $sha($$1) | mode $chan -vho $$1 $$1 $$1
      ..kick : kick $$1
      ..kick with reason: var %reason $??="Reason of kicking this person?" | kick $$1 %reason
      ..kick with random: inc %kc1 | kick $$1 $read(kick.txt) 4«14«4«14« GTFO2 2Kick Number %kc1 4»14»4»14»
      ..Kickban: who $chan |  /kick $chan $$1 | mode $chan +b $sha($$1)
      ..Ultimate ban: { who $chan | mode $chan +bbbbbbbbbbbb $address($$1,3) $address($$1,4) $address($$1,2) $address($$1,1) $address($$1,5) $address($$1,6) $address($$1,7) $address($$1,8) $address($$1,9) $address($$1,10) $address($$1,11) $$1 }
      .Black list
      ..Add to blacklist: {
        var %nickblk $$1
        var %xbb $??="Do you have a reason for blacklisting this person?"
        writeini theme.ini Blacklreason $$1 $iif(!%xbb,No reason specified,%xbb)
        kick %nickblk 12{14-15-14 blacklisted for reason: $readini(theme.ini, blacklreason, $$1) 15-14-12}
      }
      ..Delete from blacklist: {  var %nickblk $??="Who do you want to take of the blacklist."
        if (!$readini(theme.ini, blacklreason, %nickblk)) { echo -n %nickblk is not on your blacklist. | halt }
        remini theme.ini Blacklreason %nickblk
        mode $chan -b $address(%nickblk,3)
        echo -n $iif(%nickblk,%nickblk has been taken off blacklist,Command has been canceled.) 
      }
      Contact
      .query: query $$1 $$?"What do you want to say?"
      .whois: w $$1
      .version: version $$1
    }
    on @*:deop:#: {
      if ( %protection == on ) && ( $opnick == $me ) {
        ns update
        mode $chan -o $nick
        kick $nick Dont deop a pro. the pro deops you.
        window -e @Darkest-Control
        aline 4 @Darkest-Control Auto op script has been used. - by protection in settings.
      }
    }
    on @*:BAN:#:{ 
      if ( %protection == on ) && ($banmask iswm $ial($me)) && ($me isop $chan) && ($nick != $me) {
        noop $tip(Ban, Ban, 4Ban in 12 $+ $chan $+  by 3 $+ $nick $+  And it was like this: $1- ,5) 
        mode $chan -obbb $nick $me $banmask $wildsite
        if ( $nick == chanserv ) { halt }
        kick $nick
        window @Darkest-Control
        aline 4 @Darkest-Control Auto anti ban script has been used. - by protection in settings.
      } 
    }
    on @*:kick:#: {
      if ( %protection == on ) && ( $knick == $me ) && ( $me is $+ $iif( $me isop $chan,op,hop) $chan )  {
        noop $tip(Kick, Darkest-script, 4Kick in 12 $+ $chan $+  by 3 $+ $nick $+  saying $1- ,2) 
        if ( $nick == chanserv ) { cs unban $chan | halt }
        cs unban $chan
        .timer1 1 3 .join $chan
        .timer2 1 4 .kick $nick 5,1{4-0Kick4-0Protection4-5}
        window -e @Darkest-Control
        aline 4 @Darkest-Control Anti kick script has been used. - by protection in settings.
      }
    }
    
    alias cchans {
      set %cc.t = $comchan($1,0), %cc.n = 1, %cc
      while (%cc.n <= %cc.t) { %cc = %cc $comchan($1,%cc.n) | inc %cc.n }
      return ( $+ %cc $+ )
    }
    on ^*:nick: { 
      if ( %raw == on ) {
        var %cc.t = $comchan($newnick,0), %cc.n = 1, %cc
        while (%cc.n <= %cc.t) { echo $comchan($newnick,%cc.n) 12(14Nick Change12) (14 $nick 12) 14is now known as 12(14 $newnick 12) | inc %cc.n }
        if ( $nick == $me ) { identify }
        who $nick
        haltdef
      }
    }
    On ^*:Join:#: { 
      if (!$hget($network, $chan)) {
        if (!$hget($network, 0).item) hmake $network 100 
        hadd $network $chan No update needed.
        who $iif($nick == $me,$chan,$nick)
      }
      if ( %raw == on ) && ( $me isop $chan ) && ($readini(theme.ini, Blacklreason, $nick)) {  
        mode $chan +b $address($nick,3)
        kick $nick Blacklisted for reason: $readini(theme.ini, Blacklreason, $nick)
      }
      echo -t $Chan 12{14-12 14Join $+ 14:12 $nick 14(12 $+ $remove($Address($nick,1),!,*) $+ 14) Has Joined12 $Chan 14-12}  | halt 
    } 
    alias scol {
      var %x $Replace($1-,+, $+  $+ $iif($readini(theme.ini, colour, voice),$readini(theme.ini, colour, voice),12) $+ +)
      var %x $Replace(%x, $+ $chr(37) $+ , $+  $+ $iif($readini(theme.ini, colour, hop),$readini(theme.ini, colour, hop),12) $+ $chr(37) $+ )
      var %x $Replace(%x,@, $+  $+ $iif($readini(theme.ini, colour, op),$readini(theme.ini, colour, op),12) $+ @)
      var %x $Replace(%x,&, $+  $+ $iif($readini(theme.ini, colour, sop),$readini(theme.ini, colour, sop),12) $+ &)
      var %x $Replace(%x,~, $+  $+ $iif($readini(theme.ini, colour, owner),$readini(theme.ini, colour, owner),12) $+ ~)
      return %x
    }
    On ^*:Part:#: { 
      if ( %raw == on ) {
        if (!$1-) { echo -t $Chan 12{14-12 14Part:12 $Nick 14 $+ $chr(40) $+ 12 $+ $sha($nick) $+ 14 $+ $chr(41) 14Has Left12 $Chan 14-12} | halt }
        if ($1-) { echo -t $Chan 12{14-12 14Part:12 $Nick 14 $+ $chr(40) $+ 12 $+ $sha($nick) $+ 14 $+ $chr(41) 14Has Left2 $Chan 14-12} 12(14-12 $1- 14-12) | halt }
      }
    }
    On ^*:Rawmode:#:{
      if ( %raw == on ) {
      echo -t $Chan 12{14-12 $Nick 14sets Mode:14(12 $+ $1- $+ 14) 14-12} | Halt }
    }
    On $^*:Text:*:#: {
      if ( %raw == on ) {
        if ( $readini(theme.ini, settings, highlight) == on ) && (!$readini(theme.ini, bots, $nick)) {
          if ( $me isin $strip($1-) ) {
            if ($away) { 
              window -e @Darkest-control
              write hl.txt 15{14-12 $network 14-15} {14-12 $nick 14-15} {14-12 $time(dddd mmmm mm yyyy) 14-15} {14-12 $time(hh:nn) 14-15} -----< $1- >-----
              aline @Darkest-control 14 $+ $nick Has highlighted you in12 $chan 14at15 $time(hh:nn) 14saying:12 $1- 
              if (%hlw [ $+ [ $nick ] ]) { goto finish }
              set %hlw [ $+ [ $nick ] ] 1
              halt
              .notice $nick I am aware of your highlight but i am currently away, This is a 1 time highlight message. | window -e @Darkest-control | aline 8 @darkest-control Highlight < $nick > in $chan at $time(hh:nn) saying $1-
            }
            if ( $readini(Theme.ini, NoHighlight, $nick)) { goto finish }     
            if ( $chan == $active ) && ( $appactive) { 
              write hl.txt 15{14-12 $network 14-15} {14-12 $nick 14-15} {14-12 $time(dddd mmmm mm yyyy) 14-15} {14-12 $time(hh:nn) 14-15} -----< $1- >-----
              echo -at 12{14-12 $iif($ialchan($nick,#,1).pnick != $nick,$scol($left($ialchan($nick,#,1).pnick,1))) $+ 12 $+ $nick 14-12} 8<9<10Highlight9>8> $1-
              halt
            }
            if ( %highlight [ $+ [ $nick ] ] == 1 ) { goto finish }
            set -u30 %highlight [ $+ [ $nick ] ] 1
            if (!$appactive) { 
              write hl.txt 15{14-12 $network 14-15} {14-12 $nick 14-15} {14-12 $time(dddd mmmm mm yyyy) 14-15} {14-12 $time(hh:nn) 14-15} -----< $1- >-----
              noop $tip(H, H, 4Highlight in 12 $+ $chan $+  by 3 $+ $nick $+  saying $1- ,5)
              window -e @Darkest-control
              aline @Darkest-control 14 $+ $nick Has highlighted you in12 $chan 14at15 $time(hh:nn) 14saying:12 $1- 
              echo -t $chan 12{14-12 $iif($ialchan($nick,#,1).pnick != $nick,$scol($left($ialchan($nick,#,1).pnick,1))) $+ 12 $+ $nick 14-12} 8<9<10Highlight9>8> $1-
              halt
            }
            echo -a 12,1|11,1|2,1|12,0Highlight2,1|11,1|12,1| $chan $nick $+ : $strip($1-) 12,1|11,1|2,1|12,0Highlight2,1|11,1|12,1|
          }
        }
        if ( $readini(Theme.ini, Flood, $chan ) == 1) && ($me isop $chan) && (!$readini(theme.ini, exception, $nick)) {
          if ( $nick isop $chan ) && ( $readini(theme.ini, Protection, op) == on ) { halt }
          inc %flood [ $+ [ $nick ] ]
          if ( %flood [ $+ [ $nick ] ] == $iif(%lines,%lines,3) ) {
            inc -u3000 %num [ $+ [ $nick ] ]
            kick $nick Flood Protection. 12{14-15-14 Warning %num [ $+ [ $nick ] ] 14-15-12} %lines line $+ $iif(%lines > 1,s) in $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) seconds
            window @Darkest-Control
            aline 13 @Darkest-Control Flood protection has been used in $chan $+ .
          }
          if ( $readini(theme.ini, ban, times ) == %num [ $+ [ $nick ] ] ) {
            who $chan
          mode $chan +b $sha($nick) | unset %num [ $+ [ $nick ] ] }
          .timer 1 $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) unset %flood [ $+ [ $nick ] ]
        }
      }
      :finish
      if ( %raw != on ) { goto no }
      echo $chan $timestamp 12{14-12 $iif($ialchan($nick,#,1).pnick != $nick,$scol($left($ialchan($nick,#,1).pnick,1))) $+ 12 $+ $nick 14-12} $iif($readini(theme.ini, settings, strip) == on,$strip($1-),$1-)
      Halt
      :no
    }
    On ^*:QUIT:{
      if ( %raw == on ) {
        haltdef
        var %z = 1
        while (%z <= $comchan($nick,0)) { echo -ti2 $comchan($nick,%z) 12{14- Quit:12 $nick 14(12 $+ $sha($nick) $+ 14)12-14(12 $+ $1- $+ 14) -12} | inc %z }
      }
    }
    on ^*:ACTION:*:#: {
      if ( slaps isin $strip($1-)) && ( $me isin $strip($1-)) && ( trout isin $strip($1-)) && ( %aflood != 1)  {
        set -u10 %aflood 1
        var %trout $iif(!$readini(theme.ini, games, trout),1,$calc($readini(theme.ini, games, trout) + 1 ))
        writeini theme.ini Games Trout %trout
        .timer 1 0 describe $chan Takes the 12Trout out of $nick $+ 's hands and drops it back in the sea 12{14-15-11 $readini(theme.ini, games, trout) 12Trou $+ $iif($readini(theme.ini, games,trout) >= 2, t's,t) saved 15-14-12}
        Window -e @darkest-control
        aline 12 @darkest-control Trout protection has been used in $chan on $nick $+ ! 
      }
      if ( $readini(Theme.ini, Flood, $chan ) == 1) && ($me isop $chan) && (!$readini(theme.ini, exception, $nick)) {
        if ( $nick isop $chan ) && ( $readini(theme.ini, Protection, op) == on ) { halt }
        inc %flood [ $+ [ $nick ] ]
        if ( %flood [ $+ [ $nick ] ] == $iif(%lines,%lines,3) ) {
          inc %num [ $+ [ $nick ] ]
          .timerFloodPro -o 1 999 unset %num*
          kick $nick Flood Protection. 12{14-15-14 Warning %num [ $+ [ $nick ] ] 14-15-12} %lines line $+ $iif(%lines > 1,s) in $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) seconds
        }
        if ( $readini(theme.ini, ban, times ) == %num [ $+ [ $nick ] ] ) { mode $chan +b $sha($nick) | unset %num [ $+ [ $nick ] ] }
        .timer 1 $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) unset %flood [ $+ [ $nick ] ]
      }
    }
    On ^*:Text:*:?: {
      haltdef
      echo $nick $timestamp 12{14-12 $nick 14-12} 14 $+ $1-
    }
    alias dark { 
      var %a $len($1-),%b 1,%c 1
      while (%b <= %a) {
        if ($mid($1-,%b,1) != $chr(32)) {
          if (%c == 8) var %c 1
          var %d $+(%d,$chr(3),$gettok(6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6 6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6 6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6 6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6 6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6 6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6,%c,32),$mid($1-,%b,1),$chr(3))
          inc %c
        }
        else var %d $+(%d,$chr(160))
        inc %b
      }
      $iif($isid,return,msg $active)  $+ $replace(%d,$chr(160),$chr(32)) $+ 
    }
    alias listchan var %x 1,%a | while (%x <= $nick($iif($1,#$1,#),0)) { var %a %a $nick($iif($1,#$1,#),%x) | if ($len(%a) > 400) { msg $iif($1,$1,$active) %a | var %a } | inc %x } | msg $iif($1,$1,$active) %a
    alias viewbot {
      var %x $ini(theme.ini,bots,0)
      var %b 1
      window -c @botlist
      window -d @botlist
      aline 12 @botlist This is the list of bots you have!
      while (%x) {
        aline @botlist Bot number %b - $ini(theme.ini,bots,%x) 
        dec %x 
        inc %b
      }
    }
    menu s* {
      Bot Control
      .Update Bot list: bs botlist | echo Bot list has been updated! | set %silence [ $+ [ botserv ] ] 1 | .timerSilence 1 15 unset %silence [ $+ [ Botserv ] ]
      .View bot list: viewbot
      .Add Bot: {
        var %bot $$?"What bot are you adding?"
        writeini theme.ini bots %bot 1
        echo -a %bot has been added to the botlist.
      }
      .Delete Bot: {
        var %bot $$?"what is the bots name?"
        if ( $readini(theme.ini, bots, %bot)) {
          echo -a %bot has been taken off the botlist.
          remini theme.ini bots %bot
        }
        else { echo -a %bot is not on the bot list. }
      }
    }
    menu @Darkest-Control {
      Nick color: csetting
      Bot Control
      .Update Bot list: {
        botit
        echo Bot list has been updated!
      }
      .View bot list: viewbot
      .Add Bot: {
        var %bot $$?"What bot are you adding?"
        writeini theme.ini bots %bot 1
        echo -a %bot has been added to the botlist.
      }
      .Delete bot: {
        var %bot $$?"what is the bots name?"
        if ( $readini(theme.ini, bots, %bot)) {
          echo -a %bot has been taken off the botlist.
          remini theme.ini bots %bot
        }
        else { echo -a %bot is not on the bot list. }
      }
    }
    on *:input:@*: {
      $iif($left($1,1) == /,$1-)
      $iif($left($1,1) != /,aline 12,halt) $active $eval($1-)
    }
    menu @* {
      Window Control
      .Close: {
        var %x $window(0)
        while (%x) {
          if ( $active == $window(%x) ) { var %active $window(%x) }
          dec %x
        }
        window -c %active
      }
      .Clear: {
        var %x $window(0)
        while (%x) {
          if ( $active == $window(%x) ) { var %active $window(%x) }
          dec %x
        }
        window -c %active
        window -ae %active
      }
    }
    
    on ^*:pong:{ 
      if ((%lag) && (*123 iswm $1-)) { 
        haltdef 
        set %temp $calc( ( $ticks - %lag) / 1000 ) seconds   
        if (%temp > 5) {
          if (!%xb) {
            set -u90 %xb 1
            echo  -a |||||--Lag Alert 5+ seconds of lag detected!--|||||  
          }
        } 
      }
    }
    alias lag {
      set %lag $ticks
      .raw ping 123 
      dialog -t lag %temp
    }
    dialog lag {
      size -1 -1 150 0
      title %temp
      lag
    }
    on 1:dialog:lag:init:*: {
      .timerBar2 0 4 .raw ping 123
      .timerBar1 0 5 lag
    }
    on 1:dialog:lag:close:*: {
      .timerBar* off
      unset %lag
      unset %temp
    }
    ;;; Aliases needed for colouring. Changing colour by changing "$Chr(3),12,$Chr(2)" to "Chr(3),<Colour>,$Chr(2)" $h is the main colour, $hh is the secondary colour.
    alias h { return $+($chr(3),12,$chr(2),$chr(2),$1-,$chr(3),$chr(2),$chr(2)) }
    alias hh { return $+($chr(3),14,$chr(2),$chr(2),$1-,$chr(3),$chr(2),$chr(2)) }
    Alias Tags { Return $+($hh([),$h($1-),$hh(]) $hh(—),$h(>),) }
    
    alias FML {
      if ($Sock(FML)) { SockClose FML }
      set %FMLOut $iif($1 = -s, msg $active, Echo -a)
      Sockopen FML rscript.org 80
    }
    On *:SockOpen:FML: {
      Sockwrite -nt FML GET /lookup.php?type=fml
      SockWrite -nt FML Host: rscript.org
      SockWrite -nt FML $crlf
    }
    on *:SockRead:FML: {
      if ($SockErr) { SockClose FML | SockOpen FML rscript.org 80 }
      Var %FML 
      SockRead %FML
      if ($Regex(%FML,ID:)) { set %FMLID $GetTok(%FML,2-,32) }
      if ($Regex(%FML,Cate:)) { set %FMLCate $GetTok(%FML,2-,32) }
      if ($Regex(%FML,Text:)) { set %FMLText $hh($GetTok(%FML,2-,32)) }
      if ($Regex(%FML,Agree:)) { set %FMLAggree $Bytes($GetTok(%FML,2-,32),bd) }
      if ($Regex(%FML,Deserved:)) { set %FMLDisaggree $Bytes($GetTok(%FML,2-,32),bd) }
      if ($Regex(%FML,Comments:)) { set %FMLComments $Bytes($GetTok(%FML,2-,32),bd) }
      if ($Regex(%FML,END)) { SockClose FML }
      if (!$Sock(FML)) {
        %FMLOut $Tags(FML) $hh(FML:) $h(%FMLText) 
        %fmlout $Tags(FML) $hh(Information:) $hh(Agreed:) $h(%FMLAggree) $hh($(|)) $hh(Deserved) $h(%FMLDisaggree) $hh($(|)) $hh(Comments:) $h(%FMLComments) 
        %FMLOut $Tags(FML) $hh(Link:) $h($+(,http://www.fmylife.com,/,%FMLCate,/,%FMLID,/,))
        Unset %FML*
      }
    }
    alias eval {
      var %x = $ticks
      $iif( -a == $1,echo -a,msg $active) $remove(Eval $+(,$chr(40),,$1- == $iif($($1-,2) != $null,$v1,$!null),,$chr(41) $chr(40),,$calc($ticks - %x MS),,$chr(41))},-a)
    }
    dialog settings {
      title "Darkest settings"
      size -1 -1 110 100
      option dbu 
      tab "Base colors", 1, 5 5 100 90
      tab "main settings", 2
      tab "Addons", 3
      button  "Notice Pop up on", 19, 5 54 50 44, ok tab 1
      button  "Notice pop up off", 20, 55 54 50 44, ok tab 1
      button  "base colors on", 4, 5 20 50 34, ok tab 1
      button  "base colors off", 5, 55 20 50 34, ok tab 1
      button  "Strip messages on", 6, 5 20 50 24, tab 2
      button  "Strip messages off", 7, 55 20 50 24, tab 2
      button  "Highlight on", 8, 5 40 50 24, tab 2
      button  "Highlight off", 9, 55 40 50 24, tab 2
      button  "View highlights", 10, 5 62 100 34, tab 2
      button  "Grammer on", 11, 5 17 50 20, tab 3
      button  "Grammer off", 12, 55 17 50 20, tab 3
      button  "Rainbow text on", 13, 5 37 50 20, tab 3
      button  "Rainbow text off", 14, 55 37 50 20, tab 3
      button  "protection on", 15, 5 57 50 20, tab 3
      button  "Protection off", 16, 55 57 50 20, tab 3
      button  "mode setter on", 17, 5 75 50 20, tab 3
      button  "mode setter off", 18, 55 75 50 20, tab 3
    }
    
    on *:dialog:settings:sclick:*: {
      if ( $did == 20 ) { writeini theme.ini settings popup off | echo -a When you get a notice it will now echo in your window. }
      if ( $did == 19 ) { writeini theme.ini settings popup on | echo -a When you get a notice it will now pop up :) }
      if ( $did == 18 ) {
        writeini theme.ini settings plus off
        echo -a Mode setter has been turned off
      }
      if ( $did == 17 ) {
        writeini theme.ini settings plus on
        echo -a Mode setter has been turned on, type +(mode) or -(mode) to use it.
      }
      if ( $did == 14 ) { coff }
      if ( $did == 15 ) { proon }
      if ( $did == 16 ) { prooff }
      if ( $did == 13 ) { con }
      if ( $did == 12 ) { gcoroff }
      if ( $did == 11 ) { gcoron }
      if ( $did == 10 ) { viewhl }
      if ( $did == 9 ) { hloff }
      if ( $did == 8 ) { hlon }
      if ( $did == 6 ) {
        writeini theme.ini settings strip on
        echo -a All incoming messages are now stripped.
      }
      if ( $did == 7 ) {
        writeini theme.ini settings strip off
        echo -a All incoming messages are no longer stripped.
      }
      if ( $did == 4 ) { colourso }
      if ( $did == 5 ) { coloursf }
    }
    alias gcoron {
      if (%rainbowtexton) { echo -a Rainbow text is already on | halt }
      echo -a Grammer correction has been turned on.
      writeini theme.ini settings grammercorrect on
    }
    alias gcoroff {
      if (%rainbowtexton) { echo -a Rainbow text is already on | halt }
      echo -a grammer correction has been turned off.
      writeini theme.ini settings grammercorrect off
    }
    alias con {
      if ( $readini(theme.ini, settings, grammercorrect) == on) { echo -a Grammer correction is already on | halt }
      echo -a $ac(Rainbow text has been turned on)
      unset %rainbowtextandbackgroundon | set %rainbowtexton 1 | echo -n Rainbow text turned on
    }
    alias coff {
      if ( $readini(theme.ini, settings, grammercorrect) == on) { echo -a Grammer correction is already on | halt }
      echo -a Rainbow text has been turned off
      unset %rainbowtexton | unset %rainbowtextandbackgroundon | echo -n Rainbow text turned off
    }
    alias mseton {
      echo -a mode setter has been turned on
      writeini theme.ini settings plus on
    }
    alias msetoff {
      echo -a mode setter has been turned off.
      writeini theme.ini settings plus off
    }
    alias hlon {
      writeini theme.ini settings highlight on
      echo -a Highlights have been turned on
    }
    alias hloff {
      writeini theme.ini settings highlight off
      echo -a highlights have been turned off
    }
    alias colourso {
      .timestamp -f 14(12hh14:12nn14:12ss14)
      .timestamp on
      .timestamp -g 14(12hh14:12nn14:12ss14)
      set %raw on
      echo -a Base colors have been turned on.
    }
    alias coloursf {
      .timestamp -f
      .timestamp on
      .timestamp -g
      set %raw off
      echo -a Base colors have been turned off.
    }
    alias proon {
      set %protection on
      echo -a Protection has been turned on.
    }
    alias prooff {
      set %protection off
      echo -a Protection has been turned off.
    }
    alias viewhl {
      if (!$read(hl.txt)) {
        write Hl.txt Highlight Logs.
      } 
      var %x 1
      window -c @highlight
      window -ad @Highlight
      while (%x < $calc($lines(hl.txt) + 1)) {
        $iif($len($Read(hl.txt, %x)) > 5,echo @Highlight $read(hl.txt, %x))
        inc %x
      }
    }
    alias -l DVersion {
      return Darkest Script Version 3 - Mirc version $version
    }
    alias rawc {
      if ( %raw == on ) { noop }
      if ( %raw != on ) { halt }
    }
    alias Sha {
      who $1
      return $iif($2,$address($1,$2),$iif($remove($iif($hget($network, $1),$v1,$iif($address($1,0),$v1,$hget(address, $1))),~) == *,$null,$remove($v1,~))) 
    }
    raw 315:*: $iif(%ttraw,halt)
    raw 352:*: {
      if (!$hget($network)) { 
        .hmake $network 100 
      }
      hadd $network $6 $3 $+ @ $+ $4
      if ($hget(Address)) { hadd Address $6 $3 $+ @ $+ $4 }
      else .hmake address 1000
      .timerASave 1 5 hsave address address.txt
      if (%ttraw) halt
    }
    raw 311:*:{ 
      rawc 
      echo -a 14«12« 12[15/14WHOIS12] 15Start 12»14»
      echo -a 14«12« 12 $+ $2 15 is 15 $+ $3 $+ 12@15 $+ $4 $5- 12»14»
      if (!$hget($network)) { 
        .hmake $network 100 
      }
      hadd $network $2 $3 $+ @ $+ $4
      if ($hget(Address)) { hadd Address $2 $3 $+ @ $+ $4 }
      else .hmake address 1000
      halt 
    }
    on *:INPUT:*: {
      if ($1 == /who ) { unset %ttraw | .timer 1 5 set %ttraw on }
    }
    raw 301:*:{ rawc | echo -a 14«12« 12 $+ $2 15 $+ is away:14 $3- 12»14» | halt }
    raw 307:*:{ rawc | echo -a 14«12« 12 $+ $2 15is a registered user on14 $network 12»14» | halt }
    raw 312:*:{ rawc | echo -a 14«12« 12 $+ $2 15is on:14 $3 $12 12»14» | halt }
    raw 313:*:{ rawc | echo -a 14«12« 12 $+ $2 15is:14 $5- 12»14» | halt }
    raw 317:*:{ rawc | echo -a 14«12« 12 $+ $2 15is idling:14 $duration($3) 12»14» | halt }
    raw 319:*:{ rawc | echo -a 14«12« 12 $+ $2 15is on channels:14 $3- 12»14» | halt }
    raw 378:*:{ rawc | echo -a 14«12« 12 $+ $2 15is connecting from host:14 $6 12»14» | halt }
    raw 338:*:{ rawc | echo -a 14«12« 12 $+ $2 15is connecting from host:14 $3 12»14» | halt }
    raw 537:*:{ rawc | echo -a 14«12« 12 $+ $2 15 $+ $3- 12»14» | halt }
    raw 320:*:{ rawc | echo -a 14«12« 12 $+ $2 15 $+ $3- 12»14» | halt }
    raw 671:*:{ rawc | echo -a 14«12« 12 $+ $2 15is using a secure connection 12»14» | halt }
    raw 310:*:{ rawc | echo -a 14«12« 12 $+ $2 15 $+ $3- 12»14» | halt }
    raw 318:*:{ rawc | echo -a 14«12« 12[15/14WHOIS12] 14End 12»14» | halt }
    raw 329:*:{ haltdef }
    raw 439:*:{ echo Target Change Detected. Halt all messageing! | .timers off | halt }
    raw 474:*:{ if ( %raw == on ) { haltdef | echo $active ««Ë®®öR»» You are banned from $2 $+ . } }
    raw 972:*:{ if ( %raw == on ) { haltdef | echo $active ««Ë®®öR»» $2- } }
    raw 482:*:{ if ( %raw == on ) { haltdef | echo -a ««Ë®®öR»» You do not have enough access. } }
    raw 404:*:{ if ( %raw == on ) { haltdef | echo -a ««Ë®®öR»» $remove($1-,$me,$chan,) ) } }
    raw 421:*:{ if ( %raw == on ) { haltdef | echo -a ««Ë®®öR»» $2 - $3 command } }
    raw 332:*:{ if ( %raw == on ) { haltdef | echo $2 12{14-15-12 Topic is $2-  15-14-12}  } }
    raw 335:*:{ if ( %raw == on ) { haltdef | echo -a  12{14-15-12 $2- 15-14-12}  } }
    raw 313:*:{ if ( %raw == on ) { haltdef | echo -a 4*07*08*09*12*06 $2- 4*07*08*09*12*06  } }
    raw 372:*:{ if ( %raw == on ) { haltdef | echo  $2- | .timerconnect 1 3 echo $active You have succesfully connected to the server via 11,0¦|0,11¦|12,11¦|11,12¦|2,12¦|12,2¦|1,2¦|2,1¦|11,1 12,1 12D12,14arkest 12S12,14cript 2,11,212,22,1211,1212,110,1111,0 --- Made by Termz | .timercf 1 5 connection } }
    raw 301:*:{ if ( %raw == on ) { haltdef | echo -a 12{14-15-12 Away - $2- 15-14-12}  } }
    raw 401:*:{ if ( %raw == on ) { haltdef | echo -a 11,0¦|0,11¦|12,11¦|11,12¦|2,12¦|12,2¦|1,2¦|2,1¦|11,1 $2 not found on server. 1¦1,212,22,1211,1212,110,1111,0 } }

     

  24. Hi guys so i'm making a simple command line game, i've finished making a standard one, theres so much more to add but for now i'll show you what its like.

    this is called the DUEL game:
    Look at the pastebin to see what the game is like.
    https://pastebin.com/ep0Dzhed

    at the moment the commands are:
    [18:08:54] <~dronez4> !help
    [18:08:55] [Duel Commands]
    [18:08:55] !duel, !accept, !attack, !damage, !duelstats

    i'll show you what each command does

    [!duel]
    [18:04:58] <~dronez4> !duel wallrunner
    [18:04:59] [DUEL]: dronez4 has dueled wallrunner [Type !accept to accept dronez4's duel]

    [!accept]
    [18:05:02] !accept
    [18:05:03] [DUEL]: wallrunner accepted dronez4's duel
    [18:05:03] [Max Damage]: dronez4: 40 - wallrunner: 40
    [18:05:03] [HP:200] - dronez4
    [18:05:03] [HP:200] - wallrunner
    [18:05:04] [DUEL]: dronez4's turn

    [!attack]
    [18:05:14] <~dronez4> !attack wallrunner
    [18:05:14] [ATTACK]: dronez4 hit 11 on wallrunner
    [18:05:14] [HP:200] - dronez4
    [18:05:14] [HP:189] - wallrunner
    [18:05:14] [DUEL]: wallrunner's turn

    [!damage]
    [18:11:41] <~dronez4> !damage dronez4
    [18:11:42] [Damage Output]: Maximum amount of damage dronez4 has: [Damage: 40]

    [!duelstats]
    [18:12:26] <~dronez4> !duelstats dronez4
    [18:12:27] [Duel Stats]: dronez4 - (Max damage: 40) (Total HP: 200) (Wins: ) (loses: )
    [the wins/loses are empty if you have won/lost 0 games]

    I am currently in the stage of adding more features, way more features, feel free to give me any ideas? atm i've got a list
    hp [DONE]
    damage [DONE]
    upgrades [DONE]
    Round start - Round end [DONE]
    Special power - skip [not sure about implimenting yet]
    Store point system [Coming soon]
    Stun [Coming soon]
    Critical hit [coming soon]
    Heal [Coming soon]
    Protection spell [Coming soon]

     

    ;works for only 1 channel at the moment, so add a specific channel if need be.
    on *:text:*:#:{
      if ($1 == !duel) && ($2 ison $chan) {
        if (%duel == on) { msg $chan 7[DUEL]: There's already a duel going on }
        else {
          msg $chan 7[DUEL]: $nick has dueled $2 [Type !accept to accept $nick $+ 's duel]
          set %duel on
          set %duelnick1 $nick
          set %duelnick2 $2
        }
      }
      if ($1 == !accept) {
        if (%duel == on) {
          remini duelhp.ini hp %duelnick1
          remini duelhp.ini hp %duelnick2
          set %duelturn %duelnick1
          set %duelnotturn %duelnick2
          msg $chan 7[DUEL]: %duelnick2 accepted %duelnick1 $+ 's duel
          msg $chan 4[Max Damage]: %duelnick1 $+ :13 $calc($readini(duelstats.ini, stats, %duelnick1) + 40) 4- %duelnick2 $+ :13 $calc($readini(duelstats.ini, stats, %duelnick2) + 40)
          timer 1 2 msg $chan 7[DUEL]: %duelturn $+ 's turn
          if ($readini(addhp.ini, hp, %duelnick1) != $null) {
            timer 1 1 writeini duelhp.ini hp %duelnick1 $calc(200 + $readini(addhp.ini, hp, %duelnick1))
            msg $chan 4[HP:13 $+ $calc(200 + $readini(addhp.ini, hp, %duelnick1)) $+ 4] - %duelnick1
          }
          if ($readini(addhp.ini, hp, %duelnick2) != $null) {
            timer 1 1 writeini duelhp.ini hp %duelnick2 $calc(200 + $readini(addhp.ini, hp, %duelnick2))
            msg $chan 4[HP:13 $+ $calc(200 + $readini(addhp.ini, hp, %duelnick2)) $+ 4] - %duelnick2
          }
          if ($readini(duelhp.ini, hp, %duelnick1)) {
            msg $chan 4[HP:13 $+ $calc($readini(duelhp.ini, hp, %duelnick1) + $readini(addhp.ini, hp, %duelnick1)) $+ 4] - %duelnick1
          }
          else {
            if ($readini(addhp.ini, hp, %duelnick1) == $null) {
              writeini duelhp.ini hp %duelnick1 200
              msg $chan 4[HP:132004] - %duelnick1
            }
          }
          if ($readini(duelhp.ini, hp, %duelnick2)) {
            msg $chan 4[HP:13 $+ $calc($readini(duelhp.ini, hp, %duelnick2) + $readini(addhp.ini, hp, %duelnick2)) $+ 4] - %duelnick2
          }
          else {
            if ($readini(addhp.ini, hp, %duelnick2) == $null) {
              writeini duelhp.ini hp %duelnick2 200
              msg $chan 4[HP:132004] - %duelnick2
            }
          }
        }
      }
      if ($1 == !attack) {
        if (%duel == on) {
          if ($nick isin %duelturn) {
            set %randomhit $calc($rand(10,40) + $readini(duelstats.ini, stats, %duelturn))
            if ($chr(45) isin $calc($readini(duelhp.ini, hp, %duelnotturn) - %randomhit)) {
              set %prize $rand(1,5)
              set %prize1 $rand(1,7)
              set %duel off
              msg $chan 4[ATTACK]:9 %duelturn hit13 %randomhit 9on %duelnotturn
              writeini duelhp.ini hp %duelnotturn $calc($readini(duelhp.ini, hp, %duelnotturn) - %randomhit)
              msg $chan 4[HP:13 $+ $readini(duelhp.ini, hp, %duelnick1) $+ 4] - %duelnick1
              msg $chan 4[HP:13 $+ $readini(duelhp.ini, hp, %duelnick2) $+ 4] - %duelnick2
              msg $chan 9[Winner]: %duelturn won the duel [Prize: Added %prize damage + %prize1 HP to %duelturn $+ 's statistic]
              writeini winsnlose.ini win %duelturn $calc($readini(winsnlose.ini, win, %duelturn) + 1)
              writeini winsnlose.ini lose %duelnotturn $calc($readini(winsnlose.ini, win, %duelnotturn) + 1)
              remini duelhp.ini hp %duelnick1
              remini duelhp.ini hp %duelnick2
              if ($readini(addhp.ini, hp, %duelturn) == $null) {
                writeini addhp.ini hp %duelturn %prize1
              }
              else {
                writeini addhp.ini hp %duelturn $calc($readini(addhp.ini, hp, %duelturn) + %prize1)
              }
              if ($readini(duelstats.ini, stats, %duelturn) != $null) {
                writeini duelstats.ini stats %duelturn $calc($readini(duelstats.ini, stats, %duelturn) + %prize)
                halt
              }
              else {
                writeini duelstats.ini stats %duelturn %prize
                halt
              }
            }
    
            msg $chan 4[ATTACK]:9 %duelturn hit13 %randomhit 9on %duelnotturn
            writeini duelhp.ini hp %duelnotturn $calc($readini(duelhp.ini, hp, %duelnotturn) - %randomhit)
            msg $chan 4[HP:13 $+ $readini(duelhp.ini, hp, %duelnick1) $+ 4] - %duelnick1
            msg $chan 4[HP:13 $+ $readini(duelhp.ini, hp, %duelnick2) $+ 4] - %duelnick2
            set %duelnotturn1 %duelnotturn
            set %duelnotturn %duelturn
            set %duelturn %duelnotturn1
            msg $chan 7[DUEL]: %duelturn $+ 's turn
          }
          else {
            msg $chan 7[DUEL]: It is %duelturn $+ 's turn
          }
        }
      }
      if ($1 == !damage) && ($2 == $null) {
        msg $chan 9[Damage Output]: Maximum amount of damage $nick has: [Damage:13 $calc($readini(duelstats.ini, stats, $nick) + 40) $+ 9]
      }
      if ($1 == !damage) && ($2 != $null) {
        msg $chan 9[Damage Output]: Maximum amount of damage $2 has: [Damage:13 $calc($readini(duelstats.ini, stats, $2) + 40) $+ 9]
      }
      if ($1 == !duelstats) {
        if ($2 != $null) {
          msg $chan 9[Duel Stats]: $2 - (Max damage:13 $calc($readini(duelstats.ini, stats, $2) + 40) $+ 9) (Total HP:13 $calc($readini(addhp.ini, hp, $2) + 200) $+ 9) 9(Wins:13 $readini(winsnlose.ini, win, $2) $+ 9) 9(loses:13 $readini(winsnlose.ini, lose, $2) $+ 9)
        }
        else {
          msg $chan 9[Duel Stats]: $nick - (Max damage:13 $calc($readini(duelstats.ini, stats, $nick) + 40) $+ 9) (Total HP:13 $calc($readini(addhp.ini, hp, $nick) + 200) $+ 9) 9(Wins:13 $readini(winsnlose.ini, win, $nick) $+ 9) 9(loses:13 $readini(winsnlose.ini, lose, $nick) $+ 9)
    
        }
      }
      if ($1 == !help) {
        msg $chan [Duel Commands]
        msg $chan !duel, !accept, !attack, !damage, !duelstats
      }
    }

     

×
×
  • Create New...