Author Topic: Command help  (Read 4489 times)

0 Members and 1 Guest are viewing this topic.

Sizzles

  • Youngling
  • *
  • Posts: 48
  • Karma: +1/-0
    • View Profile
Command help
« on: June 05, 2017, 08:32:33 AM »
So i have a timer on my bot that tells people to do a command (!marshmallow) which i want to give points to the first 3 users that do it so user 1 would get 200 points, user 2 would get 150 and user 3 would get 50 but depending on what the max number they roll for the !marshmallow command.

This is the marshmallow command: @user@ feeds @rand@[1|200] marshmallows to the Fluffs! 

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Command help
« Reply #1 on: June 05, 2017, 09:18:46 PM »
Probably have to do like

@if@[<=||@counter@||1||@user@ feeds @rand@[1|200] marshmallows to the Fluffs! @editpoints@[@user@|200]||@if@[<=||@counter@||2||@user@ feeds @rand@[1|200] marshmallows to the Fluffs! @editpoints@[@user@|150]||@if@[<=||@counter@||3||@user@ feeds @rand@[1|200] marshmallows to the Fluffs! @editpoints@[@user@|100]||@if@[>||@counter@||3||Sorry @user@, you were too slow.||]

I think in the last bracket you could have it reset the counter with @exec@ at a timed delay. But up to you. Not sure how you want it setup. But with this command, it will check the command counter to see how many times it is ran. If less than or equal to 1, give 200 points, and so on till it hits 3. Once it hits 3, it will say: Sorry @user@, you were too slow. You do need to set this command to "Run as" "User (Elevated Access)".

Feel free to edit and change the command as needed.
Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport

Sizzles

  • Youngling
  • *
  • Posts: 48
  • Karma: +1/-0
    • View Profile
Re: Command help
« Reply #2 on: June 06, 2017, 12:43:31 PM »
So in the last bracket i would do  @exec@[<time till timed message runs again>,!marshmallow2] and !marshmallow2 would be @setcounter@[<timed command>|0] correct?

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Command help
« Reply #3 on: June 06, 2017, 09:07:27 PM »
Yeah, at least that should work in theory.
Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport

Sizzles

  • Youngling
  • *
  • Posts: 48
  • Karma: +1/-0
    • View Profile
Re: Command help
« Reply #4 on: June 06, 2017, 09:37:12 PM »
So it looks like because it is a timed message it won't work... How exactly would i set it up?

Also with what you gave me it should say
@if@[<=||@counter@||1||@user@ feeds @rand@[1|200] marshmallows to the Fluffs! @editpoints@[@user@|200]||@if@[<=||@counter@||2||@user@ feeds @rand@[1|200] marshmallows to the Fluffs! @editpoints@[@user@|150]||@if@[<=||@counter@||3||@user@ feeds @rand@[1|200] marshmallows to the Fluffs! @editpoints@[@user@|100]||@if@[>||@counter@||3||Sorry @user@, you were too slow.||]]]]

Bracket for each @if@

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Command help
« Reply #5 on: June 07, 2017, 07:06:04 AM »
I made two commands, !bunny and !bunny2 in their own command group "Bunny". I set to run the chain command after 60 seconds which resets the counter on the original command to "reset" the game.

What it looks like:



Command Code to Import:

Code: [Select]
[{
  "command": "!bunny",
  "group": "Bunny",
  "status": true,
  "runAsBot": false,
  "runAsUserElevated": true,
  "startsWithEx": false,
  "message": "@if@[<=||@counter@||1||@user@ feeds @rand@[1|200] marshmallows to the Fluffs! @editpoints@[@user@|200] ||@if@[<=||@counter@||2||@user@ feeds @rand@[1|200] marshmallows to the Fluffs! @editpoints@[@user@|150] ||@if@[<=||@counter@||3||@user@ feeds @rand@[1|200] marshmallows to the Fluffs! @editpoints@[@user@|100]||@if@[>||@counter@||3||Sorry @user@, you were too slow.||]]]] ",
  "description": "",
  "lastUsed": "2017-06-06T17:02:57.4713657-06:00",
  "cooldown": 0,
  "accessLevel": 1,
  "soundFile": "",
  "costEnabled": false,
  "minPoints": 0,
  "minHours": 0,
  "costAll": 0,
  "costVIPViewer": 0,
  "costVIPB": 0,
  "costVIPS": 0,
  "costVIPG": 0,
  "costVIPMod": 0,
  "costVIPStreamer": 0,
  "OnScreenWidgetEnabled": false,
  "OnScreenWidgetName": "",
  "OnScreenWidgetTitle": "",
  "OnScreenWidgetMessage": "",
  "OnScreenWidgetImageLink": "",
  "OnScreenWidgetAnimMode": 0,
  "OBSRemoteEnabled": false,
  "OBSRemoteAction": 0,
  "OBSRemoteSceneName": "",
  "CommandChaningCmdName": "!bunny2",
  "CommandChaningRunAfter": 60,
  "CommandChaningRunAsAdmin": false,
  "VIPModEnabled": false,
  "VIPModIfViewer": 0,
  "VIPModIfVIPB": 0,
  "VIPModIfVIPS": 0,
  "VIPModIfVIPG": 0,
  "VIPModAddDays": 30,
  "countdown": "2017-06-06T16:57:28.2431906-06:00",
  "counter": 0,
  "APITarget": false,
  "hideFromCmdList": false,
  "accessDeniedMsg": "",
  "noPointsMsg": "",
  "disableChanAccess": false,
  "disableWhisperAccess": false,
  "disableDiscordAccess": false,
  "isSoundVolumeSet": true,
  "soundVolume": 100
},
{
  "command": "!bunny2",
  "group": "Bunny",
  "status": true,
  "runAsBot": false,
  "runAsUserElevated": false,
  "startsWithEx": false,
  "message": "Counter has been reset! @setcounter@[!bunny|0]",
  "description": "",
  "lastUsed": "2017-06-06T17:00:50.5503219-06:00",
  "cooldown": 0,
  "accessLevel": 1,
  "soundFile": "",
  "costEnabled": false,
  "minPoints": 0,
  "minHours": 0,
  "costAll": 0,
  "costVIPViewer": 0,
  "costVIPB": 0,
  "costVIPS": 0,
  "costVIPG": 0,
  "costVIPMod": 0,
  "costVIPStreamer": 0,
  "OnScreenWidgetEnabled": false,
  "OnScreenWidgetName": "",
  "OnScreenWidgetTitle": "",
  "OnScreenWidgetMessage": "",
  "OnScreenWidgetImageLink": "",
  "OnScreenWidgetAnimMode": 0,
  "OBSRemoteEnabled": false,
  "OBSRemoteAction": 0,
  "OBSRemoteSceneName": "",
  "CommandChaningCmdName": "",
  "CommandChaningRunAfter": 0,
  "CommandChaningRunAsAdmin": false,
  "VIPModEnabled": false,
  "VIPModIfViewer": 0,
  "VIPModIfVIPB": 0,
  "VIPModIfVIPS": 0,
  "VIPModIfVIPG": 0,
  "VIPModAddDays": 30,
  "countdown": "2017-06-06T16:57:57.5312908-06:00",
  "counter": 2,
  "APITarget": false,
  "hideFromCmdList": false,
  "accessDeniedMsg": "",
  "noPointsMsg": "",
  "disableChanAccess": false,
  "disableWhisperAccess": false,
  "disableDiscordAccess": false,
  "isSoundVolumeSet": true,
  "soundVolume": 100
}]
Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport

Sizzles

  • Youngling
  • *
  • Posts: 48
  • Karma: +1/-0
    • View Profile
Re: Command help
« Reply #6 on: June 07, 2017, 12:42:07 PM »
Okay i understand what you did but the problem with that is every time someone does the !bunny command it resets the counter.... So if i spammed !bunny for 30 seconds !bunny2 wouldn't reset !bunny till 90 seconds later instead of 60 seconds later

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Command help
« Reply #7 on: June 07, 2017, 09:29:38 PM »
Well if you really want, then do this and remove the chain in the first command:

@if@[<=||@counter@||1||@user@ feeds @rand@[1|200] marshmallows to the Fluffs! @editpoints@[@user@|200] ||@if@[<=||@counter@||2||@user@ feeds @rand@[1|200] marshmallows to the Fluffs! @editpoints@[@user@|150] ||@if@[<=||@counter@||3||@user@ feeds @rand@[1|200] marshmallows to the Fluffs! @editpoints@[@user@|100]||@if@[>||@counter@||3||Sorry @user@, you were too slow.||@exec@[90,!bunny2]]]]]

Marked in red what I changed/added.
Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport

Sizzles

  • Youngling
  • *
  • Posts: 48
  • Karma: +1/-0
    • View Profile
Re: Command help
« Reply #8 on: June 07, 2017, 09:36:33 PM »
I tried to do that yesterday and because the counter will always be greater than 3 it will never be a failed match meaning it won't execute that command no matter the seconds.

And in my previous comment i was saying if the time message triggered then 3 users did !bunny they would get points and it would start counting down to run !bunny2 which resets the counter of !bunny but if a fourth user did !bunny it would start to countdown again meaning the time message would show 30 seconds before users could do !bunny again
Does that make sense?

I am assuming i could probably make it countdown once the first user triggers the command with text files or something but i have no clue how to make that happen... Reason why i am asking how to make it happen

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Command help
« Reply #9 on: June 07, 2017, 09:57:31 PM »
With the @exec@, it would reset the counter of the first command to 0 after the !bunny has reached the counter of 3. But yeah, you could make it go off when the first user types it.
Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport

Sizzles

  • Youngling
  • *
  • Posts: 48
  • Karma: +1/-0
    • View Profile
Re: Command help
« Reply #10 on: June 07, 2017, 10:07:21 PM »
How would i make it start counting down the first time someone uses !bunny because lets say 10 people use !bunny when the timed message goes off that could be a 10 minute or more wait after the next timed message goes off because it is resetting the time after each user doing !bunny...

I am guessing it would be... @if@[<=||@counter@||1||@user@ feeds @rand@[1|200] marshmallows to the Fluffs! @editpoints@[@user@|200] @exec@[60,!bunny2]||@if@[<=||@counter@||2||@user@ feeds @rand@[1|200] marshmallows to the Fluffs! @editpoints@[@user@|150] ||@if@[<=||@counter@||3||@user@ feeds @rand@[1|200] marshmallows to the Fluffs! @editpoints@[@user@|100]||@if@[>||@counter@||3||Sorry @user@, you were too slow.||]]]]

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Command help
« Reply #11 on: June 07, 2017, 10:14:50 PM »
Yeah, that is correct on where you have it in the command.
Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport

Sizzles

  • Youngling
  • *
  • Posts: 48
  • Karma: +1/-0
    • View Profile
Re: Command help
« Reply #12 on: June 08, 2017, 07:20:26 AM »
Thank you.... I was overthinking stuff before. Your help is always amazing TheNumbLock <3