Author Topic: Defuse Custom Mini-Game (Setup Guide)  (Read 13155 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
Defuse Custom Mini-Game (Setup Guide)
« on: February 02, 2016, 07:39:09 AM »
Defuse

NOTE: DeepBot v0.8.8.0 or higher and a DeepBot VIP membership are required in order for this minigame to work properly.

SCROLL TO THE BOTTOM OF THIS POST TO SEE MY CURRENT SETUP

So, Defuse is a mini-game I made by using DeepBot variables. You type !defuse and either red, blue, or green, and receive points if you guess the correct color. However, if you guess the incorrect color, you'll lose points or get timed out.

Add the following commands with their indicated names:

!defuse
Code: [Select]
@if@[@target@||||Defuse the bomb! Cut the correct wire, and you'll be showered in @pointsname@ and praise! Cut the wrong wire, and you lose @pointsname@. Type !defuse and one of the following colors to play: red, blue, or green||!defuse_color]
!defuse_color:
Code: [Select]
@if@[@target@||@customapi@[https://api.rtainc.co/twitch/random?choices=red,blue,green]||!defuse_win||!defuse_lose]
!defuse_win
Code: [Select]
You cut the correct wire!
!defuse_payout
Code: [Select]
!add <number of points to be awarded to @user@> @user@
!defuse_lose
Code: [Select]
You cut the wrong wire… SMSkull
!defuse_toll
Code: [Select]
@if@[>=||@points@||<number of points to be taken away>||!remove <number of points to be taken away> @user@||/timeout @user@ <number of seconds @user@ is to be timed out for>]
You will have to add !defuse_payout as a chain command for !defuse_win through the DeepBot program. Once that is done, add !defuse_toll as a chain command for !defuse_lose.

If you don't already know how to do this, you must go into the DeepBot program, click the Channel Commands tab, right click !defuse_win, then click Edit Command. A window will open containing all the things you can do with the command. Near the bottom right corner of the screen should be a box that says Command Chain or Exec Command or something similar to the two, type !defuse_payout in the box. Do this for !defuse_lose but put !defuse_toll in the command box.

If you're not happy with the penalty setup, then look at the examples below for different penalty options for the game.

Penalty Option 1: The loser loses points (if they have enough to be taken away)

Here's what !defuse_toll should look like for this:
Code: [Select]
!remove <number of points to be taken away> @user@
Penalty Option 2: The loser gets a timeout.

Here's what !defuse_toll should look like for this:
Code: [Select]
/timeout @user@ <number of seconds the player should be timed out for>
Penalty Option 3: If the loser doesn't have enough points that can be taken away, then they will be timed out.

Here's what !defuse_toll should look like for this:
Code: [Select]
@if@[>=||@points@||<number of points to be taken away>||!remove <number of points to be taken away> @user@||/timeout @user@ <number of seconds the player should be timed out for>]
Example:
Code: [Select]
@if@[>=||@points@||50||!remove 50 @user@||/timeout @user@ 60]In the example above, the penalty for losing is 50 points, and if the player doesn't have 50 or more points that can be taken away, they will be timed for 60 seconds.


For each of the commands listed below, locate them in the DeepBot program, right click, click Edit Command, then find the tab with "Run As". There will be 3 options you can choose: User, User (Elevated Access), and Bot. Click User (Elevated Access), then navigate to the Admin Access checkbox and make sure it is checked. Also, make sure the Access Level is set to 9. Bot & Streamer Only.

!defuse_color
!defuse_win
!defuse_payout
!defuse_toll
_______________________________________

Here is my current setup:

Make sure all of the following commands have User (Elevated Access) selected and Admin Access checked.

!defuse
Code: [Select]
@if@[@target@||||/me Defuse the bomb! Cut the correct wire, and you will be showered with @pointsname@! Type !defuse and any of the following colors to play: red, blue, or green||@if@[<=||@points@||100||Sorry, @user@, but you can't afford to pay for future ER visits. Get some more @pointsname@.||@exec@[0,!defuse_check @target@]]]
!defuse_check
Code: [Select]
@if@[@customapi@[https://ninetales.us/api/lowercase/index.php?target=@target@]||red||!defuse_start @target@||@if@[@customapi@[https://ninetales.us/api/lowercase/index.php?target=@target@]||blue||!defuse_start @target@||@if@[@customapi@[https://ninetales.us/api/lowercase/index.php?target=@target@]||green||!defuse_start @target@||That is not a valid wire color, @user@. The only wire colors are red, blue, and green.]]]Set Access Control to 9. Streamer/Bot Only

!defuse_start
Code: [Select]
@user@ is attempting to defuse the bomb by cutting the @customapi@[https://ninetales.us/api/lowercase/index.php?target=@target@] wire!Set Access Control to 9. Streamer/Bot Only
Type the following into the Command Chaining box and set it to run after 4 seconds:
Code: [Select]
!defuse_result @target@
!defuse_result
Code: [Select]
@if@[@customapi@[https://ninetales.us/api/lowercase/index.php?target=@target@]||@customapi@[http://api.alixe.pro/select/?choices=red,blue,green]||@user@ cut the correct wire and received a reward of 100 @pointsname@! @editpoints@[@user@|100]||@user@ cut the wrong wire... riPepperonis @editpoints@[@user@|-100] @exec@[1,!defuse_penalty]]Set Access Control to 9. Streamer/Bot Only

!defuse_penalty
Code: [Select]
@if@[>=||@points@||100||@user@ was brought to the emergency room and had to pay a bill of 100 @pointsname@. @editpoints@[@user@|-100]||@user@ was brought to the emergency room but couldn't pay the bill, so the doctor took whatever @pointsname@ @user@ had. @editpoints@[@user@|-@points@]]Set Access Control to 9. Streamer/Bot Only

Click here for the .JSON file for my Defuse setup!

________________________________________________________

Post a message in this topic if you have any questions about setting up Defuse or if you need help setting up special parameters.
« Last Edit: August 17, 2017, 12:04:06 PM by Nazo »
★ Twitch Bot Expert ★


YouTube: Lord Nazo
Twitch: OverlordNazo
Twitter: @Lord_Nazo

Nazo

  • Padawan
  • **
  • Posts: 70
  • Karma: +2/-0
  • Expert on Twitch Bots
    • View Profile
  • Twitch Name: OverlordNazo
Re: Defuse minigame setup tutorial
« Reply #1 on: February 04, 2016, 04:24:01 AM »
Oh, and I forgot to add this:

(This only applies if you chose Penalty Option 1)

If the person playing Defuse lost, and they don't have enough points to be taken away but instead want it to take whatever points they have left, make sure !defuse_toll looks like this:

Code: [Select]
@if@[>=||@points@||<number of points to be taken away>||!remove <number of points to be taken away> @user@||!remove @points@ @user@
Basically, what this does is that it takes away whatever amount of points the person has left if they do not have enough that meets certain point deduction penalty.

Example:
Code: [Select]
@if@[>=||@points@||50||!remove 50 @user@||!remove @points@ @user@So, say I only had 40 points, and I lost in Defuse, then I would lose all my points.
★ Twitch Bot Expert ★


YouTube: Lord Nazo
Twitch: OverlordNazo
Twitter: @Lord_Nazo

Nazo

  • Padawan
  • **
  • Posts: 70
  • Karma: +2/-0
  • Expert on Twitch Bots
    • View Profile
  • Twitch Name: OverlordNazo
Re: Defuse minigame setup tutorial
« Reply #2 on: February 09, 2016, 05:18:15 AM »
UPDATE:

I've finally perfected the Defuse minigame so that it now only accepts valid responses, rendering !defuse_color obsolete.

Remove !defuse_color and add the following commands:
Code: [Select]
!defuse_verify
@if@[@target@||red||!defuse_red||]@if@[@target@||blue||!defuse_blue||]@if@[@target@||green||!defuse_green||]

!defuse_red
@if@[red||@customapi@[https://api.rtainc.co/twitch/random?choices=red,blue,green]||!defuse_win||!defuse_lose]

!defuse_blue
@if@[blue||@customapi@[https://api.rtainc.co/twitch/random?choices=red,blue,green]||!defuse_win||!defuse_lose]

!defuse_green
@if@[green||@customapi@[https://api.rtainc.co/twitch/random?choices=red,blue,green]||!defuse_win||!defuse_lose]

Notes: Make sure the access level for the commands listed above are set to 9. Bot & Streamer Only. These commands will only run if elevated access and admin access are checked.

You will also have to edit !defuse.
Code: [Select]
!defuse
@if@[@target@||||Defuse the bomb! Cut the correct wire, and you'll be showered in @pointsname@ and praise! Cut the wrong wire, and you lose @pointsname@. Type !defuse and one of the following colors to play: red, blue, or green||!defuse_verify]

Also, make sure !defuse_lose has User (Elevated Access) selected and Admin Access checked.
« Last Edit: February 09, 2016, 05:31:02 AM by LordNazo »
★ Twitch Bot Expert ★


YouTube: Lord Nazo
Twitch: OverlordNazo
Twitter: @Lord_Nazo

TheRealAlixe

  • Knight
  • ***
  • Posts: 106
  • Karma: +5/-2
    • View Profile
    • Ninetales.us
  • Twitch Name: TheRealAlixe
Re: Defuse minigame setup tutorial
« Reply #3 on: February 09, 2016, 12:05:24 PM »
Hey here is a fix as you dont seem to be passing targets from the main command!

!defuse
Code: [Select]
@if@[@target@||||Defuse the bomb! Cut the correct wire, and you'll be showered in @pointsname@ and praise! Cut the wrong wire, and you lose @pointsname@. Type !defuse and one of the following colors to play: red, blue or yellow||@user@ is attempting to defuse the bomb by cutting the @target@ wire! @exec@[10,!defuse_verify @target@]]
   Notes:- Only runs with elevated access checked

!defuse_verify
Code: [Select]
@if@[@target@||red||!defuse_red||@if@[@target@||blue||!defuse_blue||@if@[@target@||yellow||!defuse_yellow||@user@ you seem to be color blind, there is no wired of that color!]]]
   Notes:- Only runs with elevated access checked

!defuse_red
Code: [Select]
@if@[red||@customapi@[https://api.rtainc.co/twitch/random?choices=red,blue,yellow]||!defuse_win||!defuse_lose]
   Notes:- Only runs with elevated access checked

!defuse_blue
Code: [Select]
@if@[blue||@customapi@[https://api.rtainc.co/twitch/random?choices=red,blue,yellow]||!defuse_win||!defuse_lose]
   Notes:- Only runs with elevated access checked

!defuse_yellow
Code: [Select]
@if@[yellow||@customapi@[https://api.rtainc.co/twitch/random?choices=red,blue,yellow]||!defuse_win||!defuse_lose]
   Notes:- Only runs with elevated access checked

!defuse_win
Code: [Select]
@user@ cut the correct wire! and recived @rand@[1|100] @pointsname@ as a reward! @editpoints@[@user@|@rand@[1|100]]
   Notes:- Only runs with elevated access checked

!defuse_lose
Code: [Select]
@if@[>=||@points@||@rand@[1|100]||!defuse_toll @rand@[1|100]||!defuse_done @rand@[1|100]]
   Notes:- Only runs with elevated access checked

!defuse_toll
Code: [Select]
@user@ cut the wrong wire KAPOW! and lost @target@ @pointsname@! @editpoints@[@user@|-@target@]
   Notes:- Only runs with elevated access checked

!defuse_done
Code: [Select]
@user@ Sorry but the bomb is still in the process of being built again!
   Notes:- Only runs with elevated access checked


EDIT: fixed the !defuse_verify
« Last Edit: February 11, 2016, 01:25:14 AM by LawlyPopzz »
Twitter: @TheRealAlixe | Web: Ninetales.us | Twitch: @TheRealAlixe | Discord: join

Nazo

  • Padawan
  • **
  • Posts: 70
  • Karma: +2/-0
  • Expert on Twitch Bots
    • View Profile
  • Twitch Name: OverlordNazo
Re: Defuse minigame setup tutorial
« Reply #4 on: February 10, 2016, 05:40:35 AM »
Hey here is a fix as you dont seem to be passing targets from the main command!
Thanks!
★ Twitch Bot Expert ★


YouTube: Lord Nazo
Twitch: OverlordNazo
Twitter: @Lord_Nazo

simonhdma

  • Youngling
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
  • Twitch Name: SimonHDMA
Re: Defuse minigame setup tutorial
« Reply #5 on: February 10, 2016, 10:34:46 PM »
Hey, can you help me with setting up this game in DeepBot? I lost after those updates so if you can put latest version for me, I would be more than happy. I need to translate it into polish language so I don't want mess things up. Thanks in advance!

Nazo

  • Padawan
  • **
  • Posts: 70
  • Karma: +2/-0
  • Expert on Twitch Bots
    • View Profile
  • Twitch Name: OverlordNazo
Re: Defuse minigame setup tutorial
« Reply #6 on: February 11, 2016, 08:22:42 AM »
Hey, can you help me with setting up this game in DeepBot? I lost after those updates so if you can put latest version for me, I would be more than happy. I need to translate it into polish language so I don't want mess things up. Thanks in advance!
Sure! :) Did you want any special parameters as well? (i.e. rewards, penalties, custom messages, etc.)
★ Twitch Bot Expert ★


YouTube: Lord Nazo
Twitch: OverlordNazo
Twitter: @Lord_Nazo

simonhdma

  • Youngling
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
  • Twitch Name: SimonHDMA
Re: Defuse minigame setup tutorial
« Reply #7 on: February 11, 2016, 07:29:28 PM »
Hey, can you help me with setting up this game in DeepBot? I lost after those updates so if you can put latest version for me, I would be more than happy. I need to translate it into polish language so I don't want mess things up. Thanks in advance!
Sure! :) Did you want any special parameters as well? (i.e. rewards, penalties, custom messages, etc.)

Yes please! :) I'm trying to implement version from LawlyPopzz with cooldown for each user but it doesn't work. DeepBot just show !defuse_pass if I type !defuse or !defuse_red if I typ !defuse red.

Totodilegnaw

  • Youngling
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
  • Twitch Name: Totodilegnaw
Re: Defuse Custom Mini-Game (Setup Guide)
« Reply #8 on: March 24, 2016, 02:05:52 PM »
I can't get the command to work for a freind I'm a sad panda halp meh please

Nazo

  • Padawan
  • **
  • Posts: 70
  • Karma: +2/-0
  • Expert on Twitch Bots
    • View Profile
  • Twitch Name: OverlordNazo
Re: Defuse Custom Mini-Game (Setup Guide)
« Reply #9 on: March 29, 2016, 11:18:58 PM »
I can't get the command to work for a friend I'm a sad panda halp meh please
Scroll to the bottom of the first post and add the commands with their necessary modifications.
★ Twitch Bot Expert ★


YouTube: Lord Nazo
Twitch: OverlordNazo
Twitter: @Lord_Nazo

Ninhigan

  • Youngling
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
  • Twitch Name: Ninhigan
Re: Defuse Custom Mini-Game (Setup Guide)
« Reply #10 on: April 14, 2016, 02:12:59 PM »
Hello, I copied your current set-up. The only I modified is change from 100 to 10 (so users only lose 10 points). However , I cant seem to start the commands, type !defuse red (for sample), nothing happened

chickdrummer88

  • Youngling
  • *
  • Posts: 9
  • Karma: +1/-0
    • View Profile
  • Twitch Name: chickdrummer88
Re: Defuse Custom Mini-Game (Setup Guide)
« Reply #11 on: June 12, 2016, 04:40:42 AM »
When someone loses, it just spams someone's points being taken away. Is this a bug?

markitos32

  • Youngling
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
  • Twitch Name: xmarkitos32x
Re: Defuse Custom Mini-Game (Setup Guide)
« Reply #12 on: June 21, 2016, 07:39:56 AM »
Hey i want to translate this mini game to spanish, but I canīt translate the colors beacause itīs not going to work