I still want to be able to use !beer without getting an unknown beer command error. I also want it to let you give the Beer you stole to someone else with !beer Nick
So !beer would react the same as !beer drink 1 and !beer Nick would say I stole it and add a line where I give it to nick.
in my noobish way I tried changing the top line that had the unknown error to the previous beer line I was using before. THis obviously didn't work. LOL Can someone show me how to fix it to do what I want?
Code:
on *:TEXT:!Beer*:#: {
if ($2 == $null) { $ent.default(beer,describe $chan gives $iif($2 ison $chan,$2,$nick) a beer, 4, 1800,msg $chan No more beer credit for you ; $+ [ ) ] , notice $nick cut it down on the beer :) }
elseif ($2 == help) { notice $nick Beer commands: !Beer fill - !Beer drink <number> - !Beer add <number> - !Beer guess start - !Beer guess stop - !Beer guess score - !Beer stats }
elseif ($2 == stats) {
msg $chan Last person to fill Beer Fridge: %Beerfiller
.timer 1 1 msg $chan Last person to drink Beer: $+(,%Beerdrinker,)
.timer 1 2 msg $chan Last person to add Beer: $+(,%Beeradder,)
.timer 1 3 msg $chan Beers left in Beer Fridge: $+(,%BeerFridge,)
.timer 1 4 msg $chan Type !Beer help to get a list of Beer commands.
}
elseif ($2 == guess) && ($3 == score) && (% [ $+ [ Beerscore [ $+ [ . [ $+ [ $nick ] ] ] ] ] ] == $null) {
set % [ $+ [ Beerscore [ $+ [ . [ $+ [ $nick ] ] ] ] ] ] 0
msg $chan $+(,$nick,) $+ : Your current Beer guessing score is $+(,% [ $+ [ Beerscore [ $+ [ . [ $+ [ $nick ] ] ] ] ] ],) $+ .
}
elseif ($2 == guess) && ($3 == score) { msg $chan $+(,$nick,) $+ : Your current Beer guessing score is $+(,% [ $+ [ Beerscore [ $+ [ . [ $+ [ $nick ] ] ] ] ] ],) $+ . }
elseif ($2 == guess) && ($3 == stop) && (%Beerguess != ON) { msg $chan There is no Beer guessing game in progress $+(,$nick,) $+ . }
elseif ($2 == guess) && ($3 == stop) {
set %Beerguess OFF
set %BeerFridge 0
msg $chan Beer Guessing Game has stopped. The Beer Fridge has been emptied.
}
elseif ($2 == guess) && ($3 == start) && (%Beerguess == ON) { msg $chan Beer Guessing Game is already going $+(,$nick,) $+ . }
elseif ($2 == guess) && ($3 == start) {
set %Beerguess ON
set %BeerFridge $rand(1,1000)
msg $chan Beer Guessing Game has started.
.timer 1 1 msg $chan Type !Beer guess <number> to guess how many Beers are in the Fridge.
}
elseif ($2 == guess) && ($3 !isnum) && (%Beerguess != ON) { msg $chan There is no Beer guessing game in progress $+(,$nick,) $+ . }
elseif ($2 == guess) && ($3 isnum) && ($3 > %BeerFridge) && (%Beerguess != ON) { msg $chan There is no Beer guessing game in progress $+(,$nick,) $+ . }
elseif ($2 == guess) && ($3 isnum) && ($3 < %BeerFridge) && (%Beerguess != ON) { msg $chan There is no Beer guessing game in progress $+(,$nick,) $+ . }
elseif ($2 == guess) && ($3 isnum) && ($3 == %BeerFridge) && (%Beerguess != ON) { msg $chan There is no Beer guessing game in progress $+(,$nick,) $+ . }
elseif ($2 == guess) && ($3 !isnum) { msg $chan You need to specify the number of Beers you think are in the Fridge $+(,$nick,) $+ . }
elseif ($2 == guess) && ($3 isnum) && ($3 > %BeerFridge) && (%Beerguess == ON) { msg $chan Incorrect! Try a lower number $+(,$nick,) $+ . }
elseif ($2 == guess) && ($3 isnum) && ($3 < %BeerFridge) && (%Beerguess == ON) { msg $chan Incorrect! Try a higher number $+(,$nick,) $+ . }
elseif ($2 == guess) && ($3 isnum) && ($3 == %BeerFridge) && (%Beerguess == ON) {
set %BeerFridge 0
set %Beerguess OFF
inc % [ $+ [ Beerscore [ $+ [ . [ $+ [ $nick ] ] ] ] ] ] 1
msg $chan Yes! $+(,$nick,) got the answer correct with $+(,$3,) and is awarded 1 point.
.timer 1 1 msg $chan The Fridge has been emptied. Type !Beer guess start to start anew!
}
elseif ($2 == fill) && (%Beerguess == ON) { msg $chan You cannot fill the Fridge while the Beer guessing game is in progress $+(,$nick,) $+ . }
elseif ($2 == fill) && (%BeerFridge == 1000) { msg $chan The Fridge is already full $+(,$nick,) $+ . There are $+(,%BeerFridge,) Beers in it. }
elseif ($2 == fill) {
set %BeerFridge 1000
set %Beerfiller $nick
msg $chan The Beer Fridge has been filled by $+(,$nick,) $+ . There are now $+(,%BeerFridge,) Beers in it.
}
elseif ($2 == drink) && (%Beerguess == ON) { msg $chan You cannot drink the Beer while the Beer guessing game is in progress $+(,$nick,) $+ . }
elseif ($2 == drink) && ($3 !isnum) { msg $chan You need to specify a number of Beers you want to drink $+(,$nick,) $+ . }
elseif ($2 == drink) && ($left($3,1) == 0) { msg $chan You can't drink 0 Beers from the Fridge $+(,$nick,) $+ . }
elseif ($2 == drink) && ($3 isnum) && ($calc(%BeerFridge - $3) < 0) { msg $chan There aren't enough Beers for you to drink that much $+(,$nick,) $+ . }
elseif ($2 == drink) && ($3 isnum) && ($calc(%BeerFridge - $3) >= 0) {
dec %BeerFridge $3
set %Beerdrinker $nick
msg $chan Who stole all the Beer from the Fridge?!
.timer 1 1 msg $chan $+(,$nick,) stole the Beer from the Beer Fridge! There are now $+(,%BeerFridge,) Beers left.
}
elseif ($2 == add) && (%Beerguess == ON) { msg $chan You cannot add to the Fridge while the Beer guessing game is in progress $+(,$nick,) $+ . }
elseif ($2 == add) && ($3 !isnum) { msg $chan You need to specify a number of Beers you want to add to the Fridge $+(,$nick,) $+ . }
elseif ($2 == add) && ($left($3,1) == 0) { msg $chan You can't add 0 Beers to the Fridge $+(,$nick,) $+ . }
elseif ($2 == add) && ($3 isnum) && ($calc(%BeerFridge + $3) <= 1000) {
inc %BeerFridge $3
set %Beeradder $nick
msg $chan $+(,$nick,) added $+(,$3,) Beer(s) to the Beer Fridge. There are now $+(,%BeerFridge,) Beers in it.
}
elseif ($2 == add) && ($3 isnum) && ($calc(%BeerFridge + $3) > 1000) { msg $chan The Beer Fridge can't hold that many Beers $+(,$nick,) $+ . }
else { msg $chan Unknown Beer command. Type !Beer help to get a list of available Beer commands }
}