To those of you that read my previous post... sorry... was just excited I got some stuff to work...
Starting this project over with an outline of subs, so I can move from mining to logging once I get tiles worked out.
This is Pre-Alpha of Mulchine: a bare-minimum Mule script.
This isn't a tutorial, as I have not much of an idea of what I'm doing... This is not a walkthrough, as again I have not much idea of what I'm doing... This is a sharing experiment, where hopefully my small breakthroughs will encourage others to attempt DIY projects. So, I'm going to lay this out following some of the guidelines set in Cerveza's tutorials. But first, a little background...
I play on a freeshard. This is my only tangible experience with this game. I currently have several DIY helper scripts for training skills, and combat, and, my favorites, dropping and seperating stuffs in containers.... I will first try to make the script work on my shard, and then edit, if necesary, to make it work on anything else. My free shard allows 3 active accounts with 5 characters each, and afk macroing is "encouraged," so my goal is to have at least 2 accounts gathering, filling or selling something at all times. I'm going to start with mining, and then when I'm satisfied, I WILL tackle tiles and make an LJ mule script to go along with this, then a BoD getter, then a BoD Filler, then a wood stuffs seller, then a blah blah blah... about a year total, hopefully a lot less.
Oh, and I'll be doing this in EUO, because that's what I'm comfortable with, right now.
Achievable script goals (Subject to change) v0.0-v1.0:
Make Mule carry bare minimum requirements to maximize gathering uptime.
Make Mule strip grids to the bone before moving on to next grid.
Count ores AND track rare-ore spawns (my FS has bonus ores/ingots Blaze, Ice, Toxic, Electrum and Platinum)
Do blah blah blah to make it loop endlessly...
Future goals (Subject to change) v1.1-v2.0:
Smelt Ore
Add Defensive Pet, to thwart "Friendly," players from dragging stupid orcs into the stupid cave... What's up, now?

Add Pack Animal to increase gathering uptime... my Packhorse is named Idiot... because... well... he's an...
Add lumberjacking
Unpossible goals(Subject to change) v3.0:
Master tile mapping and hardcode it so the user only has to mark good runes.
So, let's map out some make-believe code to build an outline
;---------------------------
;Name: Mulchine
;Author: Lydaan
;Build: v0.0 - v1.0, Ore Mulchine
;What: build what I said, up top...
;Thanks to: going to be using TM's Rune sub, for now. THANKS TM!
;---------------------------
User inputs
-----------
Hard coded inputs
-----------
runes
-----------
Mining Main:
digroutines
vein/grid tracker
rune tracker
ore counter
shovel routines
check for shovel
check for tinker
check for ingots
make shovel/tinker get ingots
dropore
go to secure and drop ore
go back to the SAME vein/grid
TM's travel sub...
I think that about sums it up for now... I'll add some code in a few hours and edit this when needed. Hope I can live up to what I'm trying to do.
Thanks,
Lydaan
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
So, had a toothache that ended with a root canal about an hour ago keep me away from this for the last couple days. I'll hopefully have all the operations that take place at the secure location up tonight, but in the meantime I thought I'd share something cool.
I call it endless tinker:
;--------------------------------------------------------------
;Name: Endless Tinkering Tools Sub
;Author: Lydaan
;HowTo: call this whenever your mule tinkers something
;Notes: Just have iron in your backpack. Enjoy!
;--------------------------------------------------------------
set %tinktypes KTL_JTL_MTL_LTL ;if your tinker tool type is not here, just _add *I think... I'm no expert*
sub endlesstinker
event macro 8 7
finditem %tinktypes * c_ , #backpackid
event property #findid
str mid #property 40 4 ;40 4 for reg, 52 4 for exceptional
set %regtink #strres
str mid #property 52 4
set %exctink #strres
set %checktink : , #spc , 1$
if %checktink = %regtink || %checktink = %exctink
{
set #lobjectid #findid
event macro 17 0
wait 10
click 80 160
wait 5
click 280 170
wait 2s
click 80 160 r
}
return
I think that's how I add all tool types?
- Lydaan
--------------------------------------------------------------------------------------------------------------------------------
So here's v1.0 for EUO
It's all manual setup, just follow the examples at the top of the sub. It's stable, but the travel sub hangs sometimes making a restart neccesary. I've run it for about 24 hours on 2 accounts, so about 48 hours of test time, 10 hours consecutive on both with one still running after about 14 hours.
Mulchine has a smelt sub, just make sure you're mule's secure rune is within 2 tiles of your secure and smelter
Note: All the waits are turned way down for speediness... this leads to you not being able to touch anything while it's running. There's also the possibility that you might get a lot of you must wait errors... this can be remedied by finding all the waits and changing them to "wait 20" I'll add controllable wait variables at the top later.
-----------------------------------------------------------------------------------------------------------------
v1.1 is running STABLE!!!
I've ran the smelt sub probably 30 times... works well enough right now, tho not
exactly what I want
Still recall only... but travel is a whole other issue... might hammer that out tonight, but have already spent about 9 hours on this today.
Most notable attributes of this script:
First, it hauls ass .. err ORE, yeah ORE. I've used variable waits based on contsize to speed things up, and I've only made 1 pair of scissors out of about 10,000 shovels (sitting on stacks of valorite

)
Second, endless tinker sub is now stable enough for mule scripts, and almost stable enough for selling/training scripts... computer crashed the other night while I was working on my lockpick selling script (makes lockpicks as fast as possible), and I haven't opened it yet to see if I saved my endless tinker progress before bed.
Endless tinker is dependant on #property, so you must be playing on a server with age of shadows. This sub stops your mule from using that last tinker use on a shovel and instead makes another tinker tool!

It's still a work in progress, but:
added blackrock stuff, except for the uvf one pointed out by Ghost... that's going in the gem bag for now... what do I need to do?

maybe #findcol?

or do I have to str check #property?

added a debugger for possible variable/non-static wait hangs
added an endless tinker tool debugger if that fails (really shouldn't unless your skill is <80.0, then maybe... I have no mules to test with <80.0 )
added an option for stripmining or moving on to the next rune if on the last vein at a rune and close to maxweight
added extensive notes in the header
added user controlable wait variables in the header so you can ratchet it down as tight as your server will allow
AND I've spent about 1/3 to 1/2 my time on trimming the fat off the dig routine... I have 2 journal scans for a worn out shovel and a backup #findcnt=0.... it crafts shovels and gets right back to digging in about 1.5 - 2 seconds
I also haven't gone overweight (hit 553/555 often) in about 3 weeks.
I've been running this nonstop on 3 accounts for about 4 days now... stable, stable, stable...
Things to work on:
Travel... just need to figure out where to put the fcr wait in.... *may* happen tonight
Counter... going to look into dumping to a log, as I don't really want to start in on a menu without these mechanics and other scripts started
Pets/Packy WILL be coming... need to hashout #systime and set up a global variable for pet feeding and smelting and other things... thinking about tying the FCR wait with #systime so I can skip it when my mules do other things long enough
So, again... STABLE AND ABOUT AS FAST AS IT GETS... Do yourself and myself a favor and try this out!
;==============================================================================================================================================
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;==============================================================================================================================================
; Script Name: Mulchine
; Author: Lydaan
; Version: 1.1 for EUO 1.5 *** ScriptUO.com Exclusive***
; Revision Date: 12/29/2015
; Purpose: FAST looping mule runebook gatherer. Mines, makes shovels and tinker tools,
; drops ore at secure, smelts after a few loops... should be autonomous
;
; Mule carries bare minimum:
; Runebooks with dig locations (1 stone each)
; Spellbook or Chivbook (1 stone) (Recall only right now)
; 10 ingots (1 stone)
; 1 shovel (5 stones)
; 1 tinker tool (1 stone)
; for a rough total of 12-15 stones + charweght
;
; How To: The minimum for the first run (currently):
; recommended 300+ iron ingots in secure
; 1 tinker tool per mule in secure (1 use remaining should be fine)
; You can start with ingots and tinker tool in your backpack, if you want
;
; Copyright: 2015/12/17 Lydaan
; *** you may freely use my subs... just give credit where credit is due
;
; Thanks to: CyberPope for his AWESOME Mining Radar... it's the best!
;==============================================================================================================================================
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;==============================================================================================================================================
Plenty of notes in the header, but I thought I'd post MY wait setup... everything is set to default in the dl.
;______________________________________________________________________________________________________________________________________________
;______________________________________________________________________________________________________________________________________________
; wait timers:
; Every wait that may be non-static (server response dependant) *should* or at least *will* be non-static
; These are variables for all static (actions that cannot be made non-static) waits
; Adjust at your own risk, but I would assume you can ratchet these down a little to make your server respond faster
; Wait 14 is the fastest that any action may be performed on my FS without UO posting "You must wait..."
; *** I run global "wait 14" with 0 problems ***
; Adjust these up if UO is posting "You must wait..." or it's glitching and you think it's wait related
; Turn them all to 0 if you like spam/broken scripts
;______________________________________________________________________________________________________________________________________________
set %globalwait 14 ;20 default (1 second). -I use 14- *GENERALLY* the global wait is 1 second *** see header of "wait timers" section
set %digloopglobalwait 14 ;20 default. -I use 14- *** see header and end of "wait timers" section
;This *GLOBAL WAIT* is specific for the action of digging. Co-dependant on %digjournalwait *** see header and end of "wait timers" section
;I've found <20 overloads the client post and increases the (may just be the "perceived") dig rate
set %digjournalwait 6 ;This is the wait for "There is no metal..." "You have worn out..." and other dig related journal posts. *** see header and end of "wait timers" section
;6 works for me, adjust up/down up to a maximum of %digloopglobalwait *** check is scanjournal errors, resulting in mana burn/skipping veins
;Adjust up if you experience excessive mana burn, or you suspect your mule is skipping dig locations
set %genericwait 5 ;Script stall fail-safe. generic wait that's less than the previos action, or neccesary... used minimally so far (twice right now)
set %smeltwait 5 ;20 default. The time between "using" each ore-stack and targeting the smelter *** does not seem to be attached to the global wait on my FS
;*** 5 does not glitch for me (<5 does), but HILARIOUSLY overloads the client post and my mule just stands there waiting for the server to catch up...
;*** I (maybe foolishly) assume this makes it variable/non-static (fastest possible)
Thanks for reading!
- Lydaan
P.S. Do yourself a favor and set the %slowstartup to "skip" after you run it once. Leech catcher... *This Post-Script will self destruct in about a week*
*edit... welp, there seems to be a bug... I'll try to get a solid working v1.1 up tomorrow morning
*edit again... ok, sooo.... the bug is when you set debug to no, the script fails to make shovels... hmmm, so going to post one WITH debug for those with weird gump sizes, and one WITHOUT debug...