Money System for Chatters

By Lucius on May 15, 2009

Well I made this for myself and my friends to use, but seeing the amount of rubbish snippets on here...
I decided to see how I fared against public scrutiny.
This is a REMOTE.
It will count peoples words and add them 3(credits) for each word typed. It is set to work for a bot, and will not count the IRC it is loaded onto.
finally, you will have to create the file it stores the money into by yourself, as I said it was made for me to use, not really for posting. (you only have to create the blank file. this snippet goes into remotes)
the file you have to make is:: mnycount.ini (make a NEW.txt file and rename it mnycount.ini in the main IRC folder)
the commands to use it are:
!mymoney
!transfer (nick) (amount) ((btw that command is strictly in P2P with the bot))
!addmoney (nick) (amount) ((P2P again, and it is bank robbery so be careful who knows this one))

ENJOY!!!!!!!
last comment. If this is recieved well and I get requests for the linking scripts to use the money, then I will add them also at later date.

APPEND
I have added a bar which uses the money.
Link---> http://www.hawkee.com/snippet/6150/

;#################### LUCIUS
;## Money Checking ## LUCIUS
;#################### LUCIUS
on *:TEXT:!mymoney:*:{
  if (!%replyflood. [ $+ [ $chan ] ]) {
    set -u4 %replyflood. [ $+ [ $chan ] ] ON 
  notice $nick 4Y5our 4B5ank7: $readini(mnycount.ini,$nick,money) 4C5redits. 14To transfer money to another name P2P me with 7!transfer (name) (amount)14 E.G. !transfer Lucius 1000 4:] }
}

;###################################### LUCIUS
;#########Transfer Money By P2P######## LUCIUS
;###################################### LUCIUS
on *:TEXT:*!transfer*:*: {
  tokenize 32 $strip($1-) 
  if ($1 == !transfer) {
    var %passmoney $calc($readini(mnycount.ini,$nick,money) - $3)
    var %takemoney $calc($readini(mnycount.ini,$2,money) + $3)
    if (!%replyflood. [ $+ [ $chan ] ]) {
      set -u4 %replyflood. [ $+ [ $chan ] ] ON 
      if (!$readini(mnycount.ini,$2,money)) {
        msg $nick $2 does not exist
        HALT
      } 
      if ($nick = $2) || ($3 < 0) {
        notice $nick 4Attempted ROBBERY! 5Halving your credits.
        set %cheatmoney $floor($calc($readini(mnycount.ini,$nick,money) / 2))
        writeini -n mnycount.ini $nick money $($+(%cheatmoney),2)
        HALT
      } 
      if ($readini(mnycount.ini,$nick,money) < $3) {
        msg $nick you can only give what you have...  You have 3 $readini(mnycount.ini,$nick,money) $+ C
        HALT 
      }
      if ($readini(mnycount.ini,$nick,money) >= $3) {
        writeini -n mnycount.ini $nick money $($+(%passmoney),2)
        writeini -n mnycount.ini $2 money $($+(%takemoney),2)
        msg $nick 5you just gave7 $2 3 $3 $+ C5 out of your own pocket4!
        notice $2 7 $nick 5just gave you 3 $3 $+ C 5 out of their own pocket4!
      }
    }
  }
}
;################################# LUCIUS
;###### BANK ROBBERY SYSTEM ###### LUCIUS
;################################# LUCIUS
on *:START: { if (%freemoney) { unset %freemoney | HALT } }

on *:TEXT:!addmoney*:?: {
  if (!%replyflood. [ $+ [ $chan ] ]) {
    set -u4 %replyflood. [ $+ [ $chan ] ] ON 
    if (!%freemoney) {
      set -u14400 %freemoney ON
      set %givenick $2  
      set %givemoney $calc($readini(mnycount.ini,%givenick,money) + $3)
      writeini -n mnycount.ini %givenick money $($+(%givemoney),2)
      msg $nick I just handed $2 3 $3 $+ C straight from the bank! 14[151214hour ignore to add money]
    }
    else { msg $nick 5it has been used in the past4 12 5hours
    }
  }
}

;################################# LUCIUS
;##### Money Counter System ###### LUCIUS
;################################# LUCIUS
on *:TEXT:*:#:{
  set % $+ $nick $+ tempmoney $calc($readini(mnycount.ini,$nick,money) + ($0 * 3)) 
  writeini -n mnycount.ini $nick money $($+(%,$nick,tempmoney),2)
  if ($0 > 65) {
    set %cheatmoney  $calc($readini(mnycount.ini,$nick,money) - ($0 * 9)) 
    writeini -n mnycount.ini $nick money $($+(%cheatmoney),2)
    msg $chan 4W5ell 4D5one7!!! 5You just tried to cheat by typing loads,  it LOST you double what you hoped to make. 
  }
}

Comments

Sign in to comment.
juanjito   -  Jun 23, 2023

Hello, I know that this post is several years old, but I have found the error that when you write less than 65 characters, money/coins are subtracted instead of added, if someone could verify this apart from me, I would appreciate it

 Respond  
twoclipz   -  Aug 22, 2014

This, and the rest of your money scripts seem really great but I cant seem to get them working. Are they still current? I seem to be accruing money in my ini fine, but none of the commands seem to work.

Lucius  -  Aug 31, 2014

I was using it a week or two ago and had no problem, it hasn't been altered since it was uploaded here either.
If you are having problems even doing something as simple as !mymoney I'd say you probably have another script loaded which is either
a) Named sooner in the alphabet than this script and has a HALT in the script rather than a return causing it to stop instead of allow this script to trigger properly.
b) Given priority on incoming text (e.g: on !:TEXT::#: { something then HALT } ) to another script.
or the last possibility is
c) Complicated colour text used in your channel/s (text replacers etc) which make the text 'techinically' not the first word or letter the script recieves.

Depending on your knowledge level, I could give you pointless or too complicated advice on hunting those issues down but it boils down to: debug code additions ( echo -a debug: activated !mymoney trigger ) to source errors and ALWAYS strip your bot's incoming text (It's in mIRC options).

twoclipz  -  Sep 02, 2014

I got it working great! I had to replace msg $nick with msg $chan, as well as remove the custom colors now and it works great.. .thank you soo much! Do you have a betting or lottery that uses the same system?

Oh.. I added a OP only gifting command which allows OP's to gift money just like the transfer command.... I figured I share if anyone wants.
I just modified transfer command.... still learning.
;#########GIFT Money####################
on :TEXT:!gift:: {
if ($nick isop #) {
tokenize 32 $strip($1-)
if ($1 == !gift) {
var %takemoney $calc($readini(mnycount.ini,$2,money) + $3)
if (!%replyflood. [ $+ [ $chan ] ]) {
set -u4 %replyflood. [ $+ [ $chan ] ] ON
if (!$readini(mnycount.ini,$2,money)) {
msg $chan $nick $2 does not exist
HALT
}
writeini -n mnycount.ini $2 money $($+(%takemoney),2)
msg $chan $2 The channel has just gifted you $3 $+ !
}
}
}
else { msg $chan $nick You aren't able to use this command. }
}

Lucius  -  Sep 09, 2014

I never made any betting, only fighting and rpg. Feel free to keep adding and tweaking it. I'll check in occasionally if you need help, don't expect it often though, I'm no longer using IRC much.
Glad you are still enjoying it!

Sign in to comment

Lucius   -  Sep 06, 2010

If you want help with your movie I recommend you post in the help section.
vvvvv
http://www.hawkee.com/phpBB2/viewforum.php?f=9

This is a thread for the money system which has nothing to do with movie q's, whatever they are.

 Respond  
meluygas   -  Sep 05, 2010

I tell you what q is a q timer can activate it when you start a movie that is in my channel and making it! long !time to see the movie and is q when the movie ends ... you know like to reset a command like this? regards

 Respond  
Lucius   -  Sep 05, 2010

@cptpan Those colours are for everything my bot uses, it's all coded that way and it doesn't look gay. It's called a theme and I can't stand bots that are bare or multicoloured. If you want to have it message the room instead of notice do it yourself.

@meluygas I have no idea what you are talkiing about. movie?

 Respond  
meluygas   -  Sep 05, 2010

hello friend i hope you are well ... I wonder if there is any q command I can use on my channel to read the time carrying off the movie q I can turn on and off .... Can you help me ...? I hope your answer greetings:)

 Respond  
cptpan   -  Sep 04, 2010

Remove all the gay colours and don't make it notice your money so everyone can see how rich each other is.

 Respond  
Tannn3r   -  Aug 11, 2010

(We'll just keep the conversation here) I think it is working now because it is telling me I need to finish level 5, but I will let you know if I have anymore problems.

 Respond  
Lucius   -  Aug 10, 2010

Reply posted on the other snippet:
http://www.hawkee.com/snippet/7817/#c72942

short version: unload and reload it.
(Alt+R) to open remotes -- File -- unload
same again --------------- file -- load (the name you saved it as originally, it will still be there, just not in use)

If that doesn't do it, tell me server/chan and I'll come see.

 Respond  
Tannn3r   -  Aug 10, 2010

I like it a lot! But when I added this one and BOT RPG / FIGHTING / SLAVERY I got a security warning and accidentally hit no, now there is nothing in the shop. How can I reset this?

 Respond  
Lucius   -  Aug 08, 2010

hahaha evil ones, thanks for pointing them out though.
Script edited so anyone trying to cheat gets their money halved instead.

 Respond  
LostSoulFly   -  Aug 08, 2010

I've tried out the fighting script, and I already replace my script directory already in it =)

They found another one over night, haha.
You can take another user's credits by transfering a negative number, so it increases your own by taking their money.

So I did
if ($3 < 0) { notice $nick >=( Removing some credits. }

 Respond  
Lucius   -  Aug 08, 2010

Thanks, I never thought about that, my chatters aren't as devious lol.
script edited.

You might want to add in the RPG/FIGHTING/SLAVERY I recently put up on here.
Because the money script was built to work with them, but seeing the way you wrote the addin, you may have to replace the mnycount references to go into the folder you have them in.
a simple replace all should sort it.

find: $readini(mnycount.ini,$nick,money)
replace: $readini(scripts\Money\mnycount.ini,$nick,money)

same for the writeini too of course.

 Respond  
LostSoulFly   -  Aug 07, 2010

My users found a bug quite quickly! You can transfer money to yourself, effectively doubling it each time! So, I gave the ones who were doing it a negative number with a few zeros.

if ($nick = $2) {
notice $nick >=( Removing some credits.
set %cheatmoney $calc($readini(scripts\Money\mnycount.ini,$nick,money) - ($0 * 20))
writeini -n scripts\Money\mnycount.ini $nick money $($+(%cheatmoney),2)
HALT
}

 Respond  
Lucius   -  Jul 29, 2010

The rpg and fighting and slavery is up.

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

 Respond  
Lucius   -  Jul 16, 2010

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  
Lucius   -  May 15, 2009

I did remove it initially, but the site I go to has java which plays up.
!transfer works but !transfer* doesn't.
The $1 is to keep others from initiallising it if they tell someone else about the command.

So far it's only a simple money counter, but I have added more to it, so that you can use the money to activate other scripts. I'll post them as and when.

Quote:
with ini file u'll have a prob here cz when u write the nick [bomber] into ini file u'll find ~bomber~ so no detection in this case!!

I have only one thing to say to that... if you need a [shitty] box around your nick, then I refuse to allow you use the script on principle.
Does that answer well enough?

 Respond  
WorldDMT   -  May 15, 2009

hi

u can also use timer if u want

on *:TEXT:!mymoney:*:.timermoney 1 1 notice $nick 4Y5our 4B5ank7: ...

$readini(mnycount.ini,$nick,money)

if the nick is like [bomber] e.g !transfer [bomber] 1000

with ini file u'll have a prob here cz when u write the nick [bomber] into ini file u'll find ~bomber~ so no detection in this case!!

dont use ini file when the items can be a nick use an other way or use hash tables

on *:TEXT:*!transfer*:*: {
  tokenize 32 $strip($1-) 
  if ($1 == !transfer) {

u dont need this condition "if ($1 == !transfer)" u can remove it

 Respond  
napa182   -  May 15, 2009

nice work on ur first post Lucius, and if they don't know how to make a ini file then they should be hit in the head with a tack hammer ;x

 Respond  
Lucius   -  May 15, 2009

I added how to make an ini file. (rename a new text file to mnycount.ini)
Hope that clears up any unknowns.
btw, it goes in the main IRC folder...
you right click:
New > Text Document
rename to mnycount.ini

blazer31  -  Apr 03, 2015

how to play this game

Sign in to comment

FordLawnmower   -  May 15, 2009

I agree RevJohn Straub. There should at least be instructions on how to make the .ini

 Respond  
RevJohn Straub   -  May 15, 2009

i thought to be a snipit the file had to be with 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.