Author Topic: Variable Counters  (Read 6312 times)

0 Members and 1 Guest are viewing this topic.

Antitonic

  • Youngling
  • *
  • Posts: 10
  • Karma: +0/-0
  • Invented By Gandhi
    • View Profile
    • Truly Antitonic
  • Twitch Name: Antitonic
Variable Counters
« on: July 22, 2015, 07:41:22 PM »
I'm trying to set up some variable commands, and I'm not sure it's able to be set up or not. For example, I want to track number of times I've died using !death. This would be with @counter@, I know. But when switching games, the counter doesn't reset, to be independent for the new game. Theoretically, I'd like to have the same stat work for separate games.

Also, is there a way to remove a counter other than manually? Using the !death example, is there a way to have the counter at 4, then "!death remove" or something similar puts the counter at 3?

I guess ideally, it'd look like:
Quote
!game
Now Playing: XYZ
!death
1 Death for XYZ
!death
2 Deaths for XYZ
!death
3 Deaths for XYZ
!death remove
2 Deaths for XYZ

- LATER -

!game
Now Playing: ABC
!death
1 Death for ABC
That's basically what I'm looking for.

MercurY3rd

  • Councilor
  • *****
  • Posts: 652
  • Karma: +26/-1
    • View Profile
  • Twitch Name: mercury3rd
Re: Variable Counters
« Reply #1 on: July 22, 2015, 08:31:09 PM »
There is a solution for the death counter for different games, but you need a command for each game. But you cant remove one death with a command.


So i created a command with the first word of the Game in this case for League of Legends and Alien: Isolation



And the !death command triggers these commands
Hier steht nichts Sinnvolles, dennoch freundliche Grüße. MercurY

Antitonic

  • Youngling
  • *
  • Posts: 10
  • Karma: +0/-0
  • Invented By Gandhi
    • View Profile
    • Truly Antitonic
  • Twitch Name: Antitonic
Re: Variable Counters
« Reply #2 on: July 22, 2015, 09:35:18 PM »
Ah, that's a trickier way of sorting it than I would've thought of. Would that work for additional stats too, or would something break along the line? Say, tracking both !death and !win.

Also, since removal via command is out, I assume bulk adding is too? Would be handy, if, for example, in case of sudden repeated death to save on command spamming and just bank up however many.
Quote
!death
2 Deaths for XYZ
!death
3 Deaths for XYZ
!death add 6
9 Deaths for XYZ
Like so?

MercurY3rd

  • Councilor
  • *****
  • Posts: 652
  • Karma: +26/-1
    • View Profile
  • Twitch Name: mercury3rd
Re: Variable Counters
« Reply #3 on: July 22, 2015, 10:45:11 PM »
na should work for !win if you make the commands, but you can't have both win and death counter in one command. !add 6 won't work either :(
Hier steht nichts Sinnvolles, dennoch freundliche Grüße. MercurY

Antitonic

  • Youngling
  • *
  • Posts: 10
  • Karma: +0/-0
  • Invented By Gandhi
    • View Profile
    • Truly Antitonic
  • Twitch Name: Antitonic
Re: Variable Counters
« Reply #4 on: July 22, 2015, 11:04:42 PM »
All good then! I was worried that one command would accidentally trigger both or all of them unless I had an odd workaround, so luckily that's not the case. Thank you so much!

MercurY3rd

  • Councilor
  • *****
  • Posts: 652
  • Karma: +26/-1
    • View Profile
  • Twitch Name: mercury3rd
Re: Variable Counters
« Reply #5 on: July 22, 2015, 11:16:47 PM »
hmm na now i get you for !win you need to change the commands a bit then they don't trigger both

so i just add a w in front of the commands for the win command

Hier steht nichts Sinnvolles, dennoch freundliche Grüße. MercurY

Antitonic

  • Youngling
  • *
  • Posts: 10
  • Karma: +0/-0
  • Invented By Gandhi
    • View Profile
    • Truly Antitonic
  • Twitch Name: Antitonic
Re: Variable Counters
« Reply #6 on: July 22, 2015, 11:33:37 PM »
Problem is, I've played a few games (and intend to play a few more) in sequels, which counters the @game@. For example, Saints Row 2 and Saints Row 3 would both output !dsaints when !d@game@ is used, wouldn't it? Which would end up triggering for both games.

MercurY3rd

  • Councilor
  • *****
  • Posts: 652
  • Karma: +26/-1
    • View Profile
  • Twitch Name: mercury3rd
Re: Variable Counters
« Reply #7 on: July 23, 2015, 12:35:35 AM »
yeah it's just a workarround not a good solution, you coud add a pre letter at the commands like !1@game@ !2@game@ for part 1 and part2 of the game
Hier steht nichts Sinnvolles, dennoch freundliche Grüße. MercurY