View Full Version : Firefox KOC tools I've been building
Buber
11-07-2005, 01:29 PM
UPDATE --- GREASEMONKEY EXPLOIT NOW FIXED :)
For those who liked using my scripts before greasemonkey broke, there is a new not broken greasemonkey available.
http://userscript.org/greasemonkey-0.5.xpi
----------------------------------------------------------------------------------------------------------------------
All,
I've been working on, and have working for myself at least, addons to firefox to, given a certain buy ratio per turn, calculate based on your current gold and prefill the armory purchase screen.
Since it sounds like the armory script is almost definitely safe, I'll put that up for now. The first thing you will need to do is install greasemonkey:
https://addons.mozilla.org/extensions/moreinfo.php?id=748
This allows you to use greasemonkey userscripts.
Then right click on:
http://clan-maxwell.us/greasemonkey/kocarmory.user.js
and
http://clan-maxwell.us/greasemonkey/kingsofchaosbattlefield.user.js
And choose Install User Script
Install the script, click Ok to accept the standard config, and have fun. Browse to your armory page, go to Tools->User Script Commands->KOC Armory Prefs, or Battlefield, and then battlefield prefs and you will get a config menu at the bottom of the page.
I also have something that will limit what you see in the battlefield to people with a certain amount of gold, and am working on army size/max potential DA restrictions as well.
Also, I mostly have something done that, if you bring up someone in the attack.php page, will pop up an alert if they are listed in the PR/LaCN forums ( don't know of a better source for the data)
Unfortunately, without creating a regular dump of the PR/LaCN memberlist and storing it locally, there is no way to inline flag/not display the members, only asynchronous pop ups. If people (owners of the various lists) wouldn't mind me doing that, or can point me to a better place to get the lists, I can change it to not be an alert.
So, the questions would be:
A. Are these legal? I read the rules and it looks like it, but would like feedback from people with more experience interacting with the KoC servers
B. Are people interested, and are there other similar things people would want?
C. With a little bit of work, these should be able to be used in IE as well. Would people rather have IE support, or more tools? (currently they will work in any recent build of firefox, so MAC, linux, windows, etc all supported)
Baloo-DM
11-07-2005, 01:36 PM
isn't this just iris for firefox
FirePenguins
11-07-2005, 01:38 PM
It all sounds neat. The program to limit who you see in the battlefield might be illegal but I'm not certain about that. Some one who knows for sure will probably post here eventually.
Good Work!!
Buber
11-07-2005, 01:52 PM
As far as I know, Iris is a windows/IE based program that you have to start up, sign into, etc. It also has a lot more features than this, of course.
What I've been building is something that is a series of scripts that are installed into firefox, so that if you are visiting a KoC page, it is running. It will also work on any system that firefox works on.
If nobody wants them, that's fine, I wrote them to learn how to use GreaseMonkey, and to have something for at work where it's all linux/unix
Baloo-DM
11-07-2005, 02:30 PM
i might be interested. I really hate having to go into IE just to use iris :(
Gladii
11-07-2005, 02:47 PM
It sounds great but the feature that only shows people with a certain amount of gold does sound a bit illegal if you ask me. It would be great but if it turns out to be illegal, is there a way to uninstall without system slow downs and stuff?
Buber
11-07-2005, 03:01 PM
A few clarifications:
The battlefield script simply won't display people whose gold you can't see, or who don't meet a minimum (the can't see is configurable). It won't skip around to other pages automatically to find gold that meets the minimum. Most of the time, in normal usage, you'll just get a blank battlefield page with previous/next links to click on.
All of the things that I'm building are independent greasemonkey scripts. The armory script only gets executed by firefox if you go to the armory page, battlefield only if you go to the battlefied.
They can all be installed separately, and once you have greasemonkey installed (a firefox plugin) you can disable all greasemonkey scripts simply by clicking the little monkey head in the bottom.
The actual code simply tells the browser not to display pieces of the webpage during rendering
DaNzO
11-07-2005, 03:39 PM
well this program sounds verry good but were is it can we have a look at it were is the link :P
Derij
11-07-2005, 03:40 PM
sounds good to me and I'd definately be interested once you get everything fully functional :)
Fianor
11-07-2005, 03:51 PM
Gimme the scripts and I'll beta test em for ya. IRIS is awsome, it's only true flaw is its reliance on IE to work. If you can get a script to record sabs and recons for us from FF then I'd stop using IRIS compeltely. You should get in touch with lor and see about getting it all to work together.
Buber
11-07-2005, 03:52 PM
It's pretty functional, I mostly want to get feedback as to whether or not the tools would be against the rules before I release them
theBlackDragon
11-07-2005, 03:53 PM
It would be extremely cool if the PR would cooperate on this, Iris being limited to platforms on which VB6 binaries run (read Windows) and that have IE (read Windows, though there is/was a Mac version) is a royal pita a program that works equally well as Iris but doesn't impose those restrictions on it's users would be a god's gift!
Now, to keep this short: where's the download page? ;)
Buber
11-07-2005, 03:55 PM
Not sure you'd want to use something like this to feed an iris like database for sabs/recons. There is no way to require someone to login, and the only way to get data to an external soruce is simple http post requests, which means that anyone who got the script could fill iris up with any random sab/recon gibberish they wanted to. There are probably ways to make something for firefox that would be safe, but that would require learning something other than greasemonkey :)
Fianor
11-07-2005, 04:02 PM
bleh, oh well, I keep sabbing with IE/IRIS then. As far as legal, have you downloaded and run iris?
I've been working on, and have working for myself at least, addons to firefox to, given a certain buy ratio per turn, calculate based on your current gold and prefill the armory purchase screen.
As long as it can't autobuy the stuff then there should be nothing wrong with this. IRIS does something similar to the attack pages by filling in, if it can legally then your's should be legal too.
I also have something that will limit what you see in the battlefield to people with a certain amount of gold, and am working on army size/max potential DA restrictions as well.
Again IRIS is similar in that it changes the color of links instead of hiding them, as long as it doesn't hide the ads then it's legal by my understanding.
Also, I mostly have something done that, if you bring up someone in the attack.php page, will pop up an alert if they are listed in the PR/LaCN forums ( don't know of a better source for the data)
Unfortunately, without creating a regular dump of the PR/LaCN memberlist and storing it locally, there is no way to inline flag/not display the members, only asynchronous pop ups. If people (owners of the various lists) wouldn't mind me doing that, or can point me to a better place to get the lists, I can change it to not be an alert.
IRIS does this also, so again legal. As far as better source, talk with Lor.
DaNzO
11-07-2005, 04:32 PM
It's pretty functional, I mostly want to get feedback as to whether or not the tools would be against the rules before I release them
You want Feedback well let us hav the links or give finor the scripts and we can use them and give you feed back :P
zetetyc
11-07-2005, 04:42 PM
you probably want to try to find Lor on IRC and ask him, as he's had the most experience with the bounds of legality on this sort of program. it sounds like it shouldn't be a problem, but it might need to be submitted to the admins for approval, or something
theBlackDragon
11-07-2005, 04:52 PM
Not sure you'd want to use something like this to feed an iris like database for sabs/recons. There is no way to require someone to login, and the only way to get data to an external soruce is simple http post requests, which means that anyone who got the script could fill iris up with any random sab/recon gibberish they wanted to. There are probably ways to make something for firefox that would be safe, but that would require learning something other than greasemonkey :)
Which is not true, it is very well possible to build in a login system, which does need to be done anyway as the submission can only be done by people with a PR account an ditto password. Doing so would make it as secure as Iris.
Buber
11-07-2005, 08:34 PM
Ok, since it sounds like the armory script is almost definitely safe, I'll put that up for now. The first thing you will need to do is install greasemonkey:
https://addons.mozilla.org/extensions/moreinfo.php?id=748
This allows you to use greasemonkey userscripts.
Then go to:
http://clan-maxwell.us/greasemonkey/kocarmory.user.js
Install the script, and have fun
theBlackDragon
11-07-2005, 09:31 PM
Ok, since it sounds like the armory script is almost definitely safe, I'll put that up for now. The first thing you will need to do is install greasemonkey:
https://addons.mozilla.org/extensions/moreinfo.php?id=748
This allows you to use greasemonkey userscripts.
Then go to:
http://clan-maxwell.us/greasemonkey/kocarmory.user.js
Install the script, and have fun
I think something went wrong over here, this is what I see: http://users.tijd.com/~tdn44921/shots/oops.png
Buber
11-07-2005, 10:05 PM
Ok. By the old default (just changed it so it will be less scary) the script is set up to not display all the different armory tables that I ignore, and only display the weapons that I tend to buy.
Create a file on your desktop, for example "foo.js", right click on it, click choose program, and associate wordpad with .js files.
After you do that, go to Tools in firefox, manage user scripts, KOC Armory, and then click the edit button on the bottom.
Right now you can buy hooks, shields, missiles and dogs with it (those are the only ones I buy)
If you make removeTables = 1 it will not display the extra tables.
You will want to change the numbers for numHooks, numMissiles, numShields, etc to the numbers of those things you tend to buy per turn.
I'll work on getting the ability to have it fill in the buy amounts for other weapons tonight if I have time.
Buber
11-07-2005, 10:06 PM
In order to get the new less scary default you'll have to download my userscript again, by going to the second url.
Fianor
11-07-2005, 11:09 PM
I've dl'ed them both, I restarted ff, I've associated notepad with .js files, I open the manage user scripts and hit edit and it jsut closes the window.
:S
Buber
11-07-2005, 11:19 PM
When you look at the .js file on your desktop, does it have the normal textfile icon, or does it have a curled sheet of paper icon? The first time I tried on my work laptop I didn't have show common file extensions turned on, and the file was actually foo.js.txt. The icon should look like a curled sheet of paper, and if double click it it should open up notepad.
I also recommend using wordpad instead of notepad, I do a lot of this on linux and wordpad handles unix style linebreaks better than notepad does.
Fianor
11-07-2005, 11:22 PM
proper icon, opens in wordpad not notepad, named foo.js
Buber
11-07-2005, 11:25 PM
Sounds like it should work, but if you can't get it to play nice, the scripts get installed to:
C:\Documents and Settings\YourUserName\Application Data\Mozilla\Firefox\Profiles\something.default\extensions\{e4a8a97b-f2ed-450b-b12d-ee082ba24781}\chrome\greasemonkey\content\scripts
So you can edit it there
Fianor
11-07-2005, 11:26 PM
I'm stupid. I never right-clicked it from your link above and chose install, I was trying to install from the user script manager. Working now, thx. I'll let you know how it goes for me.
Buber
11-07-2005, 11:27 PM
I've also uploaded a new version that allows you to configure all the different weapon types for purchase, as well as an option, defaults to off, to spend all your left over gold on knives, since that seems to be a popular way to bank
FirePenguins
12-07-2005, 03:59 AM
This sounds awesome especially for me being a FF user. I'll probably download it sometime tommorow and test it out.
Fianor
12-07-2005, 03:53 PM
I like the script. It's a bit complicated to adjust for non-programmers, but not impossible. A few questions:
Can it be set so that instead of hiding all tables we can choose to turn each table on and off specifically?
If I want it to buy as many IS as I have money for then as many dogs as I have money left for then as many knives as monsy is left for, can that be set? e.g.
2,157,254 gold on hand, I want to buy 2 IS @ 1,500,000; 6 Hooks @ 400,000; and 57 knives.
Working on ratio's I don't see a way to do this. Does it only work on ratios?
And the most important question: When you gonna give us the rest of ur scripts ;) ?
Just logged in, have 5,063,917 gold, script set up for 1 IS, 2 dogs and spend the rest on knives, so it suggests 5 IS, 10 dogs, but that leaves 313,917 gold and wants to buy 313 knives. I want it to buy as 6 hooks 5 dogs and 63 knives instead, Of course I can adjust manually, but I'd rather it do it for me. ;) Maybe between us we can edit the "spend the rest on knives" part to have multiple levels. So instead of using a ratio at all it buys as many IS as u have money for (level1) then as many hooks as you have money left for (level2) then as many knives as you have money left for (level3). What do you think?
Buber
12-07-2005, 06:32 PM
I've been making my head bleed trying to come up with code to make the options configurable without having to crack open the script. I have a prototype working on a test page right now, but I have to rework parts of the existing script to incorporate it.
The new way will let you go up to Tools->User Script Commands and click on something that will say "edit prefs" or something of that sort, and then a form will appear on the bottom of the screen with text boxes and toggle fields for all the options, prepopulated with the existing prefs, and a submit button.
After that, I can add in the other "max" options easily enough, and add the easy to set option code to the battlefield script that I already have.
To choose what tables to keep and not to keep there is a regex (currently called dumbTablesRE, changing it to keepTablesRE and adding a comment to make it more clear) that chooses what tables to not delete. It's just a list of words separated by | (foo|foo2|foo3). If you want to keep the Personnel table add Personnel to the list. Those could all be made individual options, but I'll probably wait on that till there are less interesting things to do :)
The battlefield script I'll put up once I have time to get on IRC and catch Lor and ask if something that filters the battlefield page to only show what you are interested in is legal, no auto searching, just filters the 50 names that would have been displayed, or if someone else reads this and wants to ask so that I release it faster, someone else asks :) Don't want to get myself or others banned for cheating while trying to be helpful.
After that, it really boils down to whether people want more features for the two that I have functional now, or scripts to manipulate other pages, such as alerts if you have an ally pulled up on the attack.php page, etc.
Buber
13-07-2005, 03:43 AM
Ok, the new version of the armory script with user friendly preference editing is available. Once you have the script installed, browse to your armory, and then go to Tools->User Script Commands->KOC Armory Prefs
This should bring up a form on the bottom of your screen that will allow you to enter the ratio of weapons you want to buy, and check boxes for whether to remove tables, filter weapons, and bank max knives after you purchase the normal ratio. Once you have changed your prefs, click submit, reload the armory page, and your new preferences will have take effect.
The weapon names are currently the names given in the dwarf armory, if people would like the names in their own armories naming convention, please post something in the format of
var DwarfWeaponNames = {
SA2: "Sticks",
SA5: "Knives",
SA10: "Hatchets",
SA20: "Pikes",
SA40: "Maces",
SA160: "WarHammers",
SA640: "Hammer of Thors",
SA2560: "Battle Axes",
SA10000: "Black Powder Missiles",
DA10: "Helmets",
DA20: "Shields",
DA40: "Chainmails",
DA160: "Plate Mails",
DA640: "Gauntlets",
DA2560: "Dragonskins",
DA10000: "Invisibility Shields",
SPY2: "Ropes",
SPY4: "Dirks",
SPY8: "Cloaks",
SPY15: "Grappling Hooks",
SENTRY2: "Big Candles",
SENTRY4: "Horns",
SENTRY8: "Tripwires",
SENTRY15: "Guard Dogs",
}
Replacing the dwarven names for each weapon level with the names for your race
Buber
13-07-2005, 01:01 PM
Purchasing max per weapon priority is now implemented.
1 is highest, 100 is lowest, just select the maxPerWeapon radio button at the top of the user prefs menu, and then type the priority for each weapon into the input box next to it. 0 will cause no weapons of that type to be bought.
If you mark two weapons as the same priority, it won't work right, so try not to :)
smoran
13-07-2005, 01:49 PM
figurd it out but when it says enter a url what do i put? it has foo.com there alerady
-sean
Buber
13-07-2005, 02:12 PM
What stage of the install/setup process are you at? The included pages should be:
http://*kingsofchaos.com/armory.php*
You shouldn't have to change any of the params when you install, just click ok.
And all of the stuff to edit/view the javascript is only applicable if you want to make sure I'm not doing anything nefarious, all of the normal config options can now be done by going to Tools->User Script Commands->KOC Armory Prefs
smoran
13-07-2005, 02:21 PM
EDIT: it's all good thank you for your help- so when do the rest come out? *rep* :)
-sean
Fianor
13-07-2005, 02:24 PM
Very nice.
/me waits very impatiently for other scripts
Buber
13-07-2005, 02:32 PM
Well, now that I actually sort of know javascript things should move faster (why couldn't they have embedded a friendly scripting language like perl or python or tcl or anything useful into webbrowsers....)
I should have the battlefield script modified to have the user friendly options today. Then it's just a matter of making sure it isn't illegal
Fianor
13-07-2005, 02:35 PM
I've poked Lor about it in IRC already, don't know if he came and read the thread or not though. :S
RobertVH
13-07-2005, 03:10 PM
It doesn't work...
I installed that greasemonkey, i downloaded the script and when i double click it it opens in wordpad. The script is on my desktop and the icon looks like some paper scroll. When i click 'Manage User Scripts' and press edit it closes the window?
Buber
13-07-2005, 03:36 PM
When you go to the link, you need to click Install User Script from tools, or right click on the link in the post and pick install user script.
Sorry, should have been more specific on the install instructions, edited the original post to make those more clear too :)
RobertVH
13-07-2005, 05:17 PM
It works now... nice tool, altough will only use it when i have to spend quick and i aint using iris. :)
Buber
13-07-2005, 06:15 PM
yeah, the main motivation behind building it for me was so that when I wake up I just have to click a few times and pass a captcha, no math needed, and I primarily use linux, which means no Iris
Buber
14-07-2005, 09:50 PM
battlefield script has all the prefs done, started working on the alert window in case you are attacking an ally.
Unfortunately, it looks right now like doing 2 checks for ally status (one to the LaCN forums, one to the PR forums) isn't going to work very well.
For now, I'm just going to check the PR forums, unless someone can point me at an http get/post type queryable interface for checking both
zetetyc
14-07-2005, 10:10 PM
i talked with Lor briefly on IRC about this, and he said that as long as it doesn't block ads, it looks like it should be legal. especially because it does all it doesn't change the interaction between the browser and their servers.
Buber
14-07-2005, 11:26 PM
Ok, here it goes then:
http://clan-maxwell.us/greasemonkey/kingsofchaosbattlefield.user.js
Same deal as the armory script, install greasemonkey, right click on the above url, choose install user script, go to to Tools->User Script Commands-> KOC Battlefield Prefs to change the settings.
Fianor
14-07-2005, 11:42 PM
I'd kill to combine this with Iris's color changer so I can see if they are allied at the same time as sorting out gold.
Buber
14-07-2005, 11:49 PM
Unfortunately greasemonkey is not very good at getting data from places other than the webpage you are currently on. I can pop alerts if they are allied, but short of storing all of the data in the firefox user prefs (all the data being all of the pr/lacn members) highlighting isn't going to work.
I can play around with it and see what kind of impact cacheing all of those values and then looking them up when you load the battlefield has, but no guarantees :)
Infiltrate
14-07-2005, 11:58 PM
lol this is so awesome.....like a renisaunce ( horrible spelling) for FF :)..
Wha happened to the defence estimator?
Infiltrate
15-07-2005, 12:43 AM
Humans
var HumanWeaponNames = {
SA2: "Sticks",
SA5: "Knives",
SA10: "Staff",
SA20: "Long Sword",
SA40: "Lance",
SA160: "Broadsword",
SA640: "Steed",
SA2560: "Excalibur",
SA10000: "Black Powder Missiles",
DA10: "Helmets",
DA20: "Shields",
DA40: "Chainmails",
DA160: "Plate Armor",
DA640: "Mithril",
DA2560: "Dragonskins",
DA10000: "Invisibility Shields",
SPY2: "Ropes",
SPY4: "Dirks",
SPY8: "Cloaks",
SPY15: "Grappling Hooks",
SENTRY2: "Big Candles",
SENTRY4: "Horns",
SENTRY8: "Tripwires",
SENTRY15: "Guard Dogs",
}
-------------------------------
Elves
var ElvesWeaponNames = {
SA2: "Sticks",
SA5: "Knives",
SA10: "Short Bow",
SA20: "Crossbow",
SA40: "Longbow",
SA160: "Steel Bow",
SA640: "Steed",
SA2560: "Flaming Arrow",
SA10000: "Black Powder Missiles",
DA10: "Helmets",
DA20: "Shields",
DA40: "Chainmails",
DA160: "Plate Armor",
DA640: "Elven Cloak",
DA2560: "Dragonskins",
DA10000: "Invisibility Shields",
SPY2: "Ropes",
SPY4: "Dirks",
SPY8: "Cloaks",
SPY15: "Grappling Hooks",
SENTRY2: "Big Candles",
SENTRY4: "Horns",
SENTRY8: "Tripwires",
SENTRY15: "Guard Dogs",
}
---------------------------------
Orcs
var OrcWeaponNames = {
SA2: "Sticks",
SA5: "Knives",
SA10: "Sling",
SA20: "Club",
SA40: "Spear",
SA160: "Warblade",
SA640: "Warg",
SA2560: "Dragon",
SA10000: "Black Powder Missiles",
DA10: "Helmets",
DA20: "Shields",
DA40: "Chainmails",
DA160: "Plat Armor",
DA640: "Heavy Shield",
DA2560: "Dragonskins",
DA10000: "Invisibility Shields",
SPY2: "Ropes",
SPY4: "Dirks",
SPY8: "Cloaks",
SPY15: "Grappling Hooks",
SENTRY2: "Big Candles",
SENTRY4: "Horns",
SENTRY8: "Tripwires",
SENTRY15: "Guard Dogs",
}
smoran
15-07-2005, 02:29 AM
works great but nobody has money that works with my defesnse :( thanks tho :D
-sean
BigEll
16-07-2005, 09:39 AM
Sweet, *rep* :)
I'm looking forward to more FF Tools!!
smoran
16-07-2005, 10:32 AM
Just wanted to say i got 19 mill totall off one guy because of you-thanks much :D
-sean
Buber
19-07-2005, 02:58 AM
Ok, Checking for Ally status is officially a royal pain in the arse with greasemonkey, and cannot be done in a fast/effective manner. If someone has a quick webserver/database that I could host a lookup script on it would be somewhat feasible, but even then it would take 30+ seconds for everything to finish, I expect.
Is 30 seconds to a minute fast enough for an ally check? What do non iris people use now/how long does it take?
My next ideas for firefox tools are something where you can add an extra table of links to click to your command center (similar to officers, but you would be able to put friends/chain commanders in and click them in the normal flow of the game) and something that would interpret spy reports and do the math to determine min/max of stats based on info gathered (siege/fort level, number of trained/untrained soldiers/mercs, number of weapons of different strengths, etc.)
What to do people think would be most useful? The command center one would be easy, if people would be interested in something like that, the script to do the math is a bit harder, but still pretty doable :)
Infiltrate
19-07-2005, 09:46 AM
YES YES YES YES YES more more more :D.......KEEP THEM COMMING.......maybe a script for filling out messeges automatically :)....just and idea...You keep this up and i will be able and ready to ROLL next age :).....P.S. you have inspired me to learn HTML after i feel suffecient i will move on to more challegin code, any suggestions?...prolly showing my noobness there huh?
Buber
19-07-2005, 11:34 AM
By filling out messages automatically do you mean sending pm's to people?
Infiltrate
19-07-2005, 10:18 PM
By filling out messages automatically do you mean sending pm's to people?
yup like a recruite messege.....or if you need to inform all you officers....it would be simple i would think you kinda alread know ho to do it from your other scripts....you know the input in the bottom of the screen that pops up when you go to the manage scripts...sorry if it doesnt make sence
Buber
20-07-2005, 02:17 AM
Heh, I think I kind of understand what you are after. My day job for the last 5 years has been fighting spam though, writing something to automate sending messages, even if you don't plan to use it to spam, just isn't something I'm going to do :)
Infiltrate
20-07-2005, 02:56 AM
lol...i understand........it was worth a try
Infiltrate
20-07-2005, 03:00 AM
what do you have in mind for us next?
matereation
20-07-2005, 12:24 PM
peoplz it aint working for me wat did i do wrong?? i did everything u told me too but it doesnt seem to be working!!! help dun no wats wrong!!
Buber
20-07-2005, 09:24 PM
Ok, first question, do you have a little monkey head in the bottom right corner of your screen? If not, then you don't have greasemonkey installed. If you do have the monkey head, it should be colored if greasemonkey is turned on, clear if it is turned off (clicking on the monkey head switches it on and off)
The go to Tools->manage user scripts
You should see a Battlefield and an Armory script.
If you don't see those, then you need to right click on the links for them in the earlier posts and choose install script.
If you do see them, and you have a colored monkey head, then go to your KOC Armory, and choose Tools->User Script Commands-> Armory Prefs, configure it how you want, and then refresh the page.
smoran
21-07-2005, 04:26 AM
hmm thats odd i had it wokring fine and then i installed some more firefox add ons now it doesnt both are installed any suggestiong because this is a avery good program id hate to lose.
Buber
21-07-2005, 04:45 AM
What are the other add ons you installed?
smoran
21-07-2005, 04:48 AM
customize google and adblocker...
Buber
21-07-2005, 04:51 AM
Ok, if I get a chance to play around with I'll try installing those and see what happens. Do you still have the colored in monkey head at the bottom of your screen and everything? Also, do both greasemonkey scripts not work?
matereation
21-07-2005, 01:22 PM
Ok, first question, do you have a little monkey head in the bottom right corner of your screen? If not, then you don't have greasemonkey installed. If you do have the monkey head, it should be colored if greasemonkey is turned on, clear if it is turned off (clicking on the monkey head switches it on and off)
The go to Tools->manage user scripts
You should see a Battlefield and an Armory script.
If you don't see those, then you need to right click on the links for them in the earlier posts and choose install script.
If you do see them, and you have a colored monkey head, then go to your KOC Armory, and choose Tools->User Script Commands-> Armory Prefs, configure it how you want, and then refresh the page.
huh prefs i didnt see that and how do i confiugre it?? i only see armory and the battlefield thing!!
LGC-Ramm
21-07-2005, 01:26 PM
hello
i've installed the monkey and the scripts like you told!
nothing really happens
i've got the monkey icon in the lower bar...
if i want to edit them in tools/manage user scripts
i get a winsows error "Windows script host" ... syntaxisfault ... compilationfault Microsoft Jscript...
can i do something about this??
Greets LGC-Ramm
i just saw that i need to click the "user script commands" in the tools menu!
but its grey and can't click it!!!!
anyone know why?
Buber
21-07-2005, 01:49 PM
If you log into your KOC account and go to your armory, you should have a user script command available under Tools->User Script Commands
When you click that, it will bring up a preferences menu that lets you configure what your buying preferences are ( it will be an html form on the bottom of the page)
If you click on attack and bring up your battlefield, you will have a user script command available to set your battlefield preferences.
For editing the scripts, you need to associate wordpad with .js
Create a file on your desktop that is .js, or save a copy of the scripts to your desktop.
Right click on the file, choose open with, select wordpad, and check the box that says always use wordpad to open files of this type.
You should now be able to double click on the script on your desktop, and have it open in wordpad.
Once that works, if you go to manage scripts under Tools in Firefox, and click edit, it should bring the script up and let you change things.
LionBorg
21-07-2005, 02:05 PM
I also have the same problem; 'user script commands' is not highlighted and can't be clicked.
Lionborg
Buber
21-07-2005, 02:12 PM
Ok. Is the monkey head, clear, or colored? It has to be colored, or greasemonkey isn't actually running, just installed. Also, when you got manage user scripts, if you click on the battlefield script, on the side where it lists included pages, it should have http://*kingsofchaos.com/battlefield.php* and armoury should be http://*kingsofchaos.com/armory.php*
The User Script Commands will only be runnable if you are on those pages.
LionBorg
21-07-2005, 02:24 PM
Yes,
everything is like you say: the monkey is at the right corner and is coloured and both the armory and battlefield thing is filled in....
Still the 'use script commands' is not highlighted...
Buber
21-07-2005, 03:31 PM
Are you at www.kingsofchaos.com/armory.php when you check? Also, check Tools->Java Script Console and see if there are any errors there
LionBorg
21-07-2005, 04:26 PM
JAva Script Console gives different faults (Fout = fault; bronbestand = source file; regel = line )
Fout: syntax error
Bronbestand: http://www.dur.ac.uk/Admin/proxy.config
Regel: 207
Broncode:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
Fout: threadedmode is not defined
Bronbestand: http://www.phoenixrising.at/forums/clientscript/vbulletin_quickreply.js
Regel: 17
Fout: GM_getValue is not a function
Bronbestand: http://www.kingsofchaos.com/armory.php
Regel: 236
Fout: this.buybut has no properties
Fout: GM_registerMenuCommand is not a function
Bronbestand: http://www.kingsofchaos.com/battlefield.php
Regel: 133
Hope you can do something with this. I don't understand it at all...
Greets
Buber
21-07-2005, 06:49 PM
Hmm. Sounds like you are not running a version of greasemonkey that supports my stuff. If you click on Tools->Extensions what is the version of greasemonkey given? Mine is 0.3.3.
Also, what version of firefox are you running?
LGC-Ramm
21-07-2005, 06:49 PM
Mine says
Fout: GM_registerMenuCommand is not a function
Bronbestand: http://www.kingsofchaos.com/battlefield.php
Regel: 133
when i try to open the .js files with "Microsoft (r) Windows bases script host"
it gives a compile error
i'm usin
firefox 1.0.4 (+adblock)
greasemonkey 0.3.5
windowsXP
greets
LGC-ramm
Buber
21-07-2005, 07:24 PM
Ah, ok, just checked the greasemonkey dev site, apparently there is a bug in the underlying greasemonkey code, and 0.3.5 is an intentionally gimped version that doesn't support the commands to do some of the cooler things (like add menus).
For people using my scripts, this only an issue if the developers of KoC decide to try to exploit the bug and hack your box, but for the paranoid you may want to upgrade to 0.3.5 or disable greasemonkey for now.
I'll post an update once they have a version that no longer can be exploited, and if I can find an older version of my scripts before I spent a day adding the user friendly preferences menu, I'll put those up for now, as they will still work :(
Fianor
21-07-2005, 07:36 PM
I was fixin to post about the bug. It's actually pretty nasty. I don't understand GM too well so I'm asking you can greasemonkey run a script from a page without me knowing it or installing a script on that page? By having GM installed and only the 2 scripts on KoC running can any other website access the bug? Could I be looking around on a webpage and unknowingly be exposing this PC to them, or only to KoC from the 2 pages I've got scripts on?
Oh and will your scripts run 3.5?
LionBorg
21-07-2005, 07:43 PM
Mozilla Firefox 1.0.4 and
Greasemonkey 0.3.5
Buber
21-07-2005, 08:12 PM
Currently my scripts will break on 3.5, because of the user preferences menu.
The bug is only something that can be exploited by a page that you have setup a greasemonkey script to run against.
There are generic greasemonkey scripts that people set up to run against all webpages, those are the ones that really expose you to problems.
If you have only installed the two that I have made and put up here, and you left the defaults when you installed them alone, then you are only vulnerable if the KoC site tries to hack you.
Fianor
21-07-2005, 10:26 PM
That's what I thought, just wnated to make sure, thx, I'll keep using em, don't think KoC admins are trying to hack us.
Infiltrate
22-07-2005, 09:02 AM
I installed the update.......damn it.....you think a system restore would get back to my old one?
smoran
22-07-2005, 09:49 AM
indeed that does stink well it was nice while i had it :( keep trying tho it is very appreciataed (btw that is my problem that i posted b4)
-sean
Neo139
07-08-2005, 07:56 PM
i got firefox 1.06
and the greasemonkey
this is what happen
the user script command is not enable
i close firefox and open it, and the same :S i install all
http://img327.imageshack.us/img327/3349/s9qx.jpg
Vaekor
07-08-2005, 08:08 PM
i got firefox 1.06
and the greasemonkey
this is what happen
the user script command is not enable
i close firefox and open it, and the same :S i install all
http://img327.imageshack.us/img327/3349/s9qx.jpg
Neo, what version of greasemonkey do you have? If you just downloaded it, then you have 0.3.5, and it was stated above that the tools described in this thread don't work on 0.3.5. (Scroll up about 7 posts before yours for more details or read the very top of the first post.)
Neo139
28-08-2005, 04:26 AM
i have version 0.5.1
Vaekor
28-08-2005, 05:51 AM
i have version 0.5.1
Then barring something profound that I'm unaware of, I think your version is too high to support the tool. My apologies.
Furthermore, anyone who installs greasemonkey at this point will have the same problem, so it's probably time to put an end to this thread.
:closed:
EDIT: Errr... or not. Apparently the problems in 0.3.5 have been fixed.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.