Bots Home
|
Create an App
test4443
Author:
markus1987test
Description
Source Code
Launch Bot
Current Users
Created by:
Markus1987test
cb.settings_choices = [ {name: 'goalUsers', type:'int', minValue: 1, maxValue: 999, defaultValue: 10, label: 'Goal usercount'}, {name: 'namedUser', type: 'choice', choice1: 'All user', choice2: 'Only named user', defaultValue: 'All user', label: "Count user"}, ]; var counter = 0 var missing = 0 cb.onEnter(function(user) { counter = counter+1 missing = cb.settings.goalUsers - counter if (missing < 0 ) { missing = 0 } else { messageEnter(user); } }); cb.onLeave(function(user) { counter = counter-1 missing = cb.settings.goalUsers - counter if (missing < 0 ) { missing = 0 } else { messageLeave(user); } }); function messageEnter(user) { cb.sendNotice('User number ' + counter + ' entered the room. :-) ' + missing + ' users are still missing.'); } function messageLeave(user) { cb.sendNotice('One user left the room. :-( ' + missing + ' users are still missing.'); }
© Copyright Chaturbate 2011- 2024. All Rights Reserved.