So I’ve setup a death counter with the commands below based off other topics on the forum.
The problems I have right now is I would like the !ripadd to also display the current !rip value after it’s called and !ripset conflicts with !ripadd.
So the $(count) could be at 5, I call !ripset 6 to make !rip be 6, then I call !ripadd and !rip will still be 6.
Is there a way to make !ripset actually set the $(count) value?
Also is there a way to reset $(count) so each stream we can start fresh?
!commands add !rip 0
!commands edit !ripadd -ul=moderator -a=!commands edit !rip $(channel) has fucked up $(count) times.
!commands edit !ripset -ul=moderator -a=!commands edit !rip $(channel) has fucked up $(1) times.
1: !ripadd is an alias of !commands edit (!ripadd uses !commands edit to function). The output of any alias of !commands edit cannot be changed. It will always return
@$(user) -> The command "someCommand" has been edited successfully.
If you really want !ripadd to also display the edited value in !rip then I can suggest a complete overhaul to your death counter system, though it’s a bit more complex than what you have currently and will take some work on your end to set up.
2: !rip doesn’t have a $(count) variable. It’s a simple response that’s being edited by !ripadd which itself DOES have a $(count) variable. !ripadd and !ripset are setting conflicting values in !rip because they’re functioning independently of each, ie. !ripadd and !ripset both edit !rip but !ripset isn’t doing anything to edit the $(count) variable in !ripadd. What I suggest is deleting !ripset then copying and pasting this into chat:
!addcom !ripset -a=!editcom !ripadd \-c=$(eval $(1)-1)
!ripset will no longer directly edit !rip but now it will control the $(count) variable in !ripadd. For example, to set the value in !rip to 42, type:
If you’re not a big fan of running two commands to achieve this, again, I can suggest the overhaul to your commands setup I mentioned above.
3: If you followed my instructions in point 2, you now have a way to set the $(count) variable in !ripadd as well as the value in !rip to 0. Just type:
I’m completely open to an overhaul. I’m not really experienced at nightbot so I’ll take what I can get. The end goal would be to have something like what I have in streamelements where i have a single !rip command that increments the counter and displays the current value and a !ripset command to set it back to 0 at the beginning of the stream or start of a new game.
Try the current solution I have setup. It should work fine for what you need (commands to display deaths count, increment count, and set specific count). However if you’re really persistent on having one command, !ripadd, increment the value AND display the new value, then let me know.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.