Author Topic: command add minutes  (Read 1231 times)

0 Members and 1 Guest are viewing this topic.

VicPage

  • Youngling
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
  • Twitch Name: vicpagegg
command add minutes
« on: August 03, 2018, 05:10:43 PM »
For a 24h stream, I would to create a command to let the mods add minutes to a certain string, so ppl can know how much they increased the countdown (this last part should be @getcounter@[!boostadd], it's the first command I can't figure out) . I've tried the @counter@ but ofc it adds just 1 at times, I've tried the @calc@ but apparently it doesn't work (or I am dumb). Can you help me?

Sorry for my bad english, not my native one.

ThatGirlSlays

  • Youngling
  • *
  • Posts: 42
  • Karma: +0/-0
    • View Profile
    • Instagram
  • Twitch Name: ThatGirlSlays
Re: command add minutes
« Reply #1 on: August 07, 2018, 01:12:28 AM »
Hi,

So if I am understanding you correctly this is what you are trying to do (please correct me if I am wrong):

  • You want to hold a 24 hour stream and allow users (or simply just mods) to extend the time which means your stream could last over 24 hours.
  • People would do this by some means of entering a command for example they write !extend and each time they do that it adds 30 minutes to the stream
  • You want another command that will show how long the stream has been extended for. Say for example people enter !extendcount and it outputs: "The stream has been extended 4 times for an extra 2 hours! The 24 hour stream will not become a 26 hour stream!"...Something like that?

If that's what you are trying to do then you can simply make use of @counter@ and @calc@

So for example..

This is the !extend command that people use to add time to your stream:

@user@ just added @readfile@[Extend/increment.txt] minutes to the stream. This stream has been extended by @calc@[*|@readfile@[Extend/increment.txt]|@counter@] minutes.

Then if people want to check how long the stream has been extended for later then this is your !extendcount command:
This stream has been extended @getcounter@[!extend] times for a total of @calc@[*|@readfile@[Extend/increment.txt]|@getcounter@[!extend]] extra minutes.


In your "custom logs" folder, create a new folder called "Extend" and then inside of it, create a file called "increment.txt". Inside the file, enter the number of minutes you want to extend your stream each time the !extend command is used. For example enter "30" (without the quotation marks) if you want the stream to be extended by 30 minutes each time someone uses the !extend command.

You can even do further conditional logic if you want to display minutes AND hours the stream has been extended. In might example, if the stream has been extended 5 times it will say "This stream has been extended 5 times for a total of 150 minutes. If you want this to say "2.5 hours" then you would need to divide 150 by 60. If you want to add 2.5 to 24 hour and then say "This has now become a 26.5 hour stream" then you need to use calc again to add 24 + (150 / 60).