Dex , Str, Stam Pot Chuggers

amonseti

Grandmaster
3 Identicle macros but each modified for the 3 POT types .

Macro will unequip current weapon Drink the POT and re-equip weapon.

Simply make a macro for each. each with its own hotkey.


Code:
// $$$$$$$$$$$ Dex Pot Chugger $$$$$$$$$$$
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
// ?? By Amonseti
// ?? V2.1 (Last Edit made Nov 15/2015)
// ???????????????????????????????????????
// ?? This macro only requires that there
// ?? be Dex pots in the Main pack or any
// ?? bag in the main.
// ??
// ?? Macro will first check if you are
// ?? holding a weapon and clear your hands
// ?? to allow for pot chuggins.
// ??
// ?? When done the macro will automatically
// ?? re-equip the weapon you were using..
// ??
// ???????????????????????????????????????
//
// !! Check if holding a weapon !!
if @findlayer 'self' 2
  // !! Unequip wep
  togglehands 'left'
  pause 600
  //
  if @findtype 0xf08 0 'backpack'
    @setalias 'Potion' 'found'
    useobject! 'Potion'
  else
    headmsg 'OUT!!! of Dex potions'
  endif
  //
  pause 600
  // !! Re-Equip Weapon player was holding
  togglehands 'left'
else
  if @findtype 0xf08 0 'backpack'
    @setalias 'Potion' 'found'
    useobject! 'Potion'
  else
    headmsg 'OUT!!! of Dex potions'
  endif
endif

Code:
// $$$$$$$$$$$ Stam Pot Chugger $$$$$$$$$$$
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
// ?? By Amonseti
// ?? V2.0
// ???????????????????????????????????????
// ?? This macro only requires that there
// ?? be Stamina pots in the Main pack or
// ?? any bag in the main.
// ??
// ?? Macro will first check if you are
// ?? holding a weapon and clear your hands
// ?? to allow for pot chuggins.
// ??
// ?? When done the macro will automatically
// ?? re-equip the weapon you were using..
// ??
// ???????????????????????????????????????
//
// !! Check if holding a weapon !!
if @findlayer 'self' 2
  // !! Unequip wep
  togglehands 'left'
  pause 600
  //
  if @findtype 0xf0b 0 'backpack'
    @setalias 'Potion' 'found'
    useobject! 'Potion'
  else
    headmsg 'OUT!!! of Stamina potions'
  endif
  //
  pause 600
  // !! Re-Equip Weapon player was holding
  togglehands 'left'
else
  if @findtype 0xf0b 0 'backpack'
    @setalias 'Potion' 'found'
    useobject! 'Potion'
  else
    headmsg 'OUT!!! of Stamina potions'
  endif
endif

Code:
// $$$$$$$$$$$ Str Pot Chugger $$$$$$$$$$$
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
// ?? By Amonseti
// ?? V2.0
// ???????????????????????????????????????
// ?? This macro only requires that there
// ?? be Str pots in the Main pack or any
// ?? bag in the main.
// ??
// ?? Macro will first check if you are
// ?? holding a weapon and clear your hands
// ?? to allow for pot chuggins.
// ??
// ?? When done the macro will automatically
// ?? re-equip the weapon you were using..
// ??
// ???????????????????????????????????????
//
// !! Check if holding a weapon !!
if @findlayer 'self' 2
  // !! Unequip wep
  togglehands 'left'
  pause 600
  //
  if @findtype 0xf09 0 'backpack'
    @setalias 'Potion' 'found'
    useobject! 'Potion'
  else
    headmsg 'OUT!!! of Strength potions'
  endif
  //
  pause 600
  // !! Re-Equip Weapon player was holding
  togglehands 'left'
else
  if @findtype 0xf09 0 'backpack'
    @setalias 'Potion' 'found'
    useobject! 'Potion'
  else
    headmsg 'OUT!!! of Strength potions'
  endif
endif
 
Last edited by a moderator:

Young Star

Grandmaster
Just a nit pick, you could probably move the pause 600 after the else--headmsg "out of potion" before it instead since the pause isn't necessary if nothing is drank. I think you could also do the potion found check before you do the disarm routine that way you don't disarm for no reason when out of pots.
 

Young Star

Grandmaster
Here is one that I have pretty tuned up that does heal, cure, and stam when needed. the HPs can be adjusted to whatever. I set it to only disarm my left hand so it works for 2 handers or parry shield dexers.


Code:
//Set up Timer for heal potion cooldown
if not timerexists 'Heal Potion'
  createtimer 'Heal Potion'
  settimer 'Heal Potion' 10350
endif
// Cure potion
if poisoned 'self'
  if @findlayer 'self' 2
    togglehands 'left'
    pause 600
    usetype! 0xf07
  else
    usetype! 0xf07
  endif
  headmsg 'Cured'
  pause 600
elseif sysmsg 'Not poisoned'
endif
// Heal potion
if not yellowhits 'self'
  if diffhits >= 30 and timer 'Heal Potion' >= 10250
    if @findlayer 'self' 2
      togglehands 'left'
      pause 600
      usetype! 0xf0c
    else
      usetype! 0xf0c
    endif
    headmsg 'Healed'
    settimer 'Heal Potion' 0
    pause 600
  elseif sysmsg 'heal skipped'
  endif
endif
if stam < 60
  // Refresh potion
  if @findlayer 'self' 2
    togglehands 'left'
    pause 600
    usetype! 0xf0b
  else
    usetype! 0xf0b
  endif
  pause 600
  headmsg 'Refreshed'
elseif sysmsg 'Full Stam'
endif
if not @findlayer 'self' 2
  togglehands 'left'
  headmsg 'Arming'
elseif sysmsg 'Weapon Equiped'
endif
 

Young Star

Grandmaster
khajjabuost: 497076 said:
if you got rid of the symsg's, couldn't this just be looped?
Yes. I considered doing that. It would eat through cures pretty quick with some mobs I would think. I prefer to try bandage curing if I can. I guess adding a hp check there too could help keep it to a minimum.
 

khajja

Master
just pointing out how easily automated (and therefore illegal) scripts are to make.

if there were a hp check such that cure pot and heal pot are only drank at below a certain threshold, it would not show up on UOF Legends (Actions) and would be very difficult to prove.
 

amonseti

Grandmaster
just pointing out how easily automated (and therefore illegal) scripts are to make.

if there were a hp check such that cure pot and heal pot are only drank at below a certain threshold, it would not show up on UOF Legends (Actions) and would be very difficult to prove.
Yes . they can be .. and one of the reasons I publish the code they way it is .. setting loop "on", in my code would not be practicle .
 

Mara

Journeyman
I'm so noob but I tryed to chug Dex and Str in one key and culdnt do

some1 whos not tard like me can do?
thxs in advance
 

Volco

Master
I'm so noob but I tryed to chug Dex and Str in one key and culdnt do

some1 whos not tard like me can do?
thxs in advance
not on to try the macro, but are you sure you're trying to use 'Greater Dex' and 'Greater Strength' potions? Looks like the macro looks for those specificly
 

Mara

Journeyman
what I mean its that Both macros Work great!
pretty great, fast and smoth but when I try to get both toguether... it crash.... or I dont take off the weapon , or stay at the end without equip again the weapon or just dont do anything.

Didnt wasted hours on it trying to fix since my "coding level" = -1

sould be pretty easy but I cant find out =/
 
Top