Easy UO Script: Mining at Mt. Kendall -
Venos - 07-07-2011
The new forge position you should use is "set %forgePosX 2573" and "set %forgePosY 475".
This is for the forge at the top of the mine and works fine for me. Only issue is opening the bank box. But since we have to check it once a min anyway that's really not much of an issue in my opinion.
Easy UO Script: Mining at Mt. Kendall -
zenith - 07-20-2011
hey guys i got an EUO mining script at mt.kendall that works. It opens up the bankbox and drops the ingots inside the container if you want it just put this script in and run it. this script worked for me and im not sure if it will work for you. In your bank box use a bag instead of anything else and the ID will be set for the container for the ingots. This will also forge your ingots and walk back to the box. The only thing you may also have to change is the %bankcontainerID and the %ingotContainerID. Hope this works for you
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 OCTSJPD
; Change this to whatever ID your bank container has.
set %bankcontainerID WKNYMOD
; ==============================================================================
set #LPC 10
set %forgePosX 2573
set %forgePosY 475
set %ingotTypes RMK_BVI
set %forgeTypes JBG_JJ_SMF
set %toolTypes QPF
set %status idle
set %bankID NFUMKMD
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 Script: Mining at Mt. Kendall -
Venos - 07-20-2011
zenith's script is the same as the one posted by Taran. The only change is %bankID NFUMKMD which is working.
So like he said, change the %ingotContainer to the one you want to use and change %bankcontainerID to the one you get when opening the box outside the mine. Then the script works perfectly and is now fully automatic.
p.s. I'm using a small chest as ingot container so more than just bags seems to work.
Easy UO Script: Mining at Mt. Kendall -
Morwen - 08-02-2011
I've been having problems with EUO and just found out about OEUO that is scripted with lua that is a rather decent scripting language compared with the nonsense of the old EUO language and converted this script to OEUO It seems a bit faster mining so test it out.
I know it isn't perfect yet but is very usable in my opinion
Code:
-- Change this to the ID of container in your bank where you would like
-- your ingots to be placed.
ingotContainer=1082676472
ingotType=7151
toolTypes=3718
status="idle"
bankType=1074118237
idle="idle"
print("Starting OzMining 1.0 moded by Morwen")
status ="idle"
os=""
ref=0
function MineThisSpot(status)
if ( status ~= "idle" ) then
return status
end
local cnt=0
for i=1,UO.ScanItems(true) do
nID,type= UO.GetItem(i)
if type==3718 then
cnt=cnt+1
break
end
end
if cnt > 0 then
UO.LObjectID=nID
UO.Macro(17,0)
local oldX=UO.CharPosX
local oldY=UO.CharPosY
local oldZ=UO.CharPosZ
UO.TileInit (true)
local nType,nZ,sName,nFlags=UO.TileGet(oldX,oldY,2)
UO.LTargetTile=nType
UO.LTargetX=oldX
UO.LTargetY=oldY
UO.LTargetZ=oldZ
UO.LTargetKind=3
--target 10s
wait(200)
UO.Macro(22,0)
wait(400)
UO.Macro(22,0)
wait(800)
UO.Macro(22,0)
status="mining"
end
return status
end
function scanJournalFor(refArg,str)
nRef, nCnt = UO.ScanJournal(refArg)
for ji=nCnt-1,0,-1 do
text,colour=UO.GetJournal(ji)
if string.find(text,str) then
print(ji)
ref=nRef
return true
end
end
return false
end
function ProcessResults(status,jrnl)
while status == "mining" do
if scanJournalFor(ref,"dig some") then
print("You dug something")
status="idle"
end
if scanJournalFor(ref,"loosen some rocks") then
print("FAIL LOL")
status="idle"
end
if scanJournalFor(ref,"You have moved too far") then
print("Stupid biatx")
status="idle"
end
if scanJournalFor(ref,"Someone has gotten") then
print("huh?")
status="idle"
end
if scanJournalFor(ref,"target cannot be seen") then
print("stupid blind ****er")
status="no_more_ore"
--MoveToNextSpot()
end
if scanJournalFor(ref,"is no metal here to mine") then
print("Resource depleeted")
status="no_more_ore"
end
if scanJournalFor(ref,"can't mine that") then
print("You can only mine rocks... you know like... rocks")
status="idle"
--MoveToNextSpot()
end
if scanJournalFor(ref,"save complete.") then
print("God save us from Eru")
status="no_more_ore"
end
if scanJournalFor(ref,"that is too far away") then
print("You are not so big now!")
status="no_more_ore"
end
if scanJournalFor(ref,"for validating your presence") then
UO.Msg("Dont forget to VOTE\n")
status="no_more_ore"
end
if scanJournalFor(ref,"stand closer") then
print("Its ingot melting time!!!")
status="idle"
GoSmelt()
end
if status~=os then
os=status
print("new status "..status)
end
end
return status
end
function MoveToNextSpot()
print("Finding next mining spot\n")
--FindNextSpot:
local oldX=UO.CharPosX
local oldY=UO.CharPosY
local randomInc=math.random(-5,5)
local newX=oldX + randomInc
randomInc = math.random(-5,5)
local newY=oldY + randomInc
print("Checking tile data")
UO.TileInit (true)
nType,nZ,sName,nFlags=UO.TileGet(newX,newY,2)
while sName~="cave floor" do
print("tile wasn't in a cave.")
print("Checking another tile to go.")
math.random()
randomInc = math.random(-5,5)
newX=oldX + randomInc
randomInc = math.random(-5,5)
newY=oldY + randomInc
print("X:"..newX.." Y:"..newY)
nType,nZ,sName,nFlags=UO.TileGet(newX,newY,2)
end
print("Going to "..newX.."-"..newY)
UO.Pathfind(newX,newY)
local countTry=0
while UO.CharPosX~=newX and UO.CharPosY~=newY do
wait(2000)
UO.Pathfind(newX,newY)
if countTry==15 then
break
else
countTry=countTry+1
end
end
status="idle"
end
function GoToForge()
local x=UO.CharPosX
local y=UO.CharPosY
local CountOres=0
for i=1,UO.ScanItems(true) do
local id,type = UO.GetItem(i)
if type==6585 then
CountOres=CountOres+1
end
end
if(CountOres>0) then
local minD=99999999
local currD=-1
local idx=-1
local forgeXs={2568,2569,2575,2576,2568,2569,2570,2571,2572,2573,
2574,2575,2576,2577,2568,2569,2570,2571,2572,2573,
2574,2575,2576,2577,2568,2569,2570,2571,2572,2573,
2574,2575,2576,2577,2572,2573,2574,2575,2576,2577,
2578,2572,2573,2577,2578,2572,2573,2578,2572,2573,
2577,2578,2572,2573,2574,2575,2576,2577,2578,2572,
2573,2574,2575,2576,2577,2578,2572,2573,2574,2575,
2576,2577,2578,2581,2581,2581,2581,2581,2581,2581,
2582,2582,2582,2582,2582,2582,2582,2582,2583,2583,
2583,2583,2583,2583,2583}
local forgeYs={474,474,474,474,475,475,475,475,475,475,475,475,475,
475,476,476,476,476,476,476,476,476,476,476,477,
477,477,477,477,477,477,477,477,477,486,486,486,
486,486,486,486,487,487,487,487,488,488,488,489,
489,489,489,490,490,490,490,490,490,490,491,491,
491,491,491,491,491,492,492,492,492,492,492,492,
490,491,492,493,494,496,497,490,491,492,493,494,
495,496,497,490,491,492,493,494,495,496}
for i=1,95 do
--calc min distance
currD=math.sqrt(math.pow(x-forgeXs[i],2)+math.pow(y-forgeYs[i],2))
if(currD<mind) then
minD=currD
idx=i
end
end
UO.Pathfind(forgeXs[idx],forgeYs[idx])
local newX=forgeXs[idx]
local newY=forgeYs[idx]
while UO.CharPosX~=newX and UO.CharPosY~=newY do
wait(5000)
UO.Pathfind(newX,newY)
end
while UO.CharPosX ~= newX and UO.CharPosY ~= newY do
wait(1000)
end
print("Reached forge")
wait(1000)
--Melt ores
for i=1,UO.ScanItems(true) do
local id,type = UO.GetItem(i)
if type==6585 then
UO.LObjectID=id
UO.Macro(17,0)
print("Smelts ore")
wait(200)
end
end
else
print("No Ores to Smelt")
end
end
function GoSmelt()
--TODO Find nearest forge from a list of forges
-- saves current position and go to forge
-- Once there smelt all the ores and
-- go back
local oldX=UO.CharPosX
local oldY=UO.CharPosY
--SmeltOre:
-- set %oldX #charposX
-- set %oldY #charposY
GoToForge()
if UO.Weight > UO.MaxWeight-10 then
bankOre()
end
UO.Pathfind(oldX,oldY);
while UO.CharPosX~=oldX and UO.CharPosY~=oldY do
wait(2000)
UO.Pathfind(oldX,oldY)
end
while UO.CharPosX ~= oldX and UO.CharPosY ~= oldY do
wait(1000)
end
end
function bankOre()
local oldX=UO.CharPosX
local oldY=UO.CharPosY
local countIng =0
for i=1,UO.ScanItems(true) do
local nID,nType,nKind, nContID, nX, nY, nZ, nStack, nRep, nCol = UO.GetItem(i)
if nType==7151 then--ingotType then
countIng=countIng+1
end
end
if(countIng>0) then
print("Going to bank ingots...")
UO.Pathfind(2569,488);
while UO.CharPosX~=2569 and UO.CharPosY~=488 do
wait(5000)
UO.Pathfind(2569,488);
end
while UO.CharPosX~=2569 and UO.CharPosY~=489 do
wait(1000)
end
UO.Pathfind(2561,510);
while UO.CharPosX~=2561 and UO.CharPosY~=510 do
wait(5000)
UO.Pathfind(2561,510);
end
while UO.CharPosX~=2561 and UO.CharPosY~=510 do
wait(1000)
end
print("Reached banking spot")
wait(500)
UO.LObjectID=bankType
UO.Macro(17,0)
wait(2000)
print("Opened bankbox")
for i=1,UO.ScanItems(true) do
local nID,nType,nKind, nContID, nX, nY, nZ, nStack, nRep, nCol = UO.GetItem(i)
if nType==ingotType then
wait(200)
UO.Drag(nID,nStack)
wait(400)
UO.DropC(ingotContainer)
wait(800)
end
end
print("Going back...")
UO.Pathfind(2569,488);
while UO.CharPosX~=2569 and UO.CharPosY~=489 do
wait(5000)
UO.Pathfind(2569,488);
end
while UO.CharPosX~=2569 and UO.CharPosY~=489 do
wait(1000)
end
UO.Pathfind(oldX,oldY);
while UO.CharPosX~=oldX and UO.CharPosY~=oldY do
wait(5000)
UO.Pathfind(oldX,oldY)
end
while UO.CharPosX ~= oldX and UO.CharPosY ~= oldY do
wait(1000)
end
end
end
function Main()
local status="idle"
while UO.Hits > 0 do
if ( UO.Weight > UO.MaxWeight ) then
print("gosmelt")
GoSmelt()
end
if status == "no_more_ore" then
print("move next")
status= "idle"
MoveToNextSpot()
end
if ( UO.Weight > UO.MaxWeight ) then
print("gosmelt")
GoSmelt()
end
local nNewRef = UO.ScanJournal(0)
status=MineThisSpot(status)
status=ProcessResults(status,nNewRef)
end
end
Main() --Run biatx
Easy UO Script: Mining at Mt. Kendall -
Morwen - 08-02-2011
i'm still hunting bugs so i'll be posting updates
Easy UO Script: Mining at Mt. Kendall -
Morwen - 08-03-2011
I think its working for the most of it. feedback is welcome
set razor not to filter repeated messages and change the container variable to your own value.
You may tweak some wait commands to improve efficiency just be careful with your latency
Code:
-- Change this to the ID of container in your bank where you would like
-- your ingots to be placed.
ingotContainer=1082676472
ingotType=7151
toolTypes=3718
status="idle"
bankType=1074118237
idle="idle"
print("Starting OzMining 1.0 moded by Morwen")
status ="idle"
os=""
ref=0
function MineThisSpot(status)
if ( status ~= "idle" ) then
return status
end
local cnt=0
for i=1,UO.ScanItems(true) do
nID,type= UO.GetItem(i)
if type==3718 then
cnt=cnt+1
break
end
end
if cnt > 0 then
UO.LObjectID=nID
UO.Macro(17,0)
local oldX=UO.CharPosX
local oldY=UO.CharPosY
local oldZ=UO.CharPosZ
UO.TileInit (true)
local nType,nZ,sName,nFlags=UO.TileGet(oldX,oldY,2)
UO.LTargetTile=nType
UO.LTargetX=oldX
UO.LTargetY=oldY
UO.LTargetZ=oldZ
UO.LTargetKind=3
--target 10s
wait(200)
UO.Macro(22,0)
wait(400)
UO.Macro(22,0)
wait(800)
UO.Macro(22,0)
status="mining"
end
return status
end
function scanJournalFor(refArg,str)
nRef, nCnt = UO.ScanJournal(refArg)
for ji=nCnt-1,0,-1 do
text,colour=UO.GetJournal(ji)
if string.find(text,str) then
print(ji)
ref=nRef
return true
end
end
return false
end
function ProcessResults(status,jrnl)
while status == "mining" do
if scanJournalFor(ref,"dig some") then
print("You dug something")
status="idle"
end
if scanJournalFor(ref,"loosen some rocks") then
print("FAIL LOL")
status="idle"
end
if scanJournalFor(ref,"too far") then
print("Stupid biatx")
status="idle"
end
if scanJournalFor(ref,"Someone has gotten") then
print("huh?")
status="idle"
end
if scanJournalFor(ref,"target cannot be seen") then
print("stupid blind ****er")
status="no_more_ore"
--MoveToNextSpot()
end
if scanJournalFor(ref,"is no metal here to mine") then
print("Resource depleeted")
status="no_more_ore"
end
if scanJournalFor(ref,"can't mine that") then
print("You can only mine rocks... you know like... rocks")
status="no_more_ore"
--MoveToNextSpot()
end
if scanJournalFor(ref,"save complete.") then
print("God save us from Eru")
status="no_more_ore"
end
if scanJournalFor(ref,"that is too far away") then
print("You are not so big now!")
status="no_more_ore"
end
if scanJournalFor(ref,"for validating your presence") then
UO.Msg("Dont forget to VOTE\n")
status="no_more_ore"
end
if scanJournalFor(ref,"stand closer") then
print("Its ingot melting time!!!")
status="idle"
GoSmelt()
end
if status~=os then
os=status
print("new status "..status)
end
end
return status
end
function MoveToNextSpot()
print("Finding next mining spot\n")
--FindNextSpot:
local oldX=UO.CharPosX
local oldY=UO.CharPosY
local randomInc=math.random(-5,5)
local newX=oldX + randomInc
randomInc = math.random(-5,5)
local newY=oldY + randomInc
print("Checking tile data")
UO.TileInit (true)
nType,nZ,sName,nFlags=UO.TileGet(newX,newY,2)
while sName~="cave floor" do
print("tile wasn't in a cave.")
print("Checking another tile to go.")
math.random()
randomInc = math.random(-5,5)
newX=oldX + randomInc
randomInc = math.random(-5,5)
newY=oldY + randomInc
print("X:"..newX.." Y:"..newY)
nType,nZ,sName,nFlags=UO.TileGet(newX,newY,2)
end
print("Going to "..newX.."-"..newY)
UO.Pathfind(newX,newY)
local countTry=0
while UO.CharPosX~=newX and UO.CharPosY~=newY do
wait(2000)
UO.Pathfind(newX,newY)
if countTry==15 then
break
else
countTry=countTry+1
end
end
status="idle"
end
function GoToForge()
local x=UO.CharPosX
local y=UO.CharPosY
local CountOres=0
for i=1,UO.ScanItems(true) do
local id,type = UO.GetItem(i)
if type==6585 then
CountOres=CountOres+1
end
end
if(CountOres>0) then
local minD=99999999
local currD=-1
local idx=-1
local forgeXs={2568,2569,2575,2576,2568,2569,2570,2571,2572,2573,
2574,2575,2576,2577,2568,2569,2570,2571,2572,2573,
2574,2575,2576,2577,2568,2569,2570,2571,2572,2573,
2574,2575,2576,2577,2572,2573,2574,2575,2576,2577,
2578,2572,2573,2577,2578,2572,2573,2578,2572,2573,
2577,2578,2572,2573,2574,2575,2576,2577,2578,2572,
2573,2574,2575,2576,2577,2578,2572,2573,2574,2575,
2576,2577,2578,2581,2581,2581,2581,2581,2581,2581,
2582,2582,2582,2582,2582,2582,2582,2582,2583,2583,
2583,2583,2583,2583,2583}
local forgeYs={474,474,474,474,475,475,475,475,475,475,475,475,475,
475,476,476,476,476,476,476,476,476,476,476,477,
477,477,477,477,477,477,477,477,477,486,486,486,
486,486,486,486,487,487,487,487,488,488,488,489,
489,489,489,490,490,490,490,490,490,490,491,491,
491,491,491,491,491,492,492,492,492,492,492,492,
490,491,492,493,494,496,497,490,491,492,493,494,
495,496,497,490,491,492,493,494,495,496}
for i=1,95 do
--calc min distance
currD=math.sqrt(math.pow(x-forgeXs[i],2)+math.pow(y-forgeYs[i],2))
if(currD<minD) then
minD=currD
idx=i
end
end
UO.Pathfind(forgeXs[idx],forgeYs[idx])
local newX=forgeXs[idx]
local newY=forgeYs[idx]
while UO.CharPosX~=newX and UO.CharPosY~=newY do
wait(5000)
UO.Pathfind(newX,newY)
end
while UO.CharPosX ~= newX and UO.CharPosY ~= newY do
wait(1000)
end
print("Reached forge")
wait(1000)
--Melt ores
for i=1,UO.ScanItems(true) do
local id,type = UO.GetItem(i)
if type==6585 then
UO.LObjectID=id
UO.Macro(17,0)
print("Smelts ore")
wait(200)
end
end
else
print("No Ores to Smelt")
end
end
function GoSmelt()
--TODO Find nearest forge from a list of forges
-- saves current position and go to forge
-- Once there smelt all the ores and
-- go back
local oldX=UO.CharPosX
local oldY=UO.CharPosY
--SmeltOre:
-- set %oldX #charposX
-- set %oldY #charposY
GoToForge()
if UO.Weight > UO.MaxWeight-10 then
bankOre()
end
UO.Pathfind(oldX,oldY);
while UO.CharPosX~=oldX and UO.CharPosY~=oldY do
wait(2000)
UO.Pathfind(oldX,oldY)
end
while UO.CharPosX ~= oldX and UO.CharPosY ~= oldY do
wait(1000)
end
end
function bankOre()
local oldX=UO.CharPosX
local oldY=UO.CharPosY
local countIng =0
for i=1,UO.ScanItems(true) do
local nID,nType,nKind, nContID, nX, nY, nZ, nStack, nRep, nCol = UO.GetItem(i)
if nType==7151 then--ingotType then
countIng=countIng+1
end
end
if(countIng>0) then
print("Going to bank ingots...")
UO.Pathfind(2569,488);
while UO.CharPosX~=2569 and UO.CharPosY~=488 do
wait(4000)
UO.Pathfind(2569,488);
end
UO.Pathfind(2563,503);
while UO.CharPosX~=2563 and UO.CharPosY~=503 do
wait(4000)
UO.Pathfind(2563,503);
end
UO.Pathfind(2561,510);
while UO.CharPosX~=2561 and UO.CharPosY~=510 do
wait(4000)
UO.Pathfind(2561,510);
end
print("Reached banking spot")
wait(500)
UO.LObjectID=bankType
UO.Macro(17,0)
wait(2000)
print("Opened bankbox")
for i=1,UO.ScanItems(true) do
local nID,nType,nKind, nContID, nX, nY, nZ, nStack, nRep, nCol = UO.GetItem(i)
if nType==ingotType then
wait(200)
UO.Drag(nID,nStack)
wait(400)
UO.DropC(ingotContainer)
wait(800)
end
end
print("Going back...")
UO.Pathfind(2569,488);
while UO.CharPosX~=2569 and UO.CharPosY~=489 do
wait(5000)
UO.Pathfind(2569,488);
end
while UO.CharPosX~=2569 and UO.CharPosY~=489 do
wait(1000)
end
UO.Pathfind(oldX,oldY);
while UO.CharPosX~=oldX and UO.CharPosY~=oldY do
wait(5000)
UO.Pathfind(oldX,oldY)
end
while UO.CharPosX ~= oldX and UO.CharPosY ~= oldY do
wait(1000)
end
end
end
function Main()
local status="idle"
while UO.Hits > 0 do
if ( UO.Weight > UO.MaxWeight ) then
print("gosmelt")
GoSmelt()
end
if status == "no_more_ore" then
print("move next")
status= "idle"
MoveToNextSpot()
end
if ( UO.Weight > UO.MaxWeight ) then
print("gosmelt")
GoSmelt()
end
local nNewRef = UO.ScanJournal(0)
status=MineThisSpot(status)
status=ProcessResults(status,nNewRef)
end
end
Main() --Run biatx
Easy UO Script: Mining at Mt. Kendall -
Taran - 08-03-2011
Nice work Morwen, I'm sure many players will appreciate your work
Easy UO Script: Mining at Mt. Kendall -
JointCh1L - 08-29-2011
How am I able to check my own container variable ? is there a command for that?
And do i just need to copy / paste this text in EasyUO ?
Grtz
Ringo
Easy UO Script: Mining at Mt. Kendall -
Lamby - 08-29-2011
Got anything like this for Razor?
Easy UO Script: Mining at Mt. Kendall -
Morwen - 08-29-2011
@JointCh1L you just have to copy paste to OpenEasyUO and when you double click the container its variable appears in the variable list on the right under the name of ContID
This is a bit complex to Razor and even if it was made it wouldn't be efficient enough imo
Easy UO Script: Mining at Mt. Kendall -
Lamby - 08-29-2011
Ok, how to get easyUO? do we have a link here?
Easy UO Script: Mining at Mt. Kendall -
Morwen - 08-29-2011
http://www.easyuo.com/cheffe/openeuo/bin/openeuo_110815.zip