Buff macro

Share your guides, how-tos, FAQs, and so forth. This is not for support -- post questions in General Discussion.
Post Reply
User avatar
Savitar
Posts: 204

Buff macro

Post by Savitar »

Can anyone help me with a uo steam macro to keep buffs up? Such as enemy of one consecrate wep divine fury and confidence
Discord: Tokeman#9235
Selling scrolls-120's,115's,110's & Stats.
Carts for sale.
Trading HW kit's for HW saws.
Trading Blacksmith Hammer bod's(Large&Small) for your BRSK bod's OR Tailor Reset's.
Buying Tailor reset's.
zulu2401
Posts: 2009

Re: Buff macro

Post by zulu2401 »

When you cast consecrate does it appear in your buff bar?
Madmarz
Posts: 277

Re: Buff macro

Post by Madmarz »

Can change the order to whatever your needs/priorities, check loop and good

Code: Select all

if not buffexists 'Enemy of One'
  cast 'Enemy of One'
  pause 1000
endif
if not buffexists 'Consecrate Weapon'
  cast 'Consecrate Weapon'
  pause 1000
endif
if not buffexists 'Divine Fury'
  cast 'Divine Fury'
  pause 1000
endif
if not buffexists 'Confidence'
  cast 'Confidence'
  pause 1000
endif
Haswell
Posts: 44

Re: Buff macro

Post by Haswell »

Madmarz you can optimize this code by using something like:

Code: Select all

if not buffexists 'enemy of one'
  clearjournal
  cast 'enemy of one'
  waitforjournal 'disturbed' 1000 'system'
endif
if not buffexists 'consecrate weapon'
  clearjournal
  cast 'consecrate weapon'
  waitforjournal 'disturbed' 1000 'system'
endif
...
that way it should timeout once you get disturbed instead of waiting for the whole 1s
Madmarz likes this.
Top
EnEffetGile
Posts: 122

Re: Buff macro

Post by EnEffetGile »

Haswell wrote:Madmarz you can optimize this code by using something like:

Code: Select all

if not buffexists 'enemy of one'
  clearjournal
  cast 'enemy of one'
  waitforjournal 'disturbed' 1000 'system'
endif
if not buffexists 'consecrate weapon'
  clearjournal
  cast 'consecrate weapon'
  waitforjournal 'disturbed' 1000 'system'
endif
...
that way it should timeout once you get disturbed instead of waiting for the whole 1s
Unless it was fixed and Im not sure it can be without a uosteam patch. 1 of the spell from paly does not register to uosteam as a buff. I believe it was consecrate..(Been a while...)

If I am right, each time uosteam will get to this part of the code:

Code: Select all

if not buffexists 'consecrate weapon'
  clearjournal
  cast 'consecrate weapon'
  waitforjournal 'disturbed' 1000 'system'
endif
It will cast consecrate weapon every time, regardless of it being active or not.


Edit: Also, if you loop that kind of buffing macro. You should be aware that there is no sunch thing as 'priority' without some sort of 'if' statement. The only priority of uosteam will be the line it is at.

Dont really feel like writting it all but I can use a little ctrl+c, ctrl+v concept.

if not buffexists 'enemy of one'
clearjournal
cast 'enemy of one'
waitforjournal 'disturbed' 1000 'system'
elseif not buffexists 'divine fury'
clearjournal
cast 'enemy of one'
waitforjournal 'disturbed' 1000 'system'
elseif
blahblah
endif

Now, that give you some sort of priority... Tho, it could be ebtter optimised.

In a show way to explain it. Without the 'elseif'. You could do 1 macro for each spells and be more efficient then a simple if/endif statement for each spells as the elseif actualy represent the order in which you would prefer to queue up those 3 macro.
Last edited by EnEffetGile on January 21st, 2017, 10:01 pm, edited 1 time in total.
Haswell
Posts: 44

Re: Buff macro

Post by Haswell »

It took a while for servers to add all buff icons and I don't know if Demise added all icons but you can add support for more buffs by editing the UOS/Data/bufficons.xml file, for example:

Code: Select all

	<icon id="1082" name="Consecrate Weapon"/>
	<icon id="1088" name="Curse Weapon"/>
I don't have the game installed here so I can't provide you more data.

In case you can't use a buff icon you could use a timer, sample:

Code: Select all

// Initialize the timer
if not timerexists 'consecrate weapon'
  @settimer 'consecrate weapon' 10000
endif
// Check if it has reached 10s
if @timer 'consecrate weapon' >= 10000
  clearjournal
  cast 'consecrate weapon'
  waitforjournal 'disturbed' 1000 'system'
  // Check if not disturbed and reset the timer
  if not @injournal 'disturbed' 'system'
     @settimer 'consecrate weapon' 0
  endif
endif
Regarding if blocks using elseif or not using... it all depends on your scenario, lets say you have a loop like:

Code: Select all

while not dead
  // ACTION 1
  // ACTION 2
  // CASTS HERE
endwhile
if you use elseif you won't be casting in sequence (if you wan't that it is ok)... you'll end up casting only one spell at a time and it will perform action 1 and action 2 before casting spells again. so it really depends on what you want, "performance" is not the case here trust me... UOS is fast enough to process this so "priority" depends on your entire context, using or not using could affect desired behavior.
Madmarz
Posts: 277

Re: Buff macro

Post by Madmarz »

Ya elseif statements would be good in certain scenarios, but honestly like haswell said steam is fast enough it will cycle through if you happened to be out of mana or interrupted etc during a priority cast macro or sequence. You could ditch the loop check and go with replay

Code: Select all

if not buffexists 'Consecrate Weapon' and not buffexists 'Divine Fury'
clearjournal
  cast 'consecrate weapon'
  waitforjournal 'disturbed' 1000 'system'
replay
stop
elseif buffexists 'Consecrate Weapon' and not buffexists 'Divine Fury'
cast 'Divine Fury'
//etc
etc etc, and rather than run through a sequence it will cast based on current buff in a priority you choose, you could even throw in mana checks so it doesnt try and cast if your below X mana, something like

Code: Select all

If mana >= X //whatever mana needed to cast the next spell
if not buffexists 'Consecrate Weapon'
cast 'Consecrate Weapon'
endif
endif
//blah
endif
if mana >= //etc
and that could be used with elseif statements as well
User avatar
The Silvertiger
Posts: 4469

Re: Buff macro

Post by The Silvertiger »

I find that 'while not buffexists' works best.
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."
User avatar
Savitar
Posts: 204

Re: Buff macro

Post by Savitar »

thank you everyone!
Discord: Tokeman#9235
Selling scrolls-120's,115's,110's & Stats.
Carts for sale.
Trading HW kit's for HW saws.
Trading Blacksmith Hammer bod's(Large&Small) for your BRSK bod's OR Tailor Reset's.
Buying Tailor reset's.
User avatar
Savitar
Posts: 204

Re: Buff macro

Post by Savitar »

Sorry to bother everyone but how would i go about making a macro that loops but doesnt cast if the spell is already up and ready to cast. this is what i have so far...

if not buffexists 'lightning strike'
cast 'lightning strike'
endif
___________________________________
this is what i want:

if not buffexists 'lightning strike'
cast 'lightning strike'
endif
if buffexists 'lightning strike'
dont cast 'lightning strike'

this way i can loop it and not continue to hit the hotkey over and over again
Discord: Tokeman#9235
Selling scrolls-120's,115's,110's & Stats.
Carts for sale.
Trading HW kit's for HW saws.
Trading Blacksmith Hammer bod's(Large&Small) for your BRSK bod's OR Tailor Reset's.
Buying Tailor reset's.
Post Reply