Win loss counter commands

I need a command for Nightbot that shows a Win loss like so " Win: number Loss: number" using $(counts), i also need a !win to add one to the win, an vis versa for loss, but after an hour of looking through Help docs and forums i have made no progress

Doing so all in one command would not be possible as far as i can see. You would need one command for wins and one for losses.

The way that it normally works is that you have one variable you are keeping track of: wins, for this scenario. You have a command that keeps track of your wins called !wincount or something

When you wanted to modify the ‘wins’ count to bring it up you would use another command that would be modifying the wincount (lets call it !addwin) and it does it by keeping the entire structure of !wincount the same but changing the one number you needed with a count (from !addwin).

With two variables you would need to be able to keep the one you don’t want to touch the same when you are modifying the other one, which isn’t possible to do in a single command as far as i understand it. There is no way to keep track of a count from another command which would make this sort of thing possible, but using the method that other commands use (a command to track the variable and a command to modify the variable) it is not possible to get what you need done.

It would be something that is possible with a customapi (as most things nightbot can’t do are) but with normal commands and variables it doesn’t seem possible

Could likely change wording on this to show both wins and losses. I don’t know of a way to use a command to add to the number, though

After changing the wording of the commands:

!commands add !record Current Record:
!commands add !setrecord -ul=moderator -a=!commands edit !record Current Record: $(1) - $(2)

You or a moderator than then use !setrecord with the two different values. ex. !setrecord 5 2 would set the record to 5-2
.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.