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 SETUPSo, 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
@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:
@if@[@target@||@customapi@[https://api.rtainc.co/twitch/random?choices=red,blue,green]||!defuse_win||!defuse_lose]
!defuse_win
You cut the correct wire!
!defuse_payout
!add <number of points to be awarded to @user@> @user@
!defuse_lose
You cut the wrong wire
SMSkull
!defuse_toll
@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:
!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:
/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:
@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:
@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
@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
@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
@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:
!defuse_result @target@
!defuse_result
@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
@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.