Apps Home
|
My Uploads
|
Create an App
Test-Fx
Author:
assmandave69
Description
Source Code
Launch App
Current Users
Created by:
Assmandave69
App Images
/*************************************************************************************** * AKGameBot Beta0.1 * * Developed By DoobieDan69 * * <-----------Modules------------> * * CoreSystems B1.1 * * QuickPickLotto B0.9 * * AntiSpam A0.1 * * SlotMachine ComingSoon * * SideQuests B1.0 * **************************************************************************************/ cb.settings_choices = [ { name: 'NameToDisply', type: 'str', minLength: 1, label: "Your name or Role play name", maxLength: 255, defaultValue: "Ashley" }, { name: 'LottoTicketPrice', label: "Min Tip for Lotto/Raffle Game", type: 'int', minValue: 1, maxValue: 299, defaultValue: 2 }, { name: 'AtttackDicePrice', label: "Attack Dice Roll Price", type: 'int', minValue: 1, maxValue: 299, defaultValue: 8 }, { name: 'MagicAttackDicePrice', label: "Magic Attack Dice Roll Price", type: 'int', minValue: 1, maxValue: 299, defaultValue: 15 }, { name: 'TipMenuItmesa', type: 'str', minLength: 1, label: "Tip Menu Items for Quest. format is(the name:cost|next name:5) ", maxLength: 512, defaultValue: "appreciation:5|tongue out:10|roll the dice:33|hand spank:20|rub panties:24|squeeze boobs:25|wooden paddle:35|show ass:44|show pussy:48|show tits:50|random lovense lvl:69" }, { name: 'AutoPrizeListCommon', type: 'str', minLength: 1, label: "Common prizes for Completing a Quest Common(the name|next name) ", maxLength: 512, defaultValue: "hand spank|rub panties|squeeze boobs|wooden paddle|show ass|show pussy|show tits" }, { name: 'AutoPrizeListUncommon', type: 'str', minLength: 1, label: "Uncommon prizes for Completing a Quest(the name|next name) ", maxLength: 512, defaultValue: "50 spanks|pussy close up|One piece of clothing off for 5 min " }, { name: 'AutoPrizeListRare', type: 'str', minLength: 1, label: "Rare prizes for Completing a Quest(the name|next name) ", maxLength: 512, defaultValue: "suck dildo|fuck dildo|anal plug" }, { name: 'EnableAutoPrize', label: "Enable the AutoPrize feature of the side quest module 1 = on 0 = off", type: 'int', minValue: 0, maxValue: 1, defaultValue: 1 }, { name: 'AdInterval', label: "Time in Seconds Between ads", type: 'int', minValue: 20, maxValue: 299, defaultValue: 120 }, { name: 'SlotPrice', label: "The min tip to play the slot game", type: 'int', minValue: 1, maxValue: 900, defaultValue: 3 }, { name: 'SlotOdds', label: "The odds of wining the slot game 1 in ", type: 'int', minValue: 10, maxValue: 900, defaultValue: 200 }, { name: 'SlotPrize', label: "The Slot Game prize", type: 'str', maxLength: 512, defaultValue: "Lovense Control 5 min" }, { name: 'SlotTextColor', type: 'choice', label: 'Set the Colour of the slot text(I can add more colours as needed)', choice1: 'Pink', choice2: 'DeepPink', choice3: 'Violet', choice4: 'Fuchsia', defaultValue: 'DeepPink' }, { name: 'SlotsEnabled', type: 'choice', label: 'Enable the slot game', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' } ]; /***********GLobal Data***********/ let debug = false; let AdInterval = cb.settings.AdInterval * 1000; let TipMenuData = new Array(); let AutoPrizeListCommon = new Array(); let AutoPrizeListUncommon = new Array(); let AutoPrizeListRare = new Array(); let EnableAutoPrize = cb.settings.EnableAutoPrize == 1; let slotAdColour = "DeepPink" let MotivationQuotes = ["You are amazing and can do anything you put your mind two", ":alanpartridgelapdance Just for you < 3", "Thanks you for Turing me on Ashely", "Time to crush it Genital Genocide :P", "Time to Jam out with your clam out", "The good news is you can't spill a bot", "PIZZA haha made you think of food", "You are the best <3 <3"]; let emojiList = [127775, 11088, 127765, 127789, 127790, 127791, 127857, 127849, 128151, 128293, 129377, 129378, 127752, 9749, 127773, 127774, 127812] let danInRoom = false; let Creator = "doobiedan69"; let GlobalData = { USERDATA: new Array(300), TotalTips: 0, GetUserData: function (name) { if (!(name in this.USERDATA)) { this.USERDATA[name] = new UserData(); } return this.USERDATA[name]; }, } /***********Type Defs***********/ let UserData = class { constructor() { this.total_tiped = 0; this.gold = 0; } } let LottoTicket = class { constructor(username, tickeNumb) { this.username = username; this.tickeNumb = tickeNumb; } } let TipMenuItem = class { constructor(name, price) { this.name = name; this.price = price; } } let AntiSpam = { IsSpam: function (msgStr) { let spamList = new RegExp("cum\\S*\.lin|prv\\S*\.sho|ums\\S*\.m|\(*\.\)") return msgStr.search(spamList) > -1; }, HandleMessage: function (msg, user, isOwner, isMod) { if (this.IsSpam(msg)) { msg['X-Spam'] = true; } return msg }, } /***********Modules Defs**************/ let QuickPickLotto = { LottoPrize: "Flash (You Chose)", LottoTickets: new Array(300), LottoMax: 9, TicketCost: 2, TicketsSold: 0, ProfitAmount: 0, OutWarns: 0, SoldOut: false, AnyOver: true, IsRunning: false, TotalTokens: 0, OddsList: { 5: 60, 6: 120, 7: 210, 8: 336, 9: 504, 10: 720, 11: 990, 12: 1320, 13: 1716, 14: 2184, 15: 2730, 16: 3360 }, NewGame: function () { if (!this.IsRunning) { this.LottoTickets = new Array(100); this.OutWarns = 0; this.IsRunning = true; this.TicketsSold = 0; this.SoldOut = false; cb.sendNotice("New lotto game started with 1 in " + this.OddsList[this.LottoMax] + " odds", cb['room_slug'], '', '', ''); cb.sendNotice("The QuickPick Lotto Game Has Started. Tip " + this.TicketCost + " or more to get one of the " + this.OddsList[this.LottoMax] + " tickets. ", "", "#DF6589", "#eee51d", "250", ""); } }, GiveNewTicket: function (args) { arga = args.split(" "); cb.log(arga); let user = arga[0]; let number = parseInt(arga[1]); cb.log(user); cb.log(number); for (var i = 0; i < number; i++) { this.GenNewTicket(user); } }, GenNewTicket: function (user) { if (this.IsRunning == true) { if (this.TicketsSold < this.OddsList[this.LottoMax]) { var lottoTicketStr = ""; do { let nums = GetThreeNumbers(this.LottoMax); lottoTicketStr = nums[0] + "-" + nums[1] + "-" + nums[2]; } while (this.LottoTickets.hasOwnProperty(lottoTicketStr)); this.TicketsSold++; this.LottoTickets[lottoTicketStr] = new LottoTicket(user, this.TicketsSold); if (this.TicketsSold == this.OddsList[this.LottoMax]) { this.SoldOut = true; cb.sendNotice("The Final lotto ticket has been sold", "", "#DF6589", "#eee51d", "250", ""); } cb.sendNotice("You have received lotto ticket:\n #" + this.TicketsSold + " [" + lottoTicketStr + "] \n You can see all your tickets by typing /MyTickets or /lmt in to chat", user, "#DF6589", "#eee51d", "250", ""); } else { this.OutWarns++; if (this.OutWarns < 10) { cb.sendNotice("Sorry No More Lotto Tickets", user, "#DF6589", "#eee51d", "250", ""); } } } }, MyTickets: function (user) { if (this.IsRunning == true) { let listStr = ""; let count = 0; for (var key in this.LottoTickets) { if (this.LottoTickets[key].username == user) { if (count <= 30) { listStr += "\n#" + this.LottoTickets[key].tickeNumb + " [" + key + "]"; } if (count == 31) { listStr += "\n# Only the first 30 have been shown"; } count++; } } cb.sendNotice("You have " + count + " Tickets With a ~" + ((count / this.OddsList[this.LottoMax]) * 100).toFixed(2) + "% Chance to Win :" + listStr, user, '#FEFBAF', '', '100'); } }, SetMax: function (number) { if (!this.IsRunning) { let num = parseInt(number); if (num <= 16 && num >= 5) { this.LottoMax = num; cb.sendNotice("New Max set odds are 1 in " + this.OddsList[this.LottoMax] + " odds", cb['room_slug'], '', '', ''); } } }, SetPrize: function (prize) { this.LottoPrize = prize; cb.sendNotice(this, this.LottoPrize, '#FEFBAF', '', '100'); }, StartTheDraw: function () { if (this.IsRunning && this.TicketsSold > 0) { var nums = GetThreeNumbers(this.LottoMax); var lottoTicketStr = nums[0] + "-" + nums[1] + "-" + nums[2]; this.LottoInfo(cb['room_slug']); if (this.LottoTickets[lottoTicketStr] != undefined) { var winner = this.LottoTickets[lottoTicketStr].username; cb.sendNotice("Winning numbers are :drum", "", "linear-gradient(0deg, rgba(212,175,55,1) 0%, rgba(247,218,124,1) 100%);", "#000000", "250", ""); cb.setTimeout(function () { cb.sendNotice(lottoTicketStr + "\n" + winner + " Has Won the lotto prize", "", "linear-gradient(0deg, rgba(212,175,55,1) 0%, rgba(247,218,124,1) 100%);", "#000000", "250", ""); cb.sendNotice("You have won the lotto prize", winner, "#d4af37", "#000000", "350", ""); }, 1300); } else { cb.sendNotice("Winning numbers are : drum \n Sorry there was no winner this time, Better Luck Next Time :kisses4u", "", "#ff8484", "#000000", "350", ""); } this.IsRunning = false; } }, LottoInfo: function (user) { if (this.IsRunning == true) { let users = []; let infostr = ""; for (var key in this.LottoTickets) { cb.log(this.LottoTickets[key]) if (users[this.LottoTickets[key].username] == undefined) { users[this.LottoTickets[key].username] = 1; } else { users[this.LottoTickets[key].username] += 1; } } for (var key in users) { infostr += "\n" + key + " has " + users[key] + " tickets"; } cb.sendNotice("There are have been " + this.TicketsSold + " out of " + this.OddsList[this.LottoMax] + " total sold \n Total amount tipped for lotto ticks was \n " + this.ProfitAmount + infostr, user, '#FEFBAF', '', '100'); } }, HandleCMDS: function (cmd, args, user, isOwner, isMod) { if (isOwner) { if (cmd == "/startlotto" || cmd == "/sl") { this.NewGame(); } if (cmd == "/giveticket" || cmd == "/gt") { this.GiveNewTicket(args.trim()); } } if (isOwner || isMod) { if (cmd == "/RunLotto" || cmd == "/rl") { this.StartTheDraw(args.trim()); } if (cmd == "/setLMax" || cmd == "/slm") { this.SetMax(args.trim()); } if (cmd == "/lti") { this.LottoInfo(user); } } if (cmd.toLowerCase() == "/mytickets" || cmd == "/lmt") { this.MyTickets(user); } }, HandleTip: function (intAmout, user, tip) { if (this.IsRunning) { if (!this.SoldOut) { if ((this.AnyOver && intAmout >= this.TicketCost) || (!this.AnyOver && intAmout == this.TicketCost)) { this.GenNewTicket(user) this.ProfitAmount += intAmout; } else { cb.sendNotice("You could have received lotto ticket if you had tipped " + this.TicketCost + " or more", user, "#DF6589", "#eee51d", "250", ""); } } } }, HandleEnter: function (user, data) { if (this.IsRunning) { if (!this.SoldOut) { cb.sendNotice("We are playing The Quick Pick lotto Game you have a chance to win a prize just for tipping. To play just tip, any tip over " + this.TicketCost + " will get one ticket. There are " + (this.OddsList[this.LottoMax] - this.TicketsSold) + " out of " + this.OddsList[this.LottoMax] + " remaining. \n you can type /MyTickets or /lmt at to see you lotto tickets", "", "#DF6589", "#eee51d", "150", ""); } } }, Notifications: function () { if (this.IsRunning) { if (this.SoldOut) { cb.sendNotice("We are playing The Quick Pick lotto Game but unfortunately all the tickets are gone for today. Come back to my next stream to enter in the next lotto \n you can type /MyTickets or /lmt at to see you lotto tickets", "", "#DF6589", "#eee51d", "350", ""); } else { cb.sendNotice("We are playing The Quick Pick lotto Game you have a chance to win a prize just for tipping. To play just tip, any tip over " + this.TicketCost + " will get one ticket. There are " + (this.OddsList[this.LottoMax] - this.TicketsSold) + " out of " + this.OddsList[this.LottoMax] + " remaining. \n you can type /MyTickets or /lmt at to see you lotto tickets", "", "#DF6589", "#eee51d", "150", ""); } } cb.setTimeout(function () { QuickPickLotto.Notifications() }, AdInterval); }, Init: function () { Core.EnterListeners.push(this); Core.CMDListeners.push(this); Core.TipListeners.push(this); cb.setTimeout(function () { QuickPickLotto.Notifications() }, AdInterval); } } let RaffleGame = { LottoPrize: "Flash (You Chose)", LottoTickets: new Array(0), TicketCost: 2, TicketsSold: 0, ProfitAmount: 0, IsRunning: false, TotalTokens: 0, NewGame: function () { if (!this.IsRunning) { this.LottoTickets = new Array(0); this.IsRunning = true; cb.sendNotice("New Raffle game started", cb['room_slug'], '', '', ''); cb.sendNotice("The Raffle Game Has Started. Tip " + this.TicketCost + " to get a ticket ", "", "#DF6589", "#eee51d", "250", ""); } }, GiveNewTicket: function (args) { arga = args.split(" "); cb.log(arga); let user = arga[0]; let number = parseInt(arga[1]); cb.log(user); cb.log(number); for (var i = 0; i < number; i++) { this.GenNewTicket(user); } }, GenNewTicket: function (user) { if (this.IsRunning == true) { this.LottoTickets.push(user); this.TicketsSold++; cb.sendNotice("You have received raffle ticket:\n #" + this.TicketsSold, user, "#DF6589", "#eee51d", "250", ""); } }, MyTickets: function (user) { if (this.IsRunning == true) { let listStr = ""; let count = 0; for (var key in this.LottoTickets) { if (this.LottoTickets[key] == user) { count++; } } cb.sendNotice("You have " + count + " Tickets With a ~" + ((count / this.TicketsSold) * 100).toFixed(2) + "% Chance to Win ", user, '#FEFBAF', '', '100'); } }, StartTheDraw: function () { if (this.IsRunning && this.TicketsSold > 0) { var winner = this.LottoTickets[RandomRange(0, this.LottoTickets.length - 1)]; cb.sendNotice("Winning numbers are :drum", "", "linear-gradient(0deg, rgba(212,175,55,1) 0%, rgba(247,218,124,1) 100%);", "#000000", "250", ""); cb.setTimeout(function () { cb.sendNotice(winner + " Has Won the raffle prize", "", "linear-gradient(0deg, rgba(212,175,55,1) 0%, rgba(247,218,124,1) 100%);", "#000000", "250", ""); cb.sendNotice("You have won the raffle prize", winner, "#d4af37", "#000000", "350", ""); }, 1300); } this.IsRunning = false; }, HandleCMDS: function (cmd, args, user, isOwner, isMod) { if (isOwner) { if (cmd == "/sr") { this.NewGame(); } } if (isOwner || isMod) { if (cmd == "/rr") { this.StartTheDraw(args.trim()); } } if (cmd.toLowerCase() == "/mytickets" || cmd == "/rmt") { this.MyTickets(user); } }, HandleTip: function (intAmout, user, tip) { if (this.IsRunning) { if (!this.SoldOut) { if ((intAmout >= this.TicketCost)) { this.GenNewTicket(user) this.ProfitAmount += intAmout; } else { cb.sendNotice("You could have raffle ticket if you had tipped " + this.TicketCost + " or more", user, "#DF6589", "#eee51d", "250", ""); } } } }, Notifications: function () { if (this.IsRunning) { cb.sendNotice("We are playing The Raffle Game tip " + this.TicketCost + " or more to get a ticket. A winning ticket will be pick later in the stream \n you can type /MyTickets or /rmt at to see how many raffle tickets you have", "", "#DF6589", "#eee51d", "350", ""); } cb.setTimeout(function () { RaffleGame.Notifications() }, AdInterval); }, Init: function () { Core.CMDListeners.push(this); Core.TipListeners.push(this); cb.setTimeout(function () { RaffleGame.Notifications() }, AdInterval); } } let SlotGame = { Slot: "Flash (You Chose)", slotOdds: 50, PullCost: 3, IsRunning: true, TotalTokens: 0, SetPrize: function (prize) { this.LottoPrize = prize; cb.sendNotice(this, this.LottoPrize, '#FEFBAF', '', '100'); }, HandleTip: function (intAmout, user, tip) { if (this.IsRunning) {///activated BONUS Match 3 symbols to win [Lovense Control 2 min] if (intAmout >= this.PullCost) { let res = RandomRange(1, this.slotOdds); if (res == this.slotOdds) { cb.sendNotice(String.fromCodePoint(128680) + String.fromCodePoint(128680) + String.fromCodePoint(128680) + "|" + String.fromCodePoint(127920) + " " + user + " activated BONUS Match 3 symbols and won [" + cb.settings.SlotPrize + "]" + String.fromCodePoint(emojiList[0]) + "|" + String.fromCodePoint(emojiList[0]) + "|" + String.fromCodePoint(emojiList[0]) + "|" + String.fromCodePoint(128680) + String.fromCodePoint(128680) + String.fromCodePoint(128680), "", "#ffff00", "#000000", "950", ""); } else { let a = RandomRange(0, emojiList.length - 1); let b = RandomRange(0, emojiList.length - 1); let c = RandomRange(0, emojiList.length - 1); if (a == b && a == c && b == c) { if (a == 0) { a = emojiList.length - 1; } else { a -= 1; } } cb.sendNotice(String.fromCodePoint(127920) + " " + user + " activated BONUS Match 3 symbols to win [" + cb.settings.SlotPrize + "]" + String.fromCodePoint(emojiList[a]) + "|" + String.fromCodePoint(emojiList[b]) + "|" + String.fromCodePoint(emojiList[c]) + "|", "", "#FCFCFC", slotAdColour, "950", ""); } } } }, Notifications: function () { if (this.IsRunning) { cb.sendNotice(String.fromCodePoint(127920) + " Activate Match3 with a tip of " + this.PullCost + " or more. Match 3 symbols and win [" + cb.settings.SlotPrize + "] |" + String.fromCodePoint(emojiList[RandomRange(0, emojiList.length - 1)]) + "|" + String.fromCodePoint(emojiList[RandomRange(0, emojiList.length - 1)]) + "|" + String.fromCodePoint(emojiList[RandomRange(0, emojiList.length - 1)]) + "|", "", "#FCFCFC", slotAdColour, "950", ""); } cb.setTimeout(function () { SlotGame.Notifications() }, AdInterval); }, HandleEnter: function (user, data) { if (this.IsRunning) { cb.sendNotice(String.fromCodePoint(127920)+" Activate Match3 with a tip of " + this.PullCost + " or more. Match 3 symbols and win [" + cb.settings.SlotPrize + "]", user, "#FCFCFC", slotAdColour, "950", ""); } }, Init: function () { this.IsRunning = false; if (cb.settings.SlotsEnabled == "Yes") { this.IsRunning = true; } Core.EnterListeners.push(this); Core.TipListeners.push(this); this.Notifications(); } } let LuckNumberGame = { ISActive: false, GameBorad: new Array(26), PrizeName: "The Kings Golden Sword", WinIndex: 1, WinIndex2: 2, WinIndex3: 3, NumbersFound: 0, MaxNumber: 50, Offset: 0, StartSideQuest: function () { var nums = GetThreeNumbers(this.MaxNumber); this.WinIndex = nums[0]; this.WinIndex2 = nums[1]; this.WinIndex3 = nums[2]; this.NumbersFound = 0; this.ISActive = true; for (i = 0; i <= this.MaxNumber; i++) { this.GameBorad[i] = true; } this.SendNotice(String.fromCodePoint(127808) + "<-----[Lucky Numbers]----->" + String.fromCodePoint(127808) + "\n Guess the Lucky Numbers by tipping the amount of an Unguessed number" + "\n There are three Lucky Numbers the game ends when all three are found" + "\n " + this.FormateGameBorad()) + "\n "; }, SendNotice(msg) { cb.sendNotice(msg, "", "linear-gradient(180deg, rgba(237,164,174,1) 0%, rgba(255,217,222,1) 1%, rgba(247,197,204,1) 30%, rgba(237,164,174,1) 99%)", "#cc313d", "550", ""); }, FormateGameBorad: function () { let outputStr = "|"; for (var i = 1; i <= this.MaxNumber; i++) { var displayNumber = this.Offset + i; if (this.GameBorad[i]) { if (displayNumber < 10) { outputStr += "0" + displayNumber + "|"; } else { outputStr += displayNumber + "|"; } } else { outputStr += "XX|" } if (i % 10 == 0 && i != this.MaxNumber) { outputStr += "\n|" } } return outputStr; }, HandleCMDS: function (cmd, args, user, isOwner, isMod, IsFanClub) { if (isOwner || isMod) { if (cmd == "/startLuckNumber" || cmd == "/sln") { this.StartSideQuest(); } if (cmd == "/StopLuckNumber" || cmd == "/eln") { this.ISActive = false; } } }, HandleTip: function (intAmout, user, tip) { let maxtip = this.MaxNumber + this.Offset let index = intAmout - this.Offset; if (this.ISActive == true) { if (intAmout <= maxtip && this.GameBorad[index]) { this.GameBorad[intAmout - this.Offset] = false; if (index == this.WinIndex || index == this.WinIndex2 || index == this.WinIndex3) { this.NumbersFound++; let prizestr = ""; let roll = RandomRange(0, 100); if (roll < 50) { prizestr = AutoPrizeListCommon[getRandomInt(0, AutoPrizeListCommon.length)]; } else if (roll > 50 && roll < 79) { prizestr = AutoPrizeListUncommon[getRandomInt(0, AutoPrizeListUncommon.length)]; } else { prizestr = AutoPrizeListRare[getRandomInt(0, AutoPrizeListRare.length)]; } cb.sendNotice(user + " guessed the lucky number" + intAmout + " and has won " + prizestr, "", "#90ee90", "#00000", "250", ""); if (this.NumbersFound == 3) { this.ISActive = false; } return; } this.SendNotice("No prize at " + intAmout + " \n" + this.FormateGameBorad()); } } }, Notifications: function () { if (this.ISActive == true) { this.SendNotice(String.fromCodePoint(127808) + "[Lucky Numbers]" + String.fromCodePoint(127808) + "\n Guess the Lucky Numbers by tipping the amount of an Unguessed number" + "\n There are " + (3 - this.NumbersFound) + " of 3 Lucky Numbers left in the game ends when all three are found" + "\n " + this.FormateGameBorad()) + "\n"; } cb.setTimeout(function () { LuckNumberGame.Notifications() }, AdInterval); }, Init: function () { Core.TipListeners.push(this); cb.setTimeout(function () { LuckNumberGame.Notifications() }, AdInterval); }, } let MonsterFight = { MonsterName: "Big Ass Monster", ISActive: false, AttackPrice: 10, MagicPrice: 15, MonsterMaxHealth: 100, MonsterHealth: 100, CurrentIndex: 0, types: ["Beast", "Dragon", "Gian", "Undead", "Ooze", "Vampire", "Werewolve", "Basilisk", "Goblin", "Spider"], discriptorStrong: ["Elite", "Enraged", "Epic", "Psycho"], discriptorNormal: ["Menacing", "Large", "Young"], discriptorWeak: ["Corrupted", "Weak", "Drunk", "old"], diffacultyType: 0, StartSideQuest: function () { let ranRoll = RandomRange(0, 100); if (ranRoll < 50) { this.diffacultyType = 0; this.MonsterMaxHealth = RandomRange(2000, 4000); this.MonsterName = this.discriptorWeak[RandomRange(0, this.discriptorWeak.length - 1)] + " " + this.types[RandomRange(0, this.types.length - 1)]; } else if (ranRoll < 80) { this.diffacultyType = 1; this.MonsterMaxHealth = RandomRange(3000, 5500); this.MonsterName = this.discriptorNormal[RandomRange(0, this.discriptorNormal.length - 1)] + " " + this.types[RandomRange(0, this.types.length - 1)]; } else { this.diffacultyType = 2; this.MonsterMaxHealth = RandomRange(5000, 8500); this.MonsterName = this.discriptorStrong[RandomRange(0, this.discriptorStrong.length - 1)] + " " + this.types[RandomRange(0, this.types.length - 1)]; } this.MonsterHealth = this.MonsterMaxHealth; this.ISActive = true; cb.sendNotice("A Monster Fight Started:" + this.MonsterName + " has spawned with " + this.MonsterMaxHealth + " health." + "\nSomeone in the party must tip " + this.AttackPrice + " Tokens to roll the Attack dice \n(Two dice will be rolled both D20's and damage dealt will be D1*D2)." + "\nSomeone in the party may also tip " + this.MagicPrice + " Tokens to roll the Magic attack dice \n(Three dice will be rolled Two D20 & one D12 and damage dealt will be D1*D2*D3).", "", "linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(96,96,96,1) 3%, rgba(139,138,138,1) 97%, rgba(0,0,0,1) 100%)", "#D6ED17", "250", ""); }, HandleCMDS: function (cmd, args, user, isOwner, isMod, IsFanClub) { if (isOwner) { if (cmd == "/dmr") { this.BCAttack(); } } if (isOwner || isMod) { if (cmd == "/smf") { this.StartSideQuest(); } if (cmd == "/emf") { this.ISActive = false; } } }, DoPrize: function () { let prizestr = ""; let commonOdds = 60; let uncommoOdds = 85; if (this.diffacultyType == 2) { commonOdds = 10; uncommoOdds = 25; } if (this.diffacultyType == 1) { commonOdds = 50; uncommoOdds = 80; } let roll = RandomRange(0, 100); if (roll < commonOdds) { prizestr = AutoPrizeListCommon[getRandomInt(0, AutoPrizeListCommon.length)]; } else if (roll > commonOdds && roll < uncommoOdds) { prizestr = AutoPrizeListUncommon[getRandomInt(0, AutoPrizeListUncommon.length)]; } else { prizestr = AutoPrizeListRare[getRandomInt(0, AutoPrizeListRare.length)]; } cb.sendNotice("Monster Fight Prize:" + "\n The Party has won " + prizestr, "", "#90ee90", "#00000", "250", ""); }, BCAttack: function () { let typeRoll = RandomRange(1, 10); if (typeRoll < 5) { let dice1 = RandomRange(1, 20); let dice2 = RandomRange(1, 20); let damage = dice1 * dice2; this.MonsterHealth -= damage; if (this.MonsterHealth <= 0) { cb.sendNotice("The monster has been slain", "#ff8484", "#000000", "150", ""); this.ISActive = false this.DoPrize(); } else { cb.sendNotice("Monster Fight :\n" + cb['room_slug'] + " rolled the DM attack dice and got " + dice1 + " & " + dice2 + " doing " + damage + " damage total \n" + this.MonsterName + " is now at " + this.MonsterHealth + "/" + this.MonsterMaxHealth + "(" + Math.round((this.MonsterHealth / this.MonsterMaxHealth) * 100) + "%)", "", "#606060", "#D6ED17", "250", ""); } } else { let dice1 = RandomRange(1, 12); let dice2 = RandomRange(1, 6); let damage = dice1 * dice2; this.MonsterHealth += damage; cb.sendNotice("Monster Fight :\n" + cb['room_slug'] + " rolled the DM healing dice and got " + dice1 + " & " + dice2 + " doing " + damage + " healing total", "", "#606060", "#D6ED17", "250", ""); cb.sendNotice(this.MonsterName + " is now at " + this.MonsterHealth + "/" + this.MonsterMaxHealth, "", "#606060", "#D6ED17", "250", ""); } }, HandleTip: function (intAmout, user, tip) { if (this.ISActive == true) { if (intAmout == this.AttackPrice) { let dice1 = RandomRange(1, 20); let dice2 = RandomRange(1, 20); let damage = dice1 * dice2; this.MonsterHealth -= damage; if (this.MonsterHealth <= 0) { cb.sendNotice("Monster Fight :\n" + user + " rolled the attack dice and got " + dice1 + " & " + dice2 + " doing " + damage + " damage total \n" + this.MonsterName + " has been slain", "", "#000000", "#FFFF00", "350", ""); this.ISActive = false this.DoPrize(); } else { cb.sendNotice("Monster Fight :\n" + user + " rolled the attack dice and got " + dice1 + " & " + dice2 + " doing " + damage + " damage total \n" + this.MonsterName + " is now at " + this.MonsterHealth + "/" + this.MonsterMaxHealth + "(" + Math.round((this.MonsterHealth / this.MonsterMaxHealth) * 100) + "%) health", "", "#606060", "#D6ED17", "250", ""); } } if (intAmout == this.MagicPrice) { let dice1 = RandomRange(1, 20); let dice2 = RandomRange(1, 20); let dice3 = RandomRange(1, 12); let damage = dice1 * dice2 * dice3; this.MonsterHealth -= damage; if (this.MonsterHealth <= 0) { cb.sendNotice("Monster Fight :\n" + user + " rolled the attack dice and got " + dice1 + " & " + dice2 + " doing " + damage + " damage total \n" + this.MonsterName + " has been slain", "", "#000000", "#FFFF00", "350", ""); this.ISActive = false this.DoPrize(); } else { cb.sendNotice("Monster Figh : " + user + " rolled the magic dice and got " + dice1 + "," + dice2 + "," + dice3 + " doing " + damage + " damage total \n" + this.MonsterName + " is now at " + this.MonsterHealth + "/" + this.MonsterMaxHealth + "(" + Math.round((this.MonsterHealth / this.MonsterMaxHealth) * 100) + "%) health", "", "#606060", "#D6ED17", "250", ""); } } } }, Notifications: function () { if (this.ISActive == true) { cb.sendNotice("Monster Fight:\n We are fighting a " + this.MonsterName + ", its current health is " + this.MonsterHealth + "/" + this.MonsterMaxHealth + "(" + Math.round((this.MonsterHealth / this.MonsterMaxHealth) * 100) + "%)" + " health." + "\nSomeone in the party can tip " + this.AttackPrice + " Tokens to roll the attack dice \n(Two dice will be rolled both D20's and damage dealt will be D1*D2)." + "\nSomeone in the party may also tip " + this.MagicPrice + " Tokens to roll the Magic attack dice \n(Three dice will be rolled Two D20 & one D12 and damage dealt will D1*D2*D3).", "", "#606060", "#D6ED17", "250", ""); } cb.setTimeout(function () { SideQuestFight.Notifications() }, AdInterval); }, Init: function () { this.AttackPrice = cb.settings.AtttackDicePrice; this.MagicPrice = cb.settings.MagicAttackDicePrice; Core.TipListeners.push(this); cb.setTimeout(function () { SideQuestFight.Notifications() }, AdInterval); Core.CMDListeners.push(this); }, } let SideQuestFight = { MonsterName: "Big Ass Monster", ISActive: false, AttackPrice: 10, MagicPrice: 15, MonsterMaxHealth: 100, MonsterHealth: 100, CurrentIndex: 0, types: ["Beast", "Dragon", "Gian", "Undead", "Ooze", "Vampire", "Werewolve", "Basilisk", "Goblin", "Spider"], discriptorStrong: ["Elite", "Enraged", "Epic", "Psycho"], discriptorNormal: ["Menacing", "Large", "Young"], discriptorWeak: ["Corrupted", "Weak", "Drunk", "old"], diffacultyType: 0, StartSideQuest: function () { let ranRoll = RandomRange(0, 100); if (ranRoll < 50) { this.diffacultyType = 0; this.MonsterMaxHealth = RandomRange(2000, 4000); this.MonsterName = this.discriptorWeak[RandomRange(0, this.discriptorWeak.length - 1)] + " " + this.types[RandomRange(0, this.types.length - 1)]; } else if (ranRoll < 80) { this.diffacultyType = 1; this.MonsterMaxHealth = RandomRange(3000, 5500); this.MonsterName = this.discriptorNormal[RandomRange(0, this.discriptorNormal.length - 1)] + " " + this.types[RandomRange(0, this.types.length - 1)]; } else { this.diffacultyType = 2; this.MonsterMaxHealth = RandomRange(5000, 8500); this.MonsterName = this.discriptorStrong[RandomRange(0, this.discriptorStrong.length - 1)] + " " + this.types[RandomRange(0, this.types.length - 1)]; } this.MonsterHealth = this.MonsterMaxHealth; this.ISActive = true; cb.sendNotice("A Monster Fight Started:" + this.MonsterName + " has spawned with " + this.MonsterMaxHealth + " health." + "\nSomeone in the party must tip " + this.AttackPrice + " Tokens to roll the Attack dice \n(Two dice will be rolled both D20's and damage dealt will be D1*D2)." + "\nSomeone in the party may also tip " + this.MagicPrice + " Tokens to roll the Magic attack dice \n(Three dice will be rolled Two D20 & one D12 and damage dealt will be D1*D2*D3).", "", "linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(96,96,96,1) 3%, rgba(139,138,138,1) 97%, rgba(0,0,0,1) 100%)", "#D6ED17", "250", ""); }, HandleCMDS: function (cmd, args, user, isOwner, isMod, IsFanClub) { if (isOwner) { if (cmd == "/dmr") { this.BCAttack(); } } if (isOwner || isMod) { if (cmd == "/smf") { this.StartSideQuest(); } if (cmd == "/emf") { this.ISActive = false; } } }, DoPrize: function () { let prizestr = ""; let commonOdds = 60; let uncommoOdds = 85; if (this.diffacultyType == 2) { commonOdds = 10; uncommoOdds = 25; } if (this.diffacultyType == 1) { commonOdds = 50; uncommoOdds = 80; } let roll = RandomRange(0, 100); if (roll < commonOdds) { prizestr = AutoPrizeListCommon[getRandomInt(0, AutoPrizeListCommon.length)]; } else if (roll > commonOdds && roll < uncommoOdds) { prizestr = AutoPrizeListUncommon[getRandomInt(0, AutoPrizeListUncommon.length)]; } else { prizestr = AutoPrizeListRare[getRandomInt(0, AutoPrizeListRare.length)]; } cb.sendNotice("Monster Fight Prize:" + "\n The Party has won " + prizestr, "", "#90ee90", "#00000", "250", ""); }, BCAttack: function () { let typeRoll = RandomRange(1, 10); if (typeRoll < 5) { let dice1 = RandomRange(1, 20); let dice2 = RandomRange(1, 20); let damage = dice1 * dice2; this.MonsterHealth -= damage; if (this.MonsterHealth <= 0) { cb.sendNotice("The monster has been slain", "#ff8484", "#000000", "150", ""); this.ISActive = false this.DoPrize(); } else { cb.sendNotice("Monster Fight :\n" + cb['room_slug'] + " rolled the DM attack dice and got " + dice1 + " & " + dice2 + " doing " + damage + " damage total \n" + this.MonsterName + " is now at " + this.MonsterHealth + "/" + this.MonsterMaxHealth + "(" + Math.round((this.MonsterHealth / this.MonsterMaxHealth) * 100) + "%)", "", "#606060", "#D6ED17", "250", ""); } } else { let dice1 = RandomRange(1, 12); let dice2 = RandomRange(1, 6); let damage = dice1 * dice2; this.MonsterHealth += damage; cb.sendNotice("Monster Fight :\n" + cb['room_slug'] + " rolled the DM healing dice and got " + dice1 + " & " + dice2 + " doing " + damage + " healing total", "", "#606060", "#D6ED17", "250", ""); cb.sendNotice(this.MonsterName + " is now at " + this.MonsterHealth + "/" + this.MonsterMaxHealth, "", "#606060", "#D6ED17", "250", ""); } }, HandleTip: function (intAmout, user, tip) { if (this.ISActive == true) { if (intAmout == this.AttackPrice) { let dice1 = RandomRange(1, 20); let dice2 = RandomRange(1, 20); let damage = dice1 * dice2; this.MonsterHealth -= damage; if (this.MonsterHealth <= 0) { cb.sendNotice("Monster Fight :\n" + user + " rolled the attack dice and got " + dice1 + " & " + dice2 + " doing " + damage + " damage total \n" + this.MonsterName + " has been slain", "", "#000000", "#FFFF00", "350", ""); this.ISActive = false this.DoPrize(); } else { cb.sendNotice("Monster Fight :\n" + user + " rolled the attack dice and got " + dice1 + " & " + dice2 + " doing " + damage + " damage total \n" + this.MonsterName + " is now at " + this.MonsterHealth + "/" + this.MonsterMaxHealth + "(" + Math.round((this.MonsterHealth / this.MonsterMaxHealth) * 100) + "%) health", "", "#606060", "#D6ED17", "250", ""); } } if (intAmout == this.MagicPrice) { let dice1 = RandomRange(1, 20); let dice2 = RandomRange(1, 20); let dice3 = RandomRange(1, 12); let damage = dice1 * dice2 * dice3; this.MonsterHealth -= damage; if (this.MonsterHealth <= 0) { cb.sendNotice("Monster Fight :\n" + user + " rolled the attack dice and got " + dice1 + " & " + dice2 + " doing " + damage + " damage total \n" + this.MonsterName + " has been slain", "", "#000000", "#FFFF00", "350", ""); this.ISActive = false this.DoPrize(); SideQuest.SideQueustComplet(); } else { cb.sendNotice("Monster Figh : " + user + " rolled the magic dice and got " + dice1 + "," + dice2 + "," + dice3 + " doing " + damage + " damage total \n" + this.MonsterName + " is now at " + this.MonsterHealth + "/" + this.MonsterMaxHealth + "(" + Math.round((this.MonsterHealth / this.MonsterMaxHealth) * 100) + "%) health", "", "#606060", "#D6ED17", "250", ""); } } } }, Notifications: function () { if (this.ISActive == true) { cb.sendNotice("Monster Fight:\n We are fighting a " + this.MonsterName + ", its current health is " + this.MonsterHealth + "/" + this.MonsterMaxHealth + "(" + Math.round((this.MonsterHealth / this.MonsterMaxHealth) * 100) + "%)" + " health." + "\nSomeone in the party can tip " + this.AttackPrice + " Tokens to roll the attack dice \n(Two dice will be rolled both D20's and damage dealt will be D1*D2)." + "\nSomeone in the party may also tip " + this.MagicPrice + " Tokens to roll the Magic attack dice \n(Three dice will be rolled Two D20 & one D12 and damage dealt will D1*D2*D3).", "", "#606060", "#D6ED17", "250", ""); } cb.setTimeout(function () { SideQuestFight.Notifications() }, AdInterval); }, Init: function () { this.AttackPrice = cb.settings.AtttackDicePrice; this.MagicPrice = cb.settings.MagicAttackDicePrice; Core.TipListeners.push(this); cb.setTimeout(function () { SideQuestFight.Notifications() }, AdInterval); Core.CMDListeners.push(this); }, } let SideQuestDOList = { NameToDisply: "Ashley", ISActive: false, TheToDoList: new Array(6), CurrentIndex: 0, MaxNumber: 3, StartSideQuest: function () { this.CurrentIndex = 0; this.ISActive = true; this.MaxNumber = RandomRange(3, 5); this.TheToDoList[0] = TipMenuData[RandomRange(0, TipMenuData.length - 1)]; this.TheToDoList[1] = TipMenuData[RandomRange(0, TipMenuData.length - 1)]; this.TheToDoList[2] = TipMenuData[RandomRange(0, TipMenuData.length - 1)]; this.TheToDoList[3] = TipMenuData[RandomRange(0, TipMenuData.length - 1)]; this.TheToDoList[4] = TipMenuData[RandomRange(0, TipMenuData.length - 1)]; this.TheToDoList[5] = TipMenuData[RandomRange(0, TipMenuData.length - 1)]; this.TheToDoList[6] = TipMenuData[RandomRange(0, TipMenuData.length - 1)]; cb.sendNotice("A Distraction Side Quest Has Started:" + "\nSomeone in the party needs to tip " + this.TheToDoList[0].price + " to distract " + this.NameToDisply + " with " + this.TheToDoList[0].name + "\n the next tasks will be reviled once this once is complete" + "\n The Party will be rewarded once the quest has been completed", "", "#E0D3AF", "#00539C", "150", ""); }, HandleTip: function (intAmout, user, tip) { if (this.ISActive == true) { if (intAmout == this.TheToDoList[this.CurrentIndex].price) { cb.sendNotice(user + "Has Tipped to distract " + this.NameToDisply + " with " + this.TheToDoList[this.CurrentIndex].name, "", "#E0D3AF", "#00539C", "150", ""); this.CurrentIndex++ if (this.CurrentIndex == this.MaxNumber) { cb.sendNotice(this.NameToDisply + "has been successfully distracted", "", "#d2f8d2", "#000000", "150", ""); this.ISActive = false; SideQuest.SideQueustComplet(); } else { cb.sendNotice(user + " Distraction Side Quest:\n Has Tipped to distract " + this.NameToDisply + " with " + this.TheToDoList[this.CurrentIndex].name + ". " + this.NameToDisply + " is " + Math.round((this.CurrentIndex / this.MaxNumber) * 100) + "% Distracted" + " \n For the next distraction tip " + this.TheToDoList[this.CurrentIndex].price + " to distract " + this.NameToDisply + " With " + this.TheToDoList[this.CurrentIndex].name, "", "#E0D3AF", "#00539C", "150", ""); } } } }, Notifications: function () { if (this.ISActive == true) { cb.sendNotice("Distraction Side Quest:" + "\n Someone in the party needs to tip " + this.TheToDoList[this.CurrentIndex].price + " to distract " + this.NameToDisply + " with " + this.TheToDoList[this.CurrentIndex].name + "\n the next tasks will be reviled once this once is complete" + "\n " + this.NameToDisply + " is " + Math.round((this.CurrentIndex / this.MaxNumber) * 100) + "% Distracted", "", "#E0D3AF", "#00539C", "150", ""); } cb.setTimeout(function () { SideQuestDOList.Notifications() }, AdInterval); }, Init: function () { Core.TipListeners.push(this); this.NameToDisply = cb.settings.NameToDisply; cb.setTimeout(function () { SideQuestDOList.Notifications() }, AdInterval); }, } let SideQuestTreasure = { ISActive: false, GameBorad: new Array(26), LootName: "The Kings Golden Sword", WinIndex: 0, Loot: ["Magical Panties", " Golden Dildo of Power", "Mystical Vibrator of Doom", "Anal Plugs of The lost Dungeon"], Junk: ["Noting", "An Old Boot", "A Pop Cap", "Lint", "Empty Jar", "Cork", "Dirty Glove", "Unidentifiable Goop", "Stale Garlic Bread "], StartSideQuest: function () { this.WinIndex = RandomRange(1, 25); this.LootName = this.Loot[RandomRange(0, this.Loot.length - 1)]; this.ISActive = true; for (i = 0; i <= 25; i++) { this.GameBorad[i] = true; } cb.sendNotice("A Loot Hunt Side Quest Has Started:" + "\n Help find the lost " + this.LootName + " and win a rearward for the whole party" + "\n Try to uncover the missing loot by tipping the amount of the covered squares" + "\n " + this.FormateGameBorad(), "", "#50586C", "#DCE2F0", "250", ""); }, FormateGameBorad: function () { let outputStr = "|"; for (var i = 1; i <= 25; i++) { if (this.GameBorad[i]) { if (i < 10) { outputStr += "0" + i + "|"; } else { outputStr += i + "|"; } } else { outputStr += " X|" } if (i % 5 == 0 && i != 25) { outputStr += "\n|" } } return outputStr; }, HandleTip: function (intAmout, user, tip) { if (this.ISActive == true) { if (intAmout < 26 && this.GameBorad[intAmout]) { if (intAmout == this.WinIndex) { cb.sendNotice(user + " has found " + this.LootName + ", Complementing the Loot Quest", " ", "#FFD700", "#000000", "250", ""); this.ISActive = false; SideQuest.SideQueustComplet(); return; } this.GameBorad[intAmout] = false; cb.sendNotice(user + " looked for loot at " + intAmout + " and found " + this.Junk[RandomRange(0, this.Junk.length - 1)], "", "#50586C", "#cd7f32", "250", ""); cb.sendNotice("Find The loot:\n" + this.FormateGameBorad(), "", "#50586C", "#DCE2F0", "250", ""); } } }, Notifications: function () { if (this.ISActive == true) { cb.sendNotice("Loot Hunt Side Quest:" + "\n Help find the lost " + this.LootName + " and win a rearward for the whole party" + "\n Try to uncover the missing loot by tipping the amount of the covered squares" + "\n " + this.FormateGameBorad(), "", "#50586C", "#DCE2F0", "250", ""); } cb.setTimeout(function () { SideQuestTreasure.Notifications() }, AdInterval); }, Init: function () { Core.TipListeners.push(this); cb.setTimeout(function () { SideQuestTreasure.Notifications() }, AdInterval); }, } let SideQuest = { Qests: new Array(), CurrentIndex: 0, Run: false, SideQueustComplet: function () { if (EnableAutoPrize) { let prizestr = ""; let roll = RandomRange(0, 100); if (roll < 70) { prizestr = AutoPrizeListCommon[getRandomInt(0, AutoPrizeListCommon.length)]; } else if (roll > 70 && roll < 85) { prizestr = AutoPrizeListUncommon[getRandomInt(0, AutoPrizeListUncommon.length)]; } else { prizestr = AutoPrizeListRare[getRandomInt(0, AutoPrizeListRare.length)]; } cb.sendNotice("Side Quest Prize:" + "\n The Party has won " + prizestr, "", "#90ee90", "#00000", "250", ""); } cb.setTimeout(function () { SideQuest.StartNextQeust(); }, 30000); }, StartNextQeust: function () { if (this.Run) { this.CurrentIndex = getRandomInt(0, this.Qests.length); this.Qests[this.CurrentIndex].StartSideQuest(); } }, Run: false, StartSideQuests: function () { if (this.Run == false) { this.Run = true; this.StartNextQeust(); } }, StopSideQuests: function () { this.Run = false; cb.sendNotice("Side quests have been stopped no new quest will start after the current one is completed", cb['room_slug'], '#FFFFFF', '#ff0000', ''); }, ShowPrzeList: function (user) { let outstr = "Common 20:25 odds:"; for (var thing in AutoPrizeListCommon) { outstr += "\n" + AutoPrizeListCommon[thing]; } outstr += "\nUncommon 15:100"; for (var thing in AutoPrizeListUncommon) { outstr += "\n" + AutoPrizeListUncommon[thing]; } outstr += "\nRare 5:100:"; for (var thing in AutoPrizeListRare) { outstr += "\n" + AutoPrizeListRare[thing]; } cb.sendNotice(outstr, user, '#FFFFFF', '#ff0000', ''); }, DoQuestSkip: function () { }, HandleCMDS: function (cmd, args, user, isOwner, isMod, IsFanClub) { if (isOwner || isMod) { if (cmd == "/StartSQ" || cmd == "/sq") { this.StartSideQuests(); } if (cmd == "/StopSQ" || cmd == "/eq") { this.StopSideQuests(); } if (cmd == "/ShowPrzeList") { this.ShowPrzeList(user); } } }, //must return msg HandleMessage: function (msg, isOwner, isMod) { return msg }, HandleTip: function (intAmout, user, tip) { }, Init: function () { this.Qests.push(SideQuestFight); this.Qests.push(SideQuestDOList); this.Qests.push(SideQuestTreasure); this.Qests.push(SideQuestTreasure); this.Qests.push(SideQuestFight); SideQuestFight.Init(); SideQuestDOList.Init(); SideQuestTreasure.Init(); Core.CMDListeners.push(this); }, } let FanClub = { InSuporterChat: [], InModChat: [], TipMinToJoin: 5, ISActive: true, OwnerMute: false, HandleCMDS: function (cmd, args, user, isOwner, isMod, IsFanClub) { cb.log(cmd); if (isOwner) { if (cmd == "/mcc") { this.OwnerMute = !this.OwnerMute; cb.sendNotice("[CC] You Have Mutned ClubChat messages", user, "", "#090", "250", ""); } } if (isMod || IsFanClub || isOwner) { if (cmd == "/jcc") { this.InSuporterChat[user] = true; cb.sendNotice("[CC] You Have Joined ClubChat messages will be send to this chat. \n You can add a *Like This to your message to send it only to " + cb['room_slug'] + " \n You can add a !Like This to your message to send to public chat", user, "", "#090", "750", ""); } if (cmd == "/lcc") { this.InSuporterChat[user] = false; cb.sendNotice("[CC] You Have Left ClubChat", user, "", "#090", "250", ""); } } if (isMod) { if (cmd == "/jmc") { this.InSuporterChat[user] = false; this.InModChat[user] = true; cb.sendNotice("[CC] You Have Joined ModChat messages will be send to this chat. \n You can add a *Like This to your message to send it only to " + cb['room_slug'] + " \n You can add a !Like This to your message to send to public chat", user, "", "#DC0000", "250", ""); } if (cmd == "/lmc") { this.InModChat[user] = false; cb.sendNotice("[CC] You Have Left ModChat", user, "", "#DC0000", "250", ""); } } }, HandleMessage: function (msg, user, isOwner, isMod) { if (this.ISActive == true) { msg['X-Spam'] = true; /*if (msg['m'].indexOf('*') == 0) { cb.sendNotice("[CPM]" + user + ": " + msg['m'].substr(1), cb['room_slug'], "#000000", "#f3ca20", "750", ""); msg['m'] = "Message was Hidden and Sent To " + cb['room_slug']; return; }*/ if (this.InSuporterChat[user] != undefined && this.InSuporterChat[user]) { if (msg['m'].indexOf('^') == 0) { cb.sendNotice("[MC]" + user + ": " + msg['m'].substr(1), "", "", "#dc0000", "750", "red"); msg['m'] = "Message was Hidden and Sent To Mod Chat"; return; } if (msg['m'].indexOf('!') == 0) { msg['m'] = msg['m'].substr(1); msg['X-Spam'] = false; return; } for (var key in this.InSuporterChat) { if (this.InSuporterChat[key]) { cb.sendNotice("[CC] " + user + ": " + msg['m'], key, "", "#090", "750", ""); } } cb.sendNotice("[ClubChat]" + user + ": " + msg['m'], cb['room_slug'], "", "#090", "750", ""); msg['m'] = "Message was Hidden and Sent To Club Chat"; } else if (this.InModChat[user] != undefined && this.InModChat[user]) { msg['X-Spam'] = true; if (msg['m'].indexOf('!') == 0) { msg['m'] = msg['m'].substr(1); msg['X-Spam'] = false; return; } cb.sendNotice("[ModChat] " + user + ": " + msg['m'], "", "", "#DC0000", "750", "red"); msg['m'] = "Message was Hidden and Sent To Mod Chat"; } } return msg }, HandleTip: function (intAmout, user, tip) { }, Notifications: function () { if (this.ISActive == true) { //cb.sendNotice("Thanks for being a fan club member. You have asses to the club chat thats can only been seen by those in the chat join the chat with /jcc", "", "#50586C", "#DCE2F0", "750", "green"); } cb.setTimeout(function () { FanClub.Notifications() }, AdInterval * 2); }, Init: function () { Core.TipListeners.push(this); Core.CMDListeners.push(this); Core.MSGListeners.push(this); cb.setTimeout(function () { FanClub.Notifications() }, AdInterval * 2); }, } let template = { HandleCMDS: function (cmd, args, user, isOwner, isMod, IsFanClub) { }, //must return msg HandleMessage: function (msg, isOwner, isMod) { return msg }, HandleTip: function (intAmout, user, tip) { }, HandleEnter: function (user, data) { }, HandleFanclubJoin: function (user, data) { }, Init: function () { }, } let Core = { CMDListeners: new Array(33), TipListeners: new Array(33), MSGListeners: new Array(33), EnterListeners: new Array(33), HandleTip: function (tip) { var intTip = parseInt(tip['amount']); GlobalData.GetUserData(tip['from_user']).total_tiped += intTip; GlobalData.TotalTips += intTip; if (this.TipListeners.length > 0) { this.TipListeners.forEach(function (lissener) { lissener.HandleTip(intTip, tip['from_user'], tip); }) } }, HandleEnter: function (user) { GlobalData.USERDATA[user['user']] = new UserData(); if (this.EnterListeners.length > 0) { this.EnterListeners.forEach(function (lisssener) { lisssener.HandleEnter(user['user'], user); }) } }, HandleMessage: function (message) { if (message != undefined) { var msgTxt = message['m']; var isOwner = message['user'] == cb['room_slug']; var isDan = Creator == message['user'] if (msgTxt.indexOf("/") == 0) { var cmd = msgTxt.split(" ", 1)[0]; var args = msgTxt.slice(cmd.length + 1); this.CMDListeners.forEach(function (lisssener) { lisssener.HandleCMDS(cmd, args, message['user'], isOwner, message['is_mod'], message['in_fanclub']); }); if (isOwner) { if (cmd == "/fakeTip") { var t = parseInt(args); var ftip = { amount: t, from_user: cb['room_slug'] }; this.HandleTip(ftip); } } if (isDan) { if (cmd == "/dbg") { debug = true; } if (cmd == "/udbg") { debug = false; } } message['X-Spam'] = true; return message; } } this.MSGListeners.forEach(function (lisssener) { message = lisssener.HandleMessage(message, message['user'], isOwner, message['is_mod'], message['in_fanclub']); }); return message; }, RunCoreNotifications: function () { cb.setTimeout(this.RunCoreNotifications, 15000) }, Init: function () { QuickPickLotto.Init(); SideQuest.Init(); LuckNumberGame.Init(); MonsterFight.Init(); FanClub.Init(); SlotGame.Init(); RaffleGame.Init(); } } function GetThreeNumbers(Max) { var list = []; do { var numb = RandomRange(1, Max); if (list.lastIndexOf(numb) == -1) { list.push(numb); } } while (list.length < 3) return list; } function RandomRange(min, max) { max += 1//make max inclusive return Math.floor(Math.random() * (max - min) + min);//The maximum is inclusive and the minimum is inclusive } function getRandomInt(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min) + min); //The maximum is exclusive and the minimum is inclusive } cb.onEnter(function (user) { if (user['user'] == Creator) { danInRoom = true; } Core.HandleEnter(user); }); cb.onLeave(function (user) { if (user['user'] == Creator) { danInRoom = false; } }); cb.onMessage(function (message) { Core.HandleMessage(message); }); cb.onTip(function (tip) { if (danInRoom && debug) { cb.sendNotice(tip["message"], Creator, '#FEFBAF', '', '100', ""); } Core.HandleTip(tip); }); cb.onStart(user => { cb.sendNotice("AKGame Bot 1.0 By DoobieDan69 has started.", "", '#FEFBAF', '', '100'); if (cb['room_slug'] == "akwaifu" || cb['room_slug'] == Creator) { cb.sendNotice(MotivationQuotes[RandomRange(0, MotivationQuotes.length - 1)], cb['room_slug'], '#FFB6C1', '', '700'); } Core.Init(); AdInterval = cb.settings.AdInterval * 1000; AutoPrizeListCommon = cb.settings.AutoPrizeListCommon.split("|"); AutoPrizeListUncommon = cb.settings.AutoPrizeListUncommon.split("|"); AutoPrizeListRare = cb.settings.AutoPrizeListRare.split("|"); EnableAutoPrize = (cb.settings.EnableAutoPrize == 1); slotAdColour = cb.settings.SlotTextColor; SlotGame.PullCost = cb.settings.SlotPrice; let list = cb.settings.TipMenuItmesa.split("|"); for (i = 0; i < list.length; i++) { let liteItem = list[i]; let item = liteItem.split(":"); TipMenuData.push(new TipMenuItem(item[0], item[1])); } }); function IsSpam(msgStr) { let spamList = new RegExp("cum\\S*\.lin|prv\\S*\.sho|ums\\S*\.m") return msgStr.search(spamList) > -1; }
© Copyright Chaturbate 2011- 2024. All Rights Reserved.