Bots Home
|
Create an App
Chaturbate
Author:
kindasubby
Description
Source Code
Launch Bot
Current Users
Created by:
Kindasubby
cb.onTip(function (tip) { var emlalock_api_url = 'https://api.emlalock.com/add?userid=1eut90jm8evm64c&apikey=2w67w497lx&value=VALUE'; var emlalock_lockup_time = 0; // change this to the initial lockup time in seconds var amount_tipped = parseInt(tip.amount); var tip_ratio = 0.1; // change this to the desired proportion of tip to be added to lockup time var time_to_add = Math.floor(amount_tipped * tip_ratio); emlalock_lockup_time += time_to_add; var url = emlalock_api_url.replace('VALUE', time_to_add); fetch(url) .then(function (response) { if (!response.ok) { throw new Error('HTTP error, status = ' + response.status); } return response.json(); }) .then(function (data) { cb.chatNotice('Added ' + time_to_add + ' seconds to lockup time'); cb.chatNotice('New lockup time: ' + emlalock_lockup_time + ' seconds'); }) .catch(function (error) { cb.chatNotice('Error adding time to lockup: ' + error.message); }); });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.