Twilight Forums

Idle chat for wannabe heroes
It is currently Wed Jul 30, 2014 6:18 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 353 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9  Next
Author Message
 Post subject: Re: Greasemonkey
PostPosted: Thu Oct 29, 2009 3:12 pm 
Offline
User avatar

Joined: Mon Dec 17, 2007 8:24 pm
Posts: 1234
Location: Baton Rouge, LA
I'm assuming the 100HP variable can be edited?

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


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Thu Oct 29, 2009 3:14 pm 
Offline

Joined: Mon Nov 19, 2007 6:29 pm
Posts: 1811
Location: Florida
Yeah, if you know where to look in the script. Personally, I recommend changing the scheme to check for falling below a certain percentage, it's what the PFEBot and PHPBot do. But meh.


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Thu Oct 29, 2009 3:15 pm 
Offline
User avatar

Joined: Mon Dec 17, 2007 8:24 pm
Posts: 1234
Location: Baton Rouge, LA
Complicated to make the variable an entry field in one's profile?

I made the changes from 100 to 300 below... hopefully, I didn't screw anything up:

Code:
var imageTD = find('.//img[@border="3"]/..');
GM_setValue('chicken',300);
if (imageTD) {
   var victory = /Victory!/;
   var loss = / /;
   var last = find('./*[last()]',imageTD);
   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;
   var aCoward = GM_getValue('chicken',10);
   var yous = GM_getValue('health',300);
   if (endOfTurn()) {
      GM_setValue('turnsLeft',GM_getValue('turnsLeft',0)-1);
      if (yous<aCoward) shutDown();
      var round = GM_getValue('roundNumber',-1)+1;
      displayRound= round;
      GM_setValue('roundNumber', -1);
      if (GM_getValue('running',false)&&(GM_getValue('turnsLeft',false) > 0)){

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


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Thu Oct 29, 2009 3:20 pm 
Offline

Joined: Mon Nov 19, 2007 6:29 pm
Posts: 1811
Location: Florida
Change the value in GM_setValue('chicken',100):
Code:
   GM_setValue('health',x[0]);}
else{

var imageTD = find('.//img[@border="3"]/..');
GM_setValue('chicken',100);
if (imageTD) {

from 100 to whatever you want.

EDIT: Yeah, you got it.


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Thu Oct 29, 2009 3:30 pm 
Offline
User avatar

Joined: Sun Apr 08, 2007 1:01 am
Posts: 4530
Location: the Conservatory with the lead pipe
Eh. If I was to use chicken protection, I'd base it on my current HP, not a percentage. Especially since it might vary from zone to zone (100 HP would be fine for the pit, 600-800 for Insanity). No sense in hyperinflating the script just to switch to percentage.

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


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Thu Oct 29, 2009 3:31 pm 
Offline
User avatar

Joined: Mon Dec 17, 2007 8:24 pm
Posts: 1234
Location: Baton Rouge, LA
I changed 100 to 300 in TWO places (see above) was this incorrect?

Doc, if it's that big a deal, don't worry about it, bro.

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


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Thu Oct 29, 2009 3:34 pm 
Offline

Joined: Mon Nov 19, 2007 6:29 pm
Posts: 1811
Location: Florida
(switch to percentage is as simple as getting one more value from the nav pane and then dividing the first by the second)

I see your point, but HP left needs to be changed according to the zone anyways. It'd really be best to allow the player to set it for each individual run somehow.

Also, CS, the second 100 you changed was changing a default value, but since you already set it, it doesn't matter. It's not necessary, but it doesn't hurt anything.


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Thu Oct 29, 2009 8:23 pm 
Offline
User avatar

Joined: Mon Dec 17, 2007 8:24 pm
Posts: 1234
Location: Baton Rouge, LA
Well, Doc... it didn't work. I set it for 300HP. I got to 285, and it kept going... when I stopped it and healed, it stopped working. No longer attacks.

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


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Fri Oct 30, 2009 4:14 am 
Offline
User avatar

Joined: Mon Dec 17, 2007 8:24 pm
Posts: 1234
Location: Baton Rouge, LA
Anyway way I can get a link to the old version so it's usable?

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


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Fri Oct 30, 2009 8:15 am 
Offline
User avatar

Joined: Thu Oct 01, 2009 10:49 am
Posts: 460
Location: Florida, USA
Wow, you got to love Twilight Heroes. Fun, reliable, educational.
Oh yeah, I'm learning a lot from you guys!
Rock on!
:o 8) :o

_________________
When you do the best you can it's called a try!
If you don't you need to ask yourself why?
Just give it a thought,
And failure is worth naught.
And then like an eagle you shall fly!
Image


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Sat Oct 31, 2009 1:17 am 
Offline

Joined: Mon Nov 19, 2007 6:29 pm
Posts: 1811
Location: Florida
Gasp! If you used my method and regex'd the content of the frame... :p


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Sat Oct 31, 2009 9:38 am 
Offline

Joined: Mon Nov 03, 2008 12:54 am
Posts: 732
Doc Igor wrote:
Er, yeah. I updated it after I'd posted to incorporate my own css, because someone in chat had wanted to see what the nav pane was supposed to look like with it. And I try to eliminate all red-values from color schemes... it lets me stare at a computer screen a lot longer without headaches that way.
So, yeah... it affects more than just that one pane, now.

Well, I'd like to use your script, but I don't want to change the color for the forums. Any chance of that?


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Sat Oct 31, 2009 9:55 am 
Offline

Joined: Mon Nov 19, 2007 6:29 pm
Posts: 1811
Location: Florida
It's really quite easy. All she/you needs to do is put an exclude on "http://www.twilightheroes.com/forums/*". You can do that yourself, if you want to. Just right-click the GM symbol, click manage user scripts, select the auto-adventure script on the side, then click add next to the exclude section, and type that up there (minus the "") into the box. And you're done!


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Sat Oct 31, 2009 3:23 pm 
Offline

Joined: Mon Nov 03, 2008 12:54 am
Posts: 732
Thanks Satan

Edit: I just realized that it does this awful coloring to all other pages as well. I guess I'll just wait till the author makes a script that does just one thing.


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Tue Nov 03, 2009 1:57 am 
Offline

Joined: Mon Nov 03, 2008 12:54 am
Posts: 732
Works perfectly for me once I turn off all other scripts, and specifically the wikification script.
I did not install the nav script due to the color changes, but I guess my health is always high enough so I didn't encounter any problem.


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Tue Nov 03, 2009 2:32 pm 
Offline

Joined: Sat Dec 29, 2007 12:42 am
Posts: 548
I think I found part of the problem - holding off posting anything until I can confirm.

_________________
==
insert clever .sig file here
==


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Wed Nov 04, 2009 1:32 am 
Offline

Joined: Mon Nov 03, 2008 12:54 am
Posts: 732
Suggestion: when you get the out of MP message, stop. I was using Bovine Charge and left the chair for a second. It banged the server for quite some time before I returned.


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Sun Nov 08, 2009 8:55 am 
Offline

Joined: Mon Nov 03, 2008 12:54 am
Posts: 732
Add support for Aio, Quantitas Magna Frumentorum Est?

I added
Code:
   nonComChoice["Aio, Quantitas Magna Frumentorum Est"+"choice"] = "2";
   nonComChoice["Aio, Quantitas Magna Frumentorum Est"+"submitvalue"] = "What do you do?";


Here's the source:

Code:
<HTML><head><link rel='stylesheet' href='includes/style.css'><script type='text/javascript'>if (self.location == top.location)
top.location.href = 'index2.php';</script><script language=Javascript src='http://www.twilightheroes.com/scripts/popup.js'></script></head><BODY>
<table border=0 cellspacing=0 cellpadding=4 width='100%'><tr valign=top><td width='100%'><h2>Aio, Quantitas Magna Frumentorum Est</h2><font class='text'>

You dive off to the side as one out the outbuildings explodes in a ball of fire. It seems these Pax Verde operatives are more about the Macto Rutilus than the Pax Verde. As the heat wave washes over you, you find yourself pondering the use of Latin by various organizations around the world. You wonder if it really sounds as impressive as everyone seems to think it does. Perhaps you should call yourself a Crepusculum Vir.<P>

Your reverie (reverie? No, wait... that's French) is interrupted as you hear someone calling for help. While you're looking for the source of the voice, you notice another Pax Verde agent slinking towards another building. Hey, wait a minute! That's The Mad Bomber Wot Bombs At Midnight! You could probably catch the bomber unawares and bludgeon him from behind. On the other hand, that worker really needs your help. Man... silly Latin phrases were more fun to ponder.<P><form action=fight.php method=post><input type=radio name=choice value='1' checked>Rescue the worker<BR><input type=radio name=choice value='2'>Grab that bomber!<BR><BR><input type=submit value='What do you do?'></form>


</td><td align=center><img src='images/foes/explosion.jpg' height=200 width=200 border=3><BR><b></b></td></tr></table><script type='text/javascript'>top.nav.location='nav.php';</script>

</font>

</BODY>
</HTML>


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Tue Nov 10, 2009 10:06 pm 
Offline
User avatar

Joined: Mon Oct 27, 2008 11:13 pm
Posts: 1034
Location: RP Channel... we have cake!!
Doc.. the high-priority script is not working for me, is there something I can do to fix that?

_________________
Image
Top 10 on the Total Post list


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Thu Nov 19, 2009 1:00 am 
Offline

Joined: Mon Nov 03, 2008 12:54 am
Posts: 732
My very first, extremely simple yet useful to me, script.

It auto-enters the chat when you log-in, saving you one (1) click per login.

http://userscripts.org/scripts/show/62333


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Thu Nov 19, 2009 6:30 am 
Offline

Joined: Mon Nov 03, 2008 12:54 am
Posts: 732
And my second script. I guess I got appetite from the first one :)

This will add a link for direct access to your MD to your top pane.

http://userscripts.org/scripts/show/62370

It currently does not handle the case where you don't have a MD. I might handle this special case later, but I'm not sure it's worth the extra server hit.


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Mon Nov 23, 2009 2:08 am 
Offline

Joined: Mon Nov 03, 2008 12:54 am
Posts: 732
Muhandes wrote:
My very first, extremely simple yet useful to me, script.

It auto-enters the chat when you log-in, saving you one (1) click per login.

http://userscripts.org/scripts/show/62333

I updated the script so it now does a /day as soon as it enters the chat, potentially saving you an additional 5 keyboard clicks!


Top
 Profile  
 
 Post subject: Re: Greasemonkey
PostPosted: Mon Nov 23, 2009 3:23 am 
Offline

Joined: Mon Nov 03, 2008 12:54 am
Posts: 732
To help one of my testing multis, I have modified sounos's link to the radiation lab/sickbay to link to the hospital/enlightenment center instead if you don't have access to the space station yet.

If anyone is interested in this let me know and I will upload it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 353 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: Bing [Bot] and 3 guests


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