Bots Home
|
Create an App
hethg2
Author:
hethro1
Description
Source Code
Launch Bot
Current Users
Created by:
Hethro1
var BL=0; //current boss level var BHT=0; //boss total health var BHmax=0; /*Current boss health total max*/ var BHmin=0; //Current boss health total min var BHdmgT=0; //Damage to all bosses total var ML=0; //current minion level var MH=0; //Minon Health var CM=0; //Current Minon in minon wave var MW=0; //number of minons in minon wave var MChance= new Array; var MHoard=0; //number of minions in to pull from var tip_amount=0; //what is being tiped var DmgInc=0 ///the anount of damage incomeing var TBnumber=5; //total number of bosses var TWnumber=5; //total number of weapons var TMnumber=10; //total number of minons //+++++++++settings+++++++++++++ cb.settings_choices = [ //============Goals/bosses Health============== {name:'BHM1', type:'int', label:'Level 1 Boss health(goal)=',defaultValue: 500}, {name:'BHM2', type:'int', label:'Level 2 Boss health(goal)=',defaultValue: 500}, {name:'BHM3', type:'int', label:'Level 3 Boss health(goal)=',defaultValue: 750}, {name:'BHM4', type:'int', label:'Level 4 Boss health(goal)=',defaultValue: 750}, {name:'BHM5', type:'int', label:'Level 5 Boss health(goal)=',defaultValue: 1000}, //============Goals/bosses Rewards============== {name:'BR1', type:'str', label:'Level 1 Boss Reward=',defaultValue: 'Shirt Off'}, {name:'BR2', type:'str', label:'Level 2 Boss Reward=',defaultValue: 'Pants Off'}, {name:'BR3', type:'str', label:'Level 3 Boss Reward=',defaultValue: 'Bra Off'}, {name:'BR4', type:'str', label:'Level 4 Boss Reward=',defaultValue: 'Panties Off'}, {name:'BR5', type:'str', label:'Level 5 Boss Reward=',defaultValue: 'Cum Show'}, //============Minon Health============== {name:'MH1', type:'int', label:'Level 1 Minon Health=',defaultValue: 10}, {name:'MH2', type:'int', label:'Level 2 Minon Health=',defaultValue: 30}, {name:'MH3', type:'int', label:'Level 3 Minon Health=',defaultValue: 30}, {name:'MH4', type:'int', label:'Level 4 Minon Health=',defaultValue: 40}, {name:'MH5', type:'int', label:'Level 5 Minon Health=',defaultValue: 60}, {name:'MH6', type:'int', label:'Level 6 Minon Health=',defaultValue: 70}, {name:'MH7', type:'int', label:'Level 7 Minon Health=',defaultValue: 100}, {name:'MH8', type:'int', label:'Level 8 Minon Health=',defaultValue: 150}, {name:'MH9', type:'int', label:'Level 9 Minon Health=',defaultValue: 250}, {name:'MH10', type:'int', label:'Level 10 Minon Health=',defaultValue: 500}, //============Minon Rewards============== {name:'MR1', type:'str', label:'Level 1 Minon Rewards=',defaultValue: 'Spanks'}, {name:'MR2', type:'str', label:'Level 2 Minon Rewards=',defaultValue: 'Flash Ass'}, {name:'MR3', type:'str', label:'Level 3 Minon Reward=',defaultValue: 'Flash Boobs'}, {name:'MR4', type:'str', label:'Level 4 Minon Reward=',defaultValue: 'Flash Pussy'}, {name:'MR5', type:'str', label:'Level 5 Minon Reward=',defaultValue: 'Dildo BJ'}, {name:'MR6', type:'str', label:'Level 6 Minon Reward=',defaultValue: 'Self Moter Boat'}, {name:'MR7', type:'str', label:'Level 7 Minon Reward=',defaultValue: 'Short Dldo ride'}, {name:'MR8', type:'str', label:'Level 8 Minon Reward=',defaultValue: 'Lotion Boobs'}, {name:'MR9', type:'str', label:'Level 9 Minon Reward=',defaultValue: 'Naked 10 minutes'}, {name:'MR10', type:'str', label:'Level 10 Minon Reward=',defaultValue: 'mini Cum Show'}, /*==--===--==--==--==--==This is to be added after other if working==--===--==-- //============Bosses Health Regen Amount============== {name:'BRgenActive', type:'choice', choice1:'Yes', choice2:'No', label:'Activate Boss Health Regeneration?', defaultValue:'Yes'}, {name:'BRgnTime', type:'int', label:'Minutes tell boss regenerates = ',defaultValue: 10}, {name:'BRgn1', type:'int', label:'Level 1 Boss health Regeration Rate=',defaultValue: 10}, {name:'BRgn2', type:'int', label:'Level 2 Boss health Regeration Rate=',defaultValue: 15}, {name:'BRgn3', type:'int', label:'Level 3 Boss health Regeration Rate=',defaultValue: 20}, {name:'BRgn4', type:'int', label:'Level 4 Boss health Regeration Rate=',defaultValue: 25}, {name:'BRgn5', type:'int', label:'Level 5 Boss health Regeration Rate=',defaultValue: 30}, ==--===--==--==--==--==This is to be added after other if working==--===--==--*/ //============Weapon Cost============== {name:'WC1', type:'int', label:'Level 1 Weapon Cost=',defaultValue: 2}, {name:'WC2', type:'int', label:'Level 2 Weapon Cost=',defaultValue: 52}, {name:'WC3', type:'int', label:'Level 3 Weapon Cost)=',defaultValue: 102}, {name:'WC4', type:'int', label:'Level 4 Weapon Cost=',defaultValue: 302}, {name:'WC5', type:'int', label:'Level 5 Weapon Cost=',defaultValue: 502}, //============Weapon Damage Add============== {name:'WA1', type:'int', label:'Level 1 Weapon Damage Add=',defaultValue: 1}, {name:'WA2', type:'int', label:'Level 2 Weapon Damage Add=',defaultValue: 10}, {name:'WA3', type:'int', label:'Level 3 Weapon Damage Add=',defaultValue: 50}, {name:'WA4', type:'int', label:'Level 4 Weapon Damage Add=',defaultValue: 100}, {name:'WA5', type:'int', label:'Level 5 Weapon Damage Add=',defaultValue: 250}, //============Minon Spawn Rate============== {name:'MS1', type:'int', label:'Level 1 Minon in Hoard =',defaultValue: 100}, {name:'MS2', type:'int', label:'Level 2 Minon in Hoard =',defaultValue: 50}, {name:'MS3', type:'int', label:'Level 3 Minon in Hoard =',defaultValue: 40}, {name:'MS4', type:'int', label:'Level 4 Minon in Hoard =',defaultValue: 20}, {name:'MS5', type:'int', label:'Level 5 Minon in Hoard =',defaultValue: 20}, {name:'MS6', type:'int', label:'Level 6 Minon in Hoard =',defaultValue: 15}, {name:'MS7', type:'int', label:'Level 7 Minon in Hoard =',defaultValue: 10}, {name:'MS8', type:'int', label:'Level 8 Minon in Hoard =',defaultValue: 5}, {name:'MS9', type:'int', label:'Level 9 Minon in Hoard =',defaultValue: 3}, {name:'MS10', type:'int', label:'Level 10 Minon in Hoard =',defaultValue: 1}, //============Bosses names============== {name:'B1', type:'str', label:'Level 1 Boss Name=',defaultValue: 'The Scamming Rat'}, {name:'B2', type:'str', label:'Level 2 Boss Name=',defaultValue: 'The Gray Troll'}, {name:'B3', type:'str', label:'Level 3 Boss Name=',defaultValue: 'The Leaking Vampire'}, {name:'B4', type:'str', label:'Level 4 Boss Name=',defaultValue: 'The Demanding Giant '}, {name:'B5', type:'str', label:'Level 5 Boss Name=',defaultValue: 'The Dragon Of Complete Silence '}, //============Weapon Name============== {name:'W1', type:'str', label:'level1 Weapon Name=',defaultValue: 'Silencing Club'}, {name:'W2', type:'str', label:'level2 Weapon Name=',defaultValue: 'Boots of Kicking'}, {name:'W3', type:'str', label:'level3 Weapon Name=',defaultValue: 'Paddle of Pleasure '}, {name:'W4', type:'str', label:'level4 Weapon Name=',defaultValue: 'Flail of Buzzing'}, {name:'W5', type:'str', label:'level5 Weapon Name=',defaultValue: 'Vibrating Sward Of Glory'}, //============Minon Name============== {name:'M1', type:'str', label:'level 1 Minion Name=',defaultValue: 'Peeping Spider'}, {name:'M2', type:'str', label:'level 2 Minion Name=',defaultValue: 'Lerking Mouse'}, {name:'M3', type:'str', label:'level 3 Minion Name=',defaultValue: 'Loud kobold'}, {name:'M4', type:'str', label:'level 4 Minion Name=',defaultValue: 'Spamming Gobin'}, {name:'M5', type:'str', label:'level 5 Minion Name=',defaultValue: 'Rude Orc'}, {name:'M6', type:'str', label:'level 6 Minion Name=',defaultValue: 'Slamming Blue Lizard'}, {name:'M7', type:'str', label:'level 7 Minion Name=',defaultValue: 'Demading Warlock'}, {name:'M8', type:'str', label:'level 8 Minion Name=',defaultValue: 'The Hydra'}, {name:'M9', type:'str', label:'level 9 Minion Name=',defaultValue: 'Black Dragon of Nonsence'}, {name:'M10', type:'str', label:'level 10 Minion Name=',defaultValue: 'Stalking Ark Mage of Seeking'}, //============Other============== {name:'AddAllTips', type:'choice', choice1:'Yes', choice2:'No', label:'All Tips do Damage to Boss?(Not Damage to Minons)', defaultValue:'Yes'}, {name:'AddMinonTips', type:'choice', choice1:'Yes', choice2:'No', label:'Add Minon Damage to Boss?', defaultValue:'No'}, {name:'AllTipSummon', type:'choice', choice1:'Yes', choice2:'No', label:'All Tips have a chance to summon minion', defaultValue:'Yes'}, {name:'ATSummonChance', type:'int', label:'Tip chance to summon minion',defaultValue: 10}, {name:'FullAdTimer', type:'int', label:'Full Ad Display Timer(Minutes)',defaultValue: 20}, {name:'miniAdTimer', type:'int', label:'Full Ad Display Timer(Minutes)',defaultValue: 5}, {name:'noticecolor', type:'str', label:'Notice color (html code default red #FF0000)',defaultValue: '#F985EE'}, {name:'rewardcolor', type:'str', label:'Reward color (html code default red #FF0000)',defaultValue: '#FF0000'} ] //+++++++++++++/ comands+++++++++++++++++++ cb.onMessage(function (msg){ var message = msg['m'].split(' ');// 0 is comand, 1 variable for comand if(message[0].charAt(0) == '/') { switch(message[0]) { //============/dmgboss============== case '/dmgboss': { if(msg['user'] == cb.room_slug||msg['user']=='hethro' ) //checks is brodcaster { BdmgAdd(parseInt(message[1])); }else{ MsgAll('this is for Broadcasters and mods only'); } break; } //......................................... //============/summinminion============== case '/summonminion': { summonminion(); break; } //......................................... //============/weapons============== //display weapons message for user only case '/weapons': { Wdisplaymsg(); break; } //......................................... } } }) //+++++++++++++Functions+++++++++++++++++++ //============+++Speed prog functions++++============== //============MsgAll============== // shortends a simple message sent function MsgAll(msg){ cb.sendNotice(msg,'','',cb.settings['noticecolor'],'bold'); } //......................................... function RandomNum(min, max) { var range = (max - min) + 1; var rndnum =(Math.random()* range)+min; rndnum=Math.round(rndnum); return (rndnum); } //......................................... //============MsgAllReward============== // shortends a simple message sent function MsgAllReward(msg){ cb.sendNotice(msg,'','',cb.settings['rewardcolor'],'bold'); } //......................................... //============Bget============== // shortends to get boss name function Bget(BLi){ return(cb.settings['B' + BLi]); } //......................................... //============TBH============== // Total of all Bosses Health function BHTset(){ BHT=0; for(var i=1;i<=TBnumber;i++){ BHT=BHT+cb.settings['BHM' + i] } } //......................................... //============BHmin============== // Total up total bosses min health function BHminset(BLi){ BHmin=0; for(var i=1;i<=BLi-1;i++){ BHmin=BHmin+cb.settings['BHM' + i] } } //......................................... //============BHmax============== // Total up total bosses max health function BHmaxset(BLi){ BHmax=0; if(BL==TBnumber){ BHmax=TBH; } else{ for(var i=1;i<=BLi;i++){ BHmax=BHmax+cb.settings['BHM' + i] } } } //......................................... //============BLset============== // Total up total bosses max health function BLset(BLi){ if(BL<+TBnumber){ BL=BLi; BHminset(BL); BHmaxset(BL); BHdmgT=BHmin; } } //......................................... //============BHget============== // gets current bosses heath function BHget(){ var BH=0; varCBdmg=0; BH= BHmax-BHmin; CBdmg=BHdmgT-BHmin; if(CBdmg>=0&&CBdmg<BHmax){ BH=BH-CBdmg; return(BH); } } //......................................... //+=+=+=+=+=+not ntested=-=-=-=-=+=+=+== //============BDmgSub============== // The damage that is being delt to bosses total damage function BdmgSub(Dmg){ if(BHdmgT-Dmg>=BHmin){ BHdmgT=BHdmgT-Dmg; }else { BHdamgT=BHmin; } } //============BdmgAdd============== // The damage that is being delt to bosses total damage function BdmgAdd(Dmg){ if(BHget()-Dmg>0){ BHdmgT=BHdmgT+Dmg; }else{ Bdefmsg(BL); BHdmgT=BHmax; if(BL<TBnumber){ BL=BL+1; BLset(BL); Bentermsg(BL); } } } //......................................... //============Wcheck============== //returns what weapon is selected function Wcheck(TipAmt){ for(i=1;i<=TWnumber;i++){ if(cb.settings['WC' + i]==TipAmt){ return(i); } } return(0); } //......................................... //============WdmgAddget==============WORKING ON THIS //returns what weapon is selected function WdmgAddget(WLi){ if(WLi>0){ return(parseInt(cb.settings['WA' + WLi])); }else{ return(0); } } //......................................... //============StartBattle============== // starts at with a lvl one boss function StartBattle(){ BLset(1); Bentermsg(BL); MW=0; buildHoard(); setminionchance(); } //......................................... //=======+===+==Summoning====+=============+==================== //============buildHoard============== // summons a random minion function buildHoard(){ MHoard=0; for(i=1;i<=TMnumber;i++){ MHoard=MHoard+ parseInt(cb.settings['MS'+i]); } } //......................................... //============setminionhcance============== // sets the minion sommen chance //......................................... function setminionchance(){ var topnum=0; MChance[0]=0; for(i=1;i<=TMnumber;i++){ topnum=topnum+cb.settings['MS'+i]; MChance[i]=topnum; } } //......................................... //============startMW============== // starts a minion wave function startMW(TMi){ MW=TMi; MsgAll('------>Minion Wave of '+ MW+' Has started'); summonminion(); } //......................................... //============summonminion============== // summons a random minion function summonminion(){ ML=0; MH=0; var randnum=RandomNum(1,MHoard) ; for(i=1;i<=TMnumber;i++){ var lowernum=i-1; if(randnum>MChance[lowernum]&&randnum<MChance[i]){ ML=i; } } if(ML!=0){ MH=cb.settings['MH'+ML]; Mentermsg(ML); } } //......................................... //============MdmgAdd==============alsowork on hit // The damage that is being delt to bosses total damage function MdmgAdd(Dmg){ MH=MH-Dmg; if(MH>0){ Mhitmsg(Dmg); }else{ Mdefmsg(ML); if(MW!=0){ MW--; if(MW!=0){ summonminion(); }else{ MsgAllReward('Minion Wave Has Been defeated'); } } } } //......................................... //============hit============== //=====add if weopon damage need msage too // The damage that is being delt to bosses total damage function hit(TipAmt){ var Mdmg=0; var Bdmg=0; if(MW>0){ //checks to see if is a minion if(cb.settings['AddMinonTips']=='Yes'){ //checksif all minion tips add to boss Bdmg=Bdmg+TipAmt; } Mdmg=Mdmg+TipAmt; }else{ if(cb.settings['AddAllTips']=='Yes'&&Bdmg!=0){ Bdmg=Bdmg+TipAmt; } } if(Mdmg!=0){ Mdmg=Mdmg+WdmgAddget(Wcheck(TipAmt)); MdmgAdd(Mdmg); } if(Bdmg !=0||Wcheck(TipAmt)!=0){ if(Bdmg==0){ Bdmg=TipAmt; } if(Wcheck(TipAmt)!=0){ Bdmg=Bdmg+WdmgAddget(Wcheck(TipAmt)); BdmgAdd(Bdmg); Whitmsg(Wcheck(TipAmt)); }else{ BdmgAdd(Bdmg); Bhitmsg(); } } } //......................................... //============TipManager==============NOT DONE // Managers the tipes to damage cb.onTip(function (tip) { tip_amount=parseInt(tip['amount']); hit(tip_amount); WMsummon(tip_amount); }); //......................................... //+++++++++++++Messages+++++++++++++++++++ //============Bentermsg============== // Display boss enters room function Bentermsg(BLi){ MsgAll('=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n'+cb.settings['B' + BLi]+' Entered the room ('+BHget()+')\nReward= '+cb.settings['BR' + BLi]+'\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nWill You Be My Champion?'); } //......................................... //============Bdisplaymsg============== // Display boss function Bhitmsg(){ MsgAll(cb.settings['B' + BL]+' Has('+BHget()+')\n Hes in my way can you take care of that for me?'); } //......................................... //============Bhitmsg============== // Display boss was hit function Bhitmsg(){ MsgAll(cb.settings['B' + BL]+' Health now at ('+BHget()+')'); } //......................................... //============Bdefmsg============== // Display boss is defeated msg function Bdefmsg(BLi){ MsgAllReward('0=)========> * <========(=0\n'+cb.settings['B' + BLi]+' Has Been Vanquished \nReward\n- - - - - - -'+cb.settings['BR' + BLi]+'- - - - - - -\nNeeds to be claimed\n0=)========> * <========(=0\n '); } //......................................... //============Weapondisplaymsg============== // Display msg that was hit by weopon function Wdisplaymsg(){ var msg='List of Weapons to Help Slay The Beast\n'; for(i=1;i<=TWnumber;i++){ msg=msg+'Level '+i+': '+cb.settings['W' + i]+'+'+cb.settings['WA' + i]+' Damage('+i+' Minions Summed) Cost('+cb.settings['WC' + i]+' )\n'; } MsgAll(msg); } //......................................... //============miniWeapondisplaymsg============== // Display msg that was hit by weopon function miniWdisplaymsg(){ var msg=''; for(i=1;i<=TWnumber;i++){ msg=msg+'Weapon Lvl '+i+': +'+cb.settings['WA' + i]+' Dmg ('+cb.settings['WC' + i]+' )| '; } MsgAll(msg); } //......................................... //============Whitmsg============== // Display msg that was hit by weopon function Whitmsg(WLi){ MsgAll(cb.settings['B' + BL]+' Was struct by '+cb.settings['W' + WLi]+' for '+(tip_amount+WdmgAddget(WLi))+'! Health now at ('+BHget()+')'); } //......................................... //============Mentermsg============== // Display msg that was hit by weopon function Mentermsg(MLi){ MsgAll('^^^^^^^^^^('+MW+' Minions left In wave)^^^^^^^^^^\n'+cb.settings['M' +MLi ]+'('+MH+') Came To defend '+ cb.settings['B'+BL]+'!\n Reward '+cb.settings['MR'+MLi]+' if Defeated'); } //......................................... //============Mhitmsg============== // Display minion was hit function Mhitmsg(Dmg){ MsgAll(cb.settings['M' + ML]+' Was hit for '+Dmg+' and now at ('+MH+')'); } //......................................... //============Mdefmsg============== // Display boss is defeated msg function Mdefmsg(MLi){ MsgAllReward('0=)-=-=-=-=-=<*>=-=-=-=-=-\n'+cb.settings['M' + MLi]+' Has Been Vanquished \nReward\n- - - - - - -'+cb.settings['MR' + MLi]+'- - - - - - -\nNeeds to be claimed\n-=-=-=-=-=<*>=-=-=-=-=- '); } //......................................... //============FullBossAd============== // Display msg that was hit by weopon function BossAd(){ var msg=''; msg=msg+cb.settings['B' + BL]+'('+BHget()+')Is in the Room. '; if(cb.settings['AddAllTips']=='Yes'){ msg=msg+'Tip To Hurt Beast or '; } msg=msg+'Choose a weapon'; MsgAll(msg); Wdisplaymsg(); MsgAll('Weapons will Add extra damage and the Beast will summon minions to defend him'); cb.setTimeout(BossAd, (cb.settings.FullAdTimer * 60000)); } cb.setTimeout(BossAd, (cb.settings.FullAdTimer * 60000)); //......................................... //============miniBossAd============== // Display msg that was hit by weopon function miniBossAd(){ var msg=''; msg=msg+cb.settings['B' + BL]+'('+BHget()+') Health left till :'+cb.settings['BR' + BL]; MsgAll(msg); miniWdisplaymsg(); MsgAll('Will You Be My Champion?'); cb.setTimeout(miniBossAd, (cb.settings.miniAdTimer* 60000)); } cb.setTimeout(miniBossAd, (cb.settings.miniAdTimer* 60000)); //......................................... //============inti============== // The damage that is being delt to bosses total damage function inti(){ StartBattle(); } inti(); //============WMsummon============== // summings number of minions to amount of weopon level function WMsummon(TipAmt){ var WLi=0; WLi=Wcheck(parseInt(TipAmt)); if(MW<=0&&WLi!=0){ MsgAll(cb.settings['W'+WLi]+' hit '+cb.settings['B'+BL]+' Causing '+WLi+ 'of minions to come to his aid!'); startMW(WLi); } } //.........................................
© Copyright Chaturbate 2011- 2024. All Rights Reserved.