Author Topic: Adding to a @counter@ by a specific amount for my cuss jar  (Read 2342 times)

0 Members and 1 Guest are viewing this topic.

Psywarrior

  • Youngling
  • *
  • Posts: 7
  • Karma: +1/-0
    • View Profile
  • Twitch Name: djpsywarrior
I currently have a !cuss command that every time I cuss my mods use !cuss to add to a "cussing counter". So my mods can enter this command and it keeps a tally of the number of cuss words. (I need a cuss jar) ;)

If my @counter@ total is 3 then !cuss would increment that to 4
@savefile@[cuss.txt], Psy just said a naughty! That's @counter@ times

What I am trying to figure out to do is to allow my mods to use another command to enter a specific number on to the counter in case I use several swears quickly. This is so that they have to keep entering !cuss multiple times.

If I have cussed 5 times the !cuss command would add 1 and it would be 6 times. This works.

The command I need is !cussing [number to add to counter] which would add that number on to the current @counter@.

If I had already cussed 5 times !cussing 6 would add 6 to the counter and so the cuss.txt file would read as 11.

I can't figure out how to do the !cussing
  • command.



TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Adding to a @counter@ by a specific amount for my cuss jar
« Reply #1 on: May 19, 2016, 09:49:15 AM »
Might be easier to do something like this:


This command is what mods can use to add +1 to the .txt file:
Note: Maybe add a chain to !cuss.

!addcuss
@savefile@[cuss.txt,@calc@[+|1|@readfile@[cuss.txt]]]


Viewer Command/Chained Command for !addcuss and !editcuss:
!cuss
Psy just said a naughty! That's @readfile@[cuss.txt] times!

Mods could use this to edit the .txt file manually.
!editcuss
@savefile@[cuss.txt,@target@]

_________

Another one could be:

If mods do not include a number after the command, it will add +1, if they include a number it will add the number + current number in .txt file.
!addcuss
@if@[@target@||||@savefile@[cuss.txt,@calc@[+|1|@readfile@[cuss.txt]]]||@savefile@[cuss.txt,@calc@[+|@readfile@[cuss.txt]|@target@]]]

Example:


Viewer Command/Chained Command for !addcuss and !editcuss:
!cuss
Psy just said a naughty! That's @readfile@[cuss.txt] times!


!addcuss:


!cuss (Ignore that the names that are different):
Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport

Psywarrior

  • Youngling
  • *
  • Posts: 7
  • Karma: +1/-0
    • View Profile
  • Twitch Name: djpsywarrior
Re: Adding to a @counter@ by a specific amount for my cuss jar
« Reply #2 on: May 19, 2016, 10:23:12 AM »
That was perfect! Thank you so much!