Skip to content

Commit

Permalink
5.2.0
Browse files Browse the repository at this point in the history
Rift autoclick done and tested. Upgraded the save system for favs too
and the beach autoclick.
  • Loading branch information
Antoine Bertier committed Mar 23, 2014
1 parent 74f526c commit 89c21f9
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 15 deletions.
60 changes: 48 additions & 12 deletions BeachBall.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ BeachBall.Time_to_ONG = 1800000;
BeachBall.lootBoxes = ['boosts', 'badges', 'hpt', 'ninj', 'chron', 'cyb', 'bean', 'ceil', 'drac', 'stuff', 'land', 'prize', 'discov', 'monums', 'monumg', 'tagged', 'badgesav'];
BeachBall.resetCaged = 0;

//Add code from NodalW


//Version Information
BeachBall.version = '5.2.0.Beta2';
BeachBall.version = '5.2.0';
BeachBall.SCBversion = '3.33333'; //Last SandCastle Builder version tested

//BB Audio Alerts Variables
Expand Down Expand Up @@ -554,12 +551,6 @@ BeachBall.SolveLogic = function(name) {
}
}

BeachBall.ClickBeach = function(number) {
if (Molpy.Got('Temporal Rift') == 0 && Molpy.ninjad != 0 && BeachBall.Time_to_ONG >= 5){
Molpy.ClickBeach();
}
}

BeachBall.CagedAutoClick = function() {
//Purchases Caged Logicat
//If Caged AutoClick is Enabled, and Caged Logicat isn't Sleeping and Caged Logicat isn't already purchased, and timeout not active
Expand Down Expand Up @@ -671,6 +662,47 @@ BeachBall.MontyHaul = function() {
}
}

BeachBall.ClickBeach = function(number) {
if (Molpy.Got('Temporal Rift') == 0 && Molpy.ninjad != 0 && BeachBall.Time_to_ONG >= 5){
Molpy.ClickBeach();
}
}

BeachBall.RiftAutoClick = function () {
if (BeachBall.Settings['RiftAutoClick'].status == 0)
return;

switch (parseInt(BeachBall.Settings['RiftAutoClick'].status)) {

case 1 : // farm crystals
// check TL
if (!(Molpy.Boosts['Time Lord'] && Molpy.Boosts['Time Lord'].bought && Molpy.Boosts['Time Lord'].power))
return;
var buttons = $$('#logItems input[onclick="Molpy.RiftJump()"]'); // buttons to jump in the log
if (buttons.length && !Molpy.Got('Temporal Rift'))
Molpy.RiftJump();
break;

case 2 : // rift to ONG
if (!(Molpy.Boosts['Time Lord'] && Molpy.Boosts['Time Lord'].bought && Molpy.Boosts['Time Lord'].power))
return;
if (Molpy.Got('Temporal Rift') && Molpy.Boosts['Sand'].Has(1) && (BeachBall.GetBeachState() == 'beachsafe')) // ninja click has passed, rift occuring, sand in stock
Molpy.RiftJump();
break;
}
}

BeachBall.GetBeachState = function () {
var stateClass = 'beachsafe';
if(!Molpy.ninjad) {
if(Molpy.npbONG)
stateClass = 'beachstreakextend';
else
stateClass = 'beachninjawarning';
}
return stateClass;
}

BeachBall.Ninja = function() {
//Molpy.ninjad is 0 when you can't click, and stays 0 until you extend streak, when it turns to 1
//Molpy.npbONG is 0 when you can't click, and 1 when you can click
Expand Down Expand Up @@ -890,6 +922,7 @@ BeachBall.ToggleAutoclickFav = function(fav,shown) {
} else {
me.timer = window.setInterval(BeachBall.getAutoClickFav(fav),me.period)
}
BeachBall.SaveAutoclickFav();
if (shown)
Molpy.Notify('Autoclick Favorite '+Molpy.activeLayout.faves[fav].boost.name+' toggled : '+(me.timer ? 'activated, '+me.speed : 'disabled'), 1);
}
Expand Down Expand Up @@ -923,12 +956,13 @@ BeachBall.LoadAutoclickFav = function() {
BeachBall.FavsAutoclick = localStorage['BB.FavsAutoclick'] ? JSON.parse(localStorage['BB.FavsAutoclick']) : {};
for (fav in BeachBall.FavsAutoclick) {
var me = BeachBall.FavsAutoclick[fav];
if (me) {
if (me && me.timer) {// if there was an active timer when the save occured
me.timer = 0;
BeachBall.ToggleAutoclickFav(fav,false);
}
}
}

BeachBall.SaveAutoclickFav = function() {
localStorage['BB.FavsAutoclick'] = JSON.stringify(BeachBall.FavsAutoclick);
}
Expand All @@ -943,6 +977,7 @@ BeachBall.CheckToolFactory = function() {
Molpy.Notify('Tool Factory is still unavailable... keep playing!', 1);
}
}

BeachBall.LoadToolFactory = function() {
if (Molpy.Boosts['TF'].bought == 1)
Molpy.LoadToolFactory(BeachBall.Settings['ToolFactory'].setting);
Expand Down Expand Up @@ -1214,7 +1249,8 @@ function BeachBallMainProgram() {
BeachBall.CagedAutoClick();
BeachBall.Ninja();
BeachBall.MontyHaul();
BeachBall.StartLoop()
BeachBall.RiftAutoClick();
BeachBall.StartLoop();
}

BeachBall.StartLoop = function () {
Expand Down
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
# BeachBall

## Features

* Kitties have a timer on top of the screen, to tell you when there is a kitty.
* you can activate Autoclick on kitties, or just an auto-focus on the kitty
* You can put audio alerts on common events
* You can add autoclick on the picture (1 click for keeping ninja, or multiple click per second)
* Logicats can be solved automaticaly
* Tool factory can be loaded faster
* Caged logicat can be automated to solve every logicat one by one, the max at once for QQ, or get bonemeal.

## How to use this script ?

Start by installing this script (instructions here :http://xenko.github.io/BeachBall/)
Go in the Option panel of the game, and you will find every option to enable at the bottom of the panel.

## Changelog

###Version 5.1.4
###Version 5.1.4.1
###Version 5.1.4.2
###Version 5.2.0

####Features
* NEW : Favorite autoclick - In the Favorite pannel, you can now assign an autoclick to any set favorite. Doing so will ask you for a timer, and may ask you to choose a button to click if there are multiples. If you proceed so, you will have a timer that you can click for activating and de-activating the timer. You can remove it completely by starting assignation of a new timer and canceling it. This can be used to trigger Question Qubes over time, or improving sand industry regularly after a molping down, reducing repetitive spaming activities in just a few clicks.
* Improving Beach Autoclick by adding an "ninja ritual" setting, that will ninja every NP, gathering goats.
* NEW : Rift Autoclick - 2 settings. "Gather Flux Cristals" will use rifts after they close until you have no more Time Lord rift available, and waiting for the NPB to have been ninja'd. "ONG" will use rifts to create a maximum of ONGs. It will always wait for the game to have sand (for building from blackprints) and will wait for the NPB to have been ninjad.



###Version 5.1.4.0 - .2

####Bug Fixes
* Fixed Logicat countdown and clicker not working with Redacted object rewrited in 3.33331
Expand Down

0 comments on commit 89c21f9

Please sign in to comment.