Apps Home
|
Create an App
shock tester
Author:
boundupone
Description
Source Code
Launch App
Current Users
Created by:
Boundupone
var CurrentSetting = null; var StartSettingA = 0; var StartSettingA = 0; var CurSettingA = 0; var CurSettingA = 0; var TotalTips = 0; var LastTipper = null; var GoalsRunning = new Boolean(); var FirstGoal = null; var SecondGoal = null; var ThirdGoal = null; var NextGoalName = null; var NextGoalCost = 0; cb.settings_choices = [ { name: 'StopCost', type: 'int', minValue: 1, required: true, default:15, label:"Cost to pick another" }, { name: 'LowCost', type: 'int', minValue: 1, required: true, default: 10, label:"Cost for lower Intensity" },{ name: 'HighCost', type: 'int', minValue: 1, required: true, default: 25, label:"Cost for Raise Intensity" },{ name: 'StartSettingA', type: 'int', minValue: 1, required: true, default: 40, label:"Start intensity for A" },{ name: 'StartSettingB', type: 'int', minValue: 1, required: true, default: 40, label:"Start intensity for A" },{ name: 'RunGoals', type:'choice', label:"Activate Goals?", choice1:'Yes', choice2:'No', defaultValue:'No'}, { name: 'FirstGoalName', type: 'str', minLength: 1, label:"First Goal" },{ name: 'FirstGoalCost', type: 'int', minValue: 1, label:"First Goal Cost" },{ name: 'SecondGoalName', type: 'str', minLength: 1, label:"Second Goal" },{ name: 'SecondGoalCost', type: 'int', minValue: 1, label:"Second Goal Cost" },{ name: 'ThirdGoalName', type: 'str', minLength: 1, label:"Third Goal" },{ name: 'ThirdGoalCost', type: 'int', minValue: 1, label:"Third Goal cost" } ]; cb.onTip(function (tip) { TipAmount = parseInt(tip['amount']); TotalTips += TipAmount; LastTipper = tip['from_user']; if (TipAmount === HighCost && CurSettingA <= 70 && CurSettingB <= 70 ) { CurSettingA++; CurSettingB++; CurrentSetting = CurSettingA+"/"+CurSettingB; cb.chatNotice("TURN THE INTENSITY UP!", "", '#fcb2bf', '#000000', 'bold'); } if (TipAmount === LowCost && CurSettingA >= 0 && CurSettingB >= 0 ) { CurSettingA--; CurSettingB--; CurrentSetting = CurSettingA+"/"+CurSettingB; cb.chatNotice("TURN THE INTENSITY DOWN!", "", '#fcb2bf', '#000000', 'bold'); } if (TipAmount === StopCost) { cb.chatNotice("PAUSE AND PICK ANOTHER!", "", '#fcb2bf', '#000000', 'bold'); } if (GoalsRunning) { if (NextGoalName === FirstGoalName && NextGoalCost <= TotalTips) { NextGoalName = SecondGoalName; NextGoalCost = SecondGoalCost; cb.chatNotice("Goal Reached for: "+FirstGoalName+"!\n Next Goal: "+NextGoalName+" at "+NextGoalCost+" tokens!", "", '#fcb2bf', '#000000', 'bold'); //cb.changeRoomSubject("Electric stimulation: Lower - "+LowCost+" | Higher - "+HighCost+" | Pick another - "+StopCost+" | [Next Goal: "+NextGoalName+"]"); } if (NextGoalName === SecondGoalName && NextGoalCost <= TotalTips) { NextGoalName = ThirdGoalName; NextGoalCost = ThirdGoalCost; cb.chatNotice("Goal Reached for: "+SecondGoalName+"!\n Next Goal: "+NextGoalName+" at "+NextGoalCost+" tokens!", "", '#fcb2bf', '#000000', 'bold'); //cb.changeRoomSubject("Electric stimulation: Lower - "+LowCost+" | Higher - "+HighCost+" | Pick another - "+StopCost+" | [Next Goal: "+NextGoalName+"]"); } if (NextGoalName === ThirdGoalName && NextGoalCost <= TotalTips) { NextGoalName = "All Goals Reached"; NextGoalCost = "<3"; cb.chatNotice("Goal Reached for: "+ThirdGoalName+"!", "", '#fcb2bf', '#000000', 'bold'); //cb.changeRoomSubject("Electric stimulation: Lower - "+LowCost+" | Higher - "+HighCost+" | Pick another - "+StopCost); } } cb.drawPanel(); }); cb.onDrawPanel(function(user) { if (GoalsRunning) { return { 'template': '3_rows_of_labels', 'row1_label': 'Current Levels: ', 'row1_value': CurrentSetting, 'row2_label': 'Next Goal: ', 'row2_value': NextGoalName + " ("+NextGoalCost+")", 'row3_label': 'Total Tips: ', 'row3_value': TotalTips } } else { return { 'template': '3_rows_of_labels', 'row1_label': 'Current Setting: ', 'row1_value': CurrentSetting, 'row2_label': 'Last Tipper: ', 'row2_value': LastTipper, 'row3_label': 'Total Tips: ', 'row3_value': TotalTips } } }); function init() { HighCost = cb.settings.HighCost; LowCost = cb.settings.LowCost; StopCost = cb.settings.StopCost; RunGoals = cb.settings.RunGoals; StartSettingA = cb.settings.StartSettingA; StartSettingB = cb.settings.StartSettingB; CurSettingA = cb.settings.StartSettingA; CurSettingB = cb.settings.StartSettingB; FirstGoalName = cb.settings.FirstGoalName; FirstGoalCost = cb.settings.FirstGoalCost; SecondGoalName = cb.settings.SecondGoalName; SecondGoalCost = cb.settings.SecondGoalCost; ThirdGoalName = cb.settings.ThirdGoalName; ThirdGoalCost = cb.settings.ThirdGoalCost; NextGoalName = FirstGoalName; NextGoalCost = FirstGoalCost; CurrentSetting = CurSettingA+"/"+CurSettingB; if (RunGoals === "Yes") { GoalsRunning = true; //cb.changeRoomSubject("ELECTRIC STIMULATION: LOWER INTENSITY - "+LowCost+" | RAISE INTENSITY - "+HighCost+" | PICK ANOTHER- "+StopCost+" | [Next Goal: "+FirstGoalName+"]"); cb.chatNotice("ESTIM CONTROL: Lower - "+LowCost+" | Higher - "+HighCost+" | Pick another - "+StopCost+"\n Next Goal: "+FirstGoalName+" at "+FirstGoalCost+" tokens!", "", '#fcb2bf', '#000000', 'bold'); } else { GoalsRunning = false; //cb.changeRoomSubject("ELECTRIC STIMULATION: LOWER INTENSITY - "+LowCost+" | RAISE INTENSITY - "+HighCost+" | PICK ANOTHER - "+StopCost); cb.chatNotice("ESTIM CONTROL: Lower - "+LowCost+" | Higher - "+HighCost+" | Pick another - "+StopCost, "", '#fcb2bf', '#000000', 'bold'); } } init();
© Copyright Chaturbate 2011- 2025. All Rights Reserved.