Originally Posted By: seanturner70
Ok, I am starting to struggle.

I think I need to drop doing the Full thing at first...

So, I am starting with:
Code:
on 1:text:*:#: {
 if ($me == no-nick) {
  if !bar { msg $chan 11 Hello $nick Welcome To Bullets Bar We Have on the menu today || $&
      !Beer , !Coffee , !Nuts , !Haribos , !Water , !Coke , !Pepsi , !Cola , !Chips , !ChickenWings , !Pizza.6 We also have !desserts 3 Remember to pay by typing, !bill } 
  if !Beer { msg $chan Heres13 Your Beer 11 $nick }
 {
{   


I am unsure how you would make the bill go up, and if I am doing it right just now.



Floods? Look at your brackets... also ... !bar ? !beer? These are not variables or custom identifiers.

Allow me to explain the basic idea. With scripting the toughest part is figuring out how you want to do things. Once you have this figured out it's very easy to find the commands and identifiers and events you need to make it happen.

Let's make it real easy using an ini file to store customers purchases. Let's just assume money is unlimited and they can order whatever they like first.

A person orders a milk, script knows milk is $5. So you would want to $calc their existing bill PLUS $5.

Let's name the ini file bar.ini. We can name the section after the room later if you like, in case you want a seperate bill for each room you run it in. For now let's just make one big section for all customers. Name it bar.

Quote:
bar.ini

[bar]
Johnny=5
Mary=10


So! $readini(bar.ini,bar,Johnny) == 5

Johnny orders a beer that costs $7. So then the script will ...

Code:
/writeini bar.ini bar Johnny $calc($readini(bar.ini,bar,Johnny) + 7)


Now JOhnny's bill is:

$readini(bar.ini,bar,Johnny) == 12

/msg $chan Here you go $nick ! Your total bill is now $readini(bar.ini,bar,Johnny) $+ ! Thank You!

Not too tough yeah?

Now JOhnny wants to pay so you give him a command. "!pay 7"

When Johnny does this command the script will basically use $calc to subtract the amount he chose to pay from the amount in the ini file. You will want to check to make sure he has a balance owed and make sure his payment doesn't exceed it. Or maybe you will allow them to pay forward and give themselves a negative balance (future credit).

That's pretty much it! Keep it simple at first. Create the infrastructure, the basic engine for the bar game. Once it is smoothly running you can start adding features.