MW update crippled the script (solution)
|
|
Basically the script can't read / update the stats anymore, so then it won't know when to heal (health), what job to do (energy), when to deposit money (cash), etc. I will release a full script later today. For those who can manage to edit one line of the script, find the lines:
str = str.replace(/,/g,''); var re = /(Cash|Health|Energy|Stamina|Exp|Level): ?\$?([0-9]+)\/?([0-9]+)?/; and change it to: str = str.replace(/,|<\/?[^>]+(>|$)/g,''); var re = /(Cash|Health|Energy|Stamina|Exp|Level):.*?\$?([0-9]+)\/?([0-9]+)?/; |
|
|
Pea Cracker...thanks for looking into this. I did this fix and now all it does is a continuous loop where it will Acquire Illegal Weapons although I don't have enough energy. And then if I turn that off to None it will go to the bank and in a continuous loop try to deposit $8743457343. Then if I turn off deposits to the bank it will go to Resting mode. Is this happening to anyone else? |
|
|
Same problem. Script tries to execute actions that there is not enough energy to do, and is convinced that I have 8+ billion in cash. |
|
|
Yep, I just changed the code as indicated above. Cash is showing as $8,743,457,343. I wish I had that much. If I pick a job for Helper+ to do, it tries to do it every 5 seconds. Seems like it thinks there is more energy than is actually available. |
|
|
Maybe try: var re = /(Cash|Health|Energy|Stamina|Exp|Level):\s*(?:.span id=.*>)?\$?([0-9]+)(?:<\/span>)?\/?([0-9]+)?/; I was just hacking around with my old version of the script, and this might help you. Post back if it helps or not. |
|
|
bruttium...thanks for the help but unfortunately that did nothing. I don't know a thing about coding so I can't even attempt to figure this out. Edit: In this post http://userscripts.org/topics/18417 has TheDruidsKeeper posted this (which needs a little fix from page 2 of same post): Fix for Header
Look for this line: var re = /(Cash|Health|Energy|Stamina|Exp|Level): ?\$?([0-9]+)\/?([0-9]+)?/; That's the code that is mostly invalid now..
default:
And put this after it: this.cash = parseInt(document.getElementById("app8743457343_cur_cash").innerHTML.replace(/,/g, "").replace("$", ""));
And on page 2 of same post Brian T. O'N... posted this: This fixes Druid's first attempt. Put it in the same place he listed, but it should be: this.cash = parseInt(document.getElementById("app8743457343_cur_cash").innerHTML.replace(/,/g, "").replace("$", ""));
Basically it was not getting the maxes, this fixes that. This should re-enable auto-healing. It's currently working for me...
|
|
|
Ok, it looks like TheDruidsKeeper fix is working for me. Follow the instructions below: Find: var re = /(Cash|Health|Energy|Stamina|Exp|Level): ?\$?([0-9]+)\/?([0-9]+)?/; Follow the code down until you see this: default:
And put this after it: (Brian T's corrections) this.cash = parseInt(document.getElementById("app8743457343_cur_cash").innerHTML.replace(/,/g, "").replace("$", ""));
|
|
|
msm02eshift, the header fix works fine for me. I didn't try the others unless i stumble onto another problem. thanks a lot!! |
|
|
Sorry it was 2 lines not 1 line. Please refer back to the top post. Basically, MW added a bunch of HTML tags, the first line gets rid of them.
Well, it's really your pick, 2 lines, or a whole mess of lines. |
|
|
I've updated the two lines and replaced three lines in my previously released script. So that you all can just install the updated version now. Please report any problems, thanks. |
|
|
Thanks for the update Mate |
|
|
Well done Pea Cracker! |
|
|
Thanks! |
|
|
Working like a charm thanks as always Pea! |
|
|
Hi, could somebody just copy/paste post the newest version here. lol So many personalities suggesting this and that, it's confusing on what to change. Thanks! |
|
|
Jammer, just re-install this script. It's updated with the fix now. |