Bar sytem that uses money

By Lucius on May 16, 2009

This is Part two of my money system.
It's a bar which uses the money made in chatting to buy items.
!bar (will give a list of the items for sale)
It also allows you to buy someone else an item.
E.G
~coke (buy yourself a coke)
~Coke NICK (buy a coke and have the bot hand it to NICK)

IT WILL NOT WORK UNLESS YOU HAVE THE MONEY SCRIPT WORKING
the link for it is below.

I hope you have as much fun using it as my friends do.
(btw there is one command not in the list)
~clothe (nick) (item)
E.G.
~clothe Lucius a superman outfit complete with cape.
^_^
vvvv--------money script--------vvvv
http://www.hawkee.com/snippet/6147/

FINAL NOTE:(the original bar system was not my creation, and sorry to the creator but I can't remember who it was. I have expanded on it a heck of a lot though, with double the items, mix drinks and making use my money system)(##o##)(##o##)(also I keep the bar list and the bar itself in seperate remotes, so if you have any trouble with it, try cut and pasting the !bar section into a new remote instead)

;###################################### LUCIUS
;######## Home Made Bar System ######## LUCIUS
;###################################### LUCIUS

on *:TEXT:!bar:#: {
  tokenize 32 $strip($1-)
  if (!%replyflood. [ $+ [ $chan ] ]) {
    set -u4 %replyflood. [ $+ [ $chan ] ] ON 
    notice $nick 5In the 350C store I have... 7~pepsi, ~coke, ~rootbeer, ~sprite, ~dew, ~rum, ~redwine, ~beer, ~smoothie, ~cake, ~whitewine, ~pizza, ~clothe, ~jd & anything, ~vodka & anything, ~nachos & anything, ~hulahoops, ~playboy
    timer 1 1 notice $nick 7~cookie, ~honybun, ~coffee, ~hershey, ~reese, ~taco, ~klondike, ~snicker, ~burger, ~cheeseburger, ~popcorn, ~pbj, ~wings, ~spagmeatballs, ~mac&cheese, ~slurpee, ~tequilla, ~wkd (colour), ~peanuts, ~playgirl
  }
}

on *:TEXT:*:#: {
  tokenize 32 $strip($1-)
  if (!%replyflood. [ $+ [ $chan ] ]) && ($left($1,1) == ~) { 
    set -u4 %replyflood. [ $+ [ $chan ] ] ON 
    if (!$($+(%,barflood. [ $+ [ $chan ] ]),2)) {
      set -u2 $+(%,barflood. [ $+ [ $chan ] ]) on 
      var %% = $iif(!$2,$nick,$2)
      if ($readini(mnycount.ini,$nick,money) < 50) { notice $nick You don't have enough money. TALK MORE!!! lol  |  HALT }
      if (~pepsi == $1) { describe $chan brings a nice cold Pepsi to %% 14[-350C14] }
      if (~coke == $1) { describe $chan brings %% a freezing Coke 14[-350C14] }
      if (~dcoke == $1) { describe $chan brings %% a freezing Diet Coke 14[-350C14] }
      if (~taco == $1) { describe $chan hands %% a fresh tasty taco! 14[-350C14] }
      if (~slurpee == $1) { describe $chan brings %% a freezing Slurpee! 14[-350C14] }
      if (~rootbeer == $1) { describe $chan hands %% a A&W Root Beer 14[-350C14] }
      if (~sprite == $1) { describe $chan offers a Sprite to %% 14[-350C14] }
      if (~dew == $1) { describe $chan brings a Mountain Dew to %% 14[-350C14] }
      if (~rum == $1) { describe $chan brings a bottle full of rum to %% 14[-350C14] }
      if (~redwine == $1) { describe $chan takes a bottle full of chilled red wine to %% 14[-350C14] }
      if (~bud == $1) { decribe $chan hands a Bud Light to %% 14[-350C14] }
      if (~smoothie == $1) { describe $chan runs across the street to Jamba Juice and picks %% up a Strwberry Wirl 14[-350C14] }
      if (~cake == $1) { describe $chan hands %% a piece of homemade cake 14[-350C14] }
      if (~applepie == $1) { describe $chan hands %% a piece of hot Apple Pie 14[-350C14] }
      if (~cookie == $1) { describe $chan brings %% a cookie 14[-350C14] }
      if (~honybun == $1) { describe $chan brings %% a freshly baked Hony Bun 14[-350C14] }
      if (~coffee == $1) { describe $chan hands %% a hot coffee 14[-350C14] }
      if (~pancake == $1) { describe $chan hands %% a fresh steaming pancake! 14[-350C14] }
      if (~creamegg == $1) { describe $chan hands %% a little choccy egg of joy! 14[-350C14] }
      if (~hershey == $1) { describe $chan opens up a Hershey's bar for %% 14[-350C14] }
      if (~reese == $1) { describe $chan hands %% a Reece's bar 14[-350C14] }
      if (~klondike == $1) { describe $chan brings a frozen Klondike treat to %% 14[-350C14] }
      if (~snicker == $1) { describe $chan brings a Snicker's bar to %% 14[-350C14] }
      if (~burger == $1) { describe $chan hands %% a burger 14[-350C14] }
      if (~condom == $1) { describe $chan hands %% a condom, ribbed for pleasure (someone is hoping to get lucky!) 14[-350C14] }
      if (~cheeseburger == $1) { describe $chan makes a cheese burger for %% 14[-350C14] }
      if (~popcorn == $1) { describe $chan pops a bag of popcorn for %% 14[-350C14] }
      if (~peanuts == $1) { describe $chan passes a bag of peanuts to %% $+ ! 14[-350C14] }
      if (~hulahoops == $1) { describe $chan passes %% a bag of delicious HulaHoops! 14[-350C14] }
      if (~pbj == $1) { describe $chan hands %% a peanutbutter and jelly sandwhich 14[-350C14] }
      if (~wings == $1) { describe $chan brings a plate of hot, spicy wings to %% 14[-350C14] }
      if (~spagmeatballs == $1) { describe $chan brings %% a bowl of spagetti and meatballs 14[-350C14] }
      if (~mac&cheese == $1) { describe $chan hands a bowl of Mac and Cheese to %% 14[-350C14] }
      if (~whitewine == $1) { describe $chan gives %% a bottle full of white wine 14[-350C14] }
      if (~pizza == $1) { describe $chan hands %% a box of hot cheese pizza 14[-350C14] }
      if (~beer == $1) { describe $chan hands %% a fresh ice cold beer 14[-350C14] }
      if (~playboy == $1) { describe $chan hands %% a naughty magazine FULL of naked ladies! (and a complementary box of tissues) 14[-350C14] }
      if (~playgirl == $1) { describe $chan hands %% a naughty magazine FULL of naked men! (and a complementary box of tissues) 14[-350C14] }
      if (~wkd == $1) && ($3) { describe $chan hands $3 a fresh ice cold bottle of $2 WicKeD! 14[-350C14] }
      if (~wkd == $1) && (!$3) { describe $chan hands $nick a fresh ice cold bottle of $2 WicKeD! 14[-350C14] }
      if (~smokes == $1) { describe $chan hands %% a pack of smokes. $3- 14[-350C14] }
      if (~tequilla == $1) { describe $chan hands %% a fresh cool shot of Tequilla! (one tequilla, two tequilla, three tequilla, FLOOR!) 14[-350C14] }
      if (~jd == $1) && ($2 != $chr(38)) { describe $chan hands %% a fresh cool shot of JackDaniels 14[-350C14] }
      if (~jd == $1) && ($2 == $chr(38)) && (!$4) { describe $chan hands $nick a fresh cool glass of JackDaniels & $3 14[-350C14] }
      if (~jd == $1) && ($2 == $chr(38)) && ($4) { set %% $4 | describe $chan hands $4 a fresh cool glass of JackDaniels & $3 14[-350C14] }
      if (~nachos == $1) && ($2 != $chr(38)) { describe $chan hands %% Some crunchy nachos! 14[-350C14] }
      if (~nachos == $1) && ($2 == $chr(38)) && (!$4) { describe $chan hands $nick some crunchy nachos & $3 dip! 14[-350C14] }
      if (~nachos == $1) && ($2 == $chr(38)) && ($4) { set %% $4 | describe $chan hands $4 some crunchy nachos & $3 dip! 14[-350C14] }
      if (~vodka == $1) && ($2 != $chr(38)) { describe $chan hands %% a fresh cool shot-glass of vodka 14[-350C14] }
      if (~vodka == $1) && ($2 == $chr(38)) && (!$4) { describe $chan hands $nick a fresh cool glass of vodka & $3 14[-350C14] }
      if (~vodka == $1) && ($2 == $chr(38)) && ($4) { set %% $4 | describe $chan hands $4 a fresh cool glass of vodka & $3 14[-350C14] }
      if (~clothe == $1) { describe $chan stuffs %% into $3- 14[-350C14] }
      set %barmoney $calc($readini(mnycount.ini,$nick,money) - 50) 
      writeini -n mnycount.ini $nick money $($+(%barmoney),2) 
      HALT
      }
    }
  }
}

Comments

Sign in to comment.
Midian   -  May 23, 2013

Wow, old script but still great fun. Thanks Lucius!

I signed up because I have a problem though, total noob scripter here so don't expect much of me... is there an easy way to edit this script to support multiple prices on items? Any attempt I make at adding higher priced items to the bottom just adds up both prices regardless of item bought, and when I tried to implement a higher tier of items in a separate .ini they both conflicted and neither would work.

Thanks for any help!

Lucius  -  May 30, 2013

[S] The ini only stores the amount of money the person has.
If you would like to pay more for individual items I recommend taking one of a few routes.
a) completely re-write
b) cut mine to pieces and attempt to force it into individual prices
c) use a different shop script
d) ask someone to edit it for you
e) individual pricing re-write is almost the same as a complete re-write.

v--probably easiest--v

copy/paste the script (16 to 79 copied and pasted on the bottom of 79) and edit line 16 (the ~ trigger to a different symbol like ^ or & etc) to have tiered prices (then swap the items and price 50C for 1,000C etc)
line 74 is the one which alters the price, - 50 for taking 50C off the money, all other mentions of 50C are just text.
This can be repeated multiple times if you wish, each with different price tiers, but remember the prices would be linked to the trigger command you chose (~food making all 50C, &food being 1,000C, and so on)

I haven't scripted in a long while now...
If you have any more problems let me know, I may even be in the mood to fix them too. xD[/S]

Sign in to comment

Lucius   -  Jul 29, 2010

rpg, fighting & slavery is up

http://www.hawkee.com/snippet/7817/

 Respond  
Lucius   -  Jul 16, 2010

I'm afraid you've made an error there.

I don't HAVE to take any measures at all. If you want to alter it, then do so, it's open for all on here and I seriously doubt anyone would give me as much as a mention when they used it, nor am I holding high hopes to increase my 'rep' lol.

I put it up here because I like it, other people use it and like it, if I was going to market/sell it then possibly I'd attempt to cover any and all variables, including those I don't approve of... But as I'm not, I won't :]
But if that's not good enough, consider it this way, I don't use [failboxes] and I would rather that others didn't use [failboxes] in their nicks. The script is my incentive for those people to change their ways.

And on a side note,

hi

attention!!!

Is a fail comment.
Try telling me what you think of the script before you start shouting "attention!!!" like finding faults with others work is all you do, and you enjoy it.

 Respond  
WorldDMT   -  Jul 16, 2010

I refuse to alter my script to allow people who think they need [FAIL] boxes in their nick.
if [failname] wants to use this, they can alter the script themselves.

you have to take various measures to adapt your code that is valid in different cases

and i accept the idea of FordLawnmower

 Respond  
Lucius   -  Jul 16, 2010

@Fordlawnmower

I won't be altering the script just to accomodate people who feel the need to have boxes in their nick, no offence to any who do it.
And while yes, you could alter those, as you will see below, I have made a lot more to work with the money system itself, so any alterations will have to be done across the board.
(btw the fighting/slavery script -if wanted here- is in the region of 250 lines so enjoy your modding ^_^)

Hiya napa182, :] I will definitely do that, I'm online a lot recently due to a project I'm working on ;] Will tell you in there.
####################################################################
I'm posting this on any scripts I have made:

I have expanded the money system to include fighting & slavery (example below)

If I get enough requests for it to be worth the effort, I shall unleash it here in as close to easyloading format as possible.

FIGHTING------vv

«Fri-1:46pm» !fight NiHiLiSt
«Fri-1:46pm» Lucius smacks NiHiLiSt in the face, the fight is on!
«Fri-1:46pm» NiHiLiSt struggles to block the attacks from Lucius and then... Artfully, Lucius dances with death, blood and guts fly from NiHiLiSt. 9 wins.
«Fri-1:46pm» Let's collect the bets and winnings... Lucius won 344C, NiHiLiSt making up 25% of the winnings by losing 86C
«Fri-1:46pm» !fight NiHiLiSt
«Fri-1:46pm» Lucius runs up to NiHiLiSt and lays down the gauntlet!
«Fri-1:46pm» NiHiLiSt's attacks are turned or countered again and again... Lucius suddenly sits down and starts praying, NiHiLiSt drops to the floor as a Demon directly removes their soul and eats it. 10 wins.
«Fri-1:46pm» Let's collect the bets and winnings... Lucius won 432C, NiHiLiSt making up 25% of the winnings by losing 108C
«Fri-1:47pm» !fight NiHiLiSt
«Fri-1:47pm» Lucius gets all up in NiHiLiSt's face, itching for a fight!
«Fri-1:47pm» NiHiLiSt strikes Lucius and hits a log instead SUBSTITUTION JUTSU... CENSORED! Lucius wipes the blood from their face and loots the corpse. 11 wins.
«Fri-1:47pm» Let's collect the bets and winnings... Lucius won 640C, NiHiLiSt making up 25% of the winnings by losing 160C
«Fri-1:47pm» !myfights
--> Notice - From.. NiHiLiSt - You have fought: 19 times. 11 Wins. 7 Losses. 1 Ties.

Slavery-----vv

«Fri-1:51pm» .buy NiHiLiSt
«Fri-1:51pm» Haha, I am slave trader you can't own me.
«Fri-1:51pm» .buy napa182
«Fri-1:51pm» ~ NiHiLiSt - sells the deeds for napa182 to Lucius @ 10,000C First time buyer!!! napa182 you are now Lucius's SLAVE
«Fri-1:51pm» .owns napa182
«Fri-1:51pm» Lucius owns napa182!!! Someone call human rights, that slave is missing some limbs!!
«Fri-1:51pm» .owns napa182
«Fri-1:51pm» Lucius owns napa182!!! And I hope they use the free whip they got on purchase.
«Fri-1:52pm» .buy blah_random
«Fri-1:52pm» ~ NiHiLiSt - sells the deeds for blah_random to Lucius @ 10,000C First time buyer!!! blah_random you are now Lucius's SLAVE
«Fri-1:52pm» .myslaves
--> Notice - From.. NiHiLiSt - Slaves in order of purchase: napa182 blah_random
«Fri-1:52pm» .freeslave napa182
«Fri-1:52pm» Lucius just let napa182 go free! They get 5000C from the local Anti-Slavery Group!

final note...
the slavery and the fighting are linked, you aren't allowed to start a fight against someone who owns you, and as the rest of my scripts, you need the money system in place for it to work.

 Respond  
Banana-Jamma   -  Mar 10, 2010

I must say. Niiice Script. SOmething for people to do in channels. I like that. Good job!

 Respond  
napa182   -  Mar 08, 2010

hey Lucius long time no see... stop by the server an say hi to jen

 Respond  
FordLawnmower   -  Mar 08, 2010

It shouldn't be that hard to change if this is the only character issue.
Just change :

set %barmoney $calc($readini(mnycount.ini,$nick,money) - 50)

To:

set %barmoney $calc($readini(mnycount.ini,$replace($nick,$chr(91),~,$chr(93),~),money) - 50)

And :

if ($readini(mnycount.ini,$nick,money) < 50) { notice $nick You don't have enough money. TALK MORE!!! lol  |  HALT }

To :

if ($readini(mnycount.ini,$replace($nick,$chr(91),~,$chr(93),~),money) < 50) { notice $nick You don't have enough money. TALK MORE!!! lol  |  HALT }
 Respond  
Lucius   -  Mar 08, 2010

Edited to remove the repeat.

As to the:---vv

$readini(mnycount.ini,$nick,money) if the nick is [bamboo] while the nick is writed into ini file the code will not detect that nick cz u will see that writed like this ~bamboo~ and not [bamboo]

I refuse to alter my script to allow people who think they need [FAIL] boxes in their nick.
if [failname] wants to use this, they can alter the script themselves.

 Respond  
WorldDMT   -  May 17, 2009

hi

attention!!

$readini(mnycount.ini,$nick,money) if the nick is [bamboo] while the nick is writed into ini file the code will not detect that nick cz u will see that writed like this ~bamboo~ and not [bamboo]

better use txt file or hash tables

u puted

"if (!%replyflood. [ $+ [ $chan ] ]) && ($left($1,1) == ~)"

why that repetition after

"if ($left($1,1) == ~) && ($readini(mnycount.ini,$nick,money) < 50) "

the condition "if ($left($1,1) == ~)" is unless in the second condition u can remove it

 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.