Oblivion Code
|
|
I hope this isn't too dirty. My scripting is minimal... I've tested and added this code when a monster has a lot of health and Oblivion seems like the best spell to use. Of course, you had to have acquired the Oblivion spell. I use this to farm the Sea Beast Spirit. you can add it at line 950 (current code) just after the lines that say: if (autoAttackEnabled)
This is the code to add: //Oblivion code
|
|
|
In the current code, Oblivion is defined this way at line 1156:
Does this suit your need? |
|
|
I also have Inferno defined on line 1157 in my non-released version (I modify it almost daily for my own needs), but I usually have it commented out since it only is effective on a subset of the monsters:
I might add a button to the attack screen to enable/disable use of Inferno. Ideas are welcomed. |
|
|
And I modified Vikram's special case on line 1155:
If someone else has a better idea on how to deal with Vikram, I'm all ears. (notice the 991745? it's really 1745 but the 99 basically makes that one a no-op since the rule doesn't work so well with job #1745 since his energy is excessively high and probably very expensive to outlive) |
|
|
If anyone knows which attacks are specifically effective on which monsters, I want to know. I need the job # for the attacks (if not in current code already) and the job # for the monster being attacked. Or better yet, code would do great too. |
|
|
*I will work on some :) Again, just working with the logic side first.
*Vikram kalamar (1494), can be dealt with but creating a specific routine is hard.
*The Twin Giants & Hydra, likewise can be tough early on in the game. Easier to wait for them to run out of energy. Later on, its far easier to just do the Oblivion/Inferno routine. *The Amrit Revealed & Balrog & Vikram Falhill (Kraken?), just should not be done with an autofight. Not unless the logic gets pretty good. I will work on putting something together. Frankly any monster that has Regen and/or Energy Drain will be a bit of a problem.
*Be nice to have something for the Earth Elementals :) Atk/Def 50,000
|
|
|
Code for Earth Elemental autofight.
|
|
|
Ok, I think I have a better formula (generic) for Oblivion.
It yields an oblivion threshold of:
Could probably use a little tweaking on the low end, but gives a reasonable result at the higher end.
|
|
|
Thanks for these, galro. If you can figure out what might be wrong with that last one, let me know. I'd like to include it into the script. |
|
|
I found reading this particular topic interesting as it enabled me to see the logic you may use to fight a creature. Here is an example of a fight that I must program in, the farming of wyrm. I select a wyrm location around Guildin Falls in the Lindelin Forest, I choose two attacks, the first a lightening strike, the second a fire blast, both on the same basic level page. This kills the wyrm and may give me 1 or two points of damage. I will wish to continue killing the wyrm at this location until I have no more stanima or Energy whichever comes first. This is not unlike farming for bread in Sulindal. Now before I begin these two very obvious code enhancements, has someone already done this? |
|
|
I wrote the code and applied it and it works except for the messages I am unsure about which say "No Autoplay Jobs in this area" Here is the code:
|
|
|
If I remember correctly, that message just means there aren't any jobs of that kind on the quest screen? I can't remember. If it's working, I wouldn't worry about it. I'll probably just remove that message when not on the quest screen. |
|
|
Thank you kind sir; I am sure keeping the code clean and concise keeps you busy. For those of you on Facebook who really care, I can be found and added to your guild. As you can tell by my tasks, I have maxed out my character, except for farming lava links and I will be working on this code to be added soon as well. |
|
|
This code has been working great for me. Tested against Stags, Wyrms, Earth Elementals and most Bosses. (I have 15k att/def). If your attack/defense is less, you might want to adjust the numbers up or down.
|
|
|
Ikay then, I have made a grave error in comprehension. Doesn't the be;ow script monitor my health and do a heal if I fall below the healthHealmin?
|
|
|
Understanding that I have set these variables:
|
|
|
Ok, it looks like that should heal if your health is < 875. One problem, it looks like it will let you attack if you are 80+ energy. You probably want to be at/near max health and energy to start. You probably want to autoatkup if their defense is >12k and you use a lot of inferno. Will be a net savings of energy, most of the time.
|
|
|
The way the logic works is this: (when an action is performed, the page reloads and then the logic starts from the top again) - Do you have enough health? If not and if we're allowed to auto-heal, do it if there are sufficient health items. If not and we're allowed to run away, try to run away. If not, stop and wait for user. - Do you have enough energy? If not and if we're allowed to auto-energy, do it if there are sufficient health items. If not and we're allowed to run away, try to run away. If not, stop and wait for user. - If we're allowed to auto-def-up and we haven't done it yet and we have enough energy for it, do it. - If we're allowed to auto-atk-up and we haven't done it yet and we have enough energy for it, do it. - If we're allowed to auto-attack, find an attack and do it. - If we've gotten this far, wait for the user to do something. |
|
|
I have read the logic and it is sound. As I now play with the auto attack enabled I note two things:There is no escape from the logic unless I simply disable Greasemonkey. The logic works so fast that if after say 15 auto attacks I wish to escape to another place in the game for other activities, I may not until my stamina is gone and I have the ability to reclick on the auto play button.
|
|
|
There is a button in the attack screen to disable "auto attack repeat" or something. Unclick this and it will stop the fighting routine once the current fight is finished. |
|
|
Yes, if you click the "auto-attack repeat" button (in the top-left corner, so it turns red), it will not auto-attack that monster after the battle is over. It is the exact same as clicking it (so it is red) for the monster on the quests screen. The two buttons affect the same state variable. If your health goes under what you have set as your minimum health before heal, it will treat it as too low, even if just one health point under. If you want to change what your minimum health is, you have to do it in the code, either in the default setting ( |
|
|
Dismay! I unloaded the script and downloaded the current version. I then used Word to do a document compare. Wow, what the heck did I have? You see the new version has the buttons on the right I can stop the auto attack. Now, the dismay. I went into the Fahill dungeon and attacked Balrog, not auto-attack, just plain attack. Auto attack kicked in and I died because auto-heal does not function. To test this theory I went to the Barrenhoff Volcano and di an auto-attack of the Lava Chainling with Auto heal enabled, again I was killed. WTF? I have looked over the code I now have and can not discern where the failure is. Has anyone used the auto heal feature successfully? I know, ths is scripting contributed by many for the purpose of a distributed improvement. I am beginning to doubt my 10 years of scripting skill. |
|
|
The code I am using is from about 10 days ago, because I have made many changes to it. Let me download and do a compare. I don't want to lose my changes either. I have used autoheal very successfully though, and I am healing consistently. Only a couple monsters where I want to turn it off. When I am trying to get killed. Need to remember :) |
|
|
Just in case, be sure to go to your inventory list before you fight. That's the primary way the script knows your inventory. It shouldn't matter, though, because it should try to use the heal items anyway (as long as they appear as a choice during the fight without the script). I haven't had any auto-heal problems at all. Of course if I did, I'd fix it! :-) |