Been awhile since i posted anything x.x
anyway, alt+r, new file, you know the drill.
soda - really a formality and useless addition
menu - shows whoever typed it the stuff in stockprices - shows whoever typed it the prices
Mountaindew - buys a mountain dewmonster - buys a monster energy
coke - buys a Coca-Colapepsi - buys a pepsi(oh no, company conflict x.x)
vault - buys a vaultYes 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
}