UOsteam script help
UOsteam script help
So what I'm trying to do is cast lightning on the Dark Fathers in doom and add an if conditional like command to cast greater heal on myself if my hits drop to 50 or so. I have this is razor but with Google's help I still can't figure out how to create this in UOS. I don't have coding knowledge so it's been trial and error each round of doom trying to change things until it works. No luck.
This is what I'm trying to do:
cast "Lightning"
waitfortarget 3000
target! 'last'
if hits < 50
cast "Greater Heal"
waitfortarget 3000
target! 'self'
This is what I'm trying to do:
cast "Lightning"
waitfortarget 3000
target! 'last'
if hits < 50
cast "Greater Heal"
waitfortarget 3000
target! 'self'
- The Silvertiger
- Posts: 4469
Re: UOsteam script help
Are you not getting a journal msg: "unexpected if"? A better alternative to the whole greater heal phrase is:
if hits < 50
bigheal 'self'
pause 1000
endif
Also you need a recovery pause after target.
if hits < 50
bigheal 'self'
pause 1000
endif
Also you need a recovery pause after target.
Never forget June 4th 1989!
Selling List & Vendor
"Screenshots will never be used as evidence but more of a reference tool for us to help in our investigations."
Selling List & Vendor
"Screenshots will never be used as evidence but more of a reference tool for us to help in our investigations."
Re: UOsteam script help
Not that I'm very good with steam myself but maybe you could try an "if" command?
if hits < 50
cast 'greater heal'
target 'self'
elseif hits > 49
cast 'lightning'
targettype 'enemy' 'grey'
endif
Insert pauses where needed.
if hits < 50
cast 'greater heal'
target 'self'
elseif hits > 49
cast 'lightning'
targettype 'enemy' 'grey'
endif
Insert pauses where needed.
Re: UOsteam script help
Yes I was constantly getting "an unexpected if occurred" or something like that. I'll give this a try and add that recovery pause at the end.The Silvertiger wrote: ↑December 16th, 2020, 3:23 am Are you not getting a journal msg: "unexpected if"? A better alternative to the whole greater heal phrase is:
if hits < 50
bigheal 'self'
pause 1000
endif
Also you need a recovery pause after target.
Thanks
Re: UOsteam script help
Because your statement was missing an „endif“ at the End. But Silver is right about the pause though.Jeller wrote: ↑December 16th, 2020, 5:53 pmYes I was constantly getting "an unexpected if occurred" or something like that. I'll give this a try and add that recovery pause at the end.The Silvertiger wrote: ↑December 16th, 2020, 3:23 am Are you not getting a journal msg: "unexpected if"? A better alternative to the whole greater heal phrase is:
if hits < 50
bigheal 'self'
pause 1000
endif
Also you need a recovery pause after target.
Thanks
-
- Posts: 47
- Location: Cincinnati, Ohio
Re: UOsteam script help
I like to keep my targeting predictable, so I would use an alias here rather than the last target. Something like this:Jeller wrote: ↑December 16th, 2020, 1:23 am So what I'm trying to do is cast lightning on the Dark Fathers in doom and add an if conditional like command to cast greater heal on myself if my hits drop to 50 or so. I have this is razor but with Google's help I still can't figure out how to create this in UOS. I don't have coding knowledge so it's been trial and error each round of doom trying to change things until it works. No luck.
Code: Select all
if not findalias 'Dark Father'
promptalias 'Dark Father'
endif
while inrange 'Dark Father' 10
if hits < 50
bigheal 'self'
while waitingfortarget
endwhile
else
cast 'Lightning' 'Dark Father'
while waitingfortarget
endwhile
endif
endwhile
@unsetalias 'Dark Father'
You could also expand this to incorporate mana checks, like so:
Code: Select all
if not findalias 'Dark Father'
promptalias 'Dark Father'
endif
while inrange 'Dark Father' 10
if hits < 50
bigheal 'self'
while waitingfortarget
endwhile
elseif mana < 60
useskill 'Meditation'
while mana < 80
if hits < 50
break
endif
endwhile
else
cast 'Lightning' 'Dark Father'
while waitingfortarget
endwhile
endif
endwhile
@unsetalias 'Dark Father'
Last edited by Vampire337 on January 1st, 2021, 3:39 am, edited 1 time in total.
kentares, Frasier, The Silvertiger and 1 other person like this.
Top
Re: UOsteam script help
Whoaaa thanks so much for taking the time to create that and explain it out to me. That helps a ton and makes a lot more sense now. I just learned some things I need to update in my current macros too.
Brilliant!
Brilliant!
kentares, The Silvertiger and Vampire337 like this.
Top
Re: UOsteam script help
i'm just trying to understand what kind of character/template u are using...
Ciro#7619
Re: UOsteam script help
ok! I miss read what you posted! i read 'use lighting strike and g heal' hahhaa now it makes sensse. i'm sorry!
Ciro#7619
Vampire337, Jeller and Bama like this.
Top
Re: UOsteam script help
When using the "managed cast" you should check against the "waitingfortarget" command, for example:Vampire337 wrote: ↑December 17th, 2020, 7:37 pmI like to keep my targeting predictable, so I would use an alias here rather than the last target. Something like this:Jeller wrote: ↑December 16th, 2020, 1:23 am So what I'm trying to do is cast lightning on the Dark Fathers in doom and add an if conditional like command to cast greater heal on myself if my hits drop to 50 or so. I have this is razor but with Google's help I still can't figure out how to create this in UOS. I don't have coding knowledge so it's been trial and error each round of doom trying to change things until it works. No luck.Using the while loop allows you to repeat until it dies without making the entire script loop. Note that we prioritize healing before attacking (because dying sucks), so health check is first in the if/else chain. Putting the target into the cast command means you don't need to add extra lines of code to wait for target and then target. Rather than a pause after each cast, you could move the pause to after the endif and before the endwhile, but as it's written here you could tweak it to maximize casting efficiency for each spell (trial and error is good here). Then after we're done with the looping (Dark Father is no longer in range, so either it died or we ran away for some reason), I like to clean up my aliases.Code: Select all
if not findalias 'Dark Father' promptalias 'Dark Father' endif while inrange 'Dark Father' 10 if hits < 50 bigheal 'self' pause 2000 else cast 'Lightning' 'Dark Father' pause 2000 endif endwhile @clearalias 'Dark Father'
You could also expand this to incorporate mana checks, like so:We first check health, most important. Then we check mana. If health is below our minimum, the mana check never happens. If we're low on mana, meditate and wait in a while loop until mana returns to an acceptable level, BUT if health starts to drop we want to break the mana while loop, so the main while loop will make us heal up.Code: Select all
if not findalias 'Dark Father' promptalias 'Dark Father' endif while inrange 'Dark Father' 10 if hits < 50 bigheal 'self' pause 2000 elseif mana < 60 useskill 'Meditation' while mana < 80 if hits < 50 break endif endwhile else cast 'Lightning' 'Dark Father' pause 2000 endif endwhile @clearalias 'Dark Father'
Code: Select all
bigheal 'self'
while waitingfortarget
endwhile
Code: Select all
cast 'lightning' 'enemy'
while waitingfortarget
endwhile
kentares and Vampire337 like this.
Top
-
- Posts: 47
- Location: Cincinnati, Ohio
Re: UOsteam script help
Thanks for the pointers, Haswell. I updated my post accordingly, after testing and finding that it does work as you say, and no additional pause was necessary in my case.
Also in testing I found that my use of "@clearalias" is not appropriate, and instead should be "@unsetalias". The downside of writing scripts in a forum instead of in UOS. I updated that as well.
Also in testing I found that my use of "@clearalias" is not appropriate, and instead should be "@unsetalias". The downside of writing scripts in a forum instead of in UOS. I updated that as well.