All pastes #741708 Raw Edit

Someone

public text v1 · immutable
·published 2007-10-18 22:24 UTC
rendered paste body
On 1:Text:!Stop:#irchorseracing: {
  if ($nick isop $chan) {
    unset %betsarebeingtaken
    unset %horse1
    unset %horse2
    unset %horse3
    unset %horse4
    unset %horse5
    unset %horse6
    unset %horse7
    unset %horse8
    unset %lol
    /timers off
    set %Stopped 1
    msg $chan 10 Horse Races have stopped to restart type !Start Ops Only!
  }
}
On 1:Text:!Start:#irchorseracing: {
  if ($nick isop $chan) {
    if (%Stopped == 1) {
      :Fixed
      Set %Horse1 $read(Horses.txt)
      Set %Horse2 $read(Horses.txt)
      Set %Horse3 $read(Horses.txt)
      Set %Horse4 $read(Horses.txt)
      Set %Horse5 $read(Horses.txt)
      Set %Horse6 $read(Horses.txt)
      Set %Horse7 $read(Horses.txt)
      Set %Horse8 $read(Horses.txt)
      while (%Horse1 == %Horse2 || %Horse1 == %Horse3 || %Horse1 == %Horse4 || %Horse1 == %Horse5 || %Horse1 == %Horse6 || %Horse1 == %Horse7 || %Horse1 == %Horse8) {
        goto Fixed
      }
      while (%Horse2 == %Horse3 || %Horse2 == %Horse4 || %Horse2 == %Horse5 || %Horse2 == %Horse6 || %Horse2 == %Horse7 || %Horse2 == %Horse8) {
        goto Fixed
      }
      while (%Horse3 == %Horse4 || %Horse3 == %Horse5 || %Horse3 == %Horse6 || %Horse3 == %Horse7 || %Horse3 == %Horse8) {
        goto Fixed
      }
      while (%Horse4 == %Horse5 || %Horse4 == %Horse6 || %Horse4 == %Horse7 || %Horse4 == %Horse8) {
        goto Fixed
      }
      while (%Horse5 == %Horse6 || %Horse5 == %Horse7 || %Horse5 == %Horse8) {
        goto Fixed
      }
      while (%Horse6 == %Horse7 || %Horse6 == %Horse8) {
        goto Fixed
      }
      while (%Horse7 == %Horse8) {
        goto Fixed
      }
      msg $chan 10 Bets are now open!The Horses names are: %horse1 (2:1) %horse2 (4:1) %horse3 (5:1) %Horse4 (6:1) %horse5 (7:1) %Horse6 (8:1) %Horse7 (9:1) %Horse8 (100:1)
      Set %Betsarebeingtaken 1
      unset %Stopped
    }
  }
}

On 1:Text:!Bet*:#irchorseracing: {
  if (%Betsarebeingtaken != 1) {
    msg $chan 10 Bets Are not being taken $nick $+ , Be Careful!
    halt
  }
  if (%lol != 1) {
    msg $chan 10 Horse races will beging in one minute get those bets in!
    Set %lol 1
    /timer 1 60 unSet %betsarebeingtaken
    /timer 1 60 /Races $chan
  }
  if (%money [ $+ [ $nick ] ] == $null) {
    Set %Money [ $+ [ $nick ] ] 500
  }
  if (. isin $$3) {
   msg $chan No Betting Decimal Places $nick $+ .
  if ($$3 > %money [ $+ [ $nick ] ]) {
    msg $chan 10 $nick you only have %money [ $+ [ $nick ] ] Dollars.
    halt
  }
  if (- isin $$3) {
    msg $chan 10 No Cheating.
    halt
  }
  if ($$2 == %Horse1) {
   if (%Betted [ $+ [ $nick ] ] == 1) {
    msg $chan you already bet on a horse.
     halt
   }
    set %Betted [ $+ [ $nick ] ]
    Set %money [ $+ [ $nick ] ] $calc( %money [ $+ [ $nick ] ] - $$3 )
    Set %HorseBet [ $+ [ $nick ] ] $$3
    Set %Odds [ $+ [ $nick ] ] 2
    Set %horse [ $+ [ $nick ] ] %Horse1
    msg $chan 10 $nick Has bet on %Horse1 $+ !!! He bet %HorseBet [ $+ [ $nick ] ] $+ $ The odds Are %Odds [ $+ [ $nick ] ] $+ :1!!
  }
  if ($$2 == %Horse2) {
   if (%Betted [ $+ [ $nick ] ] == 1) {
    msg $chan you already bet on a horse.
     halt
   }
    set %Betted [ $+ [ $nick ] ]
    Set %money [ $+ [ $nick ] ] $calc( %money [ $+ [ $nick ] ] - $$3 )
    Set %HorseBet [ $+ [ $nick ] ] $$3
    Set %Odds [ $+ [ $nick ] ] 4
    Set %horse [ $+ [ $nick ] ] %Horse2
    msg $chan 10 $nick Has bet on %Horse2 $+ !!! He bet %HorseBet [ $+ [ $nick ] ] $+ $ The odds Are %Odds [ $+ [ $nick ] ] $+ :1!!
  }
  if ($$2 == %Horse3) {
   if (%Betted [ $+ [ $nick ] ] == 1) {
    msg $chan you already bet on a horse.
     halt
   }
    set %Betted [ $+ [ $nick ] ]
    Set %money [ $+ [ $nick ] ] $calc( %money [ $+ [ $nick ] ] - $$3 )
    Set %HorseBet [ $+ [ $nick ] ] $$3
    Set %Odds [ $+ [ $nick ] ] 5
    Set %horse [ $+ [ $nick ] ] %Horse3
    msg $chan 10 $nick Has bet on %Horse3 $+ !!! He bet %HorseBet [ $+ [ $nick ] ] $+ $ The odds Are %Odds [ $+ [ $nick ] ] $+ :1!!
  }
  if ($$2 == %Horse4) {
   if (%Betted [ $+ [ $nick ] ] == 1) {
    msg $chan you already bet on a horse.
     halt
   }
    set %Betted [ $+ [ $nick ] ]
    Set %money [ $+ [ $nick ] ] $calc( %money [ $+ [ $nick ] ] - $$3 )
    Set %HorseBet [ $+ [ $nick ] ] $$3
    Set %Odds [ $+ [ $nick ] ] 6
    Set %horse [ $+ [ $nick ] ] %Horse4
    msg $chan 10 $nick Has bet on %Horse4 $+ !!! He bet %HorseBet [ $+ [ $nick ] ] $+ $ The odds Are %Odds [ $+ [ $nick ] ] $+ :1!!
  }
  if ($$2 == %Horse5) {
   if (%Betted [ $+ [ $nick ] ] == 1) {
    msg $chan you already bet on a horse.
     halt
   }
    set %Betted [ $+ [ $nick ] ]
    Set %money [ $+ [ $nick ] ] $calc( %money [ $+ [ $nick ] ] - $$3 )
    Set %HorseBet [ $+ [ $nick ] ] $$3
    Set %Odds [ $+ [ $nick ] ] 7
    Set %horse [ $+ [ $nick ] ] %Horse5
    msg $chan 10 $nick Has bet on %Horse5 $+ !!! He bet %HorseBet [ $+ [ $nick ] ] $+ $ The odds Are %Odds [ $+ [ $nick ] ] $+ :1!!
  }
  if ($$2 == %Horse6) {
   if (%Betted [ $+ [ $nick ] ] == 1) {
    msg $chan you already bet on a horse.
     halt
   }
    set %Betted [ $+ [ $nick ] ]
    Set %money [ $+ [ $nick ] ] $calc( %money [ $+ [ $nick ] ] - $$3 )
    Set %HorseBet [ $+ [ $nick ] ] $$3
    Set %Odds [ $+ [ $nick ] ] 8
    Set %horse [ $+ [ $nick ] ] %Horse6
    msg $chan 10 $nick Has bet on %Horse6 $+ !!! He bet %HorseBet [ $+ [ $nick ] ] $+ $ The odds Are %Odds [ $+ [ $nick ] ] $+ :1!!
  }
  if ($$2 == %Horse7) {
   if (%Betted [ $+ [ $nick ] ] == 1) {
    msg $chan you already bet on a horse.
     halt
   }
    set %Betted [ $+ [ $nick ] ]
    Set %money [ $+ [ $nick ] ] $calc( %money [ $+ [ $nick ] ] - $$3 )
    Set %HorseBet [ $+ [ $nick ] ] $$3
    Set %Odds [ $+ [ $nick ] ] 9
    Set %horse [ $+ [ $nick ] ] %Horse7
    msg $chan 10 $nick Has bet on %Horse7 $+ !!! He bet %HorseBet [ $+ [ $nick ] ] $+ $ The odds Are %Odds [ $+ [ $nick ] ] $+ :1!!
  }
  if ($$2 == %Horse8) {
   if (%Betted [ $+ [ $nick ] ] == 1) {
    msg $chan you already bet on a horse.
     halt
   }
    set %Betted [ $+ [ $nick ] ]
    Set %money [ $+ [ $nick ] ] $calc( %money [ $+ [ $nick ] ] - $$3 )
    Set %HorseBet [ $+ [ $nick ] ] $$3
    Set %Odds [ $+ [ $nick ] ] 100
    Set %horse [ $+ [ $nick ] ] %Horse8
    msg $chan 10 $nick Has bet on %Horse8 $+ !!! He bet %HorseBet [ $+ [ $nick ] ] $+ $ The odds Are %Odds [ $+ [ $nick ] ] $+ :1!!
  }
}

On 1:Text:!Cashin:#irchorseracing: {
  if (%horse [ $+ [ $nick ] ] == %winner) {
    set %Winnings [ $+ [ $nick ] ] $calc( %Horsebet [ $+ [ $nick ] ] * %odds [ $+ [ $nick ] ] )
    msg $chan 10Congratulations $nick %winner Was the winner! You have won %Winnings [ $+ [ $nick ] ]
    set %Money [ $+ [ $nick ] ] $calc( %Winnings [ $+ [ $nick ] ]  + %Money [ $+ [ $nick ] ] )
   unset %Betted [ $+ [ $nick ] ]
    halt
  }
  if (%Warning [ $+ [ $nick ] ] == $null) {
    set %Warning [ $+ [ $nick ] ] 0
  }
  inc %Warning [ $+ [ $nick ] ]
  msg $Chan 4 Sorry You Didnt Win, Thankyou for the money. you have %money [ $+ [ $nick ] ]
   unset %Betted [ $+ [ $nick ] ]
  if (%warning [ $+ [ $nick ] ] == 5) {
    /kick $Chan $nick Dont Try it again </3
    unset %Warning [ $+ [ $nick ] ]
  }
}

on 1:Text:!money:*: { 
  notice $nick you have %money [ $+ [ $nick ] ]
  if (%money [ $+ [ $nick ] ] < 500 || %money [ $+ [ $nick ] ] == $null) {
    set %money [ $+ [ $nick ] ] 500
    /notice $nick i gave you 500$
  }
}

On 1:Text:!Horses:#irchorseracing: { 
  notice $nick the horses Are  %horse1 (2:1) %horse2 (4:1) %horse3 (5:1) %Horse4 (6:1) %horse5 (7:1) %Horse6 (8:1) %Horse7 (9:1) %Horse8 (100:1)
}



alias Races { 
  /mode $$1  +m
  unSet %betsarebeingtaken
  msg $$1 10 The horses are getting Ready!
  Set %ChanceNumber $r(0,1020)
  if (%ChanceNumber <= 199) {
    /timer 1 38 msg $$1   10 Ready? Set? GO!
    /timer 1 40 msg $$1   10 And their off %Horse4 taking the lead! Followed by %Horse2 and %Horse1 in behind %Horse8
    /timer 1 45 msg $$1   10 Here comes the first corner and %Horse5 Catching up fast passing %horse1 and %horse2 Trying to take the lead!
    /timer 1 55 msg $$1   10 Oh NO! %Horse5 has tripped and fallen. %Horse1 has passed %Horse2 and taken Second.
    /timer 1 60 msg $$1   10 %Horse4 is storming ahead but %Horse1 isnt far behind!
    /timer 1 70 msg $$1   10 the last corner, omg this is Stressful! %Horse1 and %Horse4 Neck and neck! WHOS Gonna Win!?
    /timer 1 75 msg $$1   10 And the winner is!
    /timer 1 77 msg $$1   10 %Horse1 $+ !!! Followed by %Horse4 %Horse2 %Horse3 %Horse6 %Horse7 %Horse8 Sorry folks but %Horse5 didnt even Finish The Race!
    Set %Winner %Horse1
    /timer 1 80 msg $$1   10 the Winner is %Horse1 Did your horse win? then type !cashin Bets will reopen in 60 Seconds!

  }
  if (%ChanceNumber >= 200 && %Chancenumber <= 399) {
    /timer 1 38 msg $$1   10 Ready? Set? GO!
    /timer 1 40 msg $$1   10 And their off %Horse7 taking the lead! Followed by %Horse3 and %Horse6 in behind %Horse1.
    /timer 1 45 msg $$1   10 Here comes the first corner and %Horse4 Catching up fast passing %horse3 and %horse6 Trying to take the lead!
    /timer 1 55 msg $$1   10 %horse2 it appears as if %horse2 has taken... a Super drive? for he is passing everyone on the course! %horse2 has taken Second.
    /timer 1 60 msg $$1   10 %Horse7 is still ahead but %Horse2 isnt far behind!
    /timer 1 70 msg $$1   10 the last corner, and %Horse2 is in first and %Horse7 is at his tail!
    /timer 1 75 msg $$1   10 And the winner is!
    /timer 1 77 msg $$1   10 %Horse2 $+ !!! Followed by %Horse7 %Horse6 %Horse5 %Horse3 %Horse4 %Horse1 %Horse8 $+ !
    Set %Winner %Horse2
    /timer 1 80 msg $$1   10 the Winner is %Horse2 Did your horse win? then type !cashin Bets will reopen in 60 Seconds!
  }
  if (%ChanceNumber >= 400 && %chancenumber <= 649) {
    /timer 1 38 msg $$1   10 Ready? Set? GO!
    /timer 1 40 msg $$1   10 And their off %Horse7 taking the lead! Followed by %Horse1 and %Horse3 in behind %Horse5
    /timer 1 45 msg $$1   10 Here comes the first corner and %Horse4 Catching up fast passing %horse1 and %horse3 Trying to take the lead!
    /timer 1 55 msg $$1   10 %Horse3 has passed %Horse1 and taken Second.
    /timer 1 60 msg $$1   10 %Horse7 is storming ahead but %Horse3 isnt far behind!
    /timer 1 70 msg $$1   10 the last corner, %Horse3 and %Horse7 Neck and neck! WHOS Gonna Win!?
    /timer 1 75 msg $$1   10 And the winner is!
    /timer 1 77 msg $$1   10 %Horse3 $+ !!! Followed by %Horse7 %Horse4 %Horse1 %Horse6 %Horse8 %Horse5 %horse2
    Set %Winner %Horse3
    /timer 1 80 msg $$1   10 the Winner is %Horse3 Did your horse win? then type !cashin Bets will reopen in 60 Seconds!
  }
  if (%ChanceNumber >= 650 && %Chancenumber <= 779) {
    /timer 1 38 msg $$1   10 Ready? Set? GO!
    /timer 1 40 msg $$1   10 And their off %Horse8 taking the lead! Followed by %Horse6 and %Horse2 in behind %Horse3
    /timer 1 45 msg $$1   10 Here comes the first corner and %Horse4 Catching up fast passing %horse6 and %horse7 Trying to take the lead!
    /timer 1 55 msg $$1   10 Oh NO! %Horse3 has tripped and fallen. %Horse4 has passed %Horse2 and taken Second.
    /timer 1 60 msg $$1   10 %Horse4 is storming ahead but %Horse8 isnt far behind!
    /timer 1 70 msg $$1   10 the last corner, %horse4 Still in the lead followed by %horse7
    /timer 1 75 msg $$1   10 And the winner is!
    /timer 1 77 msg $$1   10 %Horse4 $+ !!! Followed by %Horse7 %Horse6 %Horse8 %Horse6 %Horse1 %Horse2 Sorry folks but %Horse3 didnt even Finish The Race!
    Set %Winner %Horse4
    /timer 1 80 msg $$1   10 the Winner is %Horse4 Did your horse win? then type !cashin Bets will reopen in 60 Seconds!
  }
  if (%ChanceNumber >= 780 && %ChanceNumber <= 874) {
    /timer 1 38 msg $$1   10 Ready? Set? GO!
    /timer 1 40 msg $$1   10 And their off %Horse6 taking the lead! Followed by %Horse2 and %Horse1 in behind %Horse4
    /timer 1 45 msg $$1   10 Here comes the first corner and %Horse5 Catching up fast passing %horse3 and %horse7 Trying to take the lead!
    /timer 1 55 msg $$1   10 Oh NO! %Horse6 has tripped and fallen Knocking over %horse2 and %horse1. %Horse5 has passed them all and taken First!
    /timer 1 60 msg $$1   10 %Horse5 is storming ahead not even one horse is close
    /timer 1 70 msg $$1   10 the last corner, omg this is Amazing! %Horse5 Miles ahead i think we know who the winner is.
    /timer 1 75 msg $$1   10 And the winner is!
    /timer 1 77 msg $$1   10 %Horse5 $+ !!! Followed by %Horse4 %Horse3 %Horse7 %Horse8 Sorry folks but %Horse6 %horse2 and %horse1 didnt even Finish The Race!
    Set %Winner %Horse5
    /timer 1 80 msg $$1   10 the Winner is %Horse5 Did your horse win? then type !cashin Bets will reopen in 60 Seconds!
  }
  if (%ChanceNumber >= 875 && %Chancenumber <= 949) {
    /timer 1 38 msg $$1   10 Ready? Set? GO!
    /timer 1 40 msg $$1   10 And their off %Horse6 taking the lead! Followed by %Horse4 and %Horse3 in behind %Horse7
    /timer 1 45 msg $$1   10 Here comes the first corner and %Horse5 Catching up fast passing %horse2 and %horse8 Trying to take the lead!
    /timer 1 55 msg $$1   10 %Horse1 has passed %Horse3 and %horse4 and has taken Second.
    /timer 1 60 msg $$1   10 %Horse6 is storming ahead but %Horse1 isnt far behind!
    /timer 1 70 msg $$1   10 the last corner, omg this is Stressful! %Horse6 and %Horse1 Neck and neck! WHOS Gonna Win!?
    /timer 1 75 msg $$1   10 And the winner is!
    /timer 1 77 msg $$1   10 %Horse6 $+ !!! Followed by %Horse1 %Horse3 %Horse4 %Horse2 %Horse8 %Horse5 and %horse7
    Set %Winner %Horse6
    /timer 1 80 msg $$1   10 the Winner is %Horse6 Did your horse win? then type !cashin Bets will reopen in 60 Seconds!
  }
  if (%ChanceNumber >= 950 && %Chancenumber <= 999) {
    /timer 1 38 msg $$1   10 Ready? Set? GO!
    /timer 1 40 msg $$1   10 And their off %Horse2 taking the lead! Followed by %Horse5 and %Horse7 in behind %Horse3
    /timer 1 45 msg $$1   10 Here comes the first corner and %Horse6 Catching up fast passing %horse8 and %horse4 Trying to take the lead!
    /timer 1 55 msg $$1   10 Oh NO! %Horse1 has tripped and fallen. %Horse7 has passed %Horse5 and taken Second.
    /timer 1 60 msg $$1   10 %Horse7 is storming ahead but %Horse2 isnt far behind!
    /timer 1 70 msg $$1   10 the last corner, and %Horse7 and %Horse2 Neck and neck! WHOS Gonna Win!?
    /timer 1 75 msg $$1   10 And the winner is!
    /timer 1 77 msg $$1   10 %Horse7 $+ !!! Followed by %Horse2 %Horse4 %Horse3 %Horse6 %Horse8 %Horse5 Sorry folks but %Horse1 didnt even Finish The Race!
    Set %Winner %Horse7
    /timer 1 80 msg $$1   10 the Winner is %Horse7 Did your horse win? then type !cashin Bets will reopen in 60 Seconds!
  }
  if (%ChanceNumber >= 1000) {
    /timer 1 38 msg $$1   10 Ready? Set? GO!
    /timer 1 40 msg $$1   10 And their off %Horse1 taking the lead! Followed by %Horse2 and %Horse4 in behind %Horse8
    /timer 1 45 msg $$1   10 Here comes the first corner and %Horse5 Catching up fast passing %horse2 and %horse4 Trying to take the lead!
    /timer 1 55 msg $$1   10 Oh NO! %Horse5 has tripped and fallen. %Horse4 and %Horse2 have also trippen over the horse.
    /timer 1 60 msg $$1   10 %Horse8 is storming ahead while all other horses are falling!
    /timer 1 70 msg $$1   10 the last corner, omg this is Stressful! BUT WHATS THIS! %Horse8 is the only horse standing...
    /timer 1 75 msg $$1   10 And the winner is!
    /timer 1 77 msg $$1   10 %Horse8 $+ !!! Sorry folks but %Horse5 %Horse1 %Horse4 %Horse7 %Horse2 %Horse3 %Horse6 didnt even Finish The Race!
    Set %Winner %Horse8
    /timer 1 80 msg $$1   10 the Winner is %Horse8 Did your horse win? then type !cashin Bets will reopen in 60 Seconds!
  }
  /timer 1 140 /Begin $$1 
}

alias begin { 
  :fixed2
  Set %Horse1 $read(Horses.txt)
  Set %Horse2 $read(Horses.txt)
  Set %Horse3 $read(Horses.txt)
  Set %Horse4 $read(Horses.txt)
  Set %Horse5 $read(Horses.txt)
  Set %Horse6 $read(Horses.txt)
  Set %Horse7 $read(Horses.txt)
  Set %Horse8 $read(Horses.txt)
  Set %betsarebeingtaken 1
  while (%Horse1 == %Horse2 || %Horse1 == %Horse3 || %Horse1 == %Horse4 || %Horse1 == %Horse5 || %Horse1 == %Horse6 || %Horse1 == %Horse7 || %Horse1 == %Horse8) {
    goto Fixed2
  }
  while (%Horse2 == %Horse3 || %Horse2 == %Horse4 || %Horse2 == %Horse5 || %Horse2 == %Horse6 || %Horse2 == %Horse7 || %Horse2 == %Horse8) {
    goto Fixed2
  }
  while (%Horse3 == %Horse4 || %Horse3 == %Horse5 || %Horse3 == %Horse6 || %Horse3 == %Horse7 || %Horse3 == %Horse8) {
    goto Fixed2
  }
  while (%Horse4 == %Horse5 || %Horse4 == %Horse6 || %Horse4 == %Horse7 || %Horse4 == %Horse8) {
    goto Fixed2
  }
  while (%Horse5 == %Horse6 || %Horse5 == %Horse7 || %Horse5 == %Horse8) {
    goto Fixed2
  }
  while (%Horse6 == %Horse7 || %Horse6 == %Horse8) {
    goto Fixed2
  }
  while (%Horse7 == %Horse8) {
    goto Fixed2
  }
  msg $$1 4 Bets are open once again! The horse names are:7 %horse1 (2:1) %horse2 (4:1) %horse3 (5:1) %Horse4 (6:1) %horse5 (7:1) %Horse6 (8:1) %Horse7 (9:1) %Horse8 (100:1)
  mode $$1 -m
  unset %lol
}