Author Topic: Give points to everyone! (Not !add points)  (Read 7223 times)

0 Members and 1 Guest are viewing this topic.

Nazo

  • Padawan
  • **
  • Posts: 70
  • Karma: +2/-0
  • Expert on Twitch Bots
    • View Profile
  • Twitch Name: OverlordNazo
Give points to everyone! (Not !add points)
« on: October 17, 2016, 01:59:29 PM »
So, I just recently made a command that allows users to give their currency to everyone in the channel. The way the command works is that it takes the number of currency a user specifies and it gives that amount to every viewer currently in the channel. For example, there are currently 10 viewers in your channel, if someone does !giveall 20, it will take the number of viewers in the channel times the number of currency you specified (in this case, it's 10 viewers times 20 currency) and remove the total from that user and give everyone else 10. However, if the user doesn't have enough to give to everyone, it will notify them.

!giveall
Code: [Select]
@if@[>||@calc@[*|@viewers@|@target@[1]]||@points@||Sorry, @user@, you don't have enough @pointsname@ to give everyone @target@[1] @pointsname@.||@editpoints@[@user@|-@calc@[*|@calc@[+|@viewers@|1]|@target@[1]]] @exec@[0,!add @target@[1] all]]Note(s): Make sure to enable User (Elevated Access) in the command window.
« Last Edit: February 07, 2017, 03:08:30 AM by Nazo »
★ Twitch Bot Expert ★


YouTube: Lord Nazo
Twitch: OverlordNazo
Twitter: @Lord_Nazo

ThatGirlSlays

  • Youngling
  • *
  • Posts: 42
  • Karma: +0/-0
    • View Profile
    • Instagram
  • Twitch Name: ThatGirlSlays
Re: Give points to everyone! (Not !add points)
« Reply #1 on: May 10, 2017, 04:41:25 AM »
I love that idea I'm going to try it.

ThatGirlSlays

  • Youngling
  • *
  • Posts: 42
  • Karma: +0/-0
    • View Profile
    • Instagram
  • Twitch Name: ThatGirlSlays
Re: Give points to everyone! (Not !add points)
« Reply #2 on: May 10, 2017, 03:59:30 PM »
Tried this today and it works. Had to set the permission to elevated access. I want to try to edit it to see if I can keep a log file of all the users that have used this command and add up the total number of points they have given out in a certain time frame. Then display the most generous person for the month in my stream.