Israfel commented on a Page, Roleplaying Bartender  -  May 20, 2008

Update 2!

alright, i have almost everything working. The bot .Notice\'s people when they come in and tells them about the system, the commands to use the like. i have the Drink list set up, the drinks themselves set up, even the Tabs and Payment system! I have to give PunkTuReD the credit for being able to keep the Tabs system, so i greatly thank you :P

the only thing that ISN\'t working right now is my \"Limit\" system, ergo if someone reaches a certain limit in money (100 silver) then it cuts them off until they pay the bill. I can show you the code

On *:TEXT:!Bloodwine:#: {
  if (% $+ $nick > = 100) {
    .Describe $chan ~The bartender shakes his head and continues wiping down his glasses, \"Sorry there $nick you have racked up too high of a tab. I can\'t serve you anymore untill you pay me.\"
  }
  Else {
    describe $Chan ~ He grasps a large glass from under the counter, a large flat base  pointing  into a long thin stem, branching out in an elegant pattern to support a large bowel.   kneeling down he then lifted a large bottle, wrapped in cord to the bar top, drilling a>> 

    .timer 1 2 describe $Chan ~ Corkscrew inside the bottle. Lifting the bottle off the counter, he  began  pouring the crimson liquid into the glass, letting it settle before sliding it over  to the  drinker, \"Hope that satisfies ya. I\'ll put it on your tab.\"<D>
    .inc % $+ $nick 7
    .Inc %total 
    .timer 1 3 .notice $nick you have a % $+ $nick silver tab running
  }
}

So the part that i am having trouble with is the

if (% $+ $nick > = 100) {
    .Describe $chan ~The bartender shakes his head and continues wiping down his glasses, \"Sorry there $nick you have racked up too high of a tab. I can\'t serve you anymore until you pay me.\"
  }

Part. Even if these people have a tab of 642 it still lets them buy drinks! Its maddening! I mean, whats the point of having a payment system if you can\'t force people to use it!!

So i will break down parts of it so you get the general idea of whats going on

Ok, so when someone types !bloodwine it checks their tab to see if its over 100, if it is, it denies them the drink until they pay for their other drinks. If they have a tab under 100 (Even 99 works) then it gives them the drink, and adds money to their tab (in this case 7 silver) then it adds a 1 to a Total\'s value, which will tell people the total number of drinks ever served on this script. It then .Notice\'s them and tells them what their tab is currently at (Something i will embellish later)

So here is my delema one more time. The bot gives people drinks even though i tell it not to, any tips or tricks on what i may need done?

 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.