ScriptUO
Ultima Online Fan Board => General UO Chat => Topic started by: Scrripty on July 05, 2009, 07:21:56 PM
-
Gah, someone wanna take a stab at making a little sub to calc Enemy of One timing based on this fromula? :) I gotta make it calc amount of time to wait to recast in seconds based on this formula taking into account karma if possible... There a way to do that? I've got most of the other formulas down but haven't found a way to figure karma...? I was thinking of just making karma a static number like 10000... most anyone using my script would be at or above that most likely from killing higher end monsters but I dont want to rely on that if I don't have to, it's not the optimal solution...
The base formula is as follows: duration in seconds = (square root(karma + 20000 + (Chivalry*100)) / divisor) The "divisor" part is the bit that varies from skill to skill - for EoO it is 1, for Divine Fury it is 10, and for Consecrate Weapon it is 20. "Karma" can be anything from -20000 to 20000. Chivalry can, obviously, be anything from 0 to 120. It's also all converted to an integer, so fractions are dropped.
-
Unfortunately there's no #karma or #fame in EUO to use.
I'd suggest you use the buff bar scanner to see if Enemy of One is active or not. I'd also suggest that you figure out the range in seconds that EOO can last. So whats the minimum length of time EOO lasts for someone who is Dread?
Then I'd set up a timer that would begin checking EOO in the main loop AFTER the minimum time has passed. Why call another script if there's no need to?
set %timer_eoo #sCnt ; initialize the EOO timer, after this #sCnt is bigger
repeat ; your mainloop
....
....
gosub EnemyOfOne
....
until #false ; end of main loop
sub EnemyOfOne
if %timer_eoo > #sCnt ; why try casting if we KNOW it's still active?
return
if #mana < 20 ; why try casting if we don't have enough mana?
return
Call ScanBuffBar ; need to have that script in you EUO directory
if _EnemyofOne_ notin %BuffBarIconNames
{
event macro 15 206
wait 60
set %timer_eoo ( #sCnt + XX ) whatever we determine is minimum time in seconds
}
return
We can actually put both those scans on the same line like:
if %timer_eoo > #sCnt || #mana < 20
return
I just put them separate so you'd understand what I was doing.
-
That's a good idea, but just too slow I think. The scanner would have to scan each spot on the buff bar, taking up time. I'll probly just end up leaving that user configurable, but I have no faith in the intelligence of people in general and would like to find a better solution. The duration at dread or -20000 karma is 109 seconds. At neurtral or 0 its 178 and at Illustrious its 228. Most likely its going to be in the middle of neutral and illustrious for necro/warriors. I know I'm noble a lot on my guy using Curse Weapon. I'm just trying to keep the script FAST. While doing peerless every split second counts. :)
-
Actually at euo I found another way to set it explicity by scanning the characters paperdoll and using the title, but that's probly not 100% accurate with all the new title options out there... :(
-
Have you ever used EN's buff bar scanner? It's extremely quick. Just set it to scan beginning after 110 seconds. That way it takes up 0 cycles for almost 2 minutes. And trust me. It's quick enough to put in.
-
EN's Buff bar scanner is plenty fast to handle what you are looking for.
-
I'll give it a look. :) Thanks guys. I was hoping to just set it and forget it at beginning of the script. Just seems that setting the variable at the beginning of the script would be way faster than scanning it every loop of the stack of subs I already have. I'll incorporate it and see if it will fit in nicely or not. I've got so much going on already tho that adding something of that nature might not go well... my other big problem is finding a solution to make Counter Attack, Lightning Strike, Evasion, and weapon specials work together nicely while casting chiv and necro spells CONSTANTLY. haha Counter Strike is being a pain in the rear. It has just long enough of a cast time to be annoying, turns OFF when you use Evade, uses mana fast if it goes off a couple times in a row and interrupts other things going on... it's hard to get it to play nicely with the rest of the script...
-
EN's Buffbar scanner will work great as long as you are playing OSI. For RunUO, you're kinda out of luck because it (RunUO) doesn't support that feature of the client.
-
After a little thinking that might be my only option. With the buff bar scanner I could do something along the line of, if evade = active, skip counter strike, save me some headaches with trying to scan for karma... :) Great idea guys, thanks Cerveza.
-
I love EN's buffbar scanner. I have it in my controller script for when I run dual wammy/sampires. The only issue is it will cause me to crash occasionally but I haven't quite figured out why. It has something to do w/ checking the bar too quickly because I have it check over and over real fast to eat an apple as soon as I get blood oathed.
-
I love EN's buffbar scanner. I have it in my controller script for when I run dual wammy/sampires. The only issue is it will cause me to crash occasionally but I haven't quite figured out why. It has something to do w/ checking the bar too quickly because I have it check over and over real fast to eat an apple as soon as I get blood oathed.
Yea I'll only use it for 2 purposes... the oath/apple scenario, and to keep evade and counter from stepping on each other's toes. Those are the only 2 I can think of anyways... I'm assuming people want counter up 24/7... and evade only when you're in trouble? I do an evade right off the bat to help get started on a monster, then set up counter to go nonstop? Is that how you guys are doing it? I'd be interested to see what you have going OMG... Btw, I love your trapped box maker. :) I always wanted to make one but never did. Then I found yours. haha
-
Wow never new my scanner was so popular... OMG Burgers if you ever pinpoint your crash issue and it really is my scanner send me a pm of the specifics and ill check it out.
-
I actually haven't gotten it to work yet, and I've used a few different examples that seem pretty straight forward. I'll give it another go.
-
Critical to have called scripts in the correct directory.
To make sure, I have the Buff Bar Scanner in about 6 directories :)
-
I do that also. :)