//@SequenceName: Daily Prep
// 4.14.2011 -- Initial version by SirDuck36 (many placeholder steps)
// 4.15.2011 -- Significant update by Skarn22 (fleshed out many placeholder steps)
// 4.17.2011 -- Bug fix for Food gift and auto bingo village -- update by Skarn22
// 4.18.2011 -- Updated glowslinging to include default PoA strategy -- SirDuck36
// 4.19.2011 -- Updated for non-backwards compatible script version
// 4.20.2011 -- Updated bingo step to autoselect a target in range -- Skarn22
// 4.23.2011 -- Improved bingo step -- Skarn22
// 4.23.2011 -- Add PH Pigeons step -- Skarn22
// 4.23.2011 -- Add better TACOS eating strategy -- Skarn22 + SirDuck36
// 4.23.2011 -- Add kaiju whack steps -- Skarn22
// 4.23.2011 -- Add PH Big board / first loser / pigeons -- Skarn22
// 6.13.2011 -- Fix Show Watchin Quest -- Kazeodori
// 6.19.2011 -- New upgrades, village action step, split off party house items into another sequence -- Skarn22, Edited by SirDuck36
// 6.27.2011 -- Use glowslinging multiduels -- SirDuck36
// 10.31.2011 -- Fix for quest numbers using questnum_diff -- SirDuck36
// 3.16.20112 -- Fixes to Kaiju and Bingo step -- Shade
// 5.28.2012 -- added resource collection option, added dice altar to the script, fixed kaiju battle -- doomed
//@SequenceCode
// Update for new quests that have been added -- increase this if new quests are added
var questnum_diff = 7;
// Configuration for Village Action step
// Put your EXACT character names in the "alt#" variables.
// Put your preference for each character in the variables below their name.
// "paperwork", "patrol", "zatrs"(Resupply) and "rescol"(Collect).
// If action a is "useless"/unusable/invalid, the script will use action b.
// "useless" means 0 upkeep(paperwork), or 100% BASIC resource find(rescol).
// Default = paperwork/rescol. Used only if the player/action is not listed.
//
// select what ingredient you want to search by putting one of the folowing behind it:
// "forest", "dumpster", "idol"
// this defaults to forest
//
var actiondata = new Object();
actiondata.alt1 = "examplename";
actiondata.action1A = "paperwork";
actiondata.action1B = "patrol";
actiondata.ingredient1 = "";
actiondata.alt2 = "";
actiondata.action2A = "";
actiondata.action2B = "";
actiondata.ingredient2 = "";
actiondata.alt3 = "";
actiondata.action3A = "";
actiondata.action3B = "";
actiondata.ingredient3 = "";
//------------------------------------------
//@NewTask
//@TaskName: Summoning
GoPage("summons");
// if summon is here AND available to choose, choose it and submit form.
if (FormCheck(null, "summonname", "Mini Frog"))
FormSubmit("summonsummon");
if (FormCheck(null, "summonname", "Super Frog"))
FormSubmit("summonsummon");
if (FormCheck(null, "summonname", "Sickle Weasel"))
FormSubmit("summonsummon");
IncrementTask();
//------------------------------------------
//@NewTask
//@TaskName: Kaiju Team
GoPage('team');
if(DocTest("Strawberry Lvl. 3"))
{
if(DocTest("Robogirl Lvl. 3"))
TeamChange("Strawberry","Robogirl"); // Strawberry Shortcake Bonus
else
TeamChange("Strawberry","Shorty","Robogirl");
}
else
TeamChange("Terri","Blind Fury", "SNAKEMAN");
//------------------------------------------
//@NewTask
//@TaskName: Kaiju Stamina
GoPage('kaiju');
IncrementTaskIf(DocTest("Unable to fight"));
var fought = parseInt(/Number of times fought today: \<b\>(\d+)/.exec(document.body.innerHTML)[1]);
if(DocTest("Stamina lost"))
{
// find all stamina bonuses
var stam = document.getElementsByTagName("Table")[9].innerHTML.match (/(\d+)(?= Stamina)/g);
var max = stam.length-1;
var totstam = 0;
// add all of the individual stam bonuses up.
for(i=0;i<=max;i++)
totstam = totstam + parseInt(stam[i]);
var limit = Math.round(totstam/10) - 1;
}
else
var limit = 4;
if(fought < limit)
{
FormCheck("kat","jutsuused","Bring Down the House Jutsu");
FormCheck("kat","tsukiball","throw");
FormSubmit("kat");
}
IncrementTask();
//------------------------------------------
//@NewTask
//@TaskName: Use Booster?
GoPage('main');
IncrementTaskIf(!DocTest("Boosters:") || DocTest("Max one Boost per day!"));
ShowMsg("Use a Booster or Skip Task!");
//------------------------------------------
//@NewTask
//@TaskName: Video Challenge
GoPage('main');
IncrementTaskIf(DocTest("<b>Question Answered!</b><br>\nSee you tomorrow!"));
ShowMsg("Do the video challenge!");
//------------------------------------------
//@NewTask
//@TaskName: Hooray Food!
GoPage('main');
IncrementTaskIf(DocTest("<b>Hooray Food!</b> +11 Stamina!<br>"));
ShowMsg("Give food to the hungry!");
//------------------------------------------
//@NewTask
//@TaskName: Bonus Code
GoPage('main');
IncrementTaskIf(DocTest("<b>Check back tomorrow for<br>more Bonus Stamina!</b>"));
ShowMsg("Enter the bonus code!");
//------------------------------------------
//@NewTask
//@TaskName: Glowslinging Team
GoPage('team');
if (DocTest("Lil\' Ro Lvl. 3"))
TeamChange("Nadeshiko", "Mr. Smith", "Lil\' Ro");
else if (DocTest("Bucketface"))
TeamChange("Nadeshiko", "Mr. Smith", "Bucketface");
else
TeamChange("Nadeshiko", "Mr. Smith", "Bruce Sr.");
//------------------------------------------
//@NewTask
//@TaskName: Glowsling!
GoPage('glowslinging');
IncrementTaskIf(DocTest("<b>Out of Duels!</b>"));
// Get a PoA duel
if (FormTest('startsling2'))
{
var res = /Duels remaining: <font[^>]*>(\d+)</.exec(document.body.innerHTML);
FormSetValue(null, 'multifight', res[1]);
FormCheck(null, 'choosearea', 'a10');
FormSubmit('startsling2');
}
// Yes I actually want to fight
if (FormTest('gosling'))
FormSubmit('gosling');
if (FormTest('goslinag'))
FormSubmit('goslinag');
//////////////////////////////////
// Glowslinging strategy here ////
//////////////////////////////////
var risk = parseInt(/Your Risk: <b>(\d+)<\/b>/.exec(document.body.innerHTML)[1], 10);
var myspin = parseInt(/Your Spin: <b>(\d+)<\/b>/.exec(document.body.innerHTML)[1], 10);
var oppspin = parseInt(/Their Spin: <b>(\d+)<\/b>/.exec(document.body.innerHTML)[1], 10);
if (oppspin - myspin >= 2)
FormCheck(null, 'exausage', 'J'); // Mystic Eyes
if (risk >= 2)
FormCheck(null, 'slingaction', '4'); // WR
else
FormCheck(null, 'slingaction', '1'); // FA
FormSubmit('slingact');
//------------------------------------------
//@NewTask
//@TaskName: Bingo Team
TeamChange("Palmface", "The Paper", "Venus");
//------------------------------------------
//@NewTask
//@TaskName: Daily Bingo
GoPage('bingo');
// Select a village
if (LocationTest("bingo.html"))
{
var check = document.forms.namedItem("lookinto").elements; //pull data
var Max = Math.min(check.length,10); //determine the number of villages
var Rnd = Math.floor(Math.random()*Max+2); //pick a random village
check[Rnd].setAttribute("checked","checked") // check it
FormSubmit("lookinto")
}
// Select
if (LocationTest("bingovillage.html"))
{
//pull data
var Check = document.forms.namedItem("lookinto").elements;
//determine number of targets
var Villagers = Check.length - 4;
//pull stats
var Stattab = document.getElementsByTagName("Table")[10];
var Genrange = parseInt(/1-(\d+)/.exec(Stattab.rows[8].innerHTML)[1]);
var Ninrange = parseInt(/1-(\d+)/.exec(Stattab.rows[9].innerHTML)[1]);
var Tairange = parseInt(/1-(\d+)/.exec(Stattab.rows[10].innerHTML)[1]);
var Range = Math.min(Genrange,Ninrange,Tairange)
var Bingotab = document.getElementsByTagName("Table")[9]; // pull targets
for(i=1;i<=Villagers;i++)
{
var Tdiff = parseInt(/\d+/.exec(Bingotab.rows[i].cells[4].innerHTML));
if(Range>=Tdiff)
{
Check[i+3].setAttribute("checked","checked");
FormSubmit("lookinto");
}
}
// Go back to village page if no good targets available
FormSubmit("lookinto2");
}
// Bingo Tracking
if(LocationTest("bingotrack"))
{
if(FormTest("lookinto"))
FormSubmit("lookinto");
else
FormSubmit("bingofight");
}
if (LocationTest("bingofight"))
{
IncrementTaskIf(DocTest("You Win!"));
if(DocTest("Write their name"))
{
// Notepage if available
FormCheck(null,'usejutsu',jutsus.EDUT.code);
FormCheck(null,'notepage',null);
}
else
FormCheck(null,'usejutsu',jutsus.AOTNS.code); // Default attack
// Lost bingo, try again
if(DocTest("They strike you down, and laugh as they escape into the shadows!"))
FormSubmit("bingogo");
// Attack!
FormSubmit("attack");
}
//----------------------------------
//@NewTask
//@TaskName: Solo Team
GoPage('team');
IncrementTaskIf(DocTest('<b>-Current Team-</b><br><b>Solo</b> - no Teammates, no Bonus'));
if (FormTest('conteam'))
FormSubmit('conteam');
if (FormTest('maketeam'))
FormSubmit('maketeam');
//----------------------------------
//@NewTask
//@TaskName: Blackstones Concert
GoPage('village');
IncrementTaskIf(!FormTest('blackstones'));
FormSubmit('blackstones');
//----------------------------------
//@NewTask
//@TaskName: Lemonaid Stand
GoPage('village');
IncrementTaskIf(!FormTest('lemonaid'));
FormSubmit('lemonaid');
//----------------------------------
//@NewTask
//@TaskName: Dice Altar
/*TODO add a check if they want to roll and which setting*/
GoPage('village');
IncrementTaskIf(!FormTest('dicetime'));
FormSubmit('dicetime');
//----------------------------------
//@NewTask
//@TaskName: Get your learn on
GoPage('village');
IncrementTaskIf(DocTest('You already Got your Learn On today!'));
FormSubmit('pandtime');
//------------------------------------------
//@NewTask
//@TaskName: Chillax, Bro.
GoPage('village');
IncrementTaskIf(!FormTest('brotime'));
FormSubmit("brotime");
//------------------------------------------
//@NewTask
//@TaskName: Hunt Ingredients
GoPage('village');
IncrementTaskIf(DocTest("Already Searched Today!"));
// Helper function
function CheckCollectionArea(area)
{
//check if an area was entered and if the area is available
//if not return the default
if(area == "" || !FormTest(area) return "forest";
//else return the area
return area
}
var player = document.getElementsByName("player")[1].value;
if(player == actiondata.alt1)
FormCheck(null,'ingredientplace',CheckCollectionArea(actiondata.ingredient1));
else if(player == actiondata.alt2)
FormCheck(null,'ingredientplace',CheckCollectionArea(actiondata.ingredient2));
else if(player == actiondata.alt3)
FormCheck(null,'ingredientplace',CheckCollectionArea(actiondata.ingredient3));
else FormCheck(null,'ingredientplace', "forest");
FormSubmit("ingredienthunt");
//------------------------------------------
//@NewTask
//@TaskName: Village Action
GoPage('village');
IncrementTaskIf(DocTest("You are helping a Village out today!") ||
DocTest("You are already helping out your Village today!"));
// Helper function
function CompoundAction(actionA, actionB)
{
// Do paperwork while upkeep is still positive.
if(actionA == "paperwork")
{
var upkeep = /Current Upkeep\D+(\d+)/g.exec(document.body.innerHTML)[1];
var paper = /Paperwork\D+(\d+)%/g.exec(document.body.innerHTML)[1];
return(upkeep - paper > 0? actionA:actionB);
}
// A common request is to collect until 100% basic, then do something else.
if(actionA == "rescol")
{
var chance = /Chance of finding a Resource\D+(\d+)/g.exec(document.body.innerHTML)[1];
return(chance < 100? actionA:actionB);
}
// If your first action wasn't one of the above, it's always used.
return actionA;
}
// Helper function
function VillageAction(actionA, actionB)
{
//If no actions found, set to default.
if(!actionA && !actionB)
return CompoundAction("paperwork", "rescol");
//If at least one action found, but neither action is usable:
if(!FormTest(actionA) && !FormTest(actionB))
if(confirm("Actions unusable or invalid. Use default actions?" +'\n'+ "Note: Default is paperwork until 0 upkeep, then collect."))
return CompoundAction("paperwork", "rescol");
else
ShowMsg();
//If A is usable, but B is not:
if(FormTest(actionA) && !FormTest(actionB))
return actionA;
//If B is usable, but A is not:
if(!FormTest(actionA) && FormTest(actionB))
return actionB;
//If you get this far, meaning both A and B are usable:
return CompoundAction(actionA, actionB);
}
var player = document.getElementsByName("player")[1].value;
// Action data defined in SequenceCode at top of script
if(player == actiondata.alt1)
FormSubmit(VillageAction(actiondata.action1A, actiondata.action1B));
if(player == actiondata.alt2)
FormSubmit(VillageAction(actiondata.action2A, actiondata.action2B));
if(player == actiondata.alt3)
FormSubmit(VillageAction(actiondata.action3A, actiondata.action3B));
// If none of the above, just use the default.
FormSubmit(VillageAction());
//------------------------------------------
//@NewTask
//@TaskName: Ramen/Show Watchin Team
TeamChange("Sue", "Mister Tea", "Big Bo");
//------------------------------------------
//@NewTask
//@TaskName: Diet Ramens
GoPage('village');
IncrementTaskIf(DocTest("already swiped today!"));
FormCheck(null,'ramentobuy','app');
FormSubmit("ramen")
//------------------------------------------
//@NewTask
//@TaskName: Show Watchin
DoGenericQuest(new Quest("Watchin' Your Shows", 12+questnum_diff, 1), -1);
//------------------------------------------
//@NewTask
//@TaskName: TACOS Eating Team 1
TeamChange("TACOS", "Tsukasa", "Cipher");
//------------------------------------------
//@NewTask
//@TaskName: Eat TACOs with TACOS
GoPage('consumables');
if (!DocTest(">TACO</span>"))
ShowMsg("Out of TACOs! NOOOOOO")
var app = parseInt(/Appetite Remaining:\D+(\d+)/.exec(document.body.innerHTML)[1]); //pulls app
var numCiciTacos = Math.floor(60000 - app/10) % 6;
var numTACOSTacos = Math.floor( (app - 50*numCiciTacos) / 60);
IncrementTaskIf(numTACOSTacos == 0);
FormCheck(null, 'onetimeused', '712');
FormSetValue(null, 'onetimenumber', numTACOSTacos);
FormSubmit('otime');
//------------------------------------------
//@NewTask
//@TaskName: TACOS Eating Team 2
GoPage('team');
if (DocTest('Cici Lvl. 2'))
TeamChange("Cici");
else
TeamChange("Cici", "Lulu");
//------------------------------------------
//@NewTask
//@TaskName: Eat TACOs with Cici
GoPage('consumables');
if (!DocTest(">TACO</span>"))
ShowMsg("Out of TACOs! NOOOOOO")
var app = parseInt(/Appetite Remaining:\D+(\d+)/.exec(document.body.innerHTML)[1]); //pulls app
var numCiciTacos = Math.floor(60000 - app/10) % 6;
var numTACOSTacos = Math.floor( (app - 50*numCiciTacos) / 60);
IncrementTaskIf(numCiciTacos == 0);
FormCheck(null, 'onetimeused', '712');
FormSetValue(null, 'onetimenumber', numCiciTacos);
FormSubmit('otime');
//------------------------------------------
//@NewTask
//@TaskName: Moe Points team
TeamChange("Tsukasa", "Yuki-chan");
//------------------------------------------
//@NewTask
//@TaskName: Eat ninja-on
GoPage('consumables');
IncrementTaskIf(DocTest("<b>NinjaOn Used!</b>"));
FormCheck(null, 'onetimeused', '563');
FormSetValue(null, 'onetimenumber', '10');
FormSubmit('otime');
//------------------------------------------
//@NewTask
//@TaskName: Buy TsukiArena fights
GoPage('ph_tsukiball');
IncrementTaskIf(!FormCheck(null, 'tixtype', 'plastic'));
FormSubmit('skic');
//------------------------------------------
//@NewTask
//@TaskName: Arena Fight Team
TeamChange("Strawberry", "Bruce Jr.", "Good Boy");
//------------------------------------------
//@NewTask
//@TaskName: Use Arena Fights
GoPage('arena');
var fightcost = parseInt(/Current cost for <b>\d+<\/b> Fights: <b>(\d+) Ryo<\/b><br>/.exec(document.body.innerHTML)[1]);
if (fightcost < 10000)
{
FormSubmit("buyfights");
ShowMsg("Buying Fights"); // Halts execution
}
var numfights = parseInt(/<td>Battles Left today:.*<b>(\d+)<\/b>/.exec(document.body.innerHTML)[1],10);
IncrementTaskIf( numfights == 0 );
FormCheck(null, 'megaarena', null);
FormSubmit("arenafight");
//------------------------------------------
//@NewTask
//@TaskName: Help With Big Board
GoPage("ph_bigboard");
IncrementTaskIf(!DocTest("mainform4"));
for(i=1;i<=5;i++)
document.forms.namedItem("mainform4").elements[3+i].value = 11;
FormSubmit("mainform4");