Hello,
I made a death counter but ran into a problem: Mr Streamer sometimes just dies too fast! So I wanted to edit the command to increase the counter by the given $(query)
I’ve tried using
!commands edit !deaths X has died $(eval s="";for(i = 0; i < $(query)-1;i++){s+=$(count);}$(count);) times
But this only seems to run $(count) twice no matter what, which I guess means that count is interpreted & replaced before the eval? I’ve tried looking through the forums but couldn’t find a way to do this.
Is this even possible without creating a webserver to urlfetch from? If not are there any good resources as to how to get started with that? Any help would be greatly appreciated!
Edit: Personally I’d love if this functionality were baked into $(count) itself, like $(count 3) to add 3, $(count -1) to decrement, and $(count $(query)), as examples. Would make a lot of things a lot simpler!
Check out my reply to a very similar question. It will help you set up some commands to keep track of a running count and increment the count by whatever integer is given in the user input.
Thanks, I thought I’d looked through old questions pretty extensively but I guess I hadn’t looked enough! Shame this can’t be done through nightbot’s base functionality though.
Use this command to set the number of death to where you want it to be.
Call !deaths to know where you are, let’s say you are at 47 deaths and you want to add 3 deaths, then call !setdeath 50 (since 47+3=50), and next call !adddeath to finalize the update, now !deaths should display 50 deaths.
!addcom !zerodeath -ul=mod -a=!editcom !deaths $(twitch $(channel) "$(channel) died 0 times playing {{game}}.")
Use this command to reset the !deaths message if you want to have it at 0 right at the start, otherwise the message will be updated on the next first death.