Fishing Distance Marker

User discussion of Fishing Portal

Fishing Distance Marker

Postby Acorns » Wed Aug 08, 2007 2:19 am

SigmaJargon wrote:Kay-o. It's at http://sigmajargon.googlepages.com/fish ... er.user.js if you want to try it out. And by going to the lake directly I mean going to http://www.gaiaonline.com/games/launch. ... &l=gambino (or replace gambino with durem or wherever) in your browser instead of clicking on the lake. Also should note that the bars show all the time, which looks a little weird when you're loading the game and picking a room, but I can't think of any good way to check up on the status of the game.
Acorns
Site Admin
 
Posts: 92
Joined: Fri Jul 20, 2007 2:14 pm

Re: Fishing Distance Marker

Postby Acorns » Wed Aug 08, 2007 2:23 am

I've really no clue why it is able to show over flash no matter how you access the page at the moment; a flash object is not rendered as part of the document unless wmode is 'opaque' or 'transparent' (and as such it can ignore all z-rules, etc). Since they wrap the creation of the flash object in javascript, and then call that creation function in a <script> tag on the page I'm not sure how to stop the orig call from happening. However, if you add an onload, add the needed param, and then call it again it works just fine. As to the getting-it-to-show only when fishing, that is a little tougher. You -could- connect to the flash object, and use getVariable and setTimeout to monitor the state of the game. You could also potentially use modeEntrap to catch the function call that indicates a server has been chosen. This I'll leave up to you... its much easier to paste in a small button that lets them show/hide your divs :P
Attachments
fishingdistancemarker.user.js
Modified version of what Sigma posted above.
(4.09 KiB) Downloaded 7025 times
Acorns
Site Admin
 
Posts: 92
Joined: Fri Jul 20, 2007 2:14 pm

Re: Fishing Distance Marker

Postby SigmaJargon » Wed Aug 08, 2007 7:10 am

I like the small button solution. Very elegant.

I considered using getVariable, but that seems like it's stepping over the line. I mean, it could be cool (and again, well within the realm of possibility) to have the script show you all sorts of useful things, like the number of each type of fish remaining in the lake, or even what fish you just hooked. But that feels more than a bit like cheating, not to mention unfair to the fishers who spent a lot of time learning how to filter. >,<

So I suppose, in summary, I like the button. I'll go over it again later to make sure it looks pretty and such then I'll put it up somewhere for fisher folk to use.
The truth is in the details.
User avatar
SigmaJargon
 
Posts: 29
Joined: Sat Jul 21, 2007 11:24 am
Location: Salt Lake City

Re: Fishing Distance Marker

Postby Acorns » Wed Aug 08, 2007 10:14 am

For better in most cases, and worse in the case of fishing flash is very open.

I think this is really the way a "web application" should be, it makes things like http://swfupload.mammon.se/ not only easy to do but conceptually easy. Unfortunately it also makes flash a very bad choice for a game that gives rewards. If fishing existed -just- to play, aka no rewards from it except the fun of playing and chatting with friends while playing then flash would be a very good choice.

I liked the button idea too; I threw the code together in about 20 mins so I really doubt it is as efficient/pretty as it could be, probably even some possible errors it could throw. If you know/can figure out a way to prevent the so.write call that is embedded in the page from happening that would make it feel a lot cleaner. I'm just not sure how to access something that doesn't properly show up in the DOM.
Acorns
Site Admin
 
Posts: 92
Joined: Fri Jul 20, 2007 2:14 pm

Re: Fishing Distance Marker

Postby SigmaJargon » Wed Aug 08, 2007 11:25 am

I don't think I can remove the call to so.write() that's in the page. I mean, I can remove the script tag or something, but Greasemonkey runs after the page has rendered, so it wouldn't accomplish much.

As for Flash... it would be neat if they'd change platforms, but it would take foooorever to port all the games. Fishing, Slots, Cards, Jigsaw, Wordbump, Towns, Rally... probably Battle too. Maybe I should just up and write a fishing replacement in JavaFX or something and send it in to them. After writing the last bits of Extended Stats I won't really have too many fishy projects left to do anyways. :lol:
The truth is in the details.
User avatar
SigmaJargon
 
Posts: 29
Joined: Sat Jul 21, 2007 11:24 am
Location: Salt Lake City

Re: Fishing Distance Marker

Postby Bria_Teragram » Wed Aug 08, 2007 11:48 am

I'll have to try this out when I'm at home. It will definitely help for UFO, since I won't have to eyeball about where I'll only be hooking smalls and junk at. Not that it should matter too much. XD
Bria_Teragram
 
Posts: 67
Joined: Sat Jul 21, 2007 11:25 am

Re: Fishing Distance Marker

Postby SigmaJargon » Wed Aug 08, 2007 6:37 pm

Bleeech. Javascript not cooperating with Sigma. Even after setting the wmode to transparent, it doesn't seem to want to let an image on the page. Like, anywhere. Text I can get in just fine, and background colors, but not images of any sort. Here is the version I'm working on, and here is a nearly identical version for Google's homepage (Google is my guinea pig x3). The version on Google works perfectly fine, but you just can't see the button on the fishing page. You're usually a font of wisdom, El, any chance I can coax a thought or two out of you?

I wanted a nice button that would fit into Gaia's look and feel, but if I can't get it to work I'll probably just tweak the colors on your version and let it go. >_<
The truth is in the details.
User avatar
SigmaJargon
 
Posts: 29
Joined: Sat Jul 21, 2007 11:24 am
Location: Salt Lake City

Re: Fishing Distance Marker

Postby Acorns » Thu Aug 09, 2007 12:34 pm

Hehe, I thought this one would take some looking into.... but I couldn't resist a quick peek and its really simple.

You are a victim of Gaia's CSS. They have all images on this page set to display: none. Add a display: inline; or somesuch to the inline style of the image and it shows up quite happily.

Could do this several ways, but would be cool to have a "hover" with the opposite of current image shown. It also looks weird when it is displayed while the page is loading, I used a 5 sec timeout to get it to show up after the load finished (but almost certainly before they are in a room and actually ready to fish).

Finally, a href="#" will seem to work, but is usually better to go for a href="javascript: void(0);" this way FF 1.x all versions and some of the custom FF 2.0 compiles without the specific hack to ignore "#" in links won't work weirdly. Or heh, just put the onclick on the image itself and leave the a out :P
Acorns
Site Admin
 
Posts: 92
Joined: Fri Jul 20, 2007 2:14 pm

Re: Fishing Distance Marker

Postby SigmaJargon » Thu Aug 09, 2007 1:05 pm

Yeah. I took the timeout out so that I could see results immediately - I was planning to put it back in for the release. As for getting rid of the a, I'll try that. The only reason it's there is because I was trying to figure out what was going wrong and so rummaged through Dive Into Greasemonkey's tutorials for similar content, and went from there. The CreateButton function is adapted from their Zoom Textarea case study.

In any case, bah Gaia's CSS *shakes fist* :P
The truth is in the details.
User avatar
SigmaJargon
 
Posts: 29
Joined: Sat Jul 21, 2007 11:24 am
Location: Salt Lake City

Re: Fishing Distance Marker

Postby Acorns » Thu Aug 09, 2007 1:18 pm

Oy oy, sounds good.

Dive Into Greasemonkey is a good source for Greasemonkey stuffs!
Acorns
Site Admin
 
Posts: 92
Joined: Fri Jul 20, 2007 2:14 pm

Next

Return to Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron