Pickle fun bot :o

By pickle16 on Aug 26, 2009

this is a bot i made, all the coding was done by me even though i haven.t touched the code in months. :s So there might be alot of bugs but everything seems to work fine....

just load and have fun :o

Updated: fix "on ban event for the seen thingy" updated command list

Anything else that should be fixed?

;##################################################################
;##################################################################
;## Pickle's General Purpose Fun Bot V3.5                        ##
;## Rock,Paper,scissors v2.0 with a Dumb AI ;c                   ##
;## Remote Tic Tac Toe v3.5 now with a smart AI :o               ##
;## Flood Control v1.0                                           ##
;## Scripted By Pickle And Tested By Pickle and Kenfolk          ##
;## Tested on Mirc v6.14 and v6.35                               ##
;##################################################################
;##################################################################
on *:load:{ P.start | echo -a Thank you for loading Pickle's Fun bot v3.1 | bot | dialog -m FC FC }
alias P.Start { window -aCk0dopw1 +b @picklelogo -1 -1 250 250 | timer5 -m 12 500 picklewin | timer6 1 7 unset %temp* }
alias picklewin { set %temp $calc( %temp + 5) | set %temp2 $calc( %temp2 + 2) | clear @picklelogo 
  drawfill @picklelogo 2 2 50 50  | drawdot @picklelogo 8  100 120 120 | drawline @picklelogo 3 25 120 120 100 150
  drawline @picklelogo 3 25 140 75 120 120 | drawtext -r @picklelogo $rgb(100,700,50) arial %temp 10 50 Pickle's
  drawtext -r @picklelogo $rgb(100,700,50) arial %temp2 27 150 Scripting Service |  drawtext @picklelogo 15 arial 25 23 215 Left click To Close
}
menu @Picklelogo { 
  sclick : window -c @picklelogo | timer5 off | unset %temp*
}
;**********************************************
;ALIASES
;**********************************************
on *:Start:{ echo  Pickle's Fun Bot v3.1 is now working  | hmake -s Pickle.FC 100  }
alias -l bot { write insult.txt I insult you ;o | writeini Bot.ini FC Repeat 3 | writeini Bot.ini FC Lines 3 | writeini Bot.ini FC Fuction OFF  }
alias -l cut { kick $chan $nick Boom! opps....wrong wire >_> | timer1 off | timer2 off | unset %timer2 | halt } 
alias -l antiflood {
  if (%antiflood == on) { halt }
  set %antiflood on | timeranti 1 5 unset %antiflood
}
;**********************************************
;Menus
;**********************************************
menu menubar,nicklist,channel,status {
  Pickle'sfunbot 
  .Flood Control : dialog -m FC FC 
  .edit insult.txt : run notepad insult.txt 
  .Unload : if ($?!="Are you sure?" == $true) { unload -rs bot.mrc | remove Bot.ini } 
}
;**********************
;Remote Comamnds
;**********************
on *:exit:{ hfree Pickle.FC | hfree Pickle.RTTT | hfree Pickle.RPS }
on *:text:!commands:#:{ antiflood 
  notice $nick My commands are: !slots,!spin (num),!sexy,!darts,!timebomb <Nickname>,!potato <Nickname> ,!Store , !say 
  notice $nick ,!insult,!calc (numbers),!time(Time is in EST),!TTT <Nickname>,!RPS or  !RPS Bot if nobody wants to play but you :) 
  notice $nick !sqrt (number) , !seen <nickname>,!Money <nickname>, !reload
}
on *:text:!calc*:#:{ antiflood | msg $chan The answer is $calc( $2- ) }
on *:text:!time:#:{ antiflood | msg $chan The Time is $fulldate EST }
on *:text:!sqrt*:#:{ antiflood | msg $chan The answer is $sqrt($2) }
on *:text:!say*:#:{
  if ($2- != $null) { antiflood | msg $chan $nick told me to say  4( $2- ) }
}
on *:text:!insult:#:{ antiflood | msg $chan $read(insult.txt) }
on *:text:!reload:#:{ if ($readini(money.ini,$nick,money) >= 500) { antiflood | writeini money.ini $nick money 500 | msg $chan you been reloaded with 500 dollars } }
on *:text:!Money*:#:{ antiflood
  if ($$2 == $null) { msg $chan $nick has $readini(money.ini,$nick,money) dollars. }
  else { msg $chan $$2 has $readini(money.ini , $$2 , money) dollars }
}
on *:text:!slots:#:{ 
  if ($readini(money.ini , $nick , money) <= 0) { msg $chan $nick you're out of money... type !reload to get more money }
  if ($readini(money.ini , $nick , money) >= 0) {
    antiflood | set %temp 0
    while (%temp != 3) {
      set %slots $rand(1,3) 
      if (%slots == 1) { set %slot %slot 4,1@ }
      if (%slots == 2) { set %slot %slot 3,1& }
      if (%slots == 3) { set %slot %slot 8,1% }
      inc %temp 1
    }
    unset %temp | msg $chan %slot | set %slot $strip(%slot)
    if (%slot == @ @ @) { msg $chan $nick hits Jackpot! | writeini money.ini $nick money $calc($readini(money.ini , $nick , money) + 500) | unset %slot | halt }
    if (%slot == & & &) { msg $chan $nick wins $100 | writeini money.ini $nick money $calc($readini(money.ini , $nick , money) + 100)  | unset %slot | halt }
    if (%slot == % % %) { msg $chan $nick wins $50 | writeini money.ini $nick money $calc($readini(money.ini , $nick , money) + 50) | unset %slot | halt }
    else { msg $chan you lose 50 dollars | writeini money.ini $nick money $calc($readini(money.ini , $nick , money) - 50) | unset %slot | halt }
  }
}
on *:text:!darts:#:{ 
  antiflood | var %dart $rand(1,7) | var %darts $rand(1,30)
  if (%dart == 1) { msg $chan $nick Throws the dart at the board and hits triple %darts | halt }
  if (%dart == 2) { msg $chan $nick Throws the dart at the board and hits double %darts | halt }
  if (%dart == 3) { msg $chan $nick Throws the dart at the board and hits  %darts | halt  }
  if (%dart == 4) { msg $chan $nick Throws the dart at the board and hits Bullseye!!! | halt  }
  if (%dart == 5) { msg $chan $nick Throws the dart at the board but $nick has a bad aim and it hits $me ;( | halt  }
  if (%dart == 6) { msg $chan $nick Throws the dart at the board but $nick has a bad aim and it hits him/herself xD | halt  }
  else { msg $chan $nick Throws the dart at the board but $nick has a bad aim and it hits $nick($chan,$rand(1,$nick($chan,0))) | halt  }
}
on *:text:!Sexy:#:{ antiflood | msg $chan Gathering statatics Please wait.......
  timers 1 5 msg $chan the results are in.....
  timers2 1 6 msg $chan $nick the sexy person here is $nick($chan,$rand(1,$nick($chan,0))) with a rating of  $rand(1,100) $+ % 
}
on *:text:!spin*:#:{ 
  if ($readini(money.ini , $nick , money) <= 0) { msg $chan type !reload to get more money! } 
  if ($readini(money.ini , $nick , money) >= 0) {
    if ($$2 isnum 10-90) {
      antiflood
      set %number $rand(1,100) | set %guess $2
      if (%guess == %number) { msg $chan Nice guess $nick :) you won 500 Dollars! | writeini money.ini $nick money $calc($readini(money.ini , $nick , money) + 500) | halt }
      if (%guess != %number) { msg $chan $nick , higher or lower? you have 10 secods to answer.... |  set %timer 1 |  timer1 1 10 unset %timer }
    }
  }
}
on *:text:*higher:#:{ 
  if (%timer == 1) { 
    if (%number >  %guess) { msg $chan The number was %number , $nick wins 100 dollars | writeini money.ini $nick money $calc($readini(money.ini , $nick , money) + 100) | halt }
    if (%number <  %guess) { msg $chan The number was %number , $nick loses 50 dollars | writeini money.ini $nick money $calc($readini(money.ini , $nick , money) - 50) }
  }
}
on *:text:*lower:#:{ 
  if (%timer == 1) {   
    if (%number <  %guess) { msg $chan The number was %number , $nick wins 100 dollars | writeini money.ini $nick money $calc($readini(money.ini , $nick , money) + 100) }
    if (%number >  %guess) { msg $chan The number was %number , $nick loses 50 dollars | writeini money.ini $nick money $calc($readini(money.ini , $nick , money) - 50) }
  }
}
on *:nick:{ if (%bombee == $nick) { set %bombee $newnick } }
on *:text:!timebomb*:#:{ 
  if ($$2 == $me) { msg $chan No Bad | kick $chan $nick NO BOMBING $me | halt }
  if ($$2 != $me) {
    if ($$2 ison $chan) {
      if (%timer2 != 1) {
        set %time $rand(10,30) | set %bombee $$2 | set %bomb $rand(1,4) | set %timer2 1
        timer1 1 %time kick $chan $$2 BOOM!!!! $$2 exploded ;( 
        timer2 1 %time unset %timer2
        msg $chan $nick has placed a bomb on $$2 $+ .... | notice $$2 $nick has placed a bomb on you now you need to difuse it within %time seconds........
        notice $$2 Type !cut <color> (Colors are: Green, Yellow , red , blue) Good luck........ | halt
      }
    }
  }
}
on *:text:!cut*:#:{
  if (%timer2 == 1) {
    if ($nick == %bombee) {
      if ($$2- == green) {
        if (%bomb != 1) { var %luck $rand(1,100) 
          if (%luck <= 50) { msg $chan You cut the wrong wire D:....luckily it didn't explode >_> Try again..this time be more careful. :( | halt }
          if (%luck >= 50) { msg $chan OH NO! | cut }
        }
        if (%bomb == 1) { msg $chan $nick Save the day... | timer1 off | timer2 off | unset %timer2 | halt }
      }
      if ($$2 == yellow) { 
        if (%bomb != 2) { var %luck $rand(1,100) 
          if (%luck <= 50) { msg $chan You cut the wrong wire D:....luckily it didn't explode >_> Try again..this time be more careful. :( | halt }
          if (%luck >= 50) { msg $chan OH NO! | cut }
        }
        if (%bomb == 2) { msg $chan $nick Save the day.... | timer1 off | timer2 off | unset %timer2 | halt }
      }
      if ($$2 == red) {
        if (%bomb != 3) { var %luck $rand(1,100) 
          if (%luck <= 50) { msg $chan You cut the wrong wire D:....luckily it didn't explode >_> Try again..this time be more careful. :( | halt }
          if (%luck >= 50) { msg $chan OH NO! | cut }
        }
        if (%bomb == 3) { msg $chan $nick Save the day.... | timer1 off | timer2 off |  unset %timer2 | halt }
      }
      if ($$2 == blue) {
        if (%bomb != 4) { var %luck $rand(1,100) 
          if (%luck <= 50) { msg $chan You cut the wrong wire D:....luckily it didn't explode >_> Try again..this time be more careful. :( | halt }
          if (%luck >= 50) { msg $chan OH NO! | cut }
        }
        if (%bomb == 4) { msg $chan $nick Save the day.... | timer1 off | timer2 off | unset %timer2 | halt }
      }
    }
  }
}
on *:text:!potato*:#:{
  if ($$2 ison $chan) {
    if (%potato != 1) { 
      if ($$2 == $me) { kick $chan $nick Opps ;x | halt }
      set %potato 1 | msg $chan $nick Throws $$2 a Hot Potato!!! | notice $$2 HURRY AND THROW THE POTATO TO SOMEONE ELSE OR IT WILL EXPLODED!!!!! |  timerpotato 1 15 kick $chan $$2 "BOOM" Oh No Theres mashed taters all my new carpat D; | unset %potato 
    }
    if (%potato == 1) {
      if ($$2 == $me) { kick $chan $nick Opps ;x | halt }
      timerpotato off | msg $chan $nick Throws $$2 a Hot Potato!!! | notice $$2 HURRY AND THROW THE POTATO TO SOMEONE ELSE OR IT WILL EXPLODED!!!!! | timerpotato 1 15 kick $chan $$2 "BOOM" Oh No Theres mashed taters all my new carpat D; | unset %potato 
    }
  }
}
;**************
;Store
;**************
on *:text:!store:#:{
  antiflood | msg $chan Current Items in $me $+ 's General Store.....
  msg $chan pie cost $50 , car cost $2,500, House cost $125,000 , Helicopter cost 75,000 , Jet Cost 1,000,000 , Pickle Cost 1,000,000,000 , Mystery Bag Cost 10,000,000,000 
  msg $chan to buy an item type !buy <ITEM> | msg $chan To see what you already Own type !items
}
on *:text:!Items*:#:{
  antiflood | msg $chan $nick items:
  msg $chan $readini(money.ini , $nick , car) Cars
  msg $chan $readini(money.ini , $nick , House) Houses
  msg $chan $readini(money.ini , $nick , Pie) Pies
  msg $chan $readini(money.ini , $nick , jet) Private Jets!
  msg $chan $readini(money.ini , $nick , heli) Private Helicopters
  msg $chan $readini(money.ini , $nick , Pickle) Pickles ;o
  msg $chan $readini(money.ini , $nick , bag) Mystery bags
  msg $chan $readini(money.ini , $nick , Ball) Rubber Balls from mystery bag
  msg $chan $readini(money.ini , $nick , chicken) Rubber Chickens from mystery bag
  msg $chan $readini(money.ini , $nick , bean) "Magic" Beans from mystery bag
  msg $chan type !use <ITEM> to use a item :) | halt
}
on *:text:!buy*:#:{
  if ($$2 == pie) {
    if ($readini(money.ini , $nick , money) < 50) { msg $chan You Need More Money...START PLAYING SLOTS NOW! | halt }
    if ($readini(money.ini , $nick , money) >= 50) { msg $chan $nick buys a Pie :) | writeini money.ini $nick money $calc($readini(money.ini , $nick , money) - 50) | writeini money.ini $nick Pie $calc($readini(money.ini , $nick , pie) + 1) }
  }
  if ($$2 == Car) {
    if ($readini(money.ini , $nick , money) < 2500) { msg $chan You Need More Money...START PLAYING SLOTS NOW! | halt }
    if ($readini(money.ini , $nick , money) >= 2500) { msg $chan $nick buys a car :) | writeini money.ini $nick money $calc($readini(money.ini , $nick , money) - 2500) | writeini money.ini $nick Car $calc($readini(money.ini , $nick , Car) + 1) }
  }
  if ($$2 == House) {
    if ($readini(money.ini , $nick , money) <= 12500) { msg $chan You Need More Money...START PLAYING SLOTS NOW! | halt }
    if ($readini(money.ini , $nick , money) >= 12500) { msg $chan $nick buys a House :) | writeini money.ini $nick money $calc($readini(money.ini , $nick , Money) - 12500) | writeini money.ini $nick house $calc($readini(money.ini , $nick , house) + 1) }
  }
  if ($$2 == jet) {
    if ($readini(money.ini , $nick , money) <= 1000000) { msg $chan You Need More Money...START PLAYING SLOTS NOW! | halt}
      if ($readini(money.ini , $nick , money) >= 1000000) { msg $chan $nick buys a Private jet ;o | writeini money.ini $nick money $calc($readini(money.ini , $nick , Money) - 1000000) | writeini money.ini $nick jet $calc($readini(money.ini , $nick , jet) + 1) }
    }
    if ($$2 == helicopter) {
      if ($readini(money.ini , $nick , money) <= 75000) { msg $chan You Need More Money...START PLAYING SLOTS NOW!}
        if ($readini(money.ini , $nick , money) >= 75000) { msg $chan $nick buys a Private Helicopter ;o | writeini money.ini $nick money $calc($readini(money.ini , $nick , Money) - 75000) | writeini money.ini $nick heli $calc($readini(money.ini , $nick , heli) + 1) }
      }
      if ($$2 == pickle) {
        if ($readini(money.ini , $nick , money) <= 1000000000) { msg $chan You Need More Money...START PLAYING SLOTS NOW! }
        if ($readini(money.ini , $nick , money) >= 1000000000) { msg $chan $nick buys Pickle!!! | writeini money.ini $nick money $calc($readini(money.ini , $nick , Money) - 1000000000) | writeini money.ini $nick Pickle $calc($readini(money.ini , $nick , Pickle) + 1) }
      }
      if ($$2 == mystery) {
        if ($readini(money.ini , $nick , money) <= 10000000000) { msg $chan You Need More Money...START PLAYING SLOTS NOW! }
        if ($readini(money.ini , $nick , money) >= 10000000000) { writeini money.ini $nick money $calc($readini(money.ini , $nick , Money) - 10000000000) | var %rand $rand(1,3) 
          if (%rand == 1) { msg $chan $nick buys a mystery bag......" $+ $nick looks inside...and theres a small rubber ball inside | writeini money.ini $nick bag $calc($readini(money.ini , $nick , bag ) + 1) | writeini money.ini $nick ball $calc($readini(money.ini , $nick , ball ) + 1) }
          if (%rand == 2) { msg $chan $nick buys a mystery bag......" $+ $nick looks inside...and theres a Rubber chicken inside inside | writeini money.ini $nick bag $calc($readini(money.ini , $nick , bag ) + 1) | writeini money.ini $nick chicken $calc($readini(money.ini , $nick , chicken ) + 1) }
          if (%rand == 3) { msg $chan $nick buys a mystery bag......" $+ $nick looks inside...and theres three small "magic" beans inside | writeini money.ini $nick bag $calc($readini(money.ini , $nick , bag ) + 1) | writeini money.ini $nick bean $calc($readini(money.ini , $nick , bean ) + 3) }
        }
      }
    }
  }
}
on *:text:!use*:#:{
  if ($$2 == pie) { 
    if ($readini(money.ini , $nick , pie) > 0) { msg $chan $nick Eats A Pie :) | writeini money.ini $nick pie $calc($readini(money.ini , $nick , pie ) - 1) }
  }
  if ($$2 == car) { 
    if ($readini(money.ini , $nick , car) > 0) { msg $chan $nick Drives his/hers car, but he/she Crashes ;( | writeini money.ini $nick car $calc($readini(money.ini , $nick , car ) - 1) }
  }
  if ($$2 == house) { 
    if ($readini(money.ini , $nick , house) > 0) { msg $chan $nick Lives In His House But it catches on fire ;( | writeini money.ini $nick house $calc($readini(money.ini , $nick , house ) - 1) }
  }
  if ($$2 == jet) { 
    if ($readini(money.ini , $nick , jet) > 0) { msg $chan $nick Flys His/hers Jet but crashes :/ | writeini money.ini $nick jet $calc($readini(money.ini , $nick , jet ) - 1) }
  }
  if ($$2 == helicopter) { 
    if ($readini(money.ini , $nick , heli) > 0) { msg $chan $nick Flys his/hers Helicopter :) | timer 1 2 msg $chan $nick crashes >_> | writeini money.ini $nick heli $calc($readini(money.ini , $nick , heli ) - 1) }
  }
  if ($$2 == pickle) { 
    if ($readini(money.ini , $nick , pickle) > 0) { msg $chan $nick Eats A Pickle >;( | writeini money.ini $nick pickle $calc($readini(money.ini , $nick , pickle ) - 1) }
  }
  if ($$2 == ball) { 
    if ($readini(money.ini , $nick , ball) > 0) { msg $chan $nick Bouces a rubber ball but he/she losted it ;( | writeini money.ini $nick ball $calc($readini(money.ini , $nick , ball) - 1) }
  }
  if ($$2 == bean) { 
    if ($readini(money.ini , $nick , bean) > 0) { msg $chan $nick Plants A "magic" bean :) | writeini money.ini $nick bean $calc($readini(money.ini , $nick , bean ) - 1) }
  }
  if ($$2 == chicken) { 
    if ($readini(money.ini , $nick , chicken) > 0) { msg $chan $nick Throws away a rubber chicken <_> | writeini money.ini $nick chicken $calc($readini(money.ini , $nick , chicken ) - 1) }
  }
}
;____________________________________________
;Rock,Paper,scissors v2.0 with a Dumb AI ;c
;____________________________________________
on *:text:!RPS bot:#:{
  if ($hget(Pickle.RPS,going) != yes) {
    hmake -s Pickle.RPS 100 | hadd Pickle.RPS player1 $nick | hadd Pickle.RPS player2 $me | set %chan $chan | hadd Pickle.RPS going yes  
    hadd Pickle.RPS Goingon chose | hadd Pickle.RPS BOT yes | msg $chan $nick chosed to play with the bot....
    msg $chan To Chose Rock,Paper or Scissors Type /notice $me <rock , Paper , Scissors> | msg $chan Type !quitRPS to quit
  }
}
on *:text:!RPS:#:{
  if ($hget(Pickle.RPS,going) != yes) {
    hmake -s Pickle.RPS 100 | hadd Pickle.RPS player1 $nick | set %chan $chan | hadd Pickle.RPS going yes |  hadd Pickle.RPS Goingon join
    msg $chan $nick has started a new game of Rock,Paper,Scissors. :) | msg $chan Type  !join to join | msg $chan Type !quitRPS to quit
  }
}
on *:Text:!join:%chan:{
  if ($hget(Pickle.RPS,Goingon) == join) {
    if ($hget(Pickle.RPS,going) == yes) {
      if ($nick == $hget(Pickle.RPS,player1) ) { notice $nick your already playing. | halt }
      hadd Pickle.RPS Goingon chose | hadd Pickle.RPS player2 $nick | msg $chan $nick has joined | msg $chan To Chose Rock,Paper or Scissors Type /notice $me <rock , Paper , Scissors>
    }
  }
}
on *:notice:*:?:{
  if ($hget(Pickle.RPS,going) == yes) {
    if ($hget(Pickle.RPS,Goingon) == chose) {
      if ($hget(Pickle.RPS,BOT) == yes) { botAI }
      if $hget(Pickle.RPS,turn $+ $nick) == went) { notice $nick you already went | halt }     
      if ($hget(Pickle.RPS,player1) == $nick ) {
        if (rock isin $1-) {
          notice $nick You chose Rock.... | msg %chan $nick Has Choosen.... | hadd Pickle.RPS turn $+ $nick went
          inc %went | set %player1 1
          if (%went == 2) { RPSwin }
          halt
        }
        if (paper isin $1-) {
          notice $nick You chose Paper.... | msg %chan $nick Has Choosen.... | hadd Pickle.RPS turn $+ $nick went
          inc %went | set %player1 2
          if (%went == 2) { RPSwin }
          halt
        }
        if (scissors isin $1-) {
          notice $nick You chose Scissors.... | msg %chan $nick Has Choosen.... | hadd Pickle.RPS turn $+ $nick went
          inc %went | set %player1 3
          if (%went == 2) { RPSwin }
          halt
        }
      }
      if ($hget(Pickle.RPS,player2) == $nick ) {    
        if (rock isin $1-) {
          notice $nick You chose Rock.... | msg %chan $nick Has Choosen.... | hadd Pickle.RPS turn $+ $nick went
          inc %went | set %player2 1
          if (%went == 2) { RPSwin }
          halt
        }
        if (paper isin $1-) {
          notice $nick You chose Paper.... | msg %chan $nick Has Choosen.... |  hadd Pickle.RPS turn $+ $nick went
          inc %went | set %player2 2
          if (%went == 2) { RPSwin }
          halt  
        }
        if (scissors isin $1-) {
          notice $nick You chose Scissors.... | msg %chan $nick Has Choosen.... |  hadd Pickle.RPS turn $+ $nick went
          inc %went | set %player2 3
          if (%went == 2) { RPSwin }
          halt
        }
      }
    }
  }
}
on *:text:!quitRPS:%chan:{ if ($hget(Pickle.RPS,going) == yes) { msg $chan $nick Quits. Game Over | endrps } }
;____________________________________________
;Aliases
;____________________________________________
alias -l endrps { unset %chan  | unset %player* | unset %went | hfree Pickle.RPS | halt }
alias -l RPSwin {
  ;_______________________________________________________________
  ;Rock beats scissors : Paper beats rock : Scisscor beats Paper
  ;Rock == 1 : Paper = 2 : scissors = 3 
  ;_______________________________________________________________
  ;Player 1 wins
  if (%player1 == 1 && %player2 == 3) { msg %chan $hget(Pickle.RPS,player1)) choses Rock : $hget(Pickle.RPS,player2) choses Scissors : $hget(Pickle.RPS,player1) Wins | endrps }
  if (%player1 == 2 && %player2 == 1) { msg %chan $hget(Pickle.RPS,player1) choses Paper : $hget(Pickle.RPS,player2) choses Rock : $hget(Pickle.RPS,player1) Wins | endrps }
  if (%player1 == 3 && %player2 == 2) { msg %chan $hget(Pickle.RPS,player1) choses Scissors  : $hget(Pickle.RPS,player2) choses Paper : $hget(Pickle.RPS,player1) Wins | endrps }
  ;Player 2 wins
  if (%player2 == 1 && %player1 == 3) { msg %chan $hget(Pickle.RPS,player1) choses Scissors : $hget(Pickle.RPS,player2) choses Rock : $hget(Pickle.RPS,player2) Wins | endrps }
  if (%player2 == 2 && %player1 == 1) { msg %chan $hget(Pickle.RPS,player1) choses Rock : $hget(Pickle.RPS,player2) choses Paper : $hget(Pickle.RPS,player2) Wins | endrps }
  if (%player2 == 3 && %player1 == 2) { msg %chan $hget(Pickle.RPS,player1) choses Paper  : $hget(Pickle.RPS,player2) choses Scissors  : $hget(Pickle.RPS,player2) Wins | endrps }
  ;players tie
  if (%player2 == 1 && %player1 == 1) { msg %chan $hget(Pickle.RPS,player1) choses Rock : $hget(Pickle.RPS,player2) choses Rock : It's a Tie! | endrps }
  if (%player2 == 2 && %player1 == 2) { msg %chan $hget(Pickle.RPS,player1) choses Paper : $hget(Pickle.RPS,player2) choses Paper : It's a Tie! | endrps }
  if (%player2 == 3 && %player1 == 3) { msg %chan $hget(Pickle.RPS,player1) choses Scissors : $hget(Pickle.RPS,player2) choses Scissors  : It's a Tie! | endrps }
}
alias -l botAI { set %player2 $rand(1,3) | inc %went | hdel Pickle.RPS BOT yes | msg %chan $me Has Choosen! }
;__________________________________
;Remote Tic Tac Toe v3.5 With a AI
;__________________________________
on *:text:!TTT*:#:{
  if ($hget(Pickle.RTTT , RTTTgoing) == join) { msg $chan Theres already a game started type !join to join | halt }
  if ($hget(Pickle.RTTT , RTTTgoing) == yes) { msg $chan Please wait till the current game ends | halt }
  hmake -s Pickle.RTTT 50 | hadd  Pickle.RTTT mark1 1 | hadd  Pickle.RTTT mark2 2 | hadd  Pickle.RTTT mark3 3 | hadd  Pickle.RTTT mark4 4
  hadd  Pickle.RTTT mark5 5 | hadd  Pickle.RTTT mark6 6 | hadd  Pickle.RTTT mark7 7 | hadd  Pickle.RTTT mark8 8 | hadd  Pickle.RTTT mark9 9
  hadd  Pickle.RTTT turn 1 | hadd  Pickle.RTTT Player1 $nick |  set %Rchan $chan
  if (bot isin $1-) { 
    hadd Pickle.RTTT bot y | hadd  Pickle.RTTT Player2 $me | hadd  Pickle.RTTT RTTTgoing yes
    msg $chan $nick has started a new game of Tic Tac Toe and the bot will be playing :) 
    msg $chan $nick its your turn , type !mark <num> to mark :) | chanboard | halt

  } 
  hadd Pickle.RTTT RTTTgoing join | msg $chan $nick has started a new game of Tic Tac Toe | msg $chan Type !join to join :)
}
on *:text:!Join:%Rchan:{
  if ($hget(Pickle.RTTT , RTTTgoing) == join) {
    if ($hget(Pickle.RTTT , player1) != $nick) {  
      msg $chan $nick has joined :) | chanboard | hadd Pickle.RTTT Player2 $nick | hadd Pickle.RTTT RTTTgoing yes
    }
  }
}
on *:text:!mark*:%Rchan:{
  if ($hget(Pickle.RTTT , RTTTgoing) == yes) {
    if ($hget(Pickle.RTTT , turn) == 1) {
      if ($nick == $hget(Pickle.RTTT ,player1)) {
        if ($hget(Pickle.RTTT , mark $+ $$2) isnum 1-9) {
          hadd Pickle.RTTT mark $+ $$2 X | checkwin 
          if ($hget(Pickle.RTTT,bot) == y) { notice $hget(Pickle.RTTT , player1) I'm thinking..... | TTTAI | halt }
          notice $hget(Pickle.RTTT , player2)  Your Turn. | notice $hget(Pickle.RTTT , player1) Marking..... | hadd Pickle.RTTT turn 2 | board | halt
        }
      } 
    }
    if ($hget(Pickle.RTTT , turn) == 2) { 
      if ($hget(Pickle.RTTT , mark $+ $$2) isnum 1-9) {
        if ($nick == $hget(Pickle.RTTT , player2)) {  
          hadd Pickle.RTTT mark $+ $$2 O | hadd Pickle.RTTT turn 1 | checkwin | board 
          notice $hget(Pickle.RTTT , player1) Your Turn. | notice $hget(Pickle.RTTT , player2) Marking..... | halt
        }
      }
    }
  }
}
on *:text:!quit:%Rchan:{
  if ($hget(Pickle.RTTT , RTTTgoing) == yes || $hget(Pickle.RTTT , RTTTgoing) == join) {
    if ($nick == $hget(Pickle.RTTT , player1) || $nick == $hget(Pickle.RTTT , player2) || $nick isop %Rchan) {
      chanboard | writeini RTTT.ini tie $hget(Pickle.RTTT , player1) $calc($readini(RTTT.ini , tie , $hget(Pickle.RTTT , player1)) + 1) 
      if ($hget(Pickle.RTTT , player2) != $null) { writeini RTTT.ini tie $hget(Pickle.RTTT , player2) $calc($readini(RTTT.ini , tie , $hget(Pickle.RTTT , player2)) + 1) }
      msg $chan $nick has ended the game. | endttt
    }
  }
}
on *:text:!board*:%Rchan:{
  if ($hget(Pickle.RTTT , RTTTgoing) == yes) {
    if ($nick == $hget(Pickle.RTTT , player1) || $nick == $hget(Pickle.RTTT , player2)) {
      notice $nick $hget(Pickle.RTTT , mark1) || $hget(Pickle.RTTT , mark2) || $hget(Pickle.RTTT , mark3)
      notice $nick ____________
      notice $nick $hget(Pickle.RTTT , mark4) || $hget(Pickle.RTTT , mark5) || $hget(Pickle.RTTT , mark6) 
      notice $nick ____________
      notice $nick $hget(Pickle.RTTT , mark7) || $hget(Pickle.RTTT , mark8) || $hget(Pickle.RTTT , mark9)
    }
  }
}
on *:text:!score:#:{ msg $chan TTT Scores for $nick | msg $chan $readini(RTTT.ini , win , $nick) Wins | msg $chan $readini(RTTT.ini , lose , $nick) Loses | msg $chan $readini(RTTT.ini , tie , $nick) Ties }
alias -l checkwin {
  ;player 1
  if ($hget(Pickle.RTTT , mark1) == x && $hget(Pickle.RTTT , mark2) == x && $hget(Pickle.RTTT , mark3) == x ) { msg %Rchan $hget(Pickle.RTTT , player1) Wins. | chanboard | var %winner $hget(Pickle.RTTT , player1) | TTTscore | endttt | halt }
  if ($hget(Pickle.RTTT , mark1) == x && $hget(Pickle.RTTT , mark4) == x && $hget(Pickle.RTTT , mark7) == x ) { msg %Rchan $hget(Pickle.RTTT , player1) Wins. | chanboard | var %winner $hget(Pickle.RTTT , player1) | TTTscore | endttt | halt }
  if ($hget(Pickle.RTTT , mark3) == x && $hget(Pickle.RTTT , mark6) == x && $hget(Pickle.RTTT , mark9) == x ) { msg %Rchan $hget(Pickle.RTTT , player1) Wins. | chanboard | var %winner $hget(Pickle.RTTT , player1) | TTTscore | endttt | halt }
  if ($hget(Pickle.RTTT , mark4) == x && $hget(Pickle.RTTT , mark5) == x && $hget(Pickle.RTTT , mark6) == x ) { msg %Rchan $hget(Pickle.RTTT , player1) Wins. | chanboard | var %winner $hget(Pickle.RTTT , player1) | TTTscore | endttt | halt }
  if ($hget(Pickle.RTTT , mark7) == x && $hget(Pickle.RTTT , mark8) == x && $hget(Pickle.RTTT , mark9) == x ) { msg %Rchan $hget(Pickle.RTTT , player1) Wins. | chanboard | var %winner $hget(Pickle.RTTT , player1) | TTTscore | endttt | halt }
  if ($hget(Pickle.RTTT , mark1) == x && $hget(Pickle.RTTT , mark5) == x && $hget(Pickle.RTTT , mark9) == x ) { msg %Rchan $hget(Pickle.RTTT , player1) Wins. | chanboard | var %winner $hget(Pickle.RTTT , player1) | TTTscore | endttt | halt }
  if ($hget(Pickle.RTTT , mark3) == x && $hget(Pickle.RTTT , mark5) == x && $hget(Pickle.RTTT , mark7) == x ) { msg %Rchan $hget(Pickle.RTTT , player1) Wins. | chanboard | var %winner $hget(Pickle.RTTT , player1) | TTTscore | endttt | halt }
  if ($hget(Pickle.RTTT , mark2) == x && $hget(Pickle.RTTT , mark5) == x && $hget(Pickle.RTTT , mark8) == x ) { msg %Rchan $hget(Pickle.RTTT , player1) Wins. | chanboard | var %winner $hget(Pickle.RTTT , player1) | TTTscore | endttt | halt }
  ;player 2
  if ($hget(Pickle.RTTT , mark1) == o && $hget(Pickle.RTTT , mark2) == o && $hget(Pickle.RTTT , mark3) == o ) { msg %Rchan $hget(Pickle.RTTT , player2) Wins. | chanboard | var %winner $hget(Pickle.RTTT , player2) | TTTscore | endttt | halt }
  if ($hget(Pickle.RTTT , mark1) == o && $hget(Pickle.RTTT , mark4) == o && $hget(Pickle.RTTT , mark7) == o ) { msg %Rchan $hget(Pickle.RTTT , player2) Wins. | chanboard | var %winner $hget(Pickle.RTTT , player2) | TTTscore | endttt | halt }
  if ($hget(Pickle.RTTT , mark3) == o && $hget(Pickle.RTTT , mark6) == o && $hget(Pickle.RTTT , mark9) == o ) { msg %Rchan $hget(Pickle.RTTT , player2) Wins. | chanboard | var %winner $hget(Pickle.RTTT , player2) | TTTscore | endttt | halt }
  if ($hget(Pickle.RTTT , mark4) == o && $hget(Pickle.RTTT , mark5) == o && $hget(Pickle.RTTT , mark6) == o ) { msg %Rchan $hget(Pickle.RTTT , player2) Wins. | chanboard | var %winner $hget(Pickle.RTTT , player2) | TTTscore | endttt | halt }
  if ($hget(Pickle.RTTT , mark7) == o && $hget(Pickle.RTTT , mark8) == o && $hget(Pickle.RTTT , mark9) == o ) { msg %Rchan $hget(Pickle.RTTT , player2) Wins. | chanboard | var %winner $hget(Pickle.RTTT , player2) | TTTscore | endttt | halt }
  if ($hget(Pickle.RTTT , mark1) == o && $hget(Pickle.RTTT , mark5) == o && $hget(Pickle.RTTT , mark9) == o ) { msg %Rchan $hget(Pickle.RTTT , player2) Wins. | chanboard | var %winner $hget(Pickle.RTTT , player2) | TTTscore | endttt | halt }
  if ($hget(Pickle.RTTT , mark3) == o && $hget(Pickle.RTTT , mark5) == o && $hget(Pickle.RTTT , mark7) == o ) { msg %Rchan $hget(Pickle.RTTT , player2) Wins. | chanboard | var %winner $hget(Pickle.RTTT , player2) | TTTscore | endttt | halt }
  if ($hget(Pickle.RTTT , mark2) == o && $hget(Pickle.RTTT , mark5) == o && $hget(Pickle.RTTT , mark8) == o ) { msg %Rchan $hget(Pickle.RTTT , player2) Wins. | chanboard | var %winner $hget(Pickle.RTTT , player2) | TTTscore | endttt | halt }
  ;No win
  if ($hget(Pickle.RTTT , mark1) != 1 && $hget(Pickle.RTTT , mark2) != 2 && $hget(Pickle.RTTT , mark3) != 3 && $hget(Pickle.RTTT , mark4) != 4 && $hget(Pickle.RTTT , mark5) != 5 && $hget(Pickle.RTTT , mark6) != 6 && $hget(Pickle.RTTT , mark7) != 7 && $hget(Pickle.RTTT , mark8) != 8 && $hget(Pickle.RTTT , mark9) != 9) { msg %Rchan Nobody Wins. | chanboard | var %winner nobody | TTTscore | endttt | halt }
}
alias -l endttt { hfree Pickle.RTTT }
alias -l TTTAI {
  ;this checks if it can win
  if ($hget(Pickle.RTTT , mark1) == o && $hget(Pickle.RTTT , mark2) == o && $hget(Pickle.RTTT , mark3) != x) { hadd pickle.rttt mark3 O | goto mark }
  if ($hget(Pickle.RTTT , mark4) == o && $hget(Pickle.RTTT , mark5) == o && $hget(Pickle.RTTT , mark6) != x) { hadd pickle.rttt mark6 O | goto mark }
  if ($hget(Pickle.RTTT , mark7) == o && $hget(Pickle.RTTT , mark8) == o && $hget(Pickle.RTTT , mark9) != x) { hadd pickle.rttt mark9 O | goto mark }
  if ($hget(Pickle.RTTT , mark1) == o && $hget(Pickle.RTTT , mark4) == o && $hget(Pickle.RTTT , mark7) != x) { hadd pickle.rttt mark7 O | goto mark }
  if ($hget(Pickle.RTTT , mark2) == o && $hget(Pickle.RTTT , mark5) == o && $hget(Pickle.RTTT , mark8) != x) { hadd pickle.rttt mark8 O | goto mark }
  if ($hget(Pickle.RTTT , mark3) == o && $hget(Pickle.RTTT , mark6) == o && $hget(Pickle.RTTT , mark9) != x) { hadd pickle.rttt mark9 O | goto mark }
  if ($hget(Pickle.RTTT , mark1) == o && $hget(Pickle.RTTT , mark5) == o && $hget(Pickle.RTTT , mark9) != x) { hadd pickle.rttt mark9 O | goto mark }
  if ($hget(Pickle.RTTT , mark7) == o && $hget(Pickle.RTTT , mark5) == o && $hget(Pickle.RTTT , mark3) != x) { hadd pickle.rttt mark3 O | goto mark }
  if ($hget(Pickle.RTTT , mark3) == o && $hget(Pickle.RTTT , mark2) == o && $hget(Pickle.RTTT , mark1) != x) { hadd pickle.rttt mark1 O | goto mark }
  if ($hget(Pickle.RTTT , mark6) == o && $hget(Pickle.RTTT , mark5) == o && $hget(Pickle.RTTT , mark4) != x) { hadd pickle.rttt mark4 O | goto mark }
  if ($hget(Pickle.RTTT , mark9) == o && $hget(Pickle.RTTT , mark8) == o && $hget(Pickle.RTTT , mark7) != x) { hadd pickle.rttt mark7 O | goto mark }
  if ($hget(Pickle.RTTT , mark7) == o && $hget(Pickle.RTTT , mark4) == o && $hget(Pickle.RTTT , mark1) != x) { hadd pickle.rttt mark1 O | goto mark }
  if ($hget(Pickle.RTTT , mark8) == o && $hget(Pickle.RTTT , mark5) == o && $hget(Pickle.RTTT , mark2) != x) { hadd pickle.rttt mark2 O | goto mark }
  if ($hget(Pickle.RTTT , mark9) == o && $hget(Pickle.RTTT , mark5) == o && $hget(Pickle.RTTT , mark1) != x) { hadd pickle.rttt mark1 O | goto mark }
  if ($hget(Pickle.RTTT , mark3) == o && $hget(Pickle.RTTT , mark5) == o && $hget(Pickle.RTTT , mark7) != x) { hadd pickle.rttt mark7 O | goto mark }
  if ($hget(Pickle.RTTT , mark1) == o && $hget(Pickle.RTTT , mark3) == o && $hget(Pickle.RTTT , mark2) != x) { hadd pickle.rttt mark2 O | goto mark }
  if ($hget(Pickle.RTTT , mark4) == o && $hget(Pickle.RTTT , mark6) == o && $hget(Pickle.RTTT , mark5) != x) { hadd pickle.rttt mark5 O | goto mark }
  if ($hget(Pickle.RTTT , mark7) == o && $hget(Pickle.RTTT , mark9) == o && $hget(Pickle.RTTT , mark8) != x) { hadd pickle.rttt mark8 O | goto mark }
  if ($hget(Pickle.RTTT , mark1) == o && $hget(Pickle.RTTT , mark7) == o && $hget(Pickle.RTTT , mark4) != x) { hadd pickle.rttt mark4 O | goto mark }
  if ($hget(Pickle.RTTT , mark2) == o && $hget(Pickle.RTTT , mark8) == o && $hget(Pickle.RTTT , mark5) != x) { hadd pickle.rttt mark5 O | goto mark }
  if ($hget(Pickle.RTTT , mark3) == o && $hget(Pickle.RTTT , mark9) == o && $hget(Pickle.RTTT , mark6) != x) { hadd pickle.rttt mark6 O | goto mark }
  if ($hget(Pickle.RTTT , mark1) == o && $hget(Pickle.RTTT , mark9) == o && $hget(Pickle.RTTT , mark5) != x) { hadd pickle.rttt mark5 O | goto mark }
  if ($hget(Pickle.RTTT , mark3) == o && $hget(Pickle.RTTT , mark7) == o && $hget(Pickle.RTTT , mark5) != x) { hadd pickle.rttt mark5 O | goto mark }
  ;if it can't win it checks to see if player 1 can.
  if ($hget(Pickle.RTTT , mark1) == x && $hget(Pickle.RTTT , mark2) == x && $hget(Pickle.RTTT , mark3) != o) { hadd pickle.rttt mark3 O | goto mark }
  if ($hget(Pickle.RTTT , mark4) == x && $hget(Pickle.RTTT , mark5) == x && $hget(Pickle.RTTT , mark6) != o) { hadd pickle.rttt mark6 O | goto mark }
  if ($hget(Pickle.RTTT , mark7) == x && $hget(Pickle.RTTT , mark8) == x && $hget(Pickle.RTTT , mark9) != o) { hadd pickle.rttt mark9 O | goto mark }
  if ($hget(Pickle.RTTT , mark1) == x && $hget(Pickle.RTTT , mark4) == x && $hget(Pickle.RTTT , mark7) != o) { hadd pickle.rttt mark7 O | goto mark }
  if ($hget(Pickle.RTTT , mark2) == x && $hget(Pickle.RTTT , mark5) == x && $hget(Pickle.RTTT , mark8) != o) { hadd pickle.rttt mark8 O | goto mark }
  if ($hget(Pickle.RTTT , mark3) == x && $hget(Pickle.RTTT , mark6) == x && $hget(Pickle.RTTT , mark9) != o) { hadd pickle.rttt mark9 O | goto mark }
  if ($hget(Pickle.RTTT , mark1) == x && $hget(Pickle.RTTT , mark5) == x && $hget(Pickle.RTTT , mark9) != o) { hadd pickle.rttt mark9 O | goto mark }
  if ($hget(Pickle.RTTT , mark7) == x && $hget(Pickle.RTTT , mark5) == x && $hget(Pickle.RTTT , mark3) != o) { hadd pickle.rttt mark3 O | goto mark }
  if ($hget(Pickle.RTTT , mark3) == x && $hget(Pickle.RTTT , mark2) == x && $hget(Pickle.RTTT , mark1) != o) { hadd pickle.rttt mark1 O | goto mark }
  if ($hget(Pickle.RTTT , mark6) == x && $hget(Pickle.RTTT , mark5) == x && $hget(Pickle.RTTT , mark4) != o) { hadd pickle.rttt mark4 O | goto mark }
  if ($hget(Pickle.RTTT , mark9) == x && $hget(Pickle.RTTT , mark8) == x && $hget(Pickle.RTTT , mark7) != o) { hadd pickle.rttt mark7 O | goto mark }
  if ($hget(Pickle.RTTT , mark7) == x && $hget(Pickle.RTTT , mark4) == x && $hget(Pickle.RTTT , mark1) != o) { hadd pickle.rttt mark1 O | goto mark }
  if ($hget(Pickle.RTTT , mark8) == x && $hget(Pickle.RTTT , mark5) == x && $hget(Pickle.RTTT , mark2) != o) { hadd pickle.rttt mark2 O | goto mark }
  if ($hget(Pickle.RTTT , mark9) == x && $hget(Pickle.RTTT , mark5) == x && $hget(Pickle.RTTT , mark1) != o) { hadd pickle.rttt mark1 O | goto mark }
  if ($hget(Pickle.RTTT , mark3) == x && $hget(Pickle.RTTT , mark5) == x && $hget(Pickle.RTTT , mark7) != o) { hadd pickle.rttt mark7 O | goto mark }
  if ($hget(Pickle.RTTT , mark1) == x && $hget(Pickle.RTTT , mark3) == x && $hget(Pickle.RTTT , mark2) != o) { hadd pickle.rttt mark2 O | goto mark }
  if ($hget(Pickle.RTTT , mark4) == x && $hget(Pickle.RTTT , mark6) == x && $hget(Pickle.RTTT , mark5) != o) { hadd pickle.rttt mark5 O | goto mark }
  if ($hget(Pickle.RTTT , mark7) == x && $hget(Pickle.RTTT , mark9) == x && $hget(Pickle.RTTT , mark8) != o) { hadd pickle.rttt mark8 O | goto mark }
  if ($hget(Pickle.RTTT , mark1) == x && $hget(Pickle.RTTT , mark7) == x && $hget(Pickle.RTTT , mark4) != o) { hadd pickle.rttt mark4 O | goto mark }
  if ($hget(Pickle.RTTT , mark2) == x && $hget(Pickle.RTTT , mark8) == x && $hget(Pickle.RTTT , mark5) != o) { hadd pickle.rttt mark5 O | goto mark }
  if ($hget(Pickle.RTTT , mark3) == x && $hget(Pickle.RTTT , mark9) == x && $hget(Pickle.RTTT , mark6) != o) { hadd pickle.rttt mark6 O | goto mark }
  if ($hget(Pickle.RTTT , mark1) == x && $hget(Pickle.RTTT , mark9) == x && $hget(Pickle.RTTT , mark5) != o) { hadd pickle.rttt mark5 O | goto mark }
  if ($hget(Pickle.RTTT , mark3) == x && $hget(Pickle.RTTT , mark7) == x && $hget(Pickle.RTTT , mark5) != o) { hadd pickle.rttt mark5 O | goto mark }
  ;if else it will randomly pick one.
  if ($hget(Pickle.RTTT , mark5) == 5) { hadd pickle.rttt mark5 O | goto mark }
  else { 
    :random 
    var %rand $rand(1,9)
    if (%rand == 1 && $hget(Pickle.RTTT , mark1) == 1 || %rand == 2 && $hget(Pickle.RTTT , mark2) == 2 || %rand == 3 && $hget(Pickle.RTTT , mark3) == 3 || %rand == 4 && $hget(Pickle.RTTT , mark4) == 4 || %rand == 5 && $hget(Pickle.RTTT , mark5) == 5 || %rand == 6 && $hget(Pickle.RTTT , mark6) == 6 || %rand == 7 && $hget(Pickle.RTTT , mark7) == 7 || %rand == 8 && $hget(Pickle.RTTT , mark8) == 8 || %rand == 9 && $hget(Pickle.RTTT , mark9) == 9) {
      hadd pickle.rttt mark $+ %rand O | goto mark
    }
    if else { goto random }
  }
  :mark 
  checkwin | board | notice $hget(Pickle.RTTT , player1) Your Turn.
}
alias -l board {
  if ($hget(Pickle.RTTT , turn) == 1) {
    notice $hget(Pickle.RTTT , player1) $hget(Pickle.RTTT , mark1) || $hget(Pickle.RTTT , mark2) || $hget(Pickle.RTTT , mark3)
    notice $hget(Pickle.RTTT , player1) ____________
    notice $hget(Pickle.RTTT , player1) $hget(Pickle.RTTT , mark4) || $hget(Pickle.RTTT , mark5) || $hget(Pickle.RTTT , mark6) 
    notice $hget(Pickle.RTTT , player1)  ____________
    notice $hget(Pickle.RTTT , player1) $hget(Pickle.RTTT , mark7) || $hget(Pickle.RTTT , mark8) || $hget(Pickle.RTTT , mark9)
  }
  if ($hget(Pickle.RTTT , turn) == 2) {
    notice $hget(Pickle.RTTT , player2) $hget(Pickle.RTTT , mark1) || $hget(Pickle.RTTT , mark2) || $hget(Pickle.RTTT , mark3)
    notice $hget(Pickle.RTTT , player2) ____________
    notice $hget(Pickle.RTTT , player2) $hget(Pickle.RTTT , mark4) || $hget(Pickle.RTTT , mark5) || $hget(Pickle.RTTT , mark6) 
    notice $hget(Pickle.RTTT , player2)  ____________
    notice $hget(Pickle.RTTT , player2) $hget(Pickle.RTTT , mark7) || $hget(Pickle.RTTT , mark8) || $hget(Pickle.RTTT , mark9)
  }
}
alias -l chanboard {   
  msg %Rchan $hget(Pickle.RTTT , mark1) || $hget(Pickle.RTTT , mark2) || $hget(Pickle.RTTT , mark3)
  msg %Rchan ____________
  msg %Rchan $hget(Pickle.RTTT , mark4) || $hget(Pickle.RTTT , mark5) || $hget(Pickle.RTTT , mark6) 
  msg %Rchan ____________
  msg %Rchan $hget(Pickle.RTTT , mark7) || $hget(Pickle.RTTT , mark8) || $hget(Pickle.RTTT , mark9)
}
alias -l TTTscore {
  if (%winner == $hget(Pickle.RTTT , player1) ) {
    writeini RTTT.ini win %temp $calc($readini(RTTT.ini , win , $hget(Pickle.RTTT , player1) ) + 1) 
    writeini RTTT.ini lose %temp $calc($readini(RTTT.ini , lose , $hget(Pickle.RTTT , player2) ) + 1) 
  }
  if (%winner == $hget(Pickle.RTTT , player2) ) {
    writeini RTTT.ini win %temp $calc($readini(RTTT.ini , win , $hget(Pickle.RTTT , player2) ) + 1) 
    writeini RTTT.ini lose %temp $calc($readini(RTTT.ini , lose , $hget(Pickle.RTTT , player1) ) + 1) 
  }
  if (%winner == nobody ) {
    writeini RTTT.ini tie %temp $calc($readini(RTTT.ini , tie , $hget(Pickle.RTTT , player1) ) + 1) 
    writeini RTTT.ini tie %temp $calc($readini(RTTT.ini , tie , $hget(Pickle.RTTT , player2) ) + 1) 
  }
}
;__________________________
;Flood Control v1.0 
;__________________________
dialog FC {
  title "Flood Control v1.0"
  size -1 -1 100 100
  option dbu
  text "Flood Control V1.0",100, 25 0 100 12
  text "Enter Channel use a , for more channels!",104, 1 6 150 12
  text "ex: #Pickles,#channel,#fun",105, 1 12 150 12
  edit "",5, 5 20 90 12
  text "Enter Lines Allowed",101, 25 34 100 12
  edit "",1, 5 40 90 12
  text "Enter Repeats Allowed",102, 25 52 100 12
  edit "",2, 5 58 90 12
  Button "ON",3, 5 70 35 20
  Button "OFF",4, 60 70 35 20
}
on *:dialog:FC:init:0:{ 
  if ($readini(Bot.ini,FC,fuction) == OFF) { did -b FC 4 }
  if ($readini(Bot.ini,FC,fuction) == ON) { did -b FC 3 }
  did -a FC 1 $readini(Bot.ini,FC,Lines) | did -a FC 2 $readini(Bot.ini,FC,Repeat) | did -a FC 5 %FCchan
} 
on *:dialog:FC:sclick:*:{ 
  if ($did == 3) { did -b FC 3 | did -e FC 4 | writeini Bot.ini FC fuction ON }
  if ($did == 4) { did -b FC 4 | did -e FC 3 | writeini Bot.ini FC fuction OFF }
}
on *:dialog:FC:edit:*:{
  if ($did == 1) { if ($did(1) != $null) { writeini Bot.ini FC lines $did(1) } }
  if ($did == 2) { if ($did(2) != $null) { writeini Bot.ini FC repeat $did(2) } }
  if ($did == 5) { if ($did(5) != $null) { set %FCchan $did(5) } }
}
on *:text:*:%FCchan:{
  if ($nick isop $chan) { halt }
  if ($readini(Bot.ini,FC,Fuction) == On) {
    if ($me isop $chan) {
      if ($hget(Pickle.FC, $nick $+ Repeatword) == $1- ) { hinc Pickle.FC $nick $+ repeat 1 | timerrepeat3 1 5 hdel Pickle.FC $nick $+ repeat $hget(Pickle.FC, $nick $+ repeat) }
      if ($hget(Pickle.FC, $nick $+ Repeatword) != $1- ) { hdel Pickle.FC $nick $+ Repeatword $hget(Pickle.FC, $nick $+ repeatword) }
      hadd Pickle.FC $nick $+ Repeatword $1- | timerrepeat1 1 5 hdel Pickle.FC $nick $+ Repeatword $hget(Pickle.FC, $nick $+ repeatword) 
      hinc Pickle.FC $nick $+ lines 1 | timerrepeat2 1 5 hdel Pickle.FC $nick $+ lines $hget(Pickle.FC, $nick $+ lines) 
      if ($hget(pickle.FC, $nick $+ repeat) >= $readini(Bot.ini,FC,Repeat)) { kick $chan $nick NO, BAD! no Repeating in $chan | halt }
      if ($hget(pickle.FC, $nick $+ lines) >= $readini(Bot.ini,FC,Lines)) { kick $chan $nick NO, BAD! no flooding in $chan | halt }
      if ($len( $1- ) >= 200) { kick $chan $nick NO BAD! no using more then 200 characters! | halt }
      if ($len($1-) >= 20) {  var %temp $calc($1- - $len($remove($1-,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,w,x,y,z))) }
      if (%temp >= 20) {  kick $chan $nick NO BAD! no using more then 20 CAP characters! | halt }
    }
  }
}
;============seen bot v1.0==========
on *:join:#:{
  if ($nick != $me) {
    writeini -n seen.ini seen $nick I Last Saw $nick $time(yyyy:ddd:h:nn:tt) Joining $chan
  }
}
on *:part:#:{
  if ($nick != $me) {
    writeini -n seen.ini seen $nick  I Last Saw $nick $time(yyyy:ddd:h:nn:tt) leaving $chan
  }
}
on *:quit:{
  if ($nick != $me) {
    writeini -n seen.ini seen $nick  I Last Saw $nick $time(yyyy:ddd:h:nn:tt) Quiting.
  }
}
on *:kick:#:{
  if ($nick != $me) {
    writeini -n seen.ini seen $nick I Last Saw $knick $time(yyyy:ddd:h:nn:tt) getting kicked by $nick in $chan
  }
}
on *:ban:#:{
  if ($nick != $me) {
    writeini -n seen.ini seen $bnick  I Last Saw $bnick $time(yyyy:ddd:h:nn:tt) getting Banned by $nick in $chan
  }
}
on *:nick:{
  if ($nick != $me) {
    writeini -n seen.ini seen $nick  I Last Saw $nick $time(yyyy:ddd:h:nn:tt) changing nickname to $newnick
  }
}
on *:usermode:{
  if ($nick != $me) {
    writeini -n seen.ini seen $nick  I Last Saw $nick $time(yyyy:ddd:h:nn:tt) getting ( $1- ) in $chan
  }
}
on *:topic:#:{
  if ($nick != $me) {
    writeini -n seen.ini seen $nick  I Last Saw $nick $time(yyyy:ddd:h:nn:tt) changing topic to ( $1- ) in $chan
  }
}
on *:text:*:#:{
  if (!seen == $$1) {
    if ($$2 == $null) { msg $chan >_> who is this "blank" person again? | halt }
    if ($$2 == $me) { describe $chan Waves at $nick :) | halt }
    if ($$2 == $nick) { describe $chan hands $nick a mirror | halt }
    if ($$2 ison $chan) { msg $chan $nick $+ , don't be lazy....look at the nicklist next time. | halt }
    if ($readini(seen.ini,seen,$$2) == $null) { msg $chan hmmm....I never seen $$2 before... | halt }
    msg $chan $readini(seen.ini,seen,$$2)
    halt
  }
  else {
    writeini -n seen.ini seen $nick I Last Saw $nick $time(yyyy:ddd:h:nn:tt) Saying ( $1- ) in $chan
  }
}

Comments

Sign in to comment.
pickle16   -  Sep 04, 2010

i know. its about eh 60-70% functional...theres so many lines its easier to recode the entire thing...

but i sorta retired from large mirc scripting. so you're welcome to post a improved version.. if the bugs bother you ;p

More
 Respond  
cptpan   -  Sep 04, 2010

I can't even begin to tell you where the issues are, there's tonnes of them. Even your description says there's bugs; and there is.

More
 Respond  
pickle16   -  Sep 03, 2010

you say its broken? but don't explain how its broken? you sir is fail.

More
 Respond  
cptpan   -  Aug 30, 2010

this is a broken piece of shit

More
 Respond  
Kingc44   -  Jul 03, 2010

Niceeee I like your fun bot pickle16. Great work :)

More
 Respond  
pickle16   -  Aug 30, 2009

yay :) thanks.

More
 Respond  
FordLawnmower   -  Aug 30, 2009

@pickle16 Looks like a lot of work for a 1 ;/ I hate when people do stuff like that. I had someone give all of my scripts a 1 once. I'll add a 10 for balance.

More
 Respond  
sk68   -  Aug 30, 2009

idk, but if the person didnt feel like explaining how to fix it I wouldnt worry about it =\

More
 Respond  
pickle16   -  Aug 30, 2009

why did i get a 1? :(

More
 Respond  
sk68   -  Aug 30, 2009

I like it, the games work great, needs a better help system though, or at least a notice that tells you what commands to use

More
 Respond  
Ghost-writer   -  Aug 28, 2009

on *:ban:#:{ if ($nick != $me) {

writeini -n seen.ini seen $nick  I Last Saw $bnick $time(mmm dd yyyy hh:nn:tt) getting Banned by $nick in $chan

} }

should be

on *:ban:#:{ if ($nick != $me) {

writeini -n seen.ini seen $bnick  I Last Saw $bnick $time(mmm dd yyyy hh:nn:tt) getting Banned by $nick in $chan

} }

More
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.