Twilight Forums

Idle chat for wannabe heroes
It is currently Wed Jun 19, 2013 6:05 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 104 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: Fri Jul 01, 2011 12:25 am 
Offline
User avatar

Joined: Sun Apr 08, 2007 1:01 am
Posts: 4253
Location: the Conservatory with the lead pipe
I was wondering if someone could add "Summon Fortune Cookie" to the existing script that batch-uses *ouch items.

_________________
Image
The churches are empty / The priest has gone home / And we are left standing / Together alone
--October Project: "Dark Time"


Top
 Profile  
 
PostPosted: Thu Oct 13, 2011 8:43 pm 
Offline

Joined: Thu Nov 13, 2008 11:54 am
Posts: 108
Using the new Zillow improved auto-adventure script, I'm trying to code in a use ecto item, then star option.

Problem: each ecto item has a different item number. So when I plug them all in, it willl try to use each one, in order and if I don't have the item, it defaults to attack. Is there a way to get it coded so that it will just skip the item and move on to the next one in the list instead of switching to attack?

_________________
Image


Top
 Profile  
 
PostPosted: Fri Oct 14, 2011 6:06 am 
Offline

Joined: Tue Feb 12, 2008 1:22 pm
Posts: 1243
I asked the same thing. Zillow said he'd have to adjust the coding when he has time.

Oddly enough, that was one of the good things Heather's old script would do. If you had it coded to use an item you didn't have, it would just bring up the "you're trying to use an item you don't have screen" and move on to the next.


Top
 Profile  
 
PostPosted: Fri Oct 14, 2011 7:04 am 
Offline

Joined: Sat Jan 01, 2011 1:40 pm
Posts: 60
I changed the code for 'I' action to
Code:
      nextButton=find('.//input[@type="submit" and contains(@value,"Item")]');
      var ffound = false;
      for (var fidx = 1; fidx < selectedAction.length && !ffound; fidx++)
      {
         if (Select_Value_Set_Name('pickwhich',qqq-1,selectedAction[fidx]))
   {
      ffound = true;
   }
      }
      if(!ffound)
      {
        nextButton=find('.//input[@type="submit" and contains(@value,"Attack")]');
      }


and then the action is 'I:1766:1767:1768:1769:1770'

I also tried to add in an action to 'Q'uit (stop autoattacking, basically by calling shutDown()), but most of the time, one attack still gets through for some reason.


Top
 Profile  
 
PostPosted: Fri Oct 14, 2011 2:45 pm 
Offline

Joined: Thu Nov 13, 2008 11:54 am
Posts: 108
Thanks Kiv! that totally fixed my issues!

_________________
Image


Top
 Profile  
 
PostPosted: Mon Oct 17, 2011 7:40 am 
Offline

Joined: Tue Feb 12, 2008 1:22 pm
Posts: 1243
Where the heck do we put that code in? I'm not seeing the 'I' function anywhere.


Top
 Profile  
 
PostPosted: Mon Oct 17, 2011 10:19 am 
Offline

Joined: Sat Jan 01, 2011 1:40 pm
Posts: 60
It's not a function. It's where the current action (selectedAction[0]) is compared to the string 'I' (that's capital i), near the end of getNextButton.


Top
 Profile  
 
PostPosted: Tue Oct 18, 2011 7:36 am 
Offline

Joined: Tue Feb 12, 2008 1:22 pm
Posts: 1243
That didn't work for me at all. It still tries to attack when it's looking for an item that is not in my inventory.


Top
 Profile  
 
PostPosted: Tue Oct 18, 2011 10:08 am 
Offline

Joined: Sat Jan 01, 2011 1:40 pm
Posts: 60
Did you also change your action (to I:1766:1767:1768:1769:1770)?
You *do* have one of the ecto items in your invetory, right?
And you are only trying to use it *once* per combat?


Top
 Profile  
 
PostPosted: Tue Oct 18, 2011 11:59 am 
Offline

Joined: Tue Feb 12, 2008 1:22 pm
Posts: 1243
Yes, I have an ecto-item. I added the item numbers to the strategy I use, so that it listed all 5 ecto-items and then my throwing stars, and then finally attacking.


Top
 Profile  
 
PostPosted: Mon Oct 24, 2011 8:42 pm 
Offline
User avatar

Joined: Sun Apr 08, 2007 1:01 am
Posts: 4253
Location: the Conservatory with the lead pipe
Okay, I got it to work. If you're still confused:

Scroll down past all your stratlists and your noncom choices. You'll see a lot of code, one that should pop out is:

Code:
nextButton=find('.//input[@type="submit" and contains(@value,"Tame the Animal")]');


Go a few lines past that until you see:

Code:
nextButton=find('.//input[@type="submit" and contains(@value,"Item")]');
      if(!Select_Value_Set_Name('pickwhich',qqq-1,selectedAction[1]))
      {
        nextButton=find('.//input[@type="submit" and contains(@value,"Attack")]');
      }
    }
  }
  return nextButton;


Highlight xKiv's code down to the curly bracket right before the "@value,"Attack"" line, and paste it in. It should look like this when you're done:

Code:
nextButton=find('.//input[@type="submit" and contains(@value,"Item")]');
      var ffound = false;
      for (var fidx = 1; fidx < selectedAction.length && !ffound; fidx++)
      {
         if (Select_Value_Set_Name('pickwhich',qqq-1,selectedAction[fidx]))
   {
      ffound = true;
   }
      }
      if(!ffound)
      {
        nextButton=find('.//input[@type="submit" and contains(@value,"Attack")]');
      }
    }
  }
  return nextButton;


Then, scroll up to the stratList lines to plug in your ecto usage. For mine, I have:

Code:
stratList['Ecto, Star, then Attack To Death'] = 'I:1766:1767:1768:1769:1770:I:881;I:882:A'; //BH, Mag, attack


Works great.

_________________
Image
The churches are empty / The priest has gone home / And we are left standing / Together alone
--October Project: "Dark Time"


Top
 Profile  
 
PostPosted: Wed Oct 26, 2011 8:16 am 
Offline

Joined: Tue Feb 12, 2008 1:22 pm
Posts: 1243
Once I change the "Item" code, the stupid console for the script disappears from the page and I have to switch it back to the normal code for the script to be usable again.


Top
 Profile  
 
PostPosted: Wed Oct 26, 2011 10:40 am 
Offline

Joined: Sat Jan 01, 2011 1:40 pm
Posts: 60
Harry Dresden wrote:
Once I change the "Item" code, the stupid console for the script disappears from the page and I have to switch it back to the normal code for the script to be usable again.


You are introducing a syntax error somewhere, probably by ending the cut/paste at the wrong curly brace.

Larger code sample - this is how it looks in my version; at least the first line and 5 last lines (from return nextButton) should be exatly the same as in the original (this means that the last } is the first thing on its line!):
Code:
    } else if(selectedAction[0]=='I')
    {
      nextButton=find('.//input[@type="submit" and contains(@value,"Item")]');
      var ffound = false;
      for (var fidx = 1; fidx < selectedAction.length && !ffound; fidx++)
      {
         if (Select_Value_Set_Name('pickwhich',qqq-1,selectedAction[fidx]))
   {
      ffound = true;
   }
      }
      if(!ffound)
      {
        nextButton=find('.//input[@type="submit" and contains(@value,"Attack")]');
      }
    } else if (selectedAction[0]=='Q')
    {
      return null;
    }
  }
  return nextButton;
}

function Select_Value_Set(SelectName, Value)
{


Top
 Profile  
 
PostPosted: Thu Oct 27, 2011 7:51 am 
Offline

Joined: Tue Feb 12, 2008 1:22 pm
Posts: 1243
huh....I could have sworn I was making sure all the syntax was right. It's working now, though, so thanks!


Top
 Profile  
 
PostPosted: Sat Apr 07, 2012 5:03 pm 
Offline

Joined: Thu Sep 04, 2008 5:33 pm
Posts: 148
There's a small error with combat in the AA script when it sometimes tries to do an option twice. To fix it, at around line 310 you find: round=((round<=0)?0:round);
replace it with:
if(round < 0)
{
GM_setValue('roundNumber', 0);
round = 0;
}

_________________
Image


Top
 Profile  
 
PostPosted: Sat Apr 07, 2012 7:47 pm 
Offline
User avatar

Joined: Sun Apr 08, 2007 1:01 am
Posts: 4253
Location: the Conservatory with the lead pipe
So, in context, it should look like this?

Code:
var round =(GM_getValue('roundNumber', 0)>=strategy.length?strategy.length-1:GM_getValue('roundNumber', 0));
    //--round;
    if(round < 0)
{
GM_setValue('roundNumber', 0);
round=0;
}
    GM_log(round);
    var selectedAction = strategy[round].split(':');

_________________
Image
The churches are empty / The priest has gone home / And we are left standing / Together alone
--October Project: "Dark Time"


Top
 Profile  
 
PostPosted: Sat Apr 07, 2012 7:48 pm 
Offline

Joined: Thu Sep 04, 2008 5:33 pm
Posts: 148
Yep :)

_________________
Image


Top
 Profile  
 
PostPosted: Thu May 17, 2012 12:38 pm 
Offline
User avatar

Joined: Mon Dec 17, 2007 8:24 pm
Posts: 1234
Location: Baton Rouge, LA
I updated my AA script and Greasemonkey in an effort to get it fixed, and I lost my portion of the code for an attack strategy of "Firestorm to Death".

Can anyone help me out and tell me what code to put and where to put it?

Thanks in advance!

_________________
Image
I've won the 100k DD bet so many times, I should have the title "Mr. Luck"


Top
 Profile  
 
PostPosted: Thu May 17, 2012 6:11 pm 
Offline

Joined: Thu Jan 20, 2011 8:04 pm
Posts: 103
Corrupt Shadow wrote:
I updated my AA script and Greasemonkey in an effort to get it fixed, and I lost my portion of the code for an attack strategy of "Firestorm to Death".

Can anyone help me out and tell me what code to put and where to put it?

Thanks in advance!


Easiest way is to open up the AA script in a text editor, do a search for stratList, and insert something like this in the list:

Code:
stratList['Firestorm'] = 'IS:12';


That is an attack strategy that uses firestorm and nothing else. Hope that works for you!


Top
 Profile  
 
PostPosted: Fri May 18, 2012 8:20 am 
Offline
User avatar

Joined: Mon Dec 17, 2007 8:24 pm
Posts: 1234
Location: Baton Rouge, LA
That's it, mara! Thanks!

_________________
Image
I've won the 100k DD bet so many times, I should have the title "Mr. Luck"


Top
 Profile  
 
PostPosted: Sat Nov 10, 2012 2:33 pm 
Offline
User avatar

Joined: Wed Dec 29, 2010 4:10 pm
Posts: 38
Does anyone have an updated version of the Batch use *ouch items script that includes Professor Ouch's Satchel?


Top
 Profile  
 
PostPosted: Sat Nov 10, 2012 7:30 pm 
Offline

Joined: Mon Nov 19, 2007 6:29 pm
Posts: 1773
Location: Florida
Isladar wrote:
Does anyone have an updated version of the Batch use *ouch items script that includes Professor Ouch's Satchel?

I did, but then it broke because greasemonkey had a terrible bug that continually would reset my scripts to older versions. Seems to have cleared up now, but it works out better to do the satchel individually at the moment so I can run it again for level 55 summon items. Anyways, just add ";1926" after the 254 on line 13.

_________________
Leader of PFE league. If you wish to worship me, ask me about joining my secondary league Cult of Satan (the largest league in the game!).


Top
 Profile  
 
PostPosted: Sun Nov 11, 2012 6:28 am 
Offline
User avatar

Joined: Wed Dec 29, 2010 4:10 pm
Posts: 38
Thanks Satan!


Top
 Profile  
 
PostPosted: Tue Nov 20, 2012 6:50 am 
Offline
User avatar

Joined: Mon Nov 16, 2009 11:48 am
Posts: 213
I was trying to make the early distant warning script check for a shot blanket, but I couldn't make it return the proper message when the short version is present so, if you just want to add a reminder to that box you just need to add:

Code:
'<span id="blanket"><br />Check your <a href=\"/use.php?filter=instant\">blanket</a>!</span> <br />' +


IN this part of the code, as shown:

Code:
mybox.innerHTML = '<div id="recon_warning_box" style="margin: 0 auto 0 auto; ' +
'width:300px; opacity: .75; filter: alpha(opacity=75); z-index:100; ' +
'margin: 5px; padding: 5px; overflow: hidden; height: auto; ' +
'font-size: 8pt; font-weight: bold; font-family: arial, sans-serif; background-color: #ccffcc; ' +
'color: #000000;"> ' +
'<span id="recycle">Loading Recylzer...</span> <br />' +
'<span id="digitizer">Loading Digitizer...</span> <br/> ' +
'<span id="pouch">Checking For Pouches...</span> <br />' +
'<span id="blanket"><br />Check your <a href=\"/use.php?filter=instant\">blanket</a>!</span> <br />' +
'<span id="computer">Checking For Computers...</span>' +
'</div>';


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 104 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group