UOSteam Fighting Macro

Discussion about the technical aspects of scripting. Ask about all issues involving your freelance projects here.
Locked
Trithebest
Apprentice Scribe
Posts: 12
Joined: Fri Jun 03, 2016 6:12 pm

UOSteam Fighting Macro

Post by Trithebest »

Hey there, it's me again.

I created a small combat macro that will cast Bless, then rearm your wep, Divine Fury and Consecrate Weapon. I used the timer mechanic to achieve this.

I now have questions;

1- Is there something I can do to shorten the length of the macro, hence making it easier to read?

2- Is there a way to add auto targeting to this macro? If there is, another question comes to my mind;
-> would there be a way to cast enemy of one once a new mob type is targeted?

ex. : I fight 3 liches and 2 zombies, once it auto targets one of the liches, I cast enemy of one, then it auto targets the other liches. After killing the liches, it would target the zombies and cast enemy of one. (I understand that since UOSteam does not give the option to create variables, this would be hard to achieve, I'm only wondering if it is possible)

3- Is there a way to activate primary or secondary attacks automatically when mobs are targeted?

Here is the script I wrote, I put a couple notes here and there to make it easier to read. Keep in mind that I am a beginner when it comes to macros.

Code: Select all

//=====================================UOEX fighting macro=======================================//
//=====================================Created by Trithebest=====================================//
//Prompts for the weapon you'll be using, to rearm it after spells
if not @findobject 'Weapon'
  promptalias 'Weapon'
endif
//Casts Bless, and creates the timer for it.
if not timerexists 'Bless'
  cast 'Bless'
  pause 1500
  target! 'self'
  equipitem 'Weapon' 2
  createtimer 'Bless'
endif
clearjournal
//Casts Divine Fury, and creates the timer for it.
if not timerexists 'Divine Fury'
  cast 'Divine Fury'
  pause 300
//I put two different cells here for both scenarios, I do not know if it is possible to unite both of them.
  if @injournal 'You have not yet recovered from'
    pause 3500
    cast 'Divine Fury'
  endif
  if @injournal 'You are already'
    pause 3500
    cast 'Divine Fury'
  endif
  createtimer 'Divine Fury'
endif
clearjournal
//Casts Consecrate Weapon, and creates the timer for it.
if not timerexists 'Consecrate Weapon'
  cast 'Consecrate Weapon'
  pause 300
  if @injournal 'You have not yet recovered from'
    or 'you are already'
    pause 3500
    cast 'Consecrate Weapon'
  endif
  if @injournal 'You are already'
    pause 3500
    cast 'Consecrate Weapon'
  endif
  createtimer 'Consecrate Weapon'
endif
clearjournal
//This is where the loop starts
if timer 'Bless' > 120000
  cast 'Bless'
  pause 1500
  target! 'self'
  equipitem 'Weapon' 2
  settimer 'Bless' 0
endif
if timer 'Divine Fury' > 180000
  cast 'Divine Fury'
  pause 300
  if @injournal 'You have not yet recovered from'
    pause 3500
    cast 'Divine Fury'
  endif
  if @injournal 'You are already'
    pause 3500
    cast 'Divine Fury'
  endif
  settimer 'Divine Fury' 0
endif
if timer 'Consecrate Weapon' > 10000
  cast 'Consecrate Weapon'
  pause 300
  if @injournal 'You have not yet recovered from'
    pause 3500
    cast 'Consecrate Weapon'
  endif
  if @injournal 'You are already'
    pause 3500
    cast 'Consecrate Weapon'
  endif
  settimer 'Consecrate Weapon' 0
endif
jerco05
Adept Scribe
Posts: 43
Joined: Sun Aug 17, 2014 9:14 pm

Re: UOSteam Fighting Macro

Post by jerco05 »

For question #1, yes. It's cleaned up for you now (see below)

#2. Yes there is a way for it to be done, no it's not free.

#3. Yes, I built it into the script for you (search for "setability")

Let me know if this helps.

Code: Select all

//=====================================UOEX fighting macro=======================================//
//=====================================Created by Trithebest=====================================//
//===================================== Edited by UrNewDaddy====================================//
//Prompts for the weapon you'll be using, to rearm it after spells
if not @findobject 'Weapon'
  promptalias 'Weapon'
endif
//Sets primary weapon ability to on (spams primary weapon ability)
//-----------------------------------------------
if mana > 34
  setability 'primary' 'on'
endif
//Casts Divine Fury if stam drops under 125
//-----------------------------------------------
if stam < 125
  cast 'Divine Fury'
  pause 500
  if @injournal 'not yet recovered' 'system' or @injournal 'you are already' 'system'
    replay
  endif
endif
//Creates, sets timer for and casts Bless
//-----------------------------------------------
if not timerexists 'Bless'
  settimer 'Bless' 0
endif
if timer 'Bless' >= 9000
  cast "Bless"
  settimer 'Bless' 0
  target! 'self'
  equipitem 'Weapon' 2
endif
clearjournal
//Creates, sets timer for and casts Consecrate Weapon
//-----------------------------------------------
if not timerexists 'consecrateweapon'
  settimer 'consecrateweapon' 0
endif
if timer 'consecrateweapon' >= 9000
  cast "Consecrate Weapon"
  settimer 'consecrateweapon' 0'
  pause 500
  if @injournal 'not yet recovered' 'system' or @injournal 'you are already' 'system'
    replay
  endif
endif
PM Richter in game
Locked