Apps Home
|
Create an App
testbedcaster
Author:
testbedcaster
Description
Source Code
Launch App
Current Users
Created by:
Testbedcaster
// -Zombie Raiders - Wave Saver var tips_we_want = 5000; var tips_we_have = 0; var the_msg = ""; var tips_percent = 0; var tips_percent_done = 0; cb.onTip(function (tip) { tips_we_have += parseInt(tip['amount']) cb.sendNotice("Total Tipped: " + tips_we_have); cb.sendNotice(tip); tips_percent = (tips_we_have * 100) / tips_we_want; if (tips_percent >= 100) { // code // ... tips_percent_done = 100; cb.sendNotice(tips_percent); cb.sendNotice(tips_percent_done); } else if (tips_percent >= 75) { // code // ... tips_percent_done = 75; cb.sendNotice(tips_percent); cb.sendNotice(tips_percent_done); } else if (tips_percent >= 50) { // code // ... tips_percent_done = 50; cb.sendNotice(tips_percent); cb.sendNotice(tips_percent_done); } else if (tips_percent >= 25) { // code // ... tips_percent_done = 25; cb.sendNotice(tips_percent); cb.sendNotice(tips_percent_done); } else { // guess it's lower than 25% tips_percent_done = 1; cb.sendNotice(tips_percent); cb.sendNotice(tips_percent_done); } if (tips_percent_done <= 1) { the_msg = "we started tracking tippers, we will let you know of the progress once in a while" tips_percent_done = 2; } else if (tips_percent_done === 25) { the_msg = "We received 25% of the limited goal so far" tips_percent_done = 26; } else if (tips_percent_done === 50) { the_msg = "We received 50% of the limited goal so far" tips_percent_done = 51; } else if (tips_percent_done === 75) { the_msg = "We received 75% of the limited goal so far" tips_percent_done = 76; } else if (tips_percent_done === 100) { the_msg = "We completed the goal, let's start a limited cam show" tips_percent_done = 100; // basically leave this at 100. } else { // guess we won't do anything, just here for debugging the_msg = "it was none of the tips_percent_done: "+tips_percent_done } cb.sendNotice(the_msg) });
© Copyright Chaturbate 2011- 2025. All Rights Reserved.