Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

[EasyUO+Razor]Train healing/magery/meditation
#1

Hi there.
Decided to post this macro, which i have written, here, incase you might need it.

Requirements:
easyuo 1.5
patience
Reagents for the spell u will use for training (preferably a spell using 1 reagent)

Setup:
Razor Restock agent to get regs/bandages from your bank.

Razor Hotkey F3 for restock
Razor Hotkey F4 for cast a spell
or simply change the key settings below.

Note: Setup these hotkeys in Razor by clicking record at macro
then click the hotkey tab, click agents / spells, click execute selected, go back to current recording macro, click stop.

Everytime Before Running:
Either you open the bag popup of your house/bank, wherever you want to drop bloody bandages in by doubleclicking it.
Just to be sure it dumps to this bag, doubleclick something on the ground which is out of range, or something in your backpack, so the script will not detect a "fountain" (which it discovers from the last used object) on the ground.

Or, doubleclick the fountain/thing you want to wash your bandages with.



If you'd like to know how it operates, just read the loop: part, i'm sure you will understand.

Code:
; magery/heal/medit trainer v0.1 by bartichus
set %bloodybandy AMF
set %bandys ZLF
set %bandytimer 2s
set %msgguards 1 ; call guards when damage detected

set %razorrestockkey F3     ; RAZOR Cast DESIRED spell BUTTON
set %razorcast F4     ; RAZOR Cast DESIRED SCROL BUTTON
; pasted from documentation:
;The key-specifier can either be A-Z, 0-9, F1-F12 and ESC, BACK, TAB, ENTER, PAUSE, CAPSLOCK, SPACE, PGDN, PGUP, END, HOME, LEFT, RIGHT, UP, DOWN, PRNSCR, INSERT, DELETE, NUMLOCK or SCROLLLOCK.

set %castdelay 5s
set %manarequired 20
    ;amount of current mana when we gonna medit back to full mana
set %meditimer 59

set %fountainid #lobjectid
; wash bandy with what item (dclick item before run)
set %fountainrange 1
; at what tile range must it be

msg $ bank $
wait 3s ; hopefully world save proof
set %bankgump #contid
; current active gump for dropping bloody bandages when no fountain available



loop:
gosub meditcheck  ;meditate till full mana and check if heal needed meanwhile
gosub heal ; and msg guards if enabled
key %razorrestockkey
wait 3s
key %razorcast
wait %castdelay

gosub dumpbloodybandys ; or wash
goto loop




sub meditcheck
if #mana < %manarequired
gosub meditownage
return


sub meditownage
meditownage:

event macro 13 46
gosub healcheck %meditimer

if #mana < #maxmana
goto meditownage
}
return

sub dumpbloodybandys
finditem %fountainid G_ , %fountainrange

if #findid notin X
set %fountainid #findid
else
set %fountainid nofountain
finditem %bloodybandy C_ , #backpackid

if %fountainid notin nofountain && #findid notin X && #findstack > 100
{
set #lobjectid #findid
event macro 17 0
target
set #ltargetid %fountainid
event macro 22 0
}
else
{
exevent drag %bloodybandy #findstack
         wait 10
         exevent dropc %bankgump
}
return

sub heal
finditem %bandys C_ , #backpackid
wait 2
if #findid notin X
{
set #lobjectid #findid

if %msgguards = 1
msg $ guards $
event macro 17 0
target
event macro 23 0
wait %bandytimer
set %waitemp %bandytimer - %1
gosub healcheck %waitemp
}
return
I have a euo+razor scribe train macro at scroll+reg vendor with optional hide/bandage heal/guards protection aswell, but i'd prefer to exchange that one for ingame gold/items. Inbox me.. ;-)

Last edit was the meditate timer, i can't be responsible for people's computers taking more power then nessecary
also i recommend tweaking the wait at the restock agent in the loop. Note that value "1s" (1 second) equals "20"

@ first reply:
yes i know, but i think it isn't needed for this particular script, as razor should work just as fine as for i know.
Also thanks for making nicer markup Wink
#2

Thought about writing the casting of spells into the code?

its not over difficult, check out the initevents info ont he EasyUO Documentation.

Good script though hopefully people will check it out! Big Grin

Saintful Sinner, The Ministry


Forum Jump:


Users browsing this thread: 1 Guest(s)