Difference between revisions of "User talk:Cristiona/archive 1"
(spading...complete? day 1 of robots, yes.) |
m (Cristiona moved page User talk:Cristiona to User talk:Cristiona/archive 1: Old, out of date, etc.) |
||
(19 intermediate revisions by 4 users not shown) | |||
Line 7: | Line 7: | ||
====Spading...day 1.==== | ====Spading...day 1.==== | ||
− | 115 lanky | + | 115 lanky<br> |
− | 114 treaded | + | 114 treaded<br> |
− | 113 lanky | + | 113 lanky<br> |
− | 112 lanky | + | 112 lanky<br> |
− | 111 treaded | + | 111 treaded<br> |
− | 110 treaded | + | 110 treaded<br> |
to be finished later. --[[User:MagiNinjA|<font color=#701337><b>MN (#228)</b></font>]] <small>([[User talk:MagiNinjA|T]]|[[Special:Contributions/MagiNinjA|C]])</small> 22:57, 15 February 2008 (MST) | to be finished later. --[[User:MagiNinjA|<font color=#701337><b>MN (#228)</b></font>]] <small>([[User talk:MagiNinjA|T]]|[[Special:Contributions/MagiNinjA|C]])</small> 22:57, 15 February 2008 (MST) | ||
Line 18: | Line 18: | ||
It's a Brand New Day! (tm) | It's a Brand New Day! (tm) | ||
− | 149 lanky | + | 149 lanky<br> |
− | 148 lanky | + | 148 lanky<br> |
− | 147 treaded | + | 147 treaded<br> |
− | 146 lanky | + | 146 lanky<br> |
− | 145 lanky | + | 145 lanky<br> |
− | 144 lanky | + | 144 lanky<br> |
− | 143 lanky | + | 143 lanky<br> |
− | 142 treaded | + | 142 treaded<br> |
− | 141 treaded | + | 141 treaded<br> |
Okay, it looks like when you DON'T finish day 1 in one day (aka split it up like I did), then day 2 will not be given til next rollover. --[[User:MagiNinjA|<font color=#701337><b>MN (#228)</b></font>]] <small>([[User talk:MagiNinjA|T]]|[[Special:Contributions/MagiNinjA|C]])</small> 22:33, 16 February 2008 (MST) | Okay, it looks like when you DON'T finish day 1 in one day (aka split it up like I did), then day 2 will not be given til next rollover. --[[User:MagiNinjA|<font color=#701337><b>MN (#228)</b></font>]] <small>([[User talk:MagiNinjA|T]]|[[Special:Contributions/MagiNinjA|C]])</small> 22:33, 16 February 2008 (MST) | ||
+ | |||
+ | ====Day 2==== | ||
+ | 96 crawler<br> | ||
+ | 95 lanky<br> | ||
+ | 94 lanky<br> | ||
+ | 93 crawler<br> | ||
+ | 92 treaded<br> | ||
+ | 91 crawler<br> | ||
+ | 90 lanky<br> | ||
+ | <level up! 43 now.> | ||
+ | 103 lanky<br> | ||
+ | 102 crawler<br> | ||
+ | 101 lanky<br> | ||
+ | 100 lanky<br> | ||
+ | 99 crawler<br> | ||
+ | 98 crawler<br> | ||
+ | 97 treaded<br> | ||
+ | 96 crawler<br> | ||
+ | 95 lanky<br> | ||
+ | 94 treaded<br> | ||
+ | 93 crawler<br> | ||
+ | 92 lanky<br> | ||
+ | 91 treaded<br> | ||
+ | 90 treaded<br> | ||
+ | 89 treaded<br> | ||
+ | 88 treaded<br> | ||
+ | 87 crawler<br> | ||
+ | 86 treaded<br> | ||
+ | |||
+ | --[[User:MagiNinjA|<font color=#701337><b>MN (#228)</b></font>]] <small>([[User talk:MagiNinjA|T]]|[[Special:Contributions/MagiNinjA|C]])</small> 23:22, 19 February 2008 (MST) | ||
+ | |||
+ | ====Day 3==== | ||
+ | Oops. Stupid HTML. | ||
+ | |||
+ | 97 treaded - unsure of this one. :(<br> | ||
+ | 96 lanky<br> | ||
+ | 95 treaded - dernit! beaten up! :(<br> | ||
+ | |||
+ | Resume another day...I just can't feel it. --[[User:MagiNinjA|<font color=#701337><b>MN (#228)</b></font>]] <small>([[User talk:MagiNinjA|T]]|[[Special:Contributions/MagiNinjA|C]])</small> 21:59, 21 February 2008 (MST) | ||
+ | |||
+ | Day 3 Resume. | ||
+ | |||
+ | 54 gunboat<br> | ||
+ | 53 lanky<br> | ||
+ | 52 lanky<br> | ||
+ | 51 gunboat<br> | ||
+ | 50 lanky<br> | ||
+ | 49 crawler<br> | ||
+ | 48 treaded<br> | ||
+ | 47 treaded<br> | ||
+ | 46 crawler<br> | ||
+ | 45 gunboat<br> | ||
+ | 44 lanky<br> | ||
+ | 43 treaded<br> | ||
+ | 42 gunboat<br> | ||
+ | 41 GAH FORGOT<br> | ||
+ | 40 crawler<br> | ||
+ | 39 gunboat<br> | ||
+ | 38 crawler<br> | ||
+ | 37 gunboat<br> | ||
+ | 36 lanky<br> | ||
+ | 35 lanky<br> | ||
+ | 34 crawler<br> | ||
+ | 33 lanky<br> | ||
+ | 32 treaded<br> | ||
+ | 31 gunboat<br> | ||
+ | 30 lanky<br> | ||
+ | 29 gunboat<br> | ||
+ | 28 crawler<br> | ||
+ | 27 treaded<br> | ||
+ | 26 gunboat<br> | ||
+ | 25 treaded - damnit, beaten up<br> | ||
+ | 24 gunboat<br> | ||
+ | 23 crawler<br> | ||
+ | 22 treaded<br> | ||
+ | 21 gunboat<br> | ||
+ | |||
+ | Complete. --[[User:MagiNinjA|<font color=#701337><b>MN (#228)</b></font>]] <small>([[User talk:MagiNinjA|T]]|[[Special:Contributions/MagiNinjA|C]])</small> 22:17, 22 February 2008 (MST) | ||
+ | |||
+ | == To Cristiona: == | ||
+ | |||
+ | Hey I was wondering if I would be allowed to make a page on the hints given to chat by Ryme about the new UR. Please respond back either in game or here, thanks:) [[User:Hero of the universe|Hero of the universe]] 13:18, 26 February 2008 (MST) | ||
+ | :I don't see why not. Then again, it's not like I have the power to stop you. [[User:Cristiona|Cristiona]] | ||
+ | Aren't you the forum creator? [[User:Hero of the universe|Hero of the universe]] 20:35, 28 February 2008 (MST) | ||
+ | :Pardon me for barging in, but no. Olaf hosts the wiki. I think Cris is an admin, though. But, the initial question is a bit moot now... {{User:Zelandoni/sig}}21:23, 28 February 2008 (MST) | ||
+ | ::Not even. I'm just a normal user. [[User:Cristiona|Cristiona]] | ||
+ | Lol, ok. Just got that vibe but I guess not:) [[User:Hero of the universe|Hero of the universe]] 12:44, 29 February 2008 (MST) | ||
+ | |||
+ | ==April Fool's Data== | ||
+ | You are fighting an impractical jokester. | ||
+ | |||
+ | She's finds just about anything outrageously funny, but she's not particularly good at executing jokes because her plans are always so outrageous. They're also sometimes a little dangerous. You don't even want to know what she's planning to do with those roman candles. | ||
+ | :Your opponent attacks ... She positions a bucket so that when you approach the bucket tips and is supposed to drop paint on you. The bucket tips, and falls, hitting you in the head as well as coating you in paint. Joke's on you! She hits you for 3 + 1 () damage. | ||
+ | |||
+ | :Your opponent attacks ... She hits you with a snowball that she's kept in the freezer since January. Joke's on you! She hits you for 3 + 1 () damage. | ||
+ | |||
+ | :Your opponent attacks ... She stabs you with a retracting knife. Only it doesn't retract completely. Joke's on you! She hits you for 4 + 1 () damage. | ||
+ | |||
+ | You are fighting a practical joker. | ||
+ | |||
+ | This practical joker can dish it out, but he can't take it. Your attempts to return humor are met with violent outrage. | ||
+ | :Your opponent attacks ... She positions a bucket so that when you approach the bucket tips and is supposed to drop paint on you. The bucket tips, and falls, hitting you in the head as well as coating you in paint. Joke's on you! He hits you for 5 + 1 () damage. | ||
+ | |||
+ | :Your opponent attacks ... She stabs you with a retracting knife. Only it doesn't retract completely. Joke's on you! He hits you for 9 + 1 () damage. | ||
+ | |||
+ | |||
+ | Gadgeteer: Stalker Villain<br> | ||
+ | Psion: Mad Scientist Villain<br> | ||
+ | Elemental: Alchemist Villain<BR> | ||
+ | Naturalist: Brute Villain | ||
+ | |||
+ | |||
+ | ==GM Auto Adventure Script== | ||
+ | <nowiki> | ||
+ | |||
+ | // ==UserScript== | ||
+ | // @name Twilight Heros Adventure Script | ||
+ | // @namespace www.twilightheroes.com | ||
+ | // @description Autoadventureing for TH. | ||
+ | // @include http://www.twilightheroes.com/fight.php* | ||
+ | // ==/UserScript== | ||
+ | |||
+ | function Select_Value_Set(SelectName, Value) { | ||
+ | var SelectObject = document.getElementById(SelectName); | ||
+ | for(index = 0; | ||
+ | index < SelectObject.length; | ||
+ | index++) { | ||
+ | if(SelectObject[index].value == Value) | ||
+ | SelectObject.selectedIndex = index; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | function Select_Value_Set_Name(SelectName,which, Value) { | ||
+ | var SelectObject = document.getElementsByName(SelectName)[which]; | ||
+ | var found = false; | ||
+ | for(index = 0; | ||
+ | index < SelectObject.length; | ||
+ | index++) { | ||
+ | if(SelectObject[index].value == Value) | ||
+ | SelectObject.selectedIndex = index; | ||
+ | found = true; | ||
+ | } | ||
+ | return found; | ||
+ | } | ||
+ | |||
+ | function generateStratList () { | ||
+ | var stratList = new Array(); | ||
+ | //List of attack types, any string Specification string. Each attack is seperated by a semicolon and if there is a skill use the id follows the S. | ||
+ | //A = normal attack | ||
+ | //S:ID = use a skill with the appropriate ID following the colon | ||
+ | //IS:ID = perform the attack a specific number of times and then just use attack. Right now IS must be the only option if its being used so you can't | ||
+ | // put something like 'IS:152;A;IS:133' since you wouldn't know which IS block | ||
+ | stratList['TK To Death'] = 'S:153'; | ||
+ | stratList['Attack then TK To Death'] = 'A;S:153'; | ||
+ | stratList['MJ to Death'] = 'S:156'; | ||
+ | stratList['PB, Mj to Death'] = 'S:163;S:156'; | ||
+ | stratList['Telek for '] = 'IS:153'; | ||
+ | stratList['MindJab for '] = 'IS:156'; | ||
+ | stratList['Psionic Blast for '] = 'IS:163'; | ||
+ | stratList['Stun Gas for '] = 'IS:101'; | ||
+ | stratList['Bovine Charge for '] = 'IS:52'; | ||
+ | stratList['Electric Net for '] = 'IS:109'; | ||
+ | stratList['Firestorm for '] = 'IS:12'; | ||
+ | stratList['Groundquake for '] = 'IS:4'; | ||
+ | stratList['Ice Bolt for '] = 'IS:3'; | ||
+ | stratList['Lightning Bolt for '] = 'IS:6'; | ||
+ | stratList['Shock Grenade for '] = 'IS:113'; | ||
+ | stratList['Throw Sparks for '] = 'IS:1'; | ||
+ | stratList['Tornadoe for '] = 'IS:9'; | ||
+ | stratList['Rhino Trample for '] = 'IS:60'; | ||
+ | |||
+ | var htmlStrat = '\n<SELECT id="Strat" onchange="updateAttackControls();">'; | ||
+ | htmlStrat += '<OPTION VALUE="A">Attack Only</OPTION>'; | ||
+ | for (keys in stratList) { | ||
+ | htmlStrat += '<OPTION VALUE="'+stratList[keys]+'">'+keys+'</OPTION>'; | ||
+ | } | ||
+ | |||
+ | htmlStrat += '</SELECT>'; | ||
+ | htmlStrat += '\n<script>function updateAttackControls() { '+ | ||
+ | '\nvar strat = document.getElementById(\'Strat\'); '+ | ||
+ | '\nvar actionstuff = strat[strat.selectedIndex].value.split(\';\'); '+ | ||
+ | '\nvar possible = actionstuff[0].split(\':\'); '+ | ||
+ | '\nif (possible[0] == \'IS\') { '+ | ||
+ | '\n document.getElementById(\'control\').innerHTML = \'<input type="text" maxlength="5" size="2" id="maxAttacks"> rounds then attack.\'; '+ | ||
+ | '\n } else { '+ | ||
+ | '\n document.getElementById(\'control\').innerHTML = \'\'; '+ | ||
+ | '\n } '+ | ||
+ | '\n} '+ | ||
+ | '</script> '+ | ||
+ | ''; | ||
+ | return htmlStrat; | ||
+ | } | ||
+ | |||
+ | function updateAttackControls() { | ||
+ | var strat = document.getElementById('Strat'); | ||
+ | var actionstuff = strat[strat.selectedIndex].value.split(';'); | ||
+ | var possible = actionstuff[0].split(':'); | ||
+ | if (possible[0] == 'IS') { | ||
+ | var currentRound = (GM_getValue('roundNumber',0) < 0? 0:GM_getValue('roundNumber',0)); | ||
+ | var attacksLeft = GM_getValue('maxAttacks',0) - (currentRound); | ||
+ | attacksLeft = (attacksLeft < 0?0:attacksLeft); | ||
+ | document.getElementById('control').innerHTML = '<input type="text" maxlength="5" size="2" id="maxAttacks" '+(GM_getValue('maxAttacks',0)!=0?'value="'+GM_getValue('maxAttacks',0)+'"':'value="0"')+'> rounds then attack.'+ | ||
+ | ' <br> rounds for skill use left : '+attacksLeft; | ||
+ | } else { | ||
+ | document.getElementById('control').innerHTML = ''; | ||
+ | } | ||
+ | } | ||
+ | function stepToNextRound() { | ||
+ | //we havent won and we are still running | ||
+ | var nonComName = getNonCombatName(); | ||
+ | GM_log(' in the step to Next round the noncom name is '+nonComName); | ||
+ | var nextButton = getNextButton(nonComName); | ||
+ | GM_log('found the button '+nextButton); | ||
+ | //Save the strat to use | ||
+ | var strat = document.getElementById('Strat'); | ||
+ | GM_setValue('selectedStrat',strat[strat.selectedIndex].value); | ||
+ | GM_log('Selected Strategy is '+strat[strat.selectedIndex].value); | ||
+ | nextButton.click(); | ||
+ | } | ||
+ | |||
+ | function stepToNextCombat() { | ||
+ | //window.location = 'http://www.twilightheroes.com/fight.php?location=22'; | ||
+ | var searchy = find('.//td[contains(.,"Patrol again")]'); | ||
+ | if (searchy != null) { | ||
+ | var linkk = find('.//a',searchy); | ||
+ | window.location = linkk; | ||
+ | //GM_log(" found element "+linkk); | ||
+ | //GM_log(" found element "+searchy); | ||
+ | |||
+ | //Save the strat to use | ||
+ | var strat = document.getElementById('Strat'); | ||
+ | GM_setValue('selectedStrat',strat[strat.getSelectedIndex].value); | ||
+ | |||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | function endOfTurn() { | ||
+ | //window.location = 'http://www.twilightheroes.com/fight.php?location=22'; | ||
+ | var searchy = find('.//td[contains(.,"Patrol again")]'); | ||
+ | if (searchy != null) { | ||
+ | var linkk = find('.//a',searchy); | ||
+ | //GM_log('end of adventure'); | ||
+ | |||
+ | if (linkk != null) { | ||
+ | //GM_log('end of adventure2'); | ||
+ | return true; | ||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | return false; | ||
+ | } | ||
+ | |||
+ | function idEncounter() { | ||
+ | var combatIndicator = find('.//h1[1]'); | ||
+ | var nonCombatIndicator = find('.//h2[1]'); | ||
+ | |||
+ | var type = null; | ||
+ | if (combatIndicator != null) { | ||
+ | GM_log(" found type combat "+combatIndicator.innerHTML); | ||
+ | if ('Combat!' == combatIndicator.innerHTML) { | ||
+ | type = 'combat' | ||
+ | } | ||
+ | } | ||
+ | if (nonCombatIndicator != null) { | ||
+ | if (endOfTurn()) { | ||
+ | GM_log(" found type non-combat "+nonCombatIndicator.innerHTML); | ||
+ | type='non-combat'; | ||
+ | } else { | ||
+ | GM_log(" found type choice-non-combat "+nonCombatIndicator.innerHTML); | ||
+ | type='choice-non-combat'; | ||
+ | } | ||
+ | } | ||
+ | return type; | ||
+ | } | ||
+ | |||
+ | function getNonCombatName() { | ||
+ | |||
+ | var nonCombatIndicator = find('.//h2[1]'); | ||
+ | |||
+ | var nonname; | ||
+ | if (nonCombatIndicator != null) { | ||
+ | |||
+ | nonname = nonCombatIndicator.innerHTML; | ||
+ | } | ||
+ | GM_log(" found type choice-non-combat "+nonname); | ||
+ | return nonname; | ||
+ | } | ||
+ | |||
+ | function getNextButton(nonCombatName) { | ||
+ | GM_log('Non combat name '+nonCombatName); | ||
+ | var nonComChoice = new Array(); | ||
+ | |||
+ | //Config the choice combats | ||
+ | // | ||
+ | //nonComChoice["Crime Never Sleeps ... or Does It?"+"choice"] = "1"; //Pick up Litter | ||
+ | //nonComChoice["Crime Never Sleeps ... or Does It?"+"choice"] = "2"; //Catch up with friend | ||
+ | nonComChoice["Crime Never Sleeps ... or Does It?"+"choice"] = "3"; //Keep Walking | ||
+ | |||
+ | nonComChoice["Crime Never Sleeps ... or Does It?"+"submitvalue"] = "Make your choice"; //Pick up Litter | ||
+ | |||
+ | nonComChoice["Pick Yer Poison"+"choice"] = "1"; //caffeine | ||
+ | //nonComChoice["Pick Yer Poison"+"choice"] = "2"; //PP | ||
+ | //nonComChoice["Pick Yer Poison"+"choice"] = "3"; //SFA | ||
+ | |||
+ | nonComChoice["Pick Yer Poison"+"submitvalue"] = "What do you do?"; | ||
+ | |||
+ | //nonComChoice["Gotta Move Quick"+"choice"] = "3"; //??? | ||
+ | nonComChoice["Gotta Move Quick"+"choice"] = "4"; //backpack | ||
+ | //nonComChoice["Gotta Move Quick"+"choice"] = "5"; //unlock rooftops/nothing? | ||
+ | |||
+ | nonComChoice["Gotta Move Quick"+"submitvalue"] = "Think Fast!" | ||
+ | |||
+ | nonComChoice["Glove Slap, Baby"+"choice"] = "1"; //fight knight | ||
+ | //nonComChoice["Glove Slap, Baby"+"choice"] = "2"; //work the rep | ||
+ | //nonComChoice["Glove Slap, Baby"+"choice"] = "3"; //KFC | ||
+ | |||
+ | nonComChoice["Glove Slap, Baby"+"submitvalue"] = "What do you do?"; // | ||
+ | |||
+ | nonComChoice["A Dilemma of the Horns"+"choice"] = "6"; // money/rep | ||
+ | //nonComChoice["A Dilemma of the Horns"+"choice"] = "7"; //item | ||
+ | //nonComChoice["A Dilemma of the Horns"+"choice"] = "8"; //squat | ||
+ | |||
+ | nonComChoice["A Dilemma of the Horns"+"submitvalue"] = "What do you do?"; // | ||
+ | |||
+ | nonComChoice["Intermission"+"choice"] = "1"; // Exit stage left | ||
+ | //nonComChoice["Intermission"+"choice"] = "2"; //Exit stage right | ||
+ | //nonComChoice["Intermission"+"choice"] = "3"; //Exit fourth wall | ||
+ | |||
+ | nonComChoice["Intermission"+"submitvalue"] = "Pick Your Exit"; | ||
+ | |||
+ | ///nonComChoice["Shipping Clerk"+"choice"] = "1"; // lousy caf | ||
+ | //nonComChoice["Shipping Clerk"+"choice"] = "2"; //money/rep | ||
+ | nonComChoice["Shipping Clerk"+"choice"] = "3"; //xp | ||
+ | |||
+ | nonComChoice["Shipping Clerk"+"submitvalue"] = "What do you do?"; | ||
+ | |||
+ | nonComChoice["Two Paths Diverged in a Prehistoric Wood"+"choice"] = "1"; // pegasus - or fight if the option doesn't exist | ||
+ | //nonComChoice["Two Paths Diverged in a Prehistoric Wood"+"choice"] = "2"; //lame item | ||
+ | //nonComChoice["Two Paths Diverged in a Prehistoric Wood"+"choice"] = "3"; //lame item 2 | ||
+ | |||
+ | nonComChoice["Two Paths Diverged in a Prehistoric Wood"+"submitvalue"] = "What do you do?"; | ||
+ | |||
+ | //Castle Non combats | ||
+ | nonComChoice["Forgot to Mention the Crystal Skulls"+"choice"] = "5"; | ||
+ | //nonComChoice["Forgot to Mention the Crystal Skulls"+"choice"] = "6"; | ||
+ | //nonComChoice["Forgot to Mention the Crystal Skulls"+"choice"] = "7"; | ||
+ | nonComChoice["Forgot to Mention the Crystal Skulls"+"submitvalue"] = "Make your choice"; | ||
+ | |||
+ | //nonComChoice["Behind Door Number Three ..."+"choice"] = "1"; //Grab Nearest | ||
+ | //nonComChoice["Behind Door Number Three ..."+"choice"] = "2"; //Investigate | ||
+ | //nonComChoice["Behind Door Number Three ..."+"choice"] = "3"; //Check the experimental | ||
+ | nonComChoice["Behind Door Number Three ..."+"choice"] = "4"; //Forget | ||
+ | nonComChoice["Behind Door Number Three ..."+"submitvalue"] = "Go with the plan"; | ||
+ | |||
+ | var nextButton; | ||
+ | if (nonCombatName != null) { | ||
+ | GM_log(" non combat value is "+nonComChoice[nonCombatName+"choice"]); | ||
+ | var radiochoice = find('.//input[@type="radio" and @name="choice" and @value="'+nonComChoice[nonCombatName+"choice"]+'"]'); | ||
+ | var radiosetchoice = find('.//input[@type="radio" and @name="choice" and @value="4"]'); | ||
+ | if (radiosetchoice != null) { | ||
+ | radiosetchoice.checked=true;} | ||
+ | else{ | ||
+ | //GM_log('attempting to use this choice '+radiochoice.value); | ||
+ | if (radiochoice != null) { | ||
+ | radiochoice.checked=true;}} | ||
+ | nextButton=find('.//input[@type="submit" and @value="'+nonComChoice[nonCombatName+"submitvalue"]+'"]'); | ||
+ | GM_log(" Found noncombat button "+nextButton); | ||
+ | } else { | ||
+ | //Handle combat options | ||
+ | var strategy = GM_getValue('selectedStrat','A').split(';'); | ||
+ | var round = (GM_getValue('roundNumber', 0)>=strategy.length?strategy.length-1:GM_getValue('roundNumber', 0)); | ||
+ | GM_log("round option "+strategy[round]); | ||
+ | var selectedAction = strategy[round].split(':'); | ||
+ | //GM_log("round option option "+selectedAction[0]+' With option '+selectedAction[1]); | ||
+ | if (selectedAction[0]=='A') { | ||
+ | nextButton=find('.//input[@type="submit" and contains(@value,"Attack")]');} | ||
+ | else if (selectedAction[0]=='S') { | ||
+ | nextButton=find('.//input[@type="submit" and contains(@value,"Skill")]'); | ||
+ | if (!Select_Value_Set_Name('pickwhich',0,selectedAction[1])) { | ||
+ | //If there is no action to select then fall back to attack | ||
+ | nextButton=find('.//input[@type="submit" and contains(@value,"Attack")]');} } | ||
+ | else if (selectedAction[0]=='IS') { | ||
+ | var currentRound = (GM_getValue('roundNumber',0) < 0? 0:GM_getValue('roundNumber',0)); | ||
+ | var attacksLeft = GM_getValue('maxAttacks',0) - (currentRound); | ||
+ | if (attacksLeft > 0) { | ||
+ | nextButton=find('.//input[@type="submit" and contains(@value,"Skill")]'); | ||
+ | if (!Select_Value_Set_Name('pickwhich',0,selectedAction[1])) { | ||
+ | //If there is no action to select then fall back to attack | ||
+ | nextButton=find('.//input[@type="submit" and contains(@value,"Attack")]');}} | ||
+ | else { | ||
+ | nextButton=find('.//input[@type="submit" and contains(@value,"Attack")]');}} | ||
+ | else if (selectedAction[0]=='I') { | ||
+ | nextButton=find('.//input[@type="submit" and contains(@value,"Item")]'); | ||
+ | if (!Select_Value_Set_Name('pickwhich',1,selectedAction[1])) { | ||
+ | //If there is no action to select then fall back to attack | ||
+ | nextButton=find('.//input[@type="submit" and contains(@value,"Attack")]');}}} | ||
+ | return nextButton;} | ||
+ | |||
+ | //GM_log("encounter is "+idEncounter()); | ||
+ | //idEncounter(); | ||
+ | var imageTD = find('.//img[@border="3"]/..'); | ||
+ | if (imageTD) { | ||
+ | |||
+ | var victory = /Victory!/; | ||
+ | var loss = / /; | ||
+ | //GM_log(imageTD.tagName); | ||
+ | var last = find('./*[last()]',imageTD); | ||
+ | //GM_log(last.tagName); | ||
+ | var weWon = victory.exec(document.body.innerHTML); | ||
+ | |||
+ | var advTable = document.createElement("table"); | ||
+ | var advRow = document.createElement("tr"); | ||
+ | var advCell = document.createElement("td"); | ||
+ | var buttontype= null; | ||
+ | var displayRound = null; | ||
+ | |||
+ | if (endOfTurn()) { | ||
+ | //clean up from a victory | ||
+ | //GM_setValue('running',false); | ||
+ | |||
+ | GM_setValue('turnsLeft',GM_getValue('turnsLeft',0)-1); | ||
+ | |||
+ | var round = GM_getValue('roundNumber',-1)+1; | ||
+ | displayRound= round; | ||
+ | GM_setValue('roundNumber', -1); | ||
+ | if (GM_getValue('running',false)&&(GM_getValue('turnsLeft',false) > 0)){ | ||
+ | //Victory and we need to patrol again, find the hyperlink and navigate to it. | ||
+ | GM_setValue('delayID',setTimeout(stepToNextCombat,30)); | ||
+ | } else { | ||
+ | //at the end of the turns. | ||
+ | GM_setValue('running',false); | ||
+ | } | ||
+ | |||
+ | } else { | ||
+ | //Update the round count | ||
+ | |||
+ | var round = GM_getValue('roundNumber',-1)+1; | ||
+ | //GM_log('round '+round); | ||
+ | GM_setValue('roundNumber', round); | ||
+ | displayRound= GM_getValue('roundNumber', -1); | ||
+ | |||
+ | } | ||
+ | |||
+ | if (GM_getValue('turnsLeft',false) <= 0) { | ||
+ | GM_setValue('running',false); | ||
+ | } | ||
+ | |||
+ | if (GM_getValue('running',false)) { | ||
+ | buttontype = '<br><input type="button" id="stop" value="Stop">'; | ||
+ | } else { | ||
+ | buttontype = '<br><input type="button" id="start" value="Click to Start">'; | ||
+ | |||
+ | } | ||
+ | advCell.innerHTML= 'Battle Computer : Combat Round '+displayRound + | ||
+ | '<br> <input type="text" maxlength="5" id="turns" value="'+(GM_getValue('turnsLeft',false)?GM_getValue('turnsLeft',false):'0')+ | ||
+ | '">'+generateStratList()+'<div id="control"></div>'+ | ||
+ | buttontype; | ||
+ | advRow.insertBefore(advCell,null); | ||
+ | advTable.insertBefore(advRow,null); | ||
+ | imageTD.insertBefore(advTable,null); | ||
+ | Select_Value_Set('Strat',GM_getValue('selectedStrat','A')); //Default to attack if theres no selected strat. | ||
+ | updateAttackControls(); | ||
+ | //(weWon?weWon[0]:''); | ||
+ | |||
+ | |||
+ | if (document.getElementById("start")) { | ||
+ | document.getElementById("start").addEventListener("click",rockIt,true); | ||
+ | } | ||
+ | if (document.getElementById("stop")) { | ||
+ | document.getElementById("stop").addEventListener("click",shutDown,true); | ||
+ | } | ||
+ | |||
+ | if ((weWon == null)&&(GM_getValue('running',false))) { | ||
+ | GM_setValue('delayID',setTimeout(stepToNextRound,20)); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | function find(xp,location) { | ||
+ | if(!location)location = document; | ||
+ | var temp = document.evaluate(xp, location, null, XPathResult.FIRST_ORDERED_NODE_TYPE,null); | ||
+ | return temp.singleNodeValue; | ||
+ | } | ||
+ | |||
+ | function rockIt() { | ||
+ | if (document.getElementById("turns").value <=0) return false; | ||
+ | GM_setValue("running", true); | ||
+ | |||
+ | var strat = document.getElementById('Strat'); | ||
+ | GM_setValue('selectedStrat',strat[strat.selectedIndex].value); | ||
+ | GM_setValue('turnsLeft',document.getElementById("turns").value); | ||
+ | if (document.getElementById("maxAttacks")) { | ||
+ | GM_setValue('maxAttacks',document.getElementById("maxAttacks").value); | ||
+ | } | ||
+ | //GM_setValue("turns_left", document.getElementById("turns").value-1); | ||
+ | //document.getElementsByName("heads")[0].click(); | ||
+ | var attackButton = find('.//input[@type="submit" and contains(@value,"Attack")]'); | ||
+ | //var attackButton = | ||
+ | if (endOfTurn()) { | ||
+ | stepToNextCombat(); | ||
+ | } | ||
+ | else if (attackButton) { | ||
+ | attackButton.click(); | ||
+ | |||
+ | } | ||
+ | } | ||
+ | |||
+ | function shutDown() { | ||
+ | //if (document.getElementById("turns").value <=0) return false; | ||
+ | GM_setValue("running", false); | ||
+ | |||
+ | var strat = document.getElementById('Strat'); | ||
+ | GM_setValue('selectedStrat',strat[strat.selectedIndex].value); | ||
+ | //GM_setValue("turns_left", document.getElementById("turns").value-1); | ||
+ | //document.getElementsByName("heads")[0].click(); | ||
+ | if (GM_getValue('delayID')) { | ||
+ | clearTimeout(GM_getValue('delayID')); | ||
+ | } | ||
+ | } | ||
+ | </nowiki> |
Latest revision as of 19:59, 7 August 2013
Sorry I didn't know how to make my character page and that was the only way I could figure out to get pictures on it. Also is this the right way to message each other?
- The pictures are elsewhere on the site. The easiest way to get badge images is just to go to the page in question and grab the filename from there. This is as good a way as any to send messages (in game might be better though, or responding on your talk page). Also, it's better if you sign your talk contributions; either use the button above (second from the right, looks like a signature), or to type four tildes: ~~~~. Cristiona
Contents
Text Dump
Trying robots when <12
You must be at least level 12 to go here. It's not level discrimination or anything, I would just hate to see you get moitalized by some vicious robots that are waaaay out of your league. Come back when you're stronger.
Spading...day 1.
115 lanky
114 treaded
113 lanky
112 lanky
111 treaded
110 treaded
to be finished later. --MN (#228) (T|C) 22:57, 15 February 2008 (MST)
It's a Brand New Day! (tm)
149 lanky
148 lanky
147 treaded
146 lanky
145 lanky
144 lanky
143 lanky
142 treaded
141 treaded
Okay, it looks like when you DON'T finish day 1 in one day (aka split it up like I did), then day 2 will not be given til next rollover. --MN (#228) (T|C) 22:33, 16 February 2008 (MST)
Day 2
96 crawler
95 lanky
94 lanky
93 crawler
92 treaded
91 crawler
90 lanky
<level up! 43 now.>
103 lanky
102 crawler
101 lanky
100 lanky
99 crawler
98 crawler
97 treaded
96 crawler
95 lanky
94 treaded
93 crawler
92 lanky
91 treaded
90 treaded
89 treaded
88 treaded
87 crawler
86 treaded
--MN (#228) (T|C) 23:22, 19 February 2008 (MST)
Day 3
Oops. Stupid HTML.
97 treaded - unsure of this one. :(
96 lanky
95 treaded - dernit! beaten up! :(
Resume another day...I just can't feel it. --MN (#228) (T|C) 21:59, 21 February 2008 (MST)
Day 3 Resume.
54 gunboat
53 lanky
52 lanky
51 gunboat
50 lanky
49 crawler
48 treaded
47 treaded
46 crawler
45 gunboat
44 lanky
43 treaded
42 gunboat
41 GAH FORGOT
40 crawler
39 gunboat
38 crawler
37 gunboat
36 lanky
35 lanky
34 crawler
33 lanky
32 treaded
31 gunboat
30 lanky
29 gunboat
28 crawler
27 treaded
26 gunboat
25 treaded - damnit, beaten up
24 gunboat
23 crawler
22 treaded
21 gunboat
Complete. --MN (#228) (T|C) 22:17, 22 February 2008 (MST)
To Cristiona:
Hey I was wondering if I would be allowed to make a page on the hints given to chat by Ryme about the new UR. Please respond back either in game or here, thanks:) Hero of the universe 13:18, 26 February 2008 (MST)
- I don't see why not. Then again, it's not like I have the power to stop you. Cristiona
Aren't you the forum creator? Hero of the universe 20:35, 28 February 2008 (MST)
- Pardon me for barging in, but no. Olaf hosts the wiki. I think Cris is an admin, though. But, the initial question is a bit moot now... ζειαηđδηǐ (τ|ϛ)21:23, 28 February 2008 (MST)
- Not even. I'm just a normal user. Cristiona
Lol, ok. Just got that vibe but I guess not:) Hero of the universe 12:44, 29 February 2008 (MST)
April Fool's Data
You are fighting an impractical jokester.
She's finds just about anything outrageously funny, but she's not particularly good at executing jokes because her plans are always so outrageous. They're also sometimes a little dangerous. You don't even want to know what she's planning to do with those roman candles.
- Your opponent attacks ... She positions a bucket so that when you approach the bucket tips and is supposed to drop paint on you. The bucket tips, and falls, hitting you in the head as well as coating you in paint. Joke's on you! She hits you for 3 + 1 () damage.
- Your opponent attacks ... She hits you with a snowball that she's kept in the freezer since January. Joke's on you! She hits you for 3 + 1 () damage.
- Your opponent attacks ... She stabs you with a retracting knife. Only it doesn't retract completely. Joke's on you! She hits you for 4 + 1 () damage.
You are fighting a practical joker.
This practical joker can dish it out, but he can't take it. Your attempts to return humor are met with violent outrage.
- Your opponent attacks ... She positions a bucket so that when you approach the bucket tips and is supposed to drop paint on you. The bucket tips, and falls, hitting you in the head as well as coating you in paint. Joke's on you! He hits you for 5 + 1 () damage.
- Your opponent attacks ... She stabs you with a retracting knife. Only it doesn't retract completely. Joke's on you! He hits you for 9 + 1 () damage.
Gadgeteer: Stalker Villain
Psion: Mad Scientist Villain
Elemental: Alchemist Villain
Naturalist: Brute Villain
GM Auto Adventure Script
// ==UserScript== // @name Twilight Heros Adventure Script // @namespace www.twilightheroes.com // @description Autoadventureing for TH. // @include http://www.twilightheroes.com/fight.php* // ==/UserScript== function Select_Value_Set(SelectName, Value) { var SelectObject = document.getElementById(SelectName); for(index = 0; index < SelectObject.length; index++) { if(SelectObject[index].value == Value) SelectObject.selectedIndex = index; } } function Select_Value_Set_Name(SelectName,which, Value) { var SelectObject = document.getElementsByName(SelectName)[which]; var found = false; for(index = 0; index < SelectObject.length; index++) { if(SelectObject[index].value == Value) SelectObject.selectedIndex = index; found = true; } return found; } function generateStratList () { var stratList = new Array(); //List of attack types, any string Specification string. Each attack is seperated by a semicolon and if there is a skill use the id follows the S. //A = normal attack //S:ID = use a skill with the appropriate ID following the colon //IS:ID = perform the attack a specific number of times and then just use attack. Right now IS must be the only option if its being used so you can't // put something like 'IS:152;A;IS:133' since you wouldn't know which IS block stratList['TK To Death'] = 'S:153'; stratList['Attack then TK To Death'] = 'A;S:153'; stratList['MJ to Death'] = 'S:156'; stratList['PB, Mj to Death'] = 'S:163;S:156'; stratList['Telek for '] = 'IS:153'; stratList['MindJab for '] = 'IS:156'; stratList['Psionic Blast for '] = 'IS:163'; stratList['Stun Gas for '] = 'IS:101'; stratList['Bovine Charge for '] = 'IS:52'; stratList['Electric Net for '] = 'IS:109'; stratList['Firestorm for '] = 'IS:12'; stratList['Groundquake for '] = 'IS:4'; stratList['Ice Bolt for '] = 'IS:3'; stratList['Lightning Bolt for '] = 'IS:6'; stratList['Shock Grenade for '] = 'IS:113'; stratList['Throw Sparks for '] = 'IS:1'; stratList['Tornadoe for '] = 'IS:9'; stratList['Rhino Trample for '] = 'IS:60'; var htmlStrat = '\n<SELECT id="Strat" onchange="updateAttackControls();">'; htmlStrat += '<OPTION VALUE="A">Attack Only</OPTION>'; for (keys in stratList) { htmlStrat += '<OPTION VALUE="'+stratList[keys]+'">'+keys+'</OPTION>'; } htmlStrat += '</SELECT>'; htmlStrat += '\n<script>function updateAttackControls() { '+ '\nvar strat = document.getElementById(\'Strat\'); '+ '\nvar actionstuff = strat[strat.selectedIndex].value.split(\';\'); '+ '\nvar possible = actionstuff[0].split(\':\'); '+ '\nif (possible[0] == \'IS\') { '+ '\n document.getElementById(\'control\').innerHTML = \'<input type="text" maxlength="5" size="2" id="maxAttacks"> rounds then attack.\'; '+ '\n } else { '+ '\n document.getElementById(\'control\').innerHTML = \'\'; '+ '\n } '+ '\n} '+ '</script> '+ ''; return htmlStrat; } function updateAttackControls() { var strat = document.getElementById('Strat'); var actionstuff = strat[strat.selectedIndex].value.split(';'); var possible = actionstuff[0].split(':'); if (possible[0] == 'IS') { var currentRound = (GM_getValue('roundNumber',0) < 0? 0:GM_getValue('roundNumber',0)); var attacksLeft = GM_getValue('maxAttacks',0) - (currentRound); attacksLeft = (attacksLeft < 0?0:attacksLeft); document.getElementById('control').innerHTML = '<input type="text" maxlength="5" size="2" id="maxAttacks" '+(GM_getValue('maxAttacks',0)!=0?'value="'+GM_getValue('maxAttacks',0)+'"':'value="0"')+'> rounds then attack.'+ ' <br> rounds for skill use left : '+attacksLeft; } else { document.getElementById('control').innerHTML = ''; } } function stepToNextRound() { //we havent won and we are still running var nonComName = getNonCombatName(); GM_log(' in the step to Next round the noncom name is '+nonComName); var nextButton = getNextButton(nonComName); GM_log('found the button '+nextButton); //Save the strat to use var strat = document.getElementById('Strat'); GM_setValue('selectedStrat',strat[strat.selectedIndex].value); GM_log('Selected Strategy is '+strat[strat.selectedIndex].value); nextButton.click(); } function stepToNextCombat() { //window.location = 'http://www.twilightheroes.com/fight.php?location=22'; var searchy = find('.//td[contains(.,"Patrol again")]'); if (searchy != null) { var linkk = find('.//a',searchy); window.location = linkk; //GM_log(" found element "+linkk); //GM_log(" found element "+searchy); //Save the strat to use var strat = document.getElementById('Strat'); GM_setValue('selectedStrat',strat[strat.getSelectedIndex].value); } } function endOfTurn() { //window.location = 'http://www.twilightheroes.com/fight.php?location=22'; var searchy = find('.//td[contains(.,"Patrol again")]'); if (searchy != null) { var linkk = find('.//a',searchy); //GM_log('end of adventure'); if (linkk != null) { //GM_log('end of adventure2'); return true; } } return false; } function idEncounter() { var combatIndicator = find('.//h1[1]'); var nonCombatIndicator = find('.//h2[1]'); var type = null; if (combatIndicator != null) { GM_log(" found type combat "+combatIndicator.innerHTML); if ('Combat!' == combatIndicator.innerHTML) { type = 'combat' } } if (nonCombatIndicator != null) { if (endOfTurn()) { GM_log(" found type non-combat "+nonCombatIndicator.innerHTML); type='non-combat'; } else { GM_log(" found type choice-non-combat "+nonCombatIndicator.innerHTML); type='choice-non-combat'; } } return type; } function getNonCombatName() { var nonCombatIndicator = find('.//h2[1]'); var nonname; if (nonCombatIndicator != null) { nonname = nonCombatIndicator.innerHTML; } GM_log(" found type choice-non-combat "+nonname); return nonname; } function getNextButton(nonCombatName) { GM_log('Non combat name '+nonCombatName); var nonComChoice = new Array(); //Config the choice combats // //nonComChoice["Crime Never Sleeps ... or Does It?"+"choice"] = "1"; //Pick up Litter //nonComChoice["Crime Never Sleeps ... or Does It?"+"choice"] = "2"; //Catch up with friend nonComChoice["Crime Never Sleeps ... or Does It?"+"choice"] = "3"; //Keep Walking nonComChoice["Crime Never Sleeps ... or Does It?"+"submitvalue"] = "Make your choice"; //Pick up Litter nonComChoice["Pick Yer Poison"+"choice"] = "1"; //caffeine //nonComChoice["Pick Yer Poison"+"choice"] = "2"; //PP //nonComChoice["Pick Yer Poison"+"choice"] = "3"; //SFA nonComChoice["Pick Yer Poison"+"submitvalue"] = "What do you do?"; //nonComChoice["Gotta Move Quick"+"choice"] = "3"; //??? nonComChoice["Gotta Move Quick"+"choice"] = "4"; //backpack //nonComChoice["Gotta Move Quick"+"choice"] = "5"; //unlock rooftops/nothing? nonComChoice["Gotta Move Quick"+"submitvalue"] = "Think Fast!" nonComChoice["Glove Slap, Baby"+"choice"] = "1"; //fight knight //nonComChoice["Glove Slap, Baby"+"choice"] = "2"; //work the rep //nonComChoice["Glove Slap, Baby"+"choice"] = "3"; //KFC nonComChoice["Glove Slap, Baby"+"submitvalue"] = "What do you do?"; // nonComChoice["A Dilemma of the Horns"+"choice"] = "6"; // money/rep //nonComChoice["A Dilemma of the Horns"+"choice"] = "7"; //item //nonComChoice["A Dilemma of the Horns"+"choice"] = "8"; //squat nonComChoice["A Dilemma of the Horns"+"submitvalue"] = "What do you do?"; // nonComChoice["Intermission"+"choice"] = "1"; // Exit stage left //nonComChoice["Intermission"+"choice"] = "2"; //Exit stage right //nonComChoice["Intermission"+"choice"] = "3"; //Exit fourth wall nonComChoice["Intermission"+"submitvalue"] = "Pick Your Exit"; ///nonComChoice["Shipping Clerk"+"choice"] = "1"; // lousy caf //nonComChoice["Shipping Clerk"+"choice"] = "2"; //money/rep nonComChoice["Shipping Clerk"+"choice"] = "3"; //xp nonComChoice["Shipping Clerk"+"submitvalue"] = "What do you do?"; nonComChoice["Two Paths Diverged in a Prehistoric Wood"+"choice"] = "1"; // pegasus - or fight if the option doesn't exist //nonComChoice["Two Paths Diverged in a Prehistoric Wood"+"choice"] = "2"; //lame item //nonComChoice["Two Paths Diverged in a Prehistoric Wood"+"choice"] = "3"; //lame item 2 nonComChoice["Two Paths Diverged in a Prehistoric Wood"+"submitvalue"] = "What do you do?"; //Castle Non combats nonComChoice["Forgot to Mention the Crystal Skulls"+"choice"] = "5"; //nonComChoice["Forgot to Mention the Crystal Skulls"+"choice"] = "6"; //nonComChoice["Forgot to Mention the Crystal Skulls"+"choice"] = "7"; nonComChoice["Forgot to Mention the Crystal Skulls"+"submitvalue"] = "Make your choice"; //nonComChoice["Behind Door Number Three ..."+"choice"] = "1"; //Grab Nearest //nonComChoice["Behind Door Number Three ..."+"choice"] = "2"; //Investigate //nonComChoice["Behind Door Number Three ..."+"choice"] = "3"; //Check the experimental nonComChoice["Behind Door Number Three ..."+"choice"] = "4"; //Forget nonComChoice["Behind Door Number Three ..."+"submitvalue"] = "Go with the plan"; var nextButton; if (nonCombatName != null) { GM_log(" non combat value is "+nonComChoice[nonCombatName+"choice"]); var radiochoice = find('.//input[@type="radio" and @name="choice" and @value="'+nonComChoice[nonCombatName+"choice"]+'"]'); var radiosetchoice = find('.//input[@type="radio" and @name="choice" and @value="4"]'); if (radiosetchoice != null) { radiosetchoice.checked=true;} else{ //GM_log('attempting to use this choice '+radiochoice.value); if (radiochoice != null) { radiochoice.checked=true;}} nextButton=find('.//input[@type="submit" and @value="'+nonComChoice[nonCombatName+"submitvalue"]+'"]'); GM_log(" Found noncombat button "+nextButton); } else { //Handle combat options var strategy = GM_getValue('selectedStrat','A').split(';'); var round = (GM_getValue('roundNumber', 0)>=strategy.length?strategy.length-1:GM_getValue('roundNumber', 0)); GM_log("round option "+strategy[round]); var selectedAction = strategy[round].split(':'); //GM_log("round option option "+selectedAction[0]+' With option '+selectedAction[1]); if (selectedAction[0]=='A') { nextButton=find('.//input[@type="submit" and contains(@value,"Attack")]');} else if (selectedAction[0]=='S') { nextButton=find('.//input[@type="submit" and contains(@value,"Skill")]'); if (!Select_Value_Set_Name('pickwhich',0,selectedAction[1])) { //If there is no action to select then fall back to attack nextButton=find('.//input[@type="submit" and contains(@value,"Attack")]');} } else if (selectedAction[0]=='IS') { var currentRound = (GM_getValue('roundNumber',0) < 0? 0:GM_getValue('roundNumber',0)); var attacksLeft = GM_getValue('maxAttacks',0) - (currentRound); if (attacksLeft > 0) { nextButton=find('.//input[@type="submit" and contains(@value,"Skill")]'); if (!Select_Value_Set_Name('pickwhich',0,selectedAction[1])) { //If there is no action to select then fall back to attack nextButton=find('.//input[@type="submit" and contains(@value,"Attack")]');}} else { nextButton=find('.//input[@type="submit" and contains(@value,"Attack")]');}} else if (selectedAction[0]=='I') { nextButton=find('.//input[@type="submit" and contains(@value,"Item")]'); if (!Select_Value_Set_Name('pickwhich',1,selectedAction[1])) { //If there is no action to select then fall back to attack nextButton=find('.//input[@type="submit" and contains(@value,"Attack")]');}}} return nextButton;} //GM_log("encounter is "+idEncounter()); //idEncounter(); var imageTD = find('.//img[@border="3"]/..'); if (imageTD) { var victory = /Victory!/; var loss = / /; //GM_log(imageTD.tagName); var last = find('./*[last()]',imageTD); //GM_log(last.tagName); var weWon = victory.exec(document.body.innerHTML); var advTable = document.createElement("table"); var advRow = document.createElement("tr"); var advCell = document.createElement("td"); var buttontype= null; var displayRound = null; if (endOfTurn()) { //clean up from a victory //GM_setValue('running',false); GM_setValue('turnsLeft',GM_getValue('turnsLeft',0)-1); var round = GM_getValue('roundNumber',-1)+1; displayRound= round; GM_setValue('roundNumber', -1); if (GM_getValue('running',false)&&(GM_getValue('turnsLeft',false) > 0)){ //Victory and we need to patrol again, find the hyperlink and navigate to it. GM_setValue('delayID',setTimeout(stepToNextCombat,30)); } else { //at the end of the turns. GM_setValue('running',false); } } else { //Update the round count var round = GM_getValue('roundNumber',-1)+1; //GM_log('round '+round); GM_setValue('roundNumber', round); displayRound= GM_getValue('roundNumber', -1); } if (GM_getValue('turnsLeft',false) <= 0) { GM_setValue('running',false); } if (GM_getValue('running',false)) { buttontype = '<br><input type="button" id="stop" value="Stop">'; } else { buttontype = '<br><input type="button" id="start" value="Click to Start">'; } advCell.innerHTML= 'Battle Computer : Combat Round '+displayRound + '<br> <input type="text" maxlength="5" id="turns" value="'+(GM_getValue('turnsLeft',false)?GM_getValue('turnsLeft',false):'0')+ '">'+generateStratList()+'<div id="control"></div>'+ buttontype; advRow.insertBefore(advCell,null); advTable.insertBefore(advRow,null); imageTD.insertBefore(advTable,null); Select_Value_Set('Strat',GM_getValue('selectedStrat','A')); //Default to attack if theres no selected strat. updateAttackControls(); //(weWon?weWon[0]:''); if (document.getElementById("start")) { document.getElementById("start").addEventListener("click",rockIt,true); } if (document.getElementById("stop")) { document.getElementById("stop").addEventListener("click",shutDown,true); } if ((weWon == null)&&(GM_getValue('running',false))) { GM_setValue('delayID',setTimeout(stepToNextRound,20)); } } function find(xp,location) { if(!location)location = document; var temp = document.evaluate(xp, location, null, XPathResult.FIRST_ORDERED_NODE_TYPE,null); return temp.singleNodeValue; } function rockIt() { if (document.getElementById("turns").value <=0) return false; GM_setValue("running", true); var strat = document.getElementById('Strat'); GM_setValue('selectedStrat',strat[strat.selectedIndex].value); GM_setValue('turnsLeft',document.getElementById("turns").value); if (document.getElementById("maxAttacks")) { GM_setValue('maxAttacks',document.getElementById("maxAttacks").value); } //GM_setValue("turns_left", document.getElementById("turns").value-1); //document.getElementsByName("heads")[0].click(); var attackButton = find('.//input[@type="submit" and contains(@value,"Attack")]'); //var attackButton = if (endOfTurn()) { stepToNextCombat(); } else if (attackButton) { attackButton.click(); } } function shutDown() { //if (document.getElementById("turns").value <=0) return false; GM_setValue("running", false); var strat = document.getElementById('Strat'); GM_setValue('selectedStrat',strat[strat.selectedIndex].value); //GM_setValue("turns_left", document.getElementById("turns").value-1); //document.getElementsByName("heads")[0].click(); if (GM_getValue('delayID')) { clearTimeout(GM_getValue('delayID')); } }