Bots Home
|
Create an App
Edging-Bot
Author:
kikei
Description
Source Code
Launch Bot
Current Users
Created by:
Kikei
var CurLevel = 0; var TipAmount = 0; var TotalTips = 0; var LastTipper = null; cb.settings_choices = [ { name: 'RoomName' , type: 'str', required: true, default: "Edging!" , label: "Name of your room" }, { name: 'TokIncrease', type: 'int', minValue: 1, required: true, default: 15 , label: "Tokens to increase level" }, { name: 'TokDecrease', type: 'int', minValue: 1, required: true, default: 10 , label: "Tokens to decrease level" }, { name: 'TokRestart' , type: 'int', minValue: 1, required: true, default: 200, label: "Tokens to restart" }, ]; cb.onTip(function (tip) { TipAmount = parseInt(tip['amount']); TotalTips += TipAmount; LastTipper = tip['from_user']; if ( TipAmount === TokRestart ) { CurLevel = 0; cb.chatNotice(" Vibe is off! " + TokIncrease + " tokens to start! ", "", '#410856', '#FFFFFF'); } if ( TipAmount === TokDecrease ) { if ( CurLevel > 1 ) { CurLevel -= 1; cb.chatNotice(" Vibe level " + CurLevel, "", '#410856', '#FFFFFF'); } else if ( CurLevel == 1 ) { cb.chatNotice(" Vibe on lowest level! " + TokRestart + " to restart with levels 1 or " + TokIncrease + " to turn it up! ", "", '#410856', '#FFFFFF'); } else if ( CurLevel == 0 ) { cb.chatNotice(" Vibe is off! " + TokIncrease + " to turn it up! ", "", '#410856', '#FFFFFF'); } } if ( TipAmount === TokIncrease ) { if ( CurLevel < 12 ) { CurLevel += 1; cb.chatNotice(" Vibe level " + CurLevel, "", '#410856', '#FFFFFF'); } else { cb.chatNotice(" Vibe on highest Level! " + TokDecrease + " to turn it down or " + TokRestart + " to restart with level 1! ", "", '#410856', '#FFFFFF'); } } cb.drawPanel(); }); cb.onDrawPanel(function(user) { if ( TotalTips == 0 ) { return { 'template': '3_rows_12_22_31', 'row1_label': 'Vibe level: ', 'row1_value': 'off!', 'row2_label': 'Total Tips: ', 'row2_value': TotalTips, 'row3_value': 'How much you want to torture me?', }; } else if( TotalTips > 0 && CurLevel == 0 ) { return { 'template': '3_rows_of_labels', 'row1_label': 'Vibe level: ', 'row1_value': 'off!', 'row2_label': 'Total Tips: ', 'row2_value': TotalTips, 'row3_label': 'Last Tipper: ', 'row3_value': LastTipper + ' (' + TipAmount + ')', }; } else if ( TotalTips > 0 && CurLevel == 12 ) { return { 'template': '3_rows_of_labels', 'row1_label': 'Vibe level: ', 'row1_value': '10!!!', 'row2_label': 'Total Tips: ', 'row2_value': TotalTips, 'row3_label': 'Last Tipper: ', 'row3_value': LastTipper + ' (' + TipAmount + ')', }; } else { return { 'template': '3_rows_of_labels', 'row1_label': 'Vibe level: ', 'row1_value': CurLevel, 'row2_label': 'Total Tips: ', 'row2_value': TotalTips, 'row3_label': 'Last Tipper: ', 'row3_value': LastTipper + ' (' + TipAmount + ')', }; } }); function init() { RoomName = cb.settings.RoomName; TokIncrease = cb.settings.TokIncrease; TokDecrease = cb.settings.TokDecrease; TokRestart = cb.settings.TokRestart; cb.changeRoomSubject( RoomName + '\xa0\xa0\xa0[ Level 1 (low) - 10 (cum) || Increase level: ' + TokIncrease + ' || Decrease level: ' + TokDecrease + ' || Restart: ' + TokRestart + ' ]' ); cb.chatNotice( RoomName + '\xa0\xa0\xa0[ Level 1 (low) - 10 (cum) || Increase level: ' + TokIncrease + ' || Decrease level: ' + TokDecrease + ' || Restart: ' + TokRestart + ' ]', "", '#410856', '#FFFFFF'); } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.