Bots Home
|
Create an App
FoxyTestApp
Author:
testing1010
Description
Source Code
Launch Bot
Current Users
Created by:
Testing1010
(function() { var backgroundColor, kingBackgroundColor, kingNoticeText, kingUser, chatPrefix, foxyLandNotice, init, isInArray, noticeText, noticeTime, parseUsers, textColor, tipAmount, vipList, tombstoneList, candycornList, pumpkinList, pumpkinKingUser, tombStoneAmount, pumpkinAmount, candycornAmount, plaidMembers, pumpkinKingBackgroundColor, notices, noticeInt, triggerNotice, goldHatList, goldAmount, mvpBackgroundColor, mvpUser; chatPrefix = ""; vipList = []; kingUser = ""; mvpUser = ""; pumpkinKingUser = ""; tombstoneList = []; tombStoneAmount = 0; pumpkinList = []; plaidMembers = []; pumpkinAmount = 0; candycornList = []; candycornAmount = 0; noticeText = ""; kingNoticeText = ""; textColor = ""; tipAmount = 0; noticeTime = 1200; backgroundColor = ""; kingBackgroundColor = ""; mvpBackgroundColor = ""; pumpkinKingBackgroundColor = ""; noticeInt = 0; goldHatList = []; goldAmount = 0; var spankLover = {}; var spankLoverTotal = 0; var bootyLover = {}; var bootyLoverTotal = 0; cb.settings_choices = [ { name: "username_list", label: "Import FoxyLand List: ", type: "str", defaultValue: "", required: false, minLength: 1, maxLength: 200000 }, { name: "foxyland_king", label: "Foxyland King: ", type: "str", defaultValue: "", required: false, minLength: 1, maxLength: 200 },{ name: "foxyland_mvp", label: "Foxyland MVP: ", type: "str", defaultValue: "", required: false, minLength: 1, maxLength: 200 },{ name: "plaidMembers", label: "Plaid Members (comma seperated): ", type: "str", defaultValue: "", required: false, }, { name: "foxy_amount", label: "FoxyLand Tip Amount: ", type: "int", defaultValue: 789, minValue: 1, maxValue: 20000 }, /*{ name: "tombstoneList", label: "Import Red Hat User List: ", type: "str", defaultValue: "", required: false, minLength: 1, maxLength: 200000 },{ name: "tombstoneAmount", label: "Red Hat Tip Amount: ", type: "int", defaultValue: 111, minValue: 1, maxValue: 20000 }, { name: "candyList", label: "Import Blue Hat User List: ", type: "str", defaultValue: "", required: false, minLength: 1, maxLength: 2000000 }, { name: "candyAmount", label: "Blue Hat Tip Amount: ", type: "int", defaultValue: 1111, minValue: 1, maxValue: 20000 }, { name: "pumpkinList", label: "Import Silver Hat User List: ", type: "str", defaultValue: "", required: false, minLength: 1, maxLength: 2000000 }, { name: "pumpkinAmount", label: "Silver Hat Tip Amount: ", type: "int", defaultValue: 6666, minValue: 1, maxValue: 20000 },{ name: "goldHatList", label: "Import Gold Hat User List: ", type: "str", defaultValue: "", required: false, minLength: 1, maxLength: 2000000 }, { name: "goldAmount", label: "Gold Hat Tip Amount: ", type: "int", defaultValue: 6666, minValue: 1, maxValue: 20000 }, */ { name: "chat_prefix", label: "Prefix: ", type: "str", defaultValue: "[FoxyLand]", minLength: 1, maxLength: 64 }, { name: "background_color", label: "Background Color (HEX only): ", type: "str", defaultValue: "#000000", minLength: 4, maxLength: 7 }, { name: "king_background_color", label: "King Background Color (HEX only): ", type: "str", defaultValue: "#000000", minLength: 4, maxLength: 7 },{ name: "mvp_background_color", label: "MVP Background Color (HEX only): ", type: "str", defaultValue: "#663399", minLength: 4, maxLength: 7 }, { name: "pumpkin_king_background_color", label: "Pumpkin King Background Color (HEX only): ", type: "str", defaultValue: "#000000", minLength: 4, maxLength: 7 }, { name: "foxyland_notice", label: "Enable FoxyLand Notice: ", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes" }, { name: "foxyland_notice_text", label: "FoxyLand Notice Message: ", type: 'str', defaultValue: "If you want to become a FoxyLand Member just tip 789 tokens! Foxyland members get many perks including access to my private twitter, special monthly gifts, and much more!", minLength: 1, maxLength: 200000 }, { name: "foxyland_king_notice_text", label: "King Notice Message: ", type: 'str', defaultValue: "Tip the most to become the king!", minLength: 1, maxLength: 200000 }, { name: "foxyland_notice_time", label: "Notice Time (in seconds):", type: "int", defaultValue: 1200, minValue: 30 }, { name: "notice_1", label: "Notice Message 1: ", type: 'str', defaultValue: "", required: false, minLength: 1, maxLength: 200000 }, { name: "notice_2", label: "Notice Message 2: ", type: 'str', defaultValue: "", required: false, minLength: 1, maxLength: 200000 }, { name: "notice_3", label: "Notice Message 3: ", type: 'str', required: false, defaultValue: "", minLength: 1, maxLength: 200000 } ]; cb.onMessage(function(msg) { var commandIndex, i, newColor, parts, txt, usr, x, _i, _len; txt = msg["m"]; usr = msg["user"]; if (/^\//.test(msg['m'])||/^!/.test(msg['m'])) { msg['X-Spam'] = true; if (/!color/i.test(txt) && usr === cb.room_slug) { parts = txt.split(" "); commandIndex = 0; for (i = _i = 0, _len = parts.length; _i < _len; i = ++_i) { x = parts[i]; if (/!color/.test(x)) { commandIndex = i; } } newColor = commandIndex + 1; if (/#/.test(parts[newColor]) && parts[newColor].length === 7) { backgroundColor = parts[newColor].toUpperCase(); } else if (parts[newColor].length === 6) { backgroundColor = "#" + parts[newColor].toUpperCase(); } else { cb.chatNotice("That does not look like a color.", usr); } cb.chatNotice("Color changed to " + backgroundColor + ".", usr); } if (/!kingcolor/i.test(txt) && usr === cb.room_slug) { parts = txt.split(" "); commandIndex = 0; for (i = _i = 0, _len = parts.length; _i < _len; i = ++_i) { x = parts[i]; if (/!kingcolor/.test(x)) { commandIndex = i; } } newColor = commandIndex + 1; if (/#/.test(parts[newColor]) && parts[newColor].length === 7) { kingBackgroundColor = parts[newColor].toUpperCase(); } else if (parts[newColor].length === 6) { kingBackgroundColor = "#" + parts[newColor].toUpperCase(); } else { cb.chatNotice("That does not look like a color.", usr); } cb.chatNotice("King Color changed to " + kingBackgroundColor + ".", usr); } if (/!mvpcolor/i.test(txt) && usr === cb.room_slug) { parts = txt.split(" "); commandIndex = 0; for (i = _i = 0, _len = parts.length; _i < _len; i = ++_i) { x = parts[i]; if (/!mvpcolor/.test(x)) { commandIndex = i; } } newColor = commandIndex + 1; if (/#/.test(parts[newColor]) && parts[newColor].length === 7) { mvpBackgroundColor = parts[newColor].toUpperCase(); } else if (parts[newColor].length === 6) { mvpBackgroundColor = "#" + parts[newColor].toUpperCase(); } else { cb.chatNotice("That does not look like a color.", usr); } cb.chatNotice("MVP Color changed to " + mvpBackgroundColor + ".", usr); } if (/!pkingcolor/i.test(txt) && usr === cb.room_slug) { parts = txt.split(" "); commandIndex = 0; for (i = _i = 0, _len = parts.length; _i < _len; i = ++_i) { x = parts[i]; if (/!pkingcolor/.test(x)) { commandIndex = i; } } newColor = commandIndex + 1; if (/#/.test(parts[newColor]) && parts[newColor].length === 7) { pumpkinKingBackgroundColor = parts[newColor].toUpperCase(); } else if (parts[newColor].length === 6) { pumpkinKingBackgroundColor = "#" + parts[newColor].toUpperCase(); } else { cb.chatNotice("That does not look like a color.", usr); } cb.chatNotice("King Color changed to " + pumpkinKingBackgroundColor + ".", usr); } return msg; } var message = ""; if(usr.toLowerCase() === pumpkinKingUser.toLowerCase()){ /*message = "[Pumpkin King]"; msg["background"] = pumpkinKingBackgroundColor;*/ } else if(usr.toLowerCase() === kingUser.toLowerCase()){ message = "[Foxy's King]"; msg["background"] = kingBackgroundColor; } else if(usr.toLowerCase() === mvpUser.toLowerCase()){ message = "[Foxy's MVP]"; msg["background"] = mvpBackgroundColor; msg["c"] = '#FFFFFF'; } else if(isInArray(usr, vipList)) { message += chatPrefix; msg["background"] = backgroundColor; } else if(isInArray(usr, plaidMembers)){ message = ':plaidyankee'; msg["background"] = '#2edaff'; } message += " "+txt; msg['m'] = message; msg['m'] = msg['m'].replace(':opendickpic3', ':opendickpic'); return msg; }); cb.onTip(function(tip) { var amountTipped, announcement, fromUser; amountTipped = parseInt(tip["amount"]); fromUser = tip["from_user"]; if (amountTipped == tipAmount) { announcement = fromUser + " just joined FoxyLand!"; vipList.push(fromUser); } if(announcement){ return cb.chatNotice(announcement); } }); parseUsers = function() { var cleanName, list, user, _i, _len; if (cb.settings.username_list) { list = cb.settings.username_list.split(","); for (_i = 0, _len = list.length; _i < _len; _i++) { user = list[_i]; cleanName = user.trim(); vipList.push(cleanName); } } }; isInArray = function(text, array) { return (array.indexOf(text) != -1); }; foxyLandNotice = function() { cb.chatNotice(noticeText, '', '', '', 'bold'); cb.chatNotice(kingNoticeText, '', '', '', 'bold'); cb.setTimeout(function(){ foxyLandNotice(); }, noticeTime*1000); }; triggerNotice = function(){ setTimeout(function(){ cb.chatNotice(notices[noticeInt], '', '', '', 'bold'); noticeInt++; if(noticeInt > 2){ noticeInt = 0; } triggerNotice(); }, noticeTime*1200); } init = function() { if (cb.settings.chat_prefix) { parseUsers(); kingUser = cb.settings.foxyland_king; mvpUser = cb.settings.foxyland_mvp; // pumpkinKingUser = cb.settings.pumpkinKing; tipAmount = cb.settings.foxy_amount; chatPrefix = cb.settings.chat_prefix; noticeTime = cb.settings.foxyland_notice_time; noticeText = cb.settings.foxyland_notice_text; kingNoticeText = cb.settings.foxyland_king_notice_text; backgroundColor = cb.settings.background_color; kingBackgroundColor = cb.settings.king_background_color; mvpBackgroundColor = cb.settings.mvp_background_color; let plaidMembersStr = cb.settings.plaidMembers; notices = []; // cb.chatNotice(':progbot'); if (cb.settings.foxyland_notice === 'Yes') { foxyLandNotice(); } if(cb.settings.notice_1){ notices.push(cb.settings.notice_1); } if(cb.settings.notice_2){ notices.push(cb.settings.notice_2); } if(cb.settings.notice_3){ notices.push(cb.settings.notice_3); } if(notices.length > 0){ triggerNotice(); } if(plaidMembersStr){ const plaidArr = plaidMembersStr.split(','); plaidArr.forEach(m => { plaidMembers.push(m.trim()); }); } } }; init(); }).call(this);
© Copyright Chaturbate 2011- 2024. All Rights Reserved.