Bots Home
|
Create an App
Z-test
Author:
hethro1
Description
Source Code
Launch Bot
Current Users
Created by:
Hethro1
var Zombie = new Array; var BiteWords = new Array; var usr=0; var bites=1; var cam=2; var cs = JSON.parse(JSON.stringify(cb.settings)); cb.settings_choices = [ {name:'MaxBites', type:'int', label:'Total number of zombie bites tell full zombie',defaultValue: 3}, {name:'BiteWords', type:'str', required: false,label:'Bite Words=',defaultValue: 'bb,BB,bob,pm,PM,show,Show'} ] function Brains(msg){ var m=msg.split(' '); for(i=0;i<=m.length;i++){ if(parseInt(m[i].length)<2){m[i]='Meh';} if(parseInt(m[i].length)<3&&parseInt(m[i].length)<=5){m[i]='Eat';} if(parseInt(m[i].length)<=6){ m[i]='Br'; for(x=2;x<parseInt(m[i].length-3);x++){ M[i]+='a';} m[i]+='ins';} } return(m); } function buildZombies(){ Zombie[0]=new Array; Zombie[0][usr]=0; Zombie[0][bites]=0; Zombie[0][cam]=0;} function AddZombie(user){ var inlist=false; var zlength=(Zombie.length); if(Zombie.length!=0){for(i=0;i<Zombie.length;i++){ if(user==Zombie[zlength]){inlist=true;}}} if(inlist==false){ zlength+=1; Zombie[zlength]=new Array; Zombie[zlength][usr]=user; Zombie[zlength][bites]=0; Zombie[zlength][cam]=true; MsgCmd(Zombie[zlength][nam]+'('+zlength+') added to Zombie list'); }} function FindZombie(user){ for(i=0;i<Zombie.length;i++){ if(user==Zombie[i][usr]){return(i);} return(0); } } function AddBite(user){ Zombie[FindZombie(user)][0][bites]+=1;} function CamZombieOff(user){ Zombie[FindZombie(user)][0][cam]=false;} function CamZombieOn(user){ Zombie[FindZombie(user)][0][cam]=true;} //cb.limitCam_start(message, [allowed_users]) cb.onMessage(function (msg) { // vars for ease of use var m = msg['m']; var u = msg['user']; // check for action if(m[0] == '?') { // don't print commands msg['X-Spam'] = true; // check if user can perform actions // var broadcasteronly = (cb.settings.allow_hodor == 'allow broadcaster to hodor'); // if(broadcasteronly && u != cb.room_slug) // { // cb.chatNotice('Only the broadcaster can hodor!', u); // } // else if(!broadcasteronly && !msg['is_mod'] && u != cb.room_slug) // { // cb.chatNotice('Only the broadcaster and moderators can hodor!', u); // } // else // { // var command = m.substr(1); // var commandparts = command.split(' '); // if(commandparts[0] == hodor_command && commandparts.length > 1) // HODOR // { // var timeout = 0; // if(commandparts.length > 2 && !isNaN(commandparts[2])) // { // timeout = commandparts[2]; // } // hodor(commandparts[1], timeout, u); // } // else if(commandparts[0] == unhodor_command && commandparts.length > 1) // UNHODOR // { // unhodor(commandparts[1], u); // } // else if(commandparts[0] == hodor_detail_command) // DETAIL // { // hodorDetails(u); // } // else if(commandparts[0] == change_refresh_time_command && commandparts.length > 1 && !isNaN(commandparts[1])) // REFRESH // { // updateRefreshTime(commandparts[1]); // } // } } else if(u in Zombie) { m = Brains(m); cb.chatNotice('You are a zombie walking into a wall', u); } msg['m'] = m; return msg; });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.