Enquirer Home Page | Twitter | Back to Improbable Island

 Forum Index > Off-Topic > Out-of-Game New Topic Post Reply
 A Greasemonkey Script: Truancy Meter
 |  Printable Version
Matthew
 Sunday, December 12 2010 @ 12:00 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 08/26/10
Posts: 578

Yes, I have to agree on both accounts. A rail pass counter seems a little bit pointless. And... perhaps there could be a way to view an Island map, with coordinates and all, from the Request Stop page?


 
Profile Email
Quote
Tahvohck
 Sunday, December 12 2010 @ 07:09 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 10/15/10
Posts: 65

Mm, Fair. Just an idea that passed through. As for the favorites...yeah, you could, but I have only half an idea how, and for adding a map...yeah, I should be able to do that, though I'd need to get another first-class to test both ideas properly, so those might be a while coming, unless someone else programs them. However, once I do get a first-class, expect the map quickly, cause that's something I'd want as well.


 
Profile Email
Quote
Maniak
 Sunday, December 12 2010 @ 08:06 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 10/11/10
Posts: 298

Sent you a distraction, in case you need some cards.


http://maniak.cu.cc/
 
Profile Email Website
Quote
Count Sessine
 Sunday, December 12 2010 @ 08:15 PM UTC  
Forum Moderator
Moderator

Status: offline

Registered: 08/16/08
Posts: 1402

Quote by: Tahvohck

Mm, Fair. Just an idea that passed through. As for the favorites...yeah, you could, but I have only half an idea how, and for adding a map...yeah, I should be able to do that, though I'd need to get another first-class to test both ideas properly, so those might be a while coming, unless someone else programs them. However, once I do get a first-class, expect the map quickly, cause that's something I'd want as well.

I know there are map copies easily available, lots of places on the web. Myself, I long ago did a Grab screen capture and saved the file locally -- in fact, mine is from early Season One. Still, technically, characters aren't supposed to have the official map unless they've paid their 10K... The only difference is that the live map in the game shows you coordinates in a tooltip on mouse-over.

Is the map a feature that would be worth adding to the game's request stop logic? Or is a Greasemonkey script sufficient?


 
Profile Email
Quote
Buddleia
 Sunday, December 12 2010 @ 08:20 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 04/23/10
Posts: 343

Quote by: blob

@ buddlea
One of your scripts is a copy. Might have happened if you simpy installed what tahvock posted.
If that is the case, remove that one from your userscripts, then select one of the bar limiters posted in this thread and save it as .user.js and open it with firefox.


If it is, then that's not fair. I hadn't installed any more scripts recently, and it just started doing this last night.

Anyway, in case that was the problem, I uninstalled all my scripts, and then got the lastest versions from

Quote by: Tahvohck

Derp. *Facepalm* Well I feel like an idiot now. Here's the proper links.

Truancy Bar
Quest Tracker
Bar limiter
Mail Check


This ... doesn't seem to have helped. I still have a pair of the extra XP bars. They're in the wrong place, too. The third one appears about a second after the second.





-----------------------------------------------------------------------------------------------------------------------------------

Moving on to another topic:

Quote by: Matthew

And... perhaps there could be a way to view an Island map, with coordinates and all, from the Request Stop page?


For this, maybe something like http://bitwise-guy.com/improbable/ci/map? I think it was Beeps made this, can't remember (sorry!).


Improbable Reference Links - goo.gl/MRBnb -------------- Land Registry (map of Places) ---- goo.gl/bpkRR
 
Profile Email Website
Quote
Tahvohck
 Sunday, December 12 2010 @ 08:27 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 10/15/10
Posts: 65

Well, Sessine, I guess it depends on whether you only want those who've bought the map to be able to see it. If you do, then it'd be nice to have it built into the game, as a "you pull out your map to decide" sorta thing. If you don't care, then it wouldn't be that hard to do as a GM script: just take the HTML table for the map in-game, do a search for the appropriate spot to add it to, and "paste" it in. It could even be explained in-game: there's a map on the wall for just this occasion.


 
Profile Email
Quote
Iriana
 Sunday, December 12 2010 @ 11:06 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 09/14/10
Posts: 250

I know many Rookies consider the map a pretty big deal and actually have to decide between buying higher-grade equipment or getting a map, so perhaps it should remain something you should have only if you've paid for it. Even though it's a very poorly kept secret that there are screenshots of it all over the place. It's the spirit of the thing, you know?

But it would be nice to have a way to view the map (if you've bought it) from the first-class stop selection screen, so you can pick coordinates more easily. It's not fun to misremember your stop and have to hike back to a station.


 
Profile Email
Quote
Matthew
 Monday, December 13 2010 @ 12:40 AM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 08/26/10
Posts: 578

Quote by: Buddleia


For this, maybe something like http://bitwise-guy.com/improbable/ci/map? I think it was Beeps made this, can't remember (sorry!).

Goodness, that's the second time I've asked for something that someone else has already done.

Thank you!


 
Profile Email
Quote
Tahvohck
 Monday, December 13 2010 @ 09:55 AM UTC  
Forum Contender
Contender

Status: offline

Registered: 10/15/10
Posts: 65

Buddleia, I can't find anything that would be causing that problem, so I honestly don't know what to say. And I couldn't do anything more without being able to see your version of the script (shouldn't be a problem if you got it from my link) or being able to go through your computer and look at things like the error console (ain't gonna happen, and probably wouldn't help anyway). Sorry.


 
Profile Email
Quote
Makiwa
 Monday, January 31 2011 @ 04:45 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 08/21/10
Posts: 155

I know this is an old thread, just took me a while to get round to trying the scripts.

A big thank you to those involved in providing/tuning the scripts. I'm using them with Chrome without issues.

Great stuff! Big Grin


It's not an optical illusion. It just looks like one.
 
Profile Email Website
Quote
Maniak
 Friday, February 04 2011 @ 02:41 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 10/11/10
Posts: 298

I tinkered with the Truancy Bar a bit. Don't you love open-source?

New features:
An extra truancy bar starts filling up after you filled the first truancy bar.
Mouse-over the truancy bar and it shows you how much experience is required to fill it.

Tinkered with the colors a bit. The truancy bar fills white on a red background, then turns green once it's filled. It's the same color green that is used for the stamina and health bar, to give it a more unified look.

Code below. Remove the /* */ to activate the Overall exp bar.

PHP Formatted Code

// ==UserScript==
// @name Improbable Island Xp Bar
// @namespace http://www.shadedraco.com/improbabletruancy
// @description    Improbable Island Truancy Meter. Credit to Devin, modified by Tahvohck and Maniak
// @include http://*improbableisland.com/*
// ==/UserScript==

var CharInfo = document.evaluate("//table[@class='charinfo']", document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
if (CharInfo) {
  var LevelRow = document.evaluate("//td[@class='charinfo']/b/span[@class='colLtWhite'][text()='Level']/../../..", CharInfo, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
  if (LevelRow) {
    var Level = new Number(LevelRow.cells[1].childNodes[0].childNodes[0].textContent);
    var ExperienceRow = LevelRow.parentNode.rows[LevelRow.rowIndex+1];
    var ExperienceMatch = ExperienceRow.cells[1].childNodes[0].childNodes[0].textContent.match(/^([\d,]+)\/([\d,]+)$/);
    var Experience = new Number(ExperienceMatch[1].replace(/,/g,''));
    var ExperienceNextLevel = new Number(ExperienceMatch[2].replace(/,/g,''));
    var ExperienceTable = {
      1  : 0,
      2  : 100, //800
      3  : 400, // 1800
      4  : 1002,
      5  : 1912,
      6  : 3140,
      7  : 4707,
      8  : 6641,
      9  : 8985,
      10 : 11795,
      11 : 15143,
      12 : 19121,
      13 : 23840,
      14 : 29437,
      15 : 36071,
      16 : 43930,
      17 : 43930, // Doesn't actually exist, but I needed to put something here
    };
    var DKs = (ExperienceNextLevel - ExperienceTable[Level+1]) / Level / 25;
   
    //The various bars.------------------------------------------------
                //Truancy
    var ExperienceThisLevel = ExperienceTable[Level] + ((Level-1) * DKs * 25);
    var ExperienceTruancy = ExperienceTable[Level+2] + ((Level+1) * DKs * 25);
    var TruancyBarWidth = ((Experience - ExperienceNextLevel) / (ExperienceTruancy - ExperienceNextLevel)) * 100;
        if (TruancyBarWidth < 0) TruancyBarWidth = 0;
    if (TruancyBarWidth > 100) TruancyBarWidth = 100;
    var RemainderWidth = 100 - TruancyBarWidth;   
  if(Experience >= ExperienceNextLevel) {
    ExperienceRow.cells[1].innerHTML +=
      "<span class='colLtYellow'>" +
      "<table style='border: solid 1px #000000;' title='"+ExperienceTruancy+"' bgcolor='red' cellpadding='0' cellspacing='0' width='70' height='5'><tr><td width='"+TruancyBarWidth+"%' bgcolor='"+(Experience>=ExperienceTruancy?'#00FF00':'white')+"'></td><td width='"+RemainderWidth+"%'></td></tr></table>" +
      "</span>";}
          
                //Next Truancy
        var ExperienceNextTruancy = ExperienceTable[Level+2] + ((Level+2) * DKs * 25);
        var ExperienceLevelAfterThat = ExperienceTable[Level+3] + ((Level+2) * DKs * 25);
        var NextTruancyBarWidth = ((Experience - ExperienceNextTruancy) / (ExperienceLevelAfterThat - ExperienceNextTruancy)) * 100;
        if (NextTruancyBarWidth < 0) NextTruancyBarWidth = 0;
    if (NextTruancyBarWidth > 100) NextTruancyBarWidth = 100;
  if(Experience >= ExperienceTruancy) {
      ExperienceRow.cells[1].innerHTML +=
      "<span class='colLtYellow'>" +
          "<table style='border: solid 1px #000000;' title='"+ExperienceLevelAfterThat+"' bgcolor='red' cellpadding='0' cellspacing='0' width='70' height='5'><tr><td width='"+NextTruancyBarWidth+"%' bgcolor='"+(Experience>=ExperienceLevelAfterThat?'#00FF00':'white')+"'></td><td width='"+RemainderWidth+"%'></td></tr></table>" +
      "</span>";}
          
     /*   //Overall
        var ExperienceWin = ExperienceTable[15] + (14 * DKs * 25);
        var OverallWidth = (Experience / (ExperienceWin)) * 100;
        var OverRemaining = 100 - OverallWidth;
    LevelRow.cells[1].innerHTML +=
      "<span class='colLtYellow'>" +
      "<table style='border: solid 1px #000000;' title='"+ExperienceWin+"' bgcolor='red' cellpadding='0' cellspacing='0' width='70' height='5'><tr><td width='"+OverallWidth+"%' bgcolor='"+(Experience>=ExperienceWin?'#00D000':'white')+"'></td><td width='"+OverRemaining+"%'></td></tr></table>" +
      "<br/></span>";
    //alert(ExperienceWin);  */

  }
}


http://maniak.cu.cc/
 
Profile Email Website
Quote
Tahvohck
 Monday, February 07 2011 @ 02:51 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 10/15/10
Posts: 65

Yes I do love open source, Maniak. I'd been trying to do exactly that but couldn't get it to scale the second bar properly. I'll add that to the cache I've got set up for them once I've got a few minutes of free time, as well as a sorta-in-beta script I've got that reads the newday page for important information and saves it. (I'd like feedback on that one, especially suggestions for other things it should read.) Also, I know someone was looking for a script that removed the dotted lines under player's names in the chat, but haven't found an efficient way--any way, really--to do that. Anyone know how?


 
Profile Email
Quote
Maniak
 Monday, February 07 2011 @ 03:19 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 10/11/10
Posts: 298

Quote by: Tahvohck

Yes I do love open source, Maniak. I'd been trying to do exactly that but couldn't get it to scale the second bar properly.



To be completely honest, neither could I. It's a bit wonky, and needs at least 4 monsters to properly kick in. It's incredibly weird, but somehow functional. I'll continue tinkering but I'm having trouble getting the needed exp at my current rank.

As for important info I always check and then forget:

Card messages. Is something off-kilter, or am I lucky?
Internal bleeding/regeneration.
How many days of extra stamina I have left over from WCG.

I consider the card message as the only one that's really important.


http://maniak.cu.cc/
 
Profile Email Website
Quote
Tahvohck
 Monday, February 07 2011 @ 07:30 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 10/15/10
Posts: 65

Okay, new Truancy Bar is up, and so is the Newday Tracker, as usual at http://userpages.umbc.edu/~sq89891/Imp_Island/.

On the topic of your suggestions, Maniak:
Card messages: Done already.
Jokerstats: Will do, gonna need help due to not quite wanting to do a Joker run yet.
WCG: [Will do, should be simple enough.] Done.

Other things it has already:
Day count
Health (should be complete, might be missing something on the really low ends of hunger)
Fitness (basically only has fit, since I haven't gorged on cheeseburgers in forever)


 
Profile Email
Quote
Maniak
 Tuesday, February 08 2011 @ 01:31 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 10/11/10
Posts: 298

Some feedback:

NewDay
Day Unknown
Luck Normal
Strength Dying! Eat something!
Fitness Unknown
WCG days Unknown

Doesn't collect the Day properly, maybe because I was restored from the failboat.
Luck seems to be fine.
It says I should eat something, but I'm a robot. I think this bug would also apply to Jokers. You have an else statement, but I believe the text you're looking for is "you are slowly dying of malnutrition." For more lines, have a look at staminafood.php on github. Beware of spoilers.
Fitness, same with strength.
WCG days.. I don't know why it doesn't work.

Error console shows a pholder is null on line 42, which is about fitness. Probably nulls because I'm an organically challenged CPU-enhanced entity.

If you're willing to dive into the source of staminafood.php, you could even add Strength +10%, Fitness +5% to appropriate the results if you were so inclined.


http://maniak.cu.cc/
 
Profile Email Website
Quote
Buddleia
 Tuesday, February 08 2011 @ 04:32 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 04/23/10
Posts: 343

Quote by: Devin

... here's another script I've been using privately for quite a while. It adds a "what danquest are you on, and have you finished it" section to your stats without putting the load on the server like a php solution would. It recognizes nearly every quest-related event (I think it might be missing one or two varieties of you-found-an-item still). The name of the quest critter will be bold if it's the Big Bad Guy of the chain.

https://gist.github.com/702161


Uhm. I installed (yes, and enabled) this, and I've been through quite a few Damnquests since then. Sorry for such a stupid question, but where is the new section supposed to appear? I'm not seeing anything in the right-hand column, or in my bio.


Improbable Reference Links - goo.gl/MRBnb -------------- Land Registry (map of Places) ---- goo.gl/bpkRR
 
Profile Email Website
Quote
Tahvohck
 Tuesday, February 08 2011 @ 04:49 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 10/15/10
Posts: 65

Yeah, the unknowns are default returns for if there's no value set. For those:

Day count: yeah, I'll check the failboat message.
Fitness: technically only has one thing that'll return anything anyway. Oops!
WCG: Are you sure you got a WCG message when newday rolled around? That's the only thing I can think of that would do that, it's working fine for me.

As for fitness/strength, yeah, I didn't even think about robos and Jokers when making this. I'll look into the github.

Good to hear luck works, though. Took me forever to actually notice when the proper message was there.


 
Profile Email
Quote
Derp derp
 Saturday, February 19 2011 @ 01:18 PM UTC  
Forum Newbie
Newbie

Status: offline

Registered: 01/22/11
Posts: 9

There seems to be an extra experience bar for me next to level.


 
Profile Email
Quote
Maniak
 Saturday, February 19 2011 @ 06:20 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 10/11/10
Posts: 298

That's most likely the Overall experience bar, that fills up to level 15. If you don't like it, you can take it away by commenting it out.

(somewhere near the end of the file)
On line 66 add /* before //Overall
On line 74 add */ after //alert(ExperienceWin);

Save file.


http://maniak.cu.cc/
 
Profile Email Website
Quote
Buddleia
 Tuesday, April 05 2011 @ 05:48 AM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 04/23/10
Posts: 343

I'm finally switching over from Firefox to Chrome for playing II. Can anyone tell me how to get userscripts to behave, please? The Mail Checker and Quest Trackers work fine (once I reminded it to work on www as well as http), I've managed to hunt down the XP .js and give the new bars my preferred red background instead of black - but the Inventory Bar Limiter doesn't seem to be doing anything. I've tried changing the numbers, but nothing happens. And if there's a simple selection prompt anywhere, I don't see it.

Also ... since the Factory doesn't seem to be getting repaired ... are there by any chance any volunteers to make something that would show or say where the exit is? Instead of having to hunt through the page source for the elusive mred.gif in that sea of mblack.gifs and table attributes?


Improbable Reference Links - goo.gl/MRBnb -------------- Land Registry (map of Places) ---- goo.gl/bpkRR
 
Profile Email Website
Quote
Content generated in: 1.69 seconds
New Topic Post Reply



 All times are UTC. The time is now 11:37 AM.

Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content