Quantcast

Jump to content


Photo

Lab Map Hunting


  • Please log in to reply
26 replies to this topic

#1 phr0sty

phr0sty
  • 105 posts

Posted 31 December 2010 - 04:30 PM

For those of you that are still hunting for Secret Lab Maps or just want a dup set, I've created a bookmarklet to make your life just a little bit easier. All this will do is parse the DOM looking for the labmap images. When it find one, it will alter the text adjacent to the image to reflect its numeric value. Give it a spin!

javascript: var resultLinks = document.evaluate("//img[contains(@src, 'labmap')]", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
var i = 0;
while ((res = resultLinks.snapshotItem(i)) != null) {
  var mapn = (res.src).match(/(\d)\.gif$/)[1];
  var label = document.evaluate("ancestor::tr[1]//*[contains(text(), 'Secret Laboratory Map')]", res, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0);
  switch (document.location.pathname) {
  case "/safetydeposit.phtml":
	label.innerHTML = label.innerHTML.replace("<br", " <span style='color: red'>" + mapn + "</span><br");
	break;
  case "/island/tradingpost.phtml":
  case "/genie.phtml":
  case "/browseshop.phtml":
	label.innerHTML += " <span style='color: red'>" + mapn + "</span>";
	break;
  case "/objects.phtml":
	label.innerHTML = label.innerHTML.replace("<hr", " <span style='color: red'>" + mapn + "</span><hr");
	break;
  }

  i++
};void(0);

Let me know if there are any bugs/glitches. Also, let me know if you would like me to expand it to encompass all the maps.

* verified working with SDB, Inventory, Auctions, User Shops, and TP
* works in Firefox, Safari, and Chrome

Edited by Ch4osDr4gon, 01 January 2011 - 03:00 PM.


#2 goodyearkl

goodyearkl
  • 5 posts

Posted 04 January 2011 - 01:15 PM

This looks neat but I have no idea how to use it. :-(

#3 Noitidart

Noitidart
  • Neocodex Co-Founder

  • 23214 posts


Users Awards

Posted 04 January 2011 - 01:29 PM

You just copy paste it into the url bar. Or create a bookmark and set this as the location. You'll have to make it inline though bro. :(

Its cool you can easily tell which piece of the map you are looking at without having to right click and see image info.

#4 goodyearkl

goodyearkl
  • 5 posts

Posted 04 January 2011 - 01:31 PM

You just copy paste it into the url bar. Or create a bookmark and set this as the location. You'll have to make it inline though bro. :(

Its cool you can easily tell which piece of the map you are looking at without having to right click and see image info.


Cool! Thanks!

#5 Barophobia

Barophobia
  • 612 posts

Posted 06 January 2011 - 01:21 AM

awesome bookmarklet. Its up in my bookmarks bar now ;D

#6 Neko201

Neko201
  • 44 posts

Posted 07 January 2011 - 04:04 AM

It won't work for me :/

#7 Turtleboy

Turtleboy
  • 424 posts

Posted 07 January 2011 - 06:40 AM

For those of you that are still hunting for Secret Lab Maps or just want a dup set, I've created a bookmarklet to make your life just a little bit easier. All this will do is parse the DOM looking for the labmap images. When it find one, it will alter the text adjacent to the image to reflect its numeric value. Give it a spin!

javascript: var resultLinks = document.evaluate("//img[contains(@src, 'labmap')]", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
var i = 0;
while ((res = resultLinks.snapshotItem(i)) != null) {
  var mapn = (res.src).match(/(\d)\.gif$/)[1];
  var label = document.evaluate("ancestor::tr[1]//*[contains(text(), 'Secret Laboratory Map')]", res, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0);
  switch (document.location.pathname) {
  case "/safetydeposit.phtml":
	label.innerHTML = label.innerHTML.replace("<br", " <span style='color: red'>" + mapn + "</span><br");
	break;
  case "/island/tradingpost.phtml":
  case "/genie.phtml":
  case "/browseshop.phtml":
	label.innerHTML += " <span style='color: red'>" + mapn + "</span>";
	break;
  case "/objects.phtml":
	label.innerHTML = label.innerHTML.replace("<hr", " <span style='color: red'>" + mapn + "</span><hr");
	break;
  }

  i++
};void(0);

Let me know if there are any bugs/glitches. Also, let me know if you would like me to expand it to encompass all the maps.

* verified working with SDB, Inventory, Auctions, User Shops, and TP
* works in Firefox, Safari, and Chrome


There's a little bit of a glitch. If there are three map pieces in a store (say piece 1, 2, 3) and they're all right next to each other - rather then displaying the number in red after each lab piece - it'll show all three numbers on the first lab piece.

I don't know if that explanation made any sense but I thought you might want to know

#8 maruvott

maruvott
  • 55 posts

Posted 17 February 2011 - 06:09 PM

I'm still looking for the lab map, so this is a great bookmarket for me, tysm

#9 zevrom

zevrom
  • 411 posts

Posted 17 February 2011 - 06:35 PM

Any guide how to make bookmarkets work? idk how

#10 Persuasion

Persuasion
  • 551 posts

Posted 17 February 2011 - 07:22 PM

Any guide how to make bookmarkets work? idk how

Yea, that would help to explain how to use it :p Is it kind of like Greesemonckey scripts?

#11 mlv

mlv
  • 112 posts

Posted 12 March 2011 - 09:10 AM

There are a lot of good bookmarkers, and this is one of them! It's going to make easier my Lab Map Hunting, that has been very difficult 'til now, Trying it right NOW. Thank you very much!

#12 jonahfinn

jonahfinn
  • 1006 posts

Posted 12 March 2011 - 08:48 PM

haha, i need to buy a new one in case my main gets frozen, so this'll come in handy. There're so goddamn hard to find nowadays.
I remember back in the day the whole set cost 100k =p

#13 Ammar

Ammar
  • 9 posts

Posted 12 March 2011 - 10:54 PM

THNX

#14 Maloo

Maloo
  • 445 posts

Posted 22 March 2011 - 02:44 PM

I just copied and pasted in my URL bar..nothing happent

#15 Fresca

Fresca
  • 514 posts

Posted 05 April 2011 - 09:34 AM

You just copy paste it into the url bar. Or create a bookmark and set this as the location. You'll have to make it inline though bro. :(

Its cool you can easily tell which piece of the map you are looking at without having to right click and see image info.


So... I can't figure out how to make this work. I tried just pasting it into my URL bar and nothing happened (like the above poster). I tried creating a new bookmark and setting this as the location and nothing happened. I don't really understand how to "make it inline," so I think that might be what I'm doing wrong? Help a bookmarklet-tard out? :)

EDIT: I mean that after I created the new bookmark, I opened a shop with some lab map pieces in it, clicked the bookmark and nothing happened... not just that I made the bookmark and nothing happened lol.

Edited by Fresca, 05 April 2011 - 09:36 AM.


#16 Imkindalegit

Imkindalegit
  • 93 posts

Posted 05 April 2011 - 12:36 PM

Sounds cool, *goes to try it out*.

#17 Oyakata

Oyakata
  • 14 posts

Posted 16 April 2011 - 06:19 AM

Nothing happened for me, even after following the steps D:

Thanks for the hard work, though! Seems like it works for a lot of people.

#18 Kitty251

Kitty251
  • 19 posts

Posted 09 May 2011 - 07:29 AM

Nice! This will make things a lot easier.

#19 batryn

batryn
  • 220 posts

Posted 16 May 2011 - 01:32 PM

Thanks! I've been trying to do this for awhile...

#20 choco25

choco25
  • 68 posts

Posted 16 May 2011 - 08:50 PM

ummm seriously I don't understand how to use this... :(
seems that it's very useful though :D

#21 danielfromburn

danielfromburn
  • 492 posts

Posted 19 May 2011 - 10:33 PM

You know actually I thought this would be something that actually aids in the random events where we get the lab maps... hahaha. And you know I've seen some assholes who have like 99 lab pieces in stock. Seriously?!!?!?

#22 Mystery

Mystery
  • 472 posts

Posted 19 May 2011 - 10:35 PM

I find it faster to check on SN. Has prices too :p

#23 MOTHERMAKER

MOTHERMAKER
  • 33 posts

Posted 23 May 2011 - 11:21 AM

Cool! Thanks!

#24 batryn

batryn
  • 220 posts

Posted 23 May 2011 - 04:45 PM

I find it faster to check on SN. Has prices too :p


What's SN?

#25 Mystery

Mystery
  • 472 posts

Posted 23 May 2011 - 10:56 PM

What's SN?


Sunnyneo.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users