Page 3 of 3
Re: Code {Matrix} Library <> Tools == Macros && Scripts || Etc.
Posted: Fri Feb 25, 2022 5:48 pm
by Matrix
UOSteam Lumberjack Training Macro
{Not Tested}
Code: Select all
//Check if there is a hatchet in hand and equip one if any in pack.
if not findobject 'lefthand'
if @findtype 0xf43 'any' 'backpack'
equipitem 'found' 2
else
sysmsg 'You have run out of hatchets!' 24
endif
endif
//While there is still wood to cut, cut wood
while not @injournal 'enough wood'
useobject 'lefthand'
waitfortarget 2500
targettileoffset 0 -1 0
pause 3050
//Check if there is still a hatchet equipped, in case it broke get another
if not findobject 'lefthand'
if @findtype 0xf43 'any' 'backpack'
equipitem 'found' 2
else
sysmsg 'You have run out of hatchets!' 24
endif
endif
endwhile
@clearjournal
//Cut logs into boards.
if @findtype '0x1bdd' 'any' 'backpack'
useobject 'lefthand'
waitfortarget 15000
target 'found'
endif
stop
Re: Code {Matrix} Library <> Tools == Macros && Scripts || Etc.
Posted: Fri Feb 25, 2022 5:50 pm
by Matrix
UOSteam Magery Training Macro
{Not Tested}
Code: Select all
//you may need to edit mana on line two !
while not dead
if mana < 60
useskill 'meditation'
while not mana == maxmana
endwhile
endif
//Set Goal
if skill 'Magery' == 100
stop
endif
if skill 'Magery' >= 30 and skill 'Magery' < 50
cast 'Bless' 'self'
endif
if skill 'Magery' >= 50 and skill 'Magery' < 70
cast 'Magic Reflection'
endif
if skill 'Magery' >= 70 and skill 'Magery' < 90
cast 'Mass Dispel' 'self'
endif
if skill 'Magery' >= 90 and skill 'Magery' < 100
cast 'earthquake'
endif
pause '2500'
endwhile
Re: Code {Matrix} Library <> Tools == Macros && Scripts || Etc.
Posted: Mon Sep 25, 2023 9:27 am
by Matrix
UOSteam Magery Training (With HP Check) Macro
{Not Tested}
Code: Select all
//This checks health to make sure you don't die
while not dead
if mana < 80
useskill 'meditation'
while not mana == maxmana
endwhile
endif
if hits < 30
pause 7000
while not hits == maxhits
endwhile
endif
//Set Goal
if skill 'Magery' == 100
stop
endif
if skill 'Magery' >= 30 and skill 'Magery' < 50
cast 'Bless' 'self'
endif
if skill 'Magery' >= 50 and skill 'Magery' < 62.9
cast 'Lightning' 'self'
endif
if skill 'Magery' >= 62.9 and skill 'Magery' < 82.9
cast 'Energy Bolt' 'self'
endif
if skill 'Magery' >= 82.9 and skill 'Magery' < 100
cast 'Flame Strike'
endif
pause '2700'
endwhile
Re: Code {Matrix} Library <> Tools == Macros && Scripts || Etc.
Posted: Mon Sep 25, 2023 9:30 am
by Matrix
UOSteam Magery Training (With Resisting Spells) Macro
{Not Tested}
Code: Select all
////////////////////////////////////
// This macro is designed for //
// training both magery and //
// resist from 30. It is intended //
// for characters with 40+ //
// intelligence. //
// //
// Turn on loop and click play! //
// //
// ~~Made by kdivers~~ //
////////////////////////////////////
if skill 'magery' < 100
if @injournal 'insufficient mana'
clearjournal
useskill 'meditation'
while mana < maxmana
endwhile
else
if skill 'magery' < 30
headmsg 'Buy more skill!'
stop
elseif skill 'magery' < 45
cast 'bless' 'self'
pause 1000
elseif skill 'magery' < 55
cast 'mana drain' 'self'
pause 1000
elseif skill 'magery' < 75
cast 'invisibility' 'self'
pause 1000
elseif skill 'magery' < 100
cast 'mana vampire' 'self'
pause 1000
else
headmsg 'Magery complete!'
stop
endif
endif
elseif skill 'resisting spells' < 100
if @injournal 'insufficient mana'
clearjournal
useskill 'meditation'
while mana < maxmana
endwhile
else
cast 'mana vampire' 'self'
pause 1000
endif
else
headmsg 'Magery and resisting spells complete!'
stop
endif
Re: Code {Matrix} Library <> Tools == Macros && Scripts || Etc.
Posted: Mon Sep 25, 2023 9:32 am
by Matrix
UOSteam Magery Training (With Mana Check) Macro
{Not Tested}
Code: Select all
////////////////////////////////////
// This macro is designed for //
// training magery from 30. It is //
// intended for characters with //
// 40+ intelligence. //
// //
// Turn on loop and click play! //
// //
// ~~Made by kdivers~~ //
////////////////////////////////////
if @injournal 'insufficient mana'
clearjournal
useskill 'meditation'
while mana < maxmana
endwhile
else
if skill 'magery' < 30
headmsg 'Buy more skill!'
stop
elseif skill 'magery' < 45
cast 'bless' 'self'
pause 1000
elseif skill 'magery' < 55
cast 'mana drain' 'self'
pause 1000
elseif skill 'magery' < 75
cast 'invisibility' 'self'
while waitingfortarget
endwhile
pause 1000
elseif skill 'magery' < 100
cast 'mana vampire' 'self'
pause 1000
else
headmsg 'Magery complete!'
stop
endif
endif
Re: Code {Matrix} Library <> Tools == Macros && Scripts || Etc.
Posted: Mon Sep 25, 2023 9:34 am
by Matrix
UOSteam Meditation Training Macro
{Not Tested}
Re: Code {Matrix} Library <> Tools == Macros && Scripts || Etc.
Posted: Mon Sep 25, 2023 9:36 am
by Matrix
UOSteam Meta-Mage Training Macro
{Not Tested}
Code: Select all
//More Info: http://www.uoforum.com/threads/meta-mage-trainer.68429/
//create timers
if not timerexists 'Focus'
createtimer 'Focus'
settimer 'Focus' 60000
endif
if not timerexists 'Vivify'
createtimer 'Vivify'
settimer 'Vivify' 60000
endif
if not timerexists 'Shadow'
createtimer 'Shadow'
settimer 'Shadow' 60000
endif
//meditate if mana low
clearjournal
if mana < 10
useskill 'meditation'
while mana < 80
pause 1000
endwhile
endif
//start magic arrow loop
while timer 'Shadow' >= 42000
//timer 'Focus' >= 47000 or
clearjournal
//if out of ash, skip this part
if not @findtype 0xf8c 'any' 'backpack'
break
endif
//get the enemy and cast magic arrow
getenemy 'criminal' 'enemy' 'gray'
cast 'magic arrow'
target enemy
pause 2500
//if relics are down, wait
if @injournal 'rest''system'
pause 60000
break
endif
//if relics proc, reset their timer
if @injournal 'Focus: Activated.' 'system'
settimer 'Focus' 0
endif
if @injournal 'Shadow Disciple: Activated.' 'system'
settimer 'Shadow' 0
endif
endwhile
//start vivify loop (need mandrake root to run this part)
//check for mandrake root
if @findtype 0xf86 'any' 'backpack'
while timer 'Vivify' >= 50000
clearjournal
//meditate if < 50 mana
if mana < 50
useskill 'meditation'
while mana < 90
pause 1000
endwhile
endif
//use daemon scrolls if you have them, else use regs
if @findtype 0x1f69 'any' 'backpack'
usetype 0x1f69 any 'backpack'
else
cast "Summon Daemon"
endif
pause 4000
//release the daemon if found
if @findtype 0xa 'any' 'ground' 1 2
@setalias 'daemon' 'found'
waitforcontext 'daemon' 5 15000
pause 1000
endif
//reset Vivify timer if it procs
if @injournal 'Vivify: Activated.' 'system'
settimer 'Vivify' 0
endif
clearjournal
if not @findtype 0xf86 'any' 'backpack'
break
endif
endwhile
endif
Re: Code {Matrix} Library <> Tools == Macros && Scripts || Etc.
Posted: Mon Sep 25, 2023 9:38 am
by Matrix
UOSteam Musicianship (All Instrument) Training Macro
{Not Tested}
Code: Select all
//Select an instrument automatically to use
if @findtype '0xe9e' '0' 'backpack' 'any' '2' //Tambourine with red tassle
@setalias 'instrument' 'found'
elseif @findtype '0x2805' 'any' 'backpack' 'any' '4' //Flute
@setalias 'instrument' 'found'
headmsg "Instrument set" '66'
@useobject 'instrument'
elseif @findtype '0xe9d' '0' 'backpack' 'any' '2' //Tambourine
@setalias 'instrument' 'found'
@useobject 'instrument'
elseif @findtype '0xe9c' '0' 'backpack' 'any' '2' //Drum
@setalias 'instrument' 'found'
@useobject 'instrument'
elseif @findtype '0xeb3' '0' 'backpack' 'any' '2' //Lute
@setalias 'instrument' 'found'
@useobject 'instrument'
elseif @findtype '0xeb2' '0' 'backpack' 'any' '2' //Lap Harp
@setalias 'instrument' 'found'
@useobject 'instrument'
elseif @findtype '0xeb1' '0' 'backpack' 'any' '2' //Standing Harp
@setalias 'instrument' 'found'
useobject 'instrument'
pause 800
else
headmsg 'No instrument found'
stop
endif
Re: Code {Matrix} Library <> Tools == Macros && Scripts || Etc.
Posted: Mon Sep 25, 2023 9:39 am
by Matrix
UOSteam Musicianship (Lap Harp) Training Macro
{Not Tested}
Code: Select all
////////////////////////////////////
// This macro is designed for //
// training musicianship from 0. //
// This macro uses lap harps. //
// //
// Turn on loop and click play! //
// //
// ~~Made by kdivers~~ //
////////////////////////////////////
if not @findtype 0xeb2 0x0 'backpack'
headmsg 'Get more lap harps!'
stop
endif
if skill 'musicianship' < 100
usetype 0xeb2 0x0 'backpack'
pause 11000
else
headmsg 'Musicianship complete!'
stop
endif
Re: Code {Matrix} Library <> Tools == Macros && Scripts || Etc.
Posted: Mon Sep 25, 2023 9:41 am
by Matrix
UOSteam Mysticism (Not Available) Training Macro
{Not Tested}
Code: Select all
////////////////////////////////////
// This macro is designed for //
// training Mysticism from 0. //
// //
// Turn off loop and click play! //
// //
// ~~Made by Torruin~~ //
////////////////////////////////////
while not dead
if mana < 20
useskill 'meditation'
while not mana == maxmana
endwhile
endif
if hits < 50
pause 7000
while not findtype 0x4078
cast "Healing Stone"
pause 5000
endwhile
while not hits == maxhits
if not findtype 0x4078
cast "Healing Stone"
endif
usetype 0x4078
pause 3000
endwhile
endif
//Set Goal
if skill 'Mysticism' == 100
stop
endif
if skill 'Mysticism' < 8
cast "Healing Stone"
endif
if skill 'Mysticism' >= 8 and skill 'Mysticism' < 20
cast "Purge Magic" "self"
endif
if skill 'Mysticism' >= 20 and skill 'Mysticism' < 33
cast "Eagle Strike" "self"
endif
if skill 'Mysticism' >= 33 and skill 'Mysticism' < 62.9
cast "Stone Form"
endif
if skill 'Mysticism' >= 62.9 and skill 'Mysticism' < 80
cast "Cleansing Winds" "self"
endif
if skill 'Mysticism' >= 80 and skill 'Mysticism' < 95
cast "Hail Storm" "self"
endif
if skill 'Mysticism' >= 95 and skill 'Mysticism' < 100
cast "Nether Cyclone" "self"
endif
pause '2700'
endwhile
Re: Code {Matrix} Library <> Tools == Macros && Scripts || Etc.
Posted: Mon Sep 25, 2023 9:42 am
by Matrix
UOSteam Necromancy Training Macro
{Not Tested}
Code: Select all
////////////////////////////////////
// This macro is designed for //
// training Necromancy from 40. //
// //
// Turn on loop and click play! //
// //
// ~~Made by Vertex101~~ //
////////////////////////////////////
if skill 'Necromancy' < 100
if @injournal 'insufficient mana'
clearjournal
useskill 'Meditation'
while mana < maxmana
endwhile
else
if skill 'Necromancy' < 40
headmsg 'Please buy skill to continue!'
stop
elseif skill 'Necromancy' < 55
cast "Wraith Form"
waitfortarget 7000
elseif skill 'Necromancy' < 75
cast "Horrific Beast"
waitfortarget 7000
elseif skill 'Necromancy' < 90
cast "Wither"
waitfortarget 7000
elseif skill 'Necromancy' < 100
cast "Lich Form"
waitfortarget 7000
endif
endif
else
headmsg 'Necromancy complete!'
stop
endif
Re: Code {Matrix} Library <> Tools == Macros && Scripts || Etc.
Posted: Mon Sep 25, 2023 1:47 pm
by sarmatian
Two questions:
1) Do you have any example how to properly test if given item has attribute?
like weapon or armor and characteristic resistance or increase intelligence ..
or if crafting deed is Standard/exceptional or what kind of material it is. After first 1k of BOD manual sorting is very boring.
2) is there any way to find serial of "item that I hold in right hand"?
I would like to make generic code like potion drinking put down current weapon, quaf potion, pick up "the same weapon that you put down"
I have separate key binding to reconfigure weapon set #1, set #2 ... so I cannot hard code serials.
the only idea would be put item from right hand in designated container, then find that item in specific container and wield.
Re: Code {Matrix} Library <> Tools == Macros && Scripts || Etc.
Posted: Mon Sep 25, 2023 5:26 pm
by Eremite
Could probably go in
Coding Talk, but since we're here:
sarmatian wrote: Mon Sep 25, 2023 1:47 pm
Two questions:
1) Do you have any example how to properly test if given item has attribute?
The `property` function will return true/false if the property exists, or you can feed it an operator.
Example bool:
https://github.com/Erumite/UOEX-Macros/ ... vy#L23-L29
Example operator:
https://github.com/Erumite/UOEX-Macros/ ... vy#L28-L30
sarmatian wrote: Mon Sep 25, 2023 1:47 pm
2) is there any way to find serial of "item that I hold in right hand"?
Findlayer, MoveItem and EquipItem. Examples:
https://github.com/Erumite/UOEX-Macros/ ... vy#L37-L47