Open Tharacius opened 5 years ago
Sure, I'll take a look today/tomorrow, and update it to work with the current version. The only thing to keep in mind is that every update breaks the script, and it'd need manual updating. If I won't manage to fix that, i'll add a tutorial in the README on how to update it manually, since this project is no longer maintained.
I have started working migrating the script to a Chrome extension, but that's currently in development hell. It might see a release, but I can't promise anything. 😄
I've updated the script's PvE elements to work with the current version (at least of my server), and added an easy way to enable/disable parts of the script - a settings variable right at the beginning of the script. Oh, dungeon updates are also handled by those settings.
The README now contains much more information, which I'm sure will help getting started.
The changes have been added with https://github.com/heunetik/gladiatusScript/commit/123aea9c6000d152f326c96af798427b6c01319c
Thanks for the feedback! Let me address the issues one by one here:
This works as intended, since we do not need to be on the actual page where we attack, we just need to be on a page that has the attack()
method defined. The &loc
with the value of 1
is the safest bet, because some regions may have more areas than others (the list on the left side being longer/shorter in different areas of the game)
Sadly, submitting the form or clicking the button by it's input value achieves the same thing, since we do actually need to send the button's value. (as seen here). What could be done, is finding the buttons by their name
, since that is probably constant across different languages.
This is something that is already implemented on the Circus Turma page. I'll add it as an option to use a randomized/preset enemy to attack on both the CT and the arena page.
Food is only eaten from the 3rd inventory page (oops, didn't mention that in the README!), and it only works if you leave the 3rd page of your inventory open. Since the script does not switch inventory tabs, and does not look in other inventory slots, currently this is the only way to make it work. Also, having all the food in one single tab helps with getting the most value out of your food (the script always tries to eat food that won't overheal, as to not waste any of it). Also, the script does not "actually move" any of the food, it just constructs and sends the same request as if you'd drop the food on your character. (Gets the food's position, and "drops" it on your character's position, which is always toX: 1, toY: 1
- Example request: eating the fish from the first inventory slot)
Preferred targeting is indeed something that is doable, and planned, but since the current script is "code only" (no UI), every user should be added by hand, which is not something that a lot of users would do. As it should not be too much hassle, I'll add it as a feature in this version too, but improvements which implicitly require user interaction are probably better suited for the Chrome extension, since there will be an UI where you can configure every detail of the script.
Thanks for taking the time and writing all these things up for me, I'll do my best to implement this when I'll have the time to. If you're interested in helping to develop the script/extension, feel free to open a pull request with the changes. I'll make sure to go through it, and merge it if everything seems alright 😃 (the extension is not currently available on GitHub, I'll add it as soon as I have a version which I'm satisfied with 📜 )
Oops, you're correct about the food eating script. The string that we're trying to match is the localized one (Vindeca ...
), since we need to take into consideration only the items that are actually food (consumables don't have anything to differentiate them - all potions/food/etc have the same type - data-content-type='64'
).
Since there is no item that matches our filter, it gives an error when we're trying to read an element. Try replacing /Vindeca\s(.+?)\sdin.+inteligenta\:\s\+(.+?)\s/
with /From\sintelligence\:\s\+(.+?)\s/
, and then try again if the script works (it should 😃 )
The preferred target list was unknown by me up to this point, so thanks for the info. I'll look into it to see if it's something that would ease the implementation.
And yes, the HP check should be done against the value from settings
, not the hard-coded value, thanks for noticing. 😄
Indeed, my bad, forgot that we actually need both values (the healing value and the bonus heal value based on stats). The correct pattern should be /Using\:\sHeals\s(.+?)\s.+From\sintelligence\:\s\+(.+?)\s/
, at least on the US server (made an account there just to test if it's working - it is 😄 ). If you need help with the exact pattern for your specific language, feel free to leave the item's div
content as a reply, and I'll take a look.
Right click, "Edit as HTML" on the element, and the code within is what's of interest:
Since I'm not sure that the string appears escaped, I tried to only include actual characters: /Kori.+tenjem:\slije.+?\s(.+?)\s.+inteligencije\:\s\+(.+?)\s/
In other languages, I did not see any special characters like \u017
, but they are probably region specific (the Romanian version does not use any special characters, they simplify it to the basic character. Your localization might differ). Either way, it should work for your language/server.
Regarding the upgrades, the money is not spent if the upgrades are disabled from the settings. The only thing that it does is that it enters the page and collects the upgrade data (how much it costs, which would be the most efficient way to spend the gold, etc). I'll modify it when I'll do some other work on the script, until then, it shouldn't be an issue. It opens it once every 45 seconds, but does not upgrade anything 😄
That is really odd. Based on the text you provided, the matching works as expected:
4873
is the actual healing, with 3162
being the bonus.
Not sure what could cause the issue.
It also works with the unescaped version (the "
replaced):
And even with the unicode characters replaced:
Don't know what else to say, besides making sure that you have your food in your 3rd tab, and you keep that one open at all times. 😟
Was wondering if there are possibly any plans to update this handy script?