miscellaneous

Forum > Miscellaneous > Opponent Energy Display Script
Reply To Thread (login)
Clay Banger [73]
2013-07-10 05:40:29 🔗
[11 years, 171 days ago]

In short: This script will display the amount of energy that your opponent has remaining as part of the fight log. http://i.imgur.com/o9tYNnS.png

This is a feature that is on Ender's list of things to do, but hasn't had the time for. It is provided as a 'band-aid' until such a feature is properly implemented in the game.

As the script stores the energy a bot has (as listed in the fight list) in your browser, it may not always be correct. If someone else fights the bot it will not pick up the energy change and therefore be incorrect. The energy increase each hour also causes the value reported to be slightly out. In my use this has not been an issue. Please do not report this as a bug.

You can grab the script from here: http://userscripts.org/scripts/show/172963

You will need some form of Greasemonkey/Tampermonkey in order to use it. I can confirm it works in Chrome and Firefox, but haven't tested any others. I won't provide support on how to install the script, there is plenty of howto's out there, but if you do find something that may be a bug, report it here and I'll investigate.


 
scarabara [41]
2013-07-10 06:36:38 🔗
[11 years, 171 days ago]

Any chance you could make a version that doesn't rely on grease monkey for storing the fight list? Maybe using localStorage


 
Ender [1]
Administrator
2013-07-11 21:07:04 🔗
[11 years, 170 days ago]

Thanks for putting this together! Hopefully I can build this into the game at some point.


 
Zyzz [84]
2013-07-12 02:43:20 🔗
[11 years, 169 days ago]

how do you get it to work once installed


 
Clay Banger [73]
2013-07-12 05:13:06 🔗
[11 years, 169 days ago]
how do you get it to work once installed

Once installed and enabled it should automatically add the energy remaining to the fight log when you are fighting another bot that has energy. If you can't get it to display something like the picture linked above, let me know your setup (Operating System, Browser, script add-on) and I'll look into it further.

I will be adding support for localStorage over the weekend, as per scarabara's suggestion. This will remove the requirement for GreaseMonkey/TamperMonkey which will hopefully expand it's compatibility with other browsers.


 
leon [85]
2013-07-12 09:50:43 🔗
[11 years, 169 days ago]

I dont see it working on chrome


 
Fishwick [131]
Moderator
2013-07-12 15:28:10 🔗
[11 years, 169 days ago]

Erik Segersall only has 16k energy this month, how come the image shows 40k?


 
Gpof2 [130]
2013-07-12 21:07:49 🔗
[11 years, 169 days ago]

Erik Segersall only has 16k energy this month, how come the image shows 40k?

Well considering he attacked it on the bot he's posting with (which is 20 levels higher than that target atm) I would assume it's an old screenshot from last month.


 
Clay Banger [73]
2013-07-12 22:52:43 🔗
[11 years, 168 days ago]
Well considering he attacked it on the bot he's posting with (which is 20 levels higher than that target atm) I would assume it's an old screenshot from last month.

Correct. Screenshot was taken a few days before the month rolled over.


I dont see it working on chrome

leon, please let me know your OS, browser and script addon, and if anything appears in the javascript console while fighting a bot with energy. (you can access the javascript console in Chrome by pressing ctrl+shift+J)


 
Kemper [201]
2013-07-12 23:57:57 🔗
[11 years, 168 days ago]

I know how to access the java. Im leon btw. windows 7 and just the extension area of google chrome.


 
Jans [87]
2013-07-13 03:01:02 🔗
[11 years, 168 days ago]

Cool script :)

I've installed it on my chromebook, and it doesn't show opponent's energy.
I see the following error in the console;
Uncaught ReferenceError: GM_SuperValue is not defined
chrome-extension://bmmjhdoomfeljkimlmoafkcpndenflkm/script.js:43


 
Fishwick [131]
Moderator
2013-07-13 03:52:26 🔗
[11 years, 168 days ago]

That means you don't have grease monkey jans


 
Jans [87]
2013-07-13 03:58:08 🔗
[11 years, 168 days ago]

I thought you only need greasemonkey when using Firefox. Chrome runs scripts on its own. All the other userscripts run fine.


 
Fishwick [131]
Moderator
2013-07-13 03:59:51 🔗
[11 years, 168 days ago]

This script relies on grease monkeys storage, clay said he will work on one that uses localStorage, which should make it work without greasemonkey


 
Jans [87]
2013-07-13 04:00:28 🔗
[11 years, 168 days ago]

oh right, it does rely on greasemonkey. Well that's not going to work on chromebooks then.


 
Clay Banger [73]
2013-07-13 04:11:50 🔗
[11 years, 168 days ago]

I have just updated the script to use localStorage by default. This removes the need to have GreaseMonkey(Firefox) or TamperMonkey(Chrome) installed. This functionality is still in it if required, just change the greaseMonkey variable to true at the top of the script.

Re-install the script from the link above and let me know how you go guys.


 
Jans [87]
2013-07-13 04:18:31 🔗
[11 years, 168 days ago]

oh that was fast :)

tried the new version; it does show energy remaining! but, it doesn't seem to update the value when i continue fighting. The remaining energy stays the same, while i do keep winning and collecting energy.

when i go back to the fight list, and select the same opponent again, the amount of remaining energy does get updated.

so to summarize; it only seems to update the value with the first fight. Clicking fight again continues to show that same value.


 
Fishwick [131]
Moderator
2013-07-13 04:22:09 🔗
[11 years, 168 days ago]

Looks like he missed one grease monkey reference at the end of the big function


 
Clay Banger [73]
2013-07-13 04:23:30 🔗
[11 years, 168 days ago]

Yeah, I noticed that shortly after I posted it online. I updated it hoping that no one downloaded it during the 5 minutes that it was broken, but seems I wasn't quick enough! Re-install and it should be all good.


 
Jans [87]
2013-07-13 04:28:30 🔗
[11 years, 168 days ago]

works perfectly - thanks for adding this!


 
Fishwick12 [78]
2013-07-13 06:49:25 🔗
[11 years, 168 days ago]

Modified it to just say "[##] remaining", but really useful and awesome script. Cheers :>


 
Mithrandon [170]
2013-07-14 04:09:41 🔗
[11 years, 167 days ago]

hmm cant remember how to install from that page in chrome, any help?


 
Jans [87]
2013-07-14 04:15:07 🔗
[11 years, 167 days ago]
  • Right click the install button
  • select 'Save as'
  • find the file in your downloads
  • drag & drop into your Chrome extensions

 
DarkNinjaMaster [33]
2013-08-02 12:53:41 🔗
[11 years, 148 days ago]

bump about this script that displays energy left

need more bump and post with descriptive nouns for search if thread dies, or sticky.....


 
Gandhi [160]
2013-08-02 12:56:10 🔗
[11 years, 148 days ago]

It proved invaluable to me last month, can't imagine scoring without it now.

If interested, it used to bug after an hour ticks and would return that the opponent had a negative amount of energy. Not really worth the hassle to fix though.


 
Clay Banger [73]
2013-08-05 18:54:42 🔗
[11 years, 145 days ago]
If interested, it used to bug after an hour ticks and would return that the opponent had a negative amount of energy. Not really worth the hassle to fix though.

This is due to the hourly increase in energy and the script storing energy values locally, not refreshing them from the server at all. Which I agree, not really worth the hassle to fix. Plus Ender will fix it when he gets around to implementing this functionality into the game. :)


 
DarkNinjaMaster [34]
2013-08-06 01:58:16 🔗
[11 years, 144 days ago]

http://www.youtube.com/watch?v=izQB2-Kmiic


 
DarkNinjaMaster [34]
2013-08-06 02:12:09 🔗
[11 years, 144 days ago]

This doesn't work for me, I installed the script, nogo, installed tamper monkey, nogo.

Using chrome on windows 7 64 bit with tamper monkey.

Nothing show up in the console box when I hit ctrl+shift+j


 
DarkNinjaMaster [34]
2013-08-06 04:48:47 🔗
[11 years, 144 days ago]

works sometimes link

mostly doesn't work click


 
New Alan [100]
2013-08-06 08:29:20 🔗
[11 years, 144 days ago]

^ You have a weird way to keep your browsers. :)


 
Scabara [161]
2013-08-06 08:32:01 🔗
[11 years, 144 days ago]

Playing OSRS or RS3, DNM?


 
Clay Banger [73]
2013-08-07 08:58:59 🔗
[11 years, 143 days ago]
This doesn't work for me, I installed the script, nogo, installed tamper monkey, nogo. Using chrome on windows 7 64 bit with tamper monkey. Nothing show up in the console box when I hit ctrl+shift+j

After digging around a bit, I've found this happens when using Emanuel's remove frames script. If you click the "Add Frames" button when the energy is not displayed, you'll see that the energy count is displayed correctly with the frames.

I've updated my script to take note if the user is also running the remove frames script and to ensure that it also gets updated with the energy remaining. Update it and see how you go.


 
DarkNinjaMaster [34]
2013-08-07 15:07:55 🔗
[11 years, 143 days ago]

Works great now, thanks!


 
Xj2 [116]
2013-10-07 09:18:25 🔗
[11 years, 82 days ago]

Bump,


 
Esvrainzas [134]
2014-10-25 09:51:45 🔗
[10 years, 64 days ago]

After happening this to me and re-installing the opponent energy display script by tampermonkey, it doesn't work. This one is quite important for scoring :(


 
Esvrainzas [134]
2014-10-25 11:01:32 🔗
[10 years, 64 days ago]

Sometimes it works although I'm not sure if the value of energy it displays is correct. I don't understand why sometimes it works and others don't... I was playing just with one tab and then I oppened more tabs and it started to appear sometimes, not always :/


 
Clay Banger [74]
2014-10-28 08:34:51 🔗
[10 years, 61 days ago]

When you are fighting someone and it is not displaying, open up the console (Ctrl+Shift+J) and let me know if there is any error messages.


 
Esvrainzas [134]
2014-10-29 14:34:05 🔗
[10 years, 60 days ago]

It appears this: http://i.imgur.com/vxRbhyj.png


 
Clay Banger [74]
2015-03-10 00:06:35 🔗
[9 years, 293 days ago]

I've made some small changes to the script which should fix some of the random issues people are having.

As userscripts.org is no more, the new location to get the script from is: https://openuserjs.org/scripts/ClayBanger/bots4Energy_display


 
Esvrainzas [134]
2015-03-10 03:08:46 🔗
[9 years, 293 days ago]

It appears to be working. Thanks Clay Banger!


 
Zord [61]
2016-08-05 09:55:34 🔗
[8 years, 144 days ago]

Mine doesn't do anything at all....

Any suggestions?


 
MrZal2 [100]
2016-08-05 11:07:05 🔗
[8 years, 144 days ago]

Use Google Chrome + Tamper monkey. I had no problem getting it to work.


 
Fishwick [135]
Moderator
2024-08-15 10:59:40 🔗
[132 days ago]

This still works (and is as valuable as ever), but it looks like the userscripts link is broke

Can access my local copy of the script here: https://pastecode.io/s/kiene8yk

Maybe Clay can rehost it somewhere if he sees this


 
Ender [1]
Administrator
2024-08-18 21:20:03 🔗
[128 days ago]

This feature is now part of the base game, so you no longer need an addon. Details: http://bots4.net/forum/4/7970


 
Forum > Miscellaneous > Opponent Energy Display Script
Reply To Thread (login)