Invest Command (bank with interest )

#1

Below is a little cool bank system i have created…
it comes with 3 main command’s…

  • !bank - which will check your own bank
  • !invest - to invest in points
  • !withdraw - withdraw point u have invested

!bank also have a 5 extra sub command

  • !bank add - adds to someones bank
  • !bank check - check other users bank
  • !bank interval - set the time rate for the interest
  • !bank interest - set the percent of interest
  • !bank payout - toggle the interest on and off

PhantomBot\scripts\custom\systems\bankSystem.js (8.8 KB)
PhantomBot\scripts\lang\english\custom\systems\system-bankSystem.js (1.8 KB)

1 Like
#2

Im kinda new to the whole Phantom bot custom script scene. Could you give me a quick walk through on how to install this script for my discord server? Looks like an awesome idea! :smiley: thank you in advance!

#3

This is for twitch only but i could maybe make it work for discord id have to look at the discord end of code tbh

#4

aww. Anyways. If you’re feeling nice just help a guy out hahaha. If you don’t want to I fully understand. Thank you for replying :smiley:

#5

@Rian what would it do in discord? just be able to check the bank not gain anything?

#6

I have added a command to enable and disable the online check (example: !bank online) will toggle it on and off

bankSystem.js (10.3 KB)
system-bankSystem.js (1.9 KB)

#7

Teeny tiny typo:
I’ve fixed in mine, but “Online chack has been enabled.”

#8

ok got it line 6 of the lang file :slight_smile:

#9

This is a great module! I just got it set up, and already my viewers are excited to use it.

Quick question: How difficult would it be to be able to set the interest to different amounts based on user level? So say a new viewer gets 0% interest, a regular gets 5%, a Sub gets 10% ETC.

Would it be a simple check to add, or would this need to be completely rewritten? I’m ok with writing it myself, but I’ve only dabbled in JS working with these Modules.

#10

it could be done just add the 3 settings then do $.isSub() to check if they are a sub im not sure on the regular but im sure permission.js has the function in it

#11

Awesome! I’ll dig around and see what I find. Thank you!

#12

This is pretty cool, something I thought about that would be cool and a kinda risk/reward type deal with this would be if it also came with a heist system or an addon that worked with this for a heist and say players can bank their money and earn interest but every successful heist pulls money from all the bank accounts to payout the heist.

#13

this sounds like a really cool idea :slight_smile: i might look into doing this but if i do it will only take from people currently in the chat as its rude to steal from offline users but then again it would make people not wanna lurk or even bank there points

#14

The thing I was thinking was if you can earn interest while not watching/lurking you’re getting points for not being there so why not risk having the bank be heisted so there’s a chance that while you’re offline collecting free points you could also lose some points. I may not fully understand how your interest system works but it seems like it would give interest while the user is offline? so it’s a risk-reward system. You can put money in the bank and get interest while not being there, but also you risk losing money to bank heists. At least that’s how I’m imagining it in my mind.

#15

No only people in the chat will be rewarded by the interest (if it was to go though a database of 50k to add to them all instead of the users array that would be slower)

#16

ahhh ok, so it just loops people in chat. good to know.

#17

Ya it uses the $.users array which is the current people in the chat :slight_smile:

#18

Im having trouble getting the commands to work, I have the banksystem enabled, but am not getting a response in the bots console, just wondering what I was doing wrong?

#19

my only guess is you have done the typical thing and put it into the wrong folder and not the one listed as thats a folder you would need to create

#20

What folders should I put them in I had the banksystem.js file in the scripts/systems folder and the system-banksystem.js file in the scripts/lang/english/systems folder.