Deep Bot - Twitch Streamer Assistant

Deep Bot => Help/Support => Topic started by: MentalMedic on April 13, 2016, 04:34:16 AM

Title: Can I use calculations with a counter?
Post by: MentalMedic on April 13, 2016, 04:34:16 AM
Hello, I am trying to set up a death counter for my friend's stream and set up 2 commands; one adds a death to the counter and the other lists the current number of deaths as recorded by the counter. I want to know if there is any way to reduce the counter by one or any other number just in case I mess up.
I don't want to reset the counter at 50 deaths because I typed it one too many times and then have to add them one by one up to how many should be proper.
Title: Re: Can I use calculations with a counter?
Post by: TheNumbLock on April 13, 2016, 05:28:04 AM
You could just have the command save a .txt file and have the viewer command grab the text file/read it. And the other command to save it. Basically with this setup in the pics, the mod would type !adddeath NumberHere. The viewer command would then read the .txt file and display it in chat. The streamer can even add the .txt file to their stream overlay at the same time.

Mod command:
(http://puu.sh/og0Kz/aa9b39f52f.png)

Viewer Command: (Ignore the disabled part)
(http://puu.sh/og0Na/7abcc41ec5.png)
Title: Re: Can I use calculations with a counter?
Post by: MentalMedic on April 13, 2016, 06:23:55 AM
Thanks, i'll give it a go next stream :D
Title: Re: Can I use calculations with a counter?
Post by: SalableSix8 on April 18, 2016, 01:47:36 AM
I wonder the same thing. Saw in a stream they used !death + and !death - to add and remove a death from the counter. Any good suggestions on how to set that up? Not 100 % sure if it was deepbot or a different bot though
Title: Re: Can I use calculations with a counter?
Post by: TheNumbLock on April 18, 2016, 07:34:09 AM
It is possible, just use @calc@ = Use operators to calculate mathematical equations. @calc@[op|num1|num2] , Available operations (+,-,*,/). E.g. @calc@[+|5|4].
Title: Re: Can I use calculations with a counter?
Post by: Psywarrior on May 19, 2016, 09:31:17 AM
It is possible, just use @calc@ = Use operators to calculate mathematical equations. @calc@[op|num1|num2] , Available operations (+,-,*,/). E.g. @calc@[+|5|4].

What would this actually look like in the command?
Title: Re: Can I use calculations with a counter?
Post by: KennyGString on May 23, 2016, 09:32:22 AM
It is possible, just use @calc@ = Use operators to calculate mathematical equations. @calc@[op|num1|num2] , Available operations (+,-,*,/). E.g. @calc@[+|5|4].

What would this actually look like in the command?


Here you go guys. Had nothing better to do so I made the command for you. Need to make a custom log with the folder named Death, and inside that folder a txt file named deathcount. I've tested it and it works.

!death
Code: [Select]
@if@[@target@||+||!adddeath||@if@[@target@||-||!subdeath]]
!adddeath
Code: [Select]
@savefile@[Death\deathcount.txt,@calc@[+|@readfile@[Death\deathcount.txt]|1]]
!subdeath
Code: [Select]
@savefile@[Death\deathcount.txt,@calc@[-|@readfile@[Death\deathcount.txt]|1]]
!deathcount
Code: [Select]
You've died @readfile@[Death\deathcount.txt] times.