Soda Bar

By Viper01 on Aug 25, 2008

Been awhile since i posted anything x.x

anyway, alt+r, new file, you know the drill.

Commands

soda - really a formality and useless addition menu - shows whoever typed it the stuff in stock
prices - shows whoever typed it the prices Mountaindew - buys a mountain dew
monster - buys a monster energy coke - buys a Coca-Cola
pepsi - buys a pepsi(oh no, company conflict x.x) vault - buys a vault
/restock - restocks everything if it runs out

Issues

%cash is EVERYBODIES cash level - which means a spammer can run out pretty fast

Comments

Yes I know this can be much cleaner. I know that the %cash variable can be a problem to deal with. I also know ini files would make it cleaner and i could get rid of the `soda command.
I'm working on a new version of this already, i was experimenting with a cash limiter and decided to make this even though its been done about 40 times or more. Also wanted to post something to say 'I'm still around' besides the occasional forum/script comment. So, rate it or hate it, i've pretty much covered all the potential flame zones. DO YOUR WORST >:O

on *:text:`soda*:#: {
  set %limit 20
  notice $nick Welcome to the Soda Bar, $nick $+ .
  notice $nick Type `menu to see what we have in stock.
}
on *:text:`menu*:#: {
  describe $chan shows $nick the menu.
  notice $nick `MountainDew( $+ %MDstocked $+ / $+ %limit $+ )
  notice $nick `Pepsi( $+ %Pstocked $+ / $+ %limit $+ )
  notice $nick `Coke( $+ %Cstocked $+ / $+ %limit $+ )
  notice $nick `Vault( $+ %Vstocked $+ / $+ %limit $+ )
  notice $nick `Monster( $+ %Mstocked $+ / $+ %limit $+ )
  notice $nick You currently have: $ $+ %Cash $+ .
  notice $nick Type `Prices to view the prices.
}
on *:text:`MountainDew*:#: {
  if (%MDStocked == 0) {
    notice $nick Mountain Dew is sold out, choose another soda. | halt
  }
  else {
    dec %MDStocked 1
    describe $chan hands $nick a Mountain Dew.
    dec %cash %mdprice
    notice $nick You have $ $+ %cash remaining.
  }
}
on *:text:`pepsi*:#: {
  if (%PStocked == 0) {
    notice $nick Pepsi is sold out, choose another soda. | halt
  }
  else {
    dec %PStocked 1
    describe $chan hands $nick a Pepsi.
    dec %cash %pprice
    notice $nick You have $ $+ %cash remaining.
  }
}
on *:Text:`Vault*:#: {
  if (%VStocked == 0) {
    notice $nick Vault is sold out, choose another soda. | halt
  }
  else {
    dec %VStocked 1
    describe $chan hands $nick a Vault.
    dec %cash %Vprice
    notice $nick You have $ $+ %cash remaining.
  }
}
on *:text:`Coke*:#: {
  if (%CStocked == 0) {
    notice $nick Coke is sold out, choose another soda. | halt
  }
  else {
    dec %CStocked 1
    describe $chan hands $nick a Coke.
    dec %cash %cprice
    notice $nick You have $ $+ %cash remaining.
  }
}
on *:text:`Monster*:#: {
  if (%MStocked == 0) {
    notice $nick Monster Energy is sold out, choose another soda. | halt
  }
  if (%cash < 2 ) {
    notice $nick You don't have enough money! | halt
  }
  else {
    dec %Mstocked 1
    describe $chan hands $nick a Monster Energy.
    dec %cash %mprice
    notice $nick You have $ $+ %cash remaining.
  }
}

on *:text:`prices*:#: {
  notice $nick Mountain Dew: $ $+ %MDPrice
  notice $nick Monster: $ $+ %MPrice
  notice $nick Vault: $ $+ %VPrice
  notice $nick Coke: $ $+ %CPrice
  notice $nick Pepsi: $ $+ %PPrice
}
alias restock {
describe $chan restocks the merchandise...
  set %MDStocked 20
  set %MStocked 20
  set %VStocked 20
  set %CStocked 20
  set %PStocked 20
  set %cash 50
  set %MDPrice 2 
  set %MPrice 2
  set %CPrice 2
  set %PPrice 2
  set %VPrice 2
}

Comments

Sign in to comment.
Jonesy44   -  Aug 14, 2009

I don't play anymore. It use to be The-Heretic, I'd 26016
I got deleted after level 36 lol

 Respond  
PATX   -  Aug 11, 2009

jonesy44 whats ur tc name?

 Respond  
guest598594   -  Aug 27, 2008

:o I'm famous

 Respond  
Jonesy44   -  Aug 27, 2008

haha! :p

on :text:`MountainDew:#: {

MD, get yer bum on irc.torncity.com btw :D

 Respond  
guest598594   -  Aug 27, 2008

I think it'd be better if everyone got their own money. You could set the cash var like %money. [ $+ [ $nick ] ]

 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.