Easy UO Scripts Compendium -
Eru - 06-03-2011
LUMBERJACKING: This will pretty much just wander from tree to tree using a hatchet on it. I like to use a Razor macro with it to move the logs to a pack horse.
Code:
=========================================================================
; Script Name: EnCode MegaLumberjack
; Author: EnCode
; Version: 1.2.0
; Client Tested with: 4.0.10b
; EUO version tested with: 1.42.00A5
; Shard OSI / FS: FS
; Revision Date: 5-31-05
; Public Release: 5-15-05
; Global Variables Used: All global vars used by settings starts by *ECLJ
; This is a very powerful and easy to set up fully automatic script without rails!
; All you need is enough skills to craft tools and recall and some ingots in your bank box.
=========================================================================
; if you wish to use login by password (NOT RECOMMENDED)
; set up the macro as using razorlogin but uncomment and change these lines:
;You may edit these values if you wish but you should do just fine
;with these.
set %axetype FSF_LSF_BSF_NSF_ZRF_RMH_LPH_UOH
set %tooltype AIG_AGG_BIG_CIG_CGG_EGG_IGG_KGG_WFG_YFG_ZHG
set %solvepk 0 ;if you have the PKCurses.txt set up change this to 1
set %forcebankweight 400 ;maxweight before bankup
;================================
;do not change below here
;================================
set %VerMajor 1
set %VerMinor 2
set %VerRevision 0
set %spot 0
tile init
linespercycle 200
set %hod 0
gosub chooseforest
start:
gosub closest
move %x %y 1 10s
gosub checkdistance
gosub choptree
goto start
sub checkdistance
set %distx #charposx - %x
set %disty #charposy - %y
if %distx > -2 && %distx < 2 && %disty > -2 && %disty < 2
return
set %tempx #charposx - 5
move %tempx #charposy 1 2s
set %tempy #charposy - 5
move #charposx %tempy 1 2s
move %x %y 1 10s
return
sub choptree
menu delete status
menu Text status 116 119 Chopping...
set %backupwait #scnt + 60
choploop:
if #scnt > %backupwait
goto ready
wait 17
gosub hit
set %hitwait #scnt + 5
deletejournal
jrloop:
wait 1
scanjournal 1
if logs in #journal
goto choploop
if hack in #journal
goto choploop
if not_enough_wood in #journal
goto ready
if you_can't_use_an_axe_on_that in #journal
goto ready
if cannot_be_seen in #journal
goto ready
if that_is_too_far in #journal
goto ready
gosub checkConLost
gosub toboards
if is_attacking_you in #journal
{
gosub antipk
return
}
if #scnt > %hitwait
goto choploop
goto jrloop
ready:
return
sub hit
chop:
finditem %axetype C_ , #charid
if #findkind = -1
{
finditem %axetype C_ , #backpackid
if #findkind = -1
{
gosub toboards
menu delete status
set %hod 0
gosub chooseforest
return
}
set #lhandid #findid
event macro 24 1
wait 15
}
set #lobjectid #findid
event macro 17
target 1s
set #ltargetkind 3
set #ltargettile %tiletype
set #ltargetx %x
set #ltargety %y
set #ltargetz %tilez
event macro 22
return
sub closest
menu delete status
menu Text status 116 119 Finding tree...
set %x #charposx
set %y #charposy
set %r 0
set %fspiral -1
treefinder:
if %fspiral = -1
{
set %fspiral 1
}
else
{
set %fspiral -1
}
set %r %r + 1
for %yx 1 %r
{
set %x %x + %fspiral
gosub checktile
if %findkind = 1
return
}
for %yy 1 %r
{
set %y %y + %fspiral
gosub checktile
if %findkind = 1
return
}
goto treefinder
sub checktile
tile cnt %x %y
set %ennestaan 0
set %findkind -1
for %cnt 1 #tilecnt
{
tile get %x %y %cnt
if tree in #tilename
{
if %hod > 0
{
set %doh 0
for %doh 1 %hod
{
if %x = %hodx . %doh && %y = %hody . %doh
{
set %ennestaan 1
}
}
}
if %ennestaan = 0
{
set %hod %hod + 1
set %hodx . %hod %x
set %hody . %hod %y
set %findkind 1
set %tilez #tilez
set %tiletype #tiletype
}
}
}
return
sub chooseforest
set %spot %spot + 1
if %spot > %ljspots
set %spot 1
set %runenum %spot + 1
menu delete status
menu Text status 116 119 Recalling to forest # %spot
gosub recall %runenum %recallstyle
return
sub findcol
finditem %1 %3
for %i 1 #findcnt
{
finditem %1 %i %3
if #findcol = %2
return
}
set #findkind -1
return
sub target
set %wait #scnt + 1
wait_for_target:
wait 1
scanjournal 1
if fizzles in #journal || already_performing in #journal || more_reagants in #journal || not_yet_recovered in #journal || your_concentration in #journal || insufficent_mana in #journal
return
scanjournal 2
if fizzles in #journal || already_performing in #journal || more_reagants in #journal || not_yet_recovered in #journal || your_concentration in #journal || insufficent_mana in #journal
return
if #scnt > %wait
return
if #targcurs = 0
goto wait_for_target
if %1 = 1
{
chkdistance:
wait 1
finditem #ltargetid
if #findkind = -1 && #targcurs = 1
goto chkdistance
if #finddist > 12 && #targcurs = 1
goto chkdistance
event macro 22
}
if %1 = 2
{
event macro 23
}
return
Easy UO Scripts Compendium -
Eru - 06-03-2011
PICK COTTON: This will automatically pick any cotton or flax plant in the vicinity. I'm not sure if it puts it in your pack for you or not, but you can use Razor's Scavenger Agent to have it pick it up:
Code:
finditem IPE_FPE_HPE_CPE_TEK_VEK_WEK G_2
if #FINDCNT > 0
{
set #lObjectID #FINDID
event Macro 17 ; last object
}
Easy UO Scripts Compendium -
Eru - 06-03-2011
MINING: You'll have to do some editing on this one, but this is a mining script for Mt. Kendall. It will mine, move to the forge when you're at your weight limit, smelt, then go back to mining. Once you're overweight with ingots, it will walk to the bank box outside, use it, then put all your ingots into a bag in the bank. Very useful, but it makes you a PK target and it tends to cut out sometimes:
Code:
; OzMining 1.0
;
; For mining at Mt. Kendall on IN:X shard.
;
; Features:
; - Moves around the mine randomly
; - Mines a tile clean of ore before moving on to next one
; - Smelting when overweight
; - Banking ore when you have certain amount of weight after smelting
;
; - Notifies you with a sound if your character is dead and stops the macro
; ( might only work in windows xp.. )
; ( replace sounds with some other ones if you use another OS. )
;
; Known bugs:
; - Macro gets "stuck" mining too fast sometimes
;
; ============= User variables and instructions ================================
; YOU WILL NEED TO CHANGE THE ID VALUES BELOW TO MATCH YOUR CHARACTERS CONTAINERS
; OR AUTOMATIC BANKING WON'T WORK CORRECTLY!
; You can find out ID of a container by having EUO running and opening a container.
; Right side of EUO window there should be "Container Info" as a folded menu and
; there #CONTID variable now holds the information. For example LHUGMMD
; Change this to the ID of container in your bank where you would like
; your ingots to be placed.
set %ingotContainer AXITEND
; Change this to whatever ID your bank container has.
set %bankcontainerID JWHLKMD
; ==============================================================================
set #LPC 10
set %forgePosX 2570
set %forgePosY 482
set %ingotTypes RMK_BVI
set %forgeTypes JBG_JJ_SMF
set %toolTypes QPF
set %status idle
set %bankID ELFUMMD
set %DebugMode #true
event sysmessage Starting OzMining 1.0
while #charghost <> YES
{
if ( #WEIGHT > #MAXWEIGHT )
gosub GoSmelt
if %status = no_more_ore
{
set %status idle
goto MoveToNextSpot
}
if ( #WEIGHT > #MAXWEIGHT )
gosub GoSmelt
set %jrnl #jindex
gosub MineThisSpot
gosub ProcessResults
}
; Player dead: stopping macro after making some racket..
sound Windows XP critical stop.wav
wait 2s
sound Windows XP critical stop.wav
wait 2s
sound Windows XP critical stop.wav
wait 2s
halt
sub MineThisSpot
set #LPC 10
if ( %status <> idle )
return
finditem %tooltypes C
if #FINDCNT > 0
{
set #lObjectId #findId
event macro 17 0
tile Init
Tile Get #CharPosX #CharPosY 2
set #lTargetTile #tileType
set #lTargetX #charPosX
set #lTargetY #charPosY
set #lTargetZ #charPosZ
set #lTargetKind 3
target 20s
event Macro 22 0
set %status mining
}
return
sub ProcessResults
while %status = mining
{
if #jindex > %jrnl
{
set %jrnl %jrnl + 1
scanjournal %jrnl
if you_dig_some in #journal
set %status idle
if you_loosen_some_rocks in #journal
set %status idle
if World_save_complete in #journal
set %status idle
if You_have_moved_too_far in #journal
set %status idle
if Someone_has_gotten in #journal
set %status idle
if Can't_mine_that in #journal
set %status idle
if target_cannot_be_seen in #journal
{
set %status no_more_ore
gosub MoveToNextSpot
}
if there_is_no_metal_here_to_mine in #journal
{
set %status no_more_ore
gosub MoveToNextSpot
}
if you_can't_mine_that in #journal
{
set %status no_more_ore
gosub MoveToNextSpot
}
if world_save_complete. in #journal
{
set %status no_more_ore
gosub MoveToNextSpot
}
if that_is_too_far_away in #journal
{
set %status no_more_ore
gosub MoveToNextSpot
}
if for_validating_your_presence in #journal
{
set %status no_more_ore
gosub MoveToNextSpot
}
}
}
return
sub MoveToNextSpot
set #LPC 1
if ( %DegugMode )
event sysmessage ++ Trying to find a new location to mine...
FindNextSpot:
set %GotoX #charposX
set %GotoY #charposY
set %oldX #charposX
set %oldY #charposY
set %randomInc #random % 5
; negative or positive?
set %nDirection #random % 2
if %nDirection = 1
set %randomInc %randomInc * -1
set %GotoX %GotoX + %randomInc
; Random amount of tiles to a direction
set %randomInc #random % 5
; negative or positive?
set %nDirection #random % 2
if %nDirection = 1
set %randomInc %randomInc * -1
set %GotoY %GotoY + %randomInc
if ( %DegugMode )
event sysmessage -- Initializing tile info...
tile Init
tile Get %GotoX %GotoY 2
if ( %DegugMode )
event sysmessage #tilename / #tiletype
if ( #tilename = cave_floor )
{
if ( %DegugMode )
event sysmessage Found cave location...
event pathFind %GotoX %GotoY
wait 10
if ( #charposX = %oldX && #charposY = %oldY )
goto FindNextSpot
}
if ( #charposX <> %oldX && #charposY <> %oldY )
if ( #charposX = %GotoX && #charposY = %GotoY )
set %status idle
else
goto FindNextSpot
set #LPC 10
return
sub GoSmelt
set #LPC 1
SmeltOre:
set %oldX #charposX
set %oldY #charposY
event pathFind %forgePosX %forgePosY
wait 1s
if ( #charposX = %oldX && #charposY = %oldY )
goto SmeltOre
CheckForMoreOre:
finditem DWJ C
if #FINDCNT > 0
{
set #lObjectId #findId
event macro 17 0
goto CheckForMoreOre
}
wait 1s
if ( #weight > #maxweight - 50 )
gosub BankOre
GoBack:
event pathFind %oldX %oldY
wait 1s
if ( #charposX = %forgePosX && #charposY = %forgePosY )
goto GoBack
return
sub BankOre
if ( %DegugMode )
event sysmessage ++ Going to bank ingots...
BankingStep1:
event pathFind 2561 492
wait 1s
if ( #CHARPOSX <> 2561 && #CHARPOSX <> 492 )
goto BankingStep1
BankingStep2:
event pathFind 2559 504
wait 1s
if ( #CHARPOSX <> 2559 && #CHARPOSX <> 504 )
goto BankingStep2
BankingStep3:
event pathFind 2564 513 15
wait 1s
if ( #CHARPOSX <> 2564 && #CHARPOSX <> 513 )
goto BankingStep3
Openbank:
set #LOBJECTID %bankID
event macro 17 0
wait 10
if ( #CONTID <> %bankcontainerID )
goto Openbank
BankMore:
finditem %ingotTypes C
if #FINDCNT > 0
{
Exevent Drag #findid #findstack
wait 10
Exevent Dropc %ingotContainer
wait 10
goto BankMore
}
wait 1s
event sysmessage ++ Going back...
GoingBackStep1:
event pathFind 2559 504 0
wait 2s
if ( #CHARPOSX <> 2559 && #CHARPOSX <> 504 )
goto GoingBackStep1
GoingBackStep2:
event pathFind 2561 492
wait 2s
if ( #CHARPOSX <> 2561 && #CHARPOSX <> 492 )
goto BankingStep2
GoingBackStep3:
event pathFind %forgePosX %forgePosY
wait 2s
if ( #CHARPOSX <> %forgePosX && #CHARPOSX <> %forgePosY )
goto GoingBackStep3
set #LPC 10
return
Easy UO Scripts Compendium -
Reaper - 06-18-2011
Hello Eru,
Thanks for the mining macro. It really helps, but can you please edit it so the ores DO NOT get smelt, if possible? The reason for this is because I want to smelt each single ore one at a time. Also, another issue I'm facing is that, when I go to the bank to put my ingots, the bank does not open. However, if I manually open the bank, the ingots automatically go in. Again, can you please edit the macro to make it that it DOES NOT smelt the ores, and just puts the ores into the bank. Thanks a lot!
-Reaper
Easy UO Scripts Compendium -
Cana - 06-18-2011
I found my stash of EUO scripts from INX and I'll post them here when I can get them all sorted. For the mining script, just comment out the smelting (except banking part of it) and add ore type to the ingot types (DWJ). I have everything from a training camp dummy macro (that doesn't get you guard whacked like the razor one tends to do) to running around in a firefield for resist gains macros. I want to see more people getting ready for PvP so I'll try to get these macros here asap.
Easy UO Scripts Compendium -
BlackBeard - 06-19-2011
Looking for an auto log in, so if players get kicked off. Easy uo could start there uo again and log them on ?
Incase of crashes or restarts. That way if someones gone to work all day it doesn't slow them down so they can gm things sooner and get out to pvp sooner.
Easy UO Scripts Compendium -
Cana - 06-19-2011
Small request concerning this thread. Could the first post be edited so it would contain links to all the macros? It'd be a lot easier to find something if there are many scripts and you wouldn't have to skim through all the parts you aren't interested in if you just want to find a macro for certain task. I'd be willing to update it when needed. Also, EUO macros tend to raise questions about how to use them or someone wanting a slight modification so It'd be nice if each macro would have a thread of it's own and links to all macro threads could be found on this one compendium thread.
Easy UO Scripts Compendium -
Taran - 06-19-2011
Yeah I agree that each script should have their own thread, so I did just that
I don't really think a compendium is needed though since you can just use the search function. A compendium will get oudated fast anyway since it needs to be manually updated.
Easy UO Scripts Compendium -
Eru - 06-19-2011
Taran Wrote:Yeah I agree that each script should have their own thread, so I did just that 
At first I thought it would be a pain to have them taking up extra space, but now that I think about it, nicely named, separate threads = more content and more hits from search engines and people finding the site accidentally.