Bots Home
|
Create an App
BlahTest2
Author:
mydevaccount
Description
Source Code
Launch Bot
Current Users
Created by:
Mydevaccount
var msgCount = 0; var d = new Date(); var bg = '#ffffff'; function getGenderIcon(gender) { var genderIcon = ':obs_24_u'; switch (gender) { case 'm': genderIcon = ':obs_24_m'; break; case 'f': genderIcon = ':obs_24_f'; break; case 's': genderIcon = ':obs_24_t'; break; case 'c': genderIcon = ':obs_24_c'; break; default: genderIcon = ':obs_24_u'; break; } return genderIcon; } function getTextColor(tip) { var ret = '#cccccc'; if (tip['from_user_in_fanclub']) ret = '#009934'; else if (tip['from_user_is_mod']) ret = '#DC0034'; else if (tip['from_user_tipped_tons_recently']) ret = '#806DC5'; else if (tip['from_user_tipped_alot_recently']) ret = '#BE6AFF'; else if (tip['from_user_tipped_recently']) ret = '#0034BB'; else if (tip['from_user_has_tokens']) ret = '#6699AA'; return ret; } cb.onMessage(function(message) { var name = message['user']; var gender = message['gender']; message['m'] = getGenderIcon(gender) + ' |' + ++msgCount + '| ' + message['m']; }); cb.onTip(function (tip) { var amount = tip['amount']; var gender = tip['from_user_gender']; var name = tip['from_user']; var textColor = '#ffffff';// getTextColor(tip); var msg = '$obsfx$' + '|' + gender + '|' + d.getTime() + '|' + name + '|' + amount; cb.sendNotice(msg, tip['to_user'], bg, textColor, 'bold'); });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.