Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - lydaan

Pages: 1 ... 3 4 [5]
61
Scripting Chat / LPC for finditem and event property
« on: December 29, 2015, 07:36:32 PM »
As I've been working on my mule script and specifically the endless tinker sub and the dig routine, I find myself becoming very accustomed with the limitations of finditem and event property... specifically the update lag that exists... ESPECIALLY in #property. I know setting LPC really high will not effect the ability of these 2 to process info, but as cheffe eluded, finditem takes about 18.5 lines of the 20 alotted? i think? just due to the length of time to process and the length (in time) of a cycle. Do you think setting LPC to 1 or 2 would give finditem enough time to fully process before the next few lines were read?

As an example, I think I could eat the time by reducing a wait timer, since EUO does nothing during waits, and gives those cycles to the OS, setting LPC to 1 or 2 seems like a better use of that downtime, especially since it's only 1/20 of a second.

Sample current "code:"
Code: [Select]
sub dig
   repeat   
      finditem shovel
      if no shovel
         make shovel
      dig
      wait 6
      scan journal for stuff
      wait 8
   until forever
return

Now with an lpc adjustment:
Code: [Select]
sub dig
   repeate   
      lpc 2
      finditem shovel   ;1
      lpc 10?           ;2
      if no shovel
         make shovel
      dig
      wait 6
      scan journal for stuff
      WAIT 7   ;<--------- reduced by 1
   until forever
return

While I think this might help finditem, and would only really be neccesary in extreme cases, I don't think it would help event property/#property as it feels like that update is server response related, and limited to ping.

I'll probably fart around with this on my endless tinker sub, and think of someways to speed test finditem update...

62
v1.1 posted notes up top

added the blackrock stuff... UVF goes in the gembag for now

Asked this above, but I'll ask here again here: what do I have to do for the uvf blackrock? can I use #findcol? or do I have to str check #property?

Thanks Ghost for posting that info!

- Lydaan

63
New member introductions / Re: Hello Script UO
« on: December 29, 2015, 05:29:17 PM »
Good, at least it wasn't Analy...

omg... I should have waited for that one   ; :P

64
New member introductions / Re: Hello Script UO
« on: December 29, 2015, 12:55:16 PM »
It's a jumble of the letters in my name, + one more...

WElcome to scriptuo     Aydan !!!

DARN!!! you got me!  :o

65
Scripting Chat / Re: Travel... needs a discussion
« on: December 28, 2015, 08:42:53 AM »
Thanks EN!
Since I FINALLY got my endless tinker sub to work well enough for my mules (ran all night on 3 accounts), I'll be looking into this before I post my miner script... getting REAL annoyed watching them cast recall 2 and 3 times before continuing.

Option (1) was fine to move on, and a good starting point I think

Option (2) is definitely what I WANT to do, and WILL do (thanks for pointing me in the right direction)

Option (3) is the ultimate goal so I get all the ore...  ;)

P.S. Once I get endless tinker to not fail on my lockpick selling script (spams #property updates too fast and fails), I'll post that in it's own thread.

66
Scripting Chat / Travel... needs a discussion
« on: December 27, 2015, 10:52:22 AM »
I'm sure a lot of you know I'm working on a mule gatherer script, and while I'm working out the kinks on my endless tinker tools sub I thought I'd start a disussion on travel subs. All this is in EUO, but the biggest problems I'm running into are UO related, and should apply to whatever you're using for scripts (unless it has built in spellcast waits and such).

First, let me describe what I believe to be an EUO limitation:
Sometimes the #ltargetid/event macro 22 0 screws up... it just doesn't target. I had a lot of problems with this in TM's travel sub, which was one of the contributing factors for me to try and make my own... At this point I'm convinced that event macro 22 0 just plain sucks, so I have a little bit of gosub travel spam in my script to compensate for when it fails. Don't think I can do much else at this point... whatever... it's fine enough... the fails are few and far between.

Second, and the crux of my issues, is cast recovery:
I've toyed with my journal scanner *a little bit* to no avail. The problem is I keep getting "You have not recovered..." which makes it loop, until it hits my *fix* which returns from the sub when "That location is blocked," is displayed. Not the best fix, but solves the problem for my script, but much slower than what I'd like. I've put event sysmessages (for debugging) just about everywhere I can think of, but have hit a wall, and want to get the other parts of my script working in the meantime, since it "works," anyway. At this point, I think the sub is failing, because of my lack of understanding of Cast Recovery, and all my mules have 0 FCR. I think that other things are making "You have not recovered..." post, making my travel sub loop.

My goal is to have as many things as possible have non-static waits, and I strongly believe that travel is one of them.... I tried #charposx/y before and after travel, but the update seems to be real slow on charpos, as I wasn't able to get that to work at all... so right now, if it hits cast recovery, it loops one time until it returns "That location is blocked."

So, here's my travel sub so far... it's a little dirty, but I think that the meat is there. Oh, and it's only recall right now... just wanted to get this working.

Code: [Select]
recover:
   set %jStart #jIndex
   set %manacheck #mana
   event macro 15 31 ;recall
   target 5s

   event macro 22 0
   set %jEnd #jIndex
   set %closerbx #contposx + 250
   set %closerby #contposy + 130
   if #contsize = 452_236
      click %closerbx %closerby r
   set %journalrange %jend - %jstart
   event sysmessage scanrange = %journalrange
   for %i %jStart %jEnd
   {
      scanjournal %i
    if you_have_not in #journal || More_reagents in #journal
      {
         msg wait, wut?$
         msg omg$
         msg I'm so stupid...$
         wait %recovertime
         goto recover
      }

      if That_location in #journal
      {
         wait 10
         return
      }
}
if %manacheck <= #mana
      goto recover
  wait %recovertime
}
return

Thanks all. Just hoping to start a discussion on travel subs, and what they need to work flawlessly

Lydaan

edit* posted a non working travel sub... fixed

67
New member introductions / Re: Hello Script UO
« on: December 26, 2015, 07:14:47 PM »
It's a jumble of the letters in my name, + one more...

68
Been busy with 'rents in town and such... I've been working on this pretty much everyday, but I haven't made it that far, although I've learned a lot. I've added non-static waits to just about every action I could, and every one felt like a 3 day set back to get it worked out.

I think I've finally got all the kinks worked out to the point that it's stable. I have it running on 3 accounts right now for testing, and I'll post what I have after they all make new tinkering tool kits... maybe an hour, maybe a day...

As for blackrock, I'm sure it would be real easy to add assuming it has the same kind of 3 letter Object Type in EUO. if you tell me what the object type is, I could easily add it. My FS has random artifacts that spawn in the bag that I have yet to work out as they have diferent types, but if blackrock object type is static, it would be easy.

I also added my own travel sub, but it's pretty minimal. would LOVE a point in the direction of a discussion on that topic.

Thanks for reading and following!

- Lydaan

69
Scripting Chat / Mulchine - stripped down gatherer - A learning experiment
« on: December 14, 2015, 11:03:16 AM »
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?  :P
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

Code: [Select]
;---------------------------
;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:
Code: [Select]
;--------------------------------------------------------------
;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  ;D)

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!  8)

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?  :D 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!


Code: [Select]
;==============================================================================================================================================
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;==============================================================================================================================================
; 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.

Code: [Select]
;______________________________________________________________________________________________________________________________________________
;______________________________________________________________________________________________________________________________________________
; 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...

70
New member introductions / Hello Script UO
« on: December 09, 2015, 02:25:18 PM »
Hello Script UO!

My online handle is Lydaan, and I am a gamer. All games... doesn't really matter.

About me:
I'm in my 30's and recently graduated from the University of Arizona with bachelor's degrees in Accounting and Management Information Systems (MIS), and looking for a career. I'm a longtime computer hardware nut, and have built many computers, but am somewhat lacking in the programming/coding department (just experience... have the know how).

I studied music for several years, and consider myself a budding producer (stuff on Soundcloud already, but private... maybe pm me). I play many instruments... All brass instruments (trombone, trumpet, TUBA - HELL YEAH, etc.), many woodwinds (Saxophone, flute, etc.) Drumset as well as stage percussion, and one of my favorites, the harmonica. I've even led a bar band in Seattle for a couple years.

About my gaming:
Minesweeper anyone? haha, not so much anymore, but still hold it dear...
Gamer status started with Doom... then online competition with Age of Empires and Half-Life. lanned Diablo 2 (as well as others) for countless hours. I studied Counter-Strike more than I studied class subjects during my first run at University. I like card games: Poker (my favorite), Star Wars CCG, LOTR CCG, Magic, Hearts, Gin Rummy, etc. ; and pretty much any Board Game.

I Never played UO back when EA was running it, but have recently gotten into it thanks to my friend Iseldorn. We play on Lost City Shard which is an AFK friendly Freeshard. I realize some may look down upon this, and will refrain from posting AFK scripts.

I must say, I'm glad I found this site, as I've been using EasyUO and their forum is somewhat dead (Lots of posts from 2 years ago...), and am really interested in scripting to improve my programming/coding skills.

I've already written a few helper scripts (Netflix afk) in EasyUO, to help with skill gains, and am very much looking to get better at this, and I hope I may be able to contribute at least a fraction of what I've seen available. If anything I can probably help with some of the little headaches that I've run into while writing my own scripts...

Lastly, just wanted to say thanks for the *required* introduction. These sort of things are always enlightening to the self and create a welcoming environment within the Forum.

Hope to chat with you all soon,

Lydaan

Pages: 1 ... 3 4 [5]