Author Topic: Mulchine - stripped down gatherer - A learning experiment  (Read 4720 times)

0 Members and 1 Guest are viewing this topic.

Offline lydaanTopic starter

  • Jr. Member
  • **
  • Posts: 70
  • Activity:
    0%
  • Reputation Power: 3
  • lydaan has no influence.
  • Respect: +6
  • Referrals: 0
    • View Profile
Mulchine - stripped down gatherer - A learning experiment
« on: December 14, 2015, 11:03:16 AM »
0
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...

There are 3 attachment(s) in this post. You must register and post an acceptable introduction to download
Mulchine 1-1 -no debug.txt
Mulchine 1-1 -with contsize debug.txt
Mulchine.txt
« Last Edit: December 29, 2015, 10:16:56 PM by lydaan »

Offline gnomegates

  • Jr. Member
  • **
  • Posts: 10
  • Activity:
    0%
  • Reputation Power: 1
  • gnomegates has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Mulchine - stripped down gatherer - A learning experiment
« Reply #1 on: December 25, 2015, 05:52:48 AM »
0
Hey, I've been using several different mining scripts over the years, I look forward to testing yours out. I am on OSI so we shall see if it works. I'll let you know when I do give it a shot. Something that I noticed you did not account for (unless I'm blind) Is the blackrock that is gathered, and what to do with it. The script that I currently use lets me set up a box for the blackrock, I happened to make that box be the trash barrel.

Keep up the work, maybe someday I'll be brave enough to show some of the things I've worked on :)

G

Offline bodfather

  • Sr. Member
  • *
  • Posts: 380
  • Activity:
    0%
  • Reputation Power: 5
  • bodfather has no influence.
  • Gender: Male
  • Respect: +28
  • Referrals: 0
    • View Profile
Re: Mulchine - stripped down gatherer - A learning experiment
« Reply #2 on: December 25, 2015, 09:26:01 AM »
0
Hey, I've been using several different mining scripts over the years, I look forward to testing yours out. I am on OSI so we shall see if it works. I'll let you know when I do give it a shot. Something that I noticed you did not account for (unless I'm blind) Is the blackrock that is gathered, and what to do with it. The script that I currently use lets me set up a box for the blackrock, I happened to make that box be the trash barrel.

Keep up the work, maybe someday I'll be brave enough to show some of the things I've worked on :)

G

He said he plays freeshards. Most of them don't have blackrock.

Offline gnomegates

  • Jr. Member
  • **
  • Posts: 10
  • Activity:
    0%
  • Reputation Power: 1
  • gnomegates has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Mulchine - stripped down gatherer - A learning experiment
« Reply #3 on: December 25, 2015, 02:54:25 PM »
0
Hey, I've been using several different mining scripts over the years, I look forward to testing yours out. I am on OSI so we shall see if it works. I'll let you know when I do give it a shot. Something that I noticed you did not account for (unless I'm blind) Is the blackrock that is gathered, and what to do with it. The script that I currently use lets me set up a box for the blackrock, I happened to make that box be the trash barrel.

Keep up the work, maybe someday I'll be brave enough to show some of the things I've worked on :)

G

He said he plays freeshards. Most of them don't have blackrock.


Yes I read that, but thank you for pointing it out to me. As I stated I am on OSI so thus it would be a issue that would need to be addressed for anyone wishing to use it on OSI, should he choose to support that..... Merry Christmas!

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: Mulchine - stripped down gatherer - A learning experiment
« Reply #4 on: December 26, 2015, 01:08:28 PM »
0
nice work.. keep it going...
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline lydaanTopic starter

  • Jr. Member
  • **
  • Posts: 70
  • Activity:
    0%
  • Reputation Power: 3
  • lydaan has no influence.
  • Respect: +6
  • Referrals: 0
    • View Profile
Re: Mulchine - stripped down gatherer - A learning experiment
« Reply #5 on: December 26, 2015, 06:53:53 PM »
0
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

Offline gnomegates

  • Jr. Member
  • **
  • Posts: 10
  • Activity:
    0%
  • Reputation Power: 1
  • gnomegates has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Mulchine - stripped down gatherer - A learning experiment
« Reply #6 on: December 27, 2015, 02:41:50 AM »
0
Nice, I'll try and get you the blackrock info for you to play with, will be later tonight when I'm back in game. Keep up the good work!


Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Mulchine - stripped down gatherer - A learning experiment
« Reply #7 on: December 27, 2015, 01:20:42 PM »
0
OSI

;---- Mining -------------
; finditem UVF_EWF_FWF_GWF   ; Black Rock
; finditem  EVF_VUF_RVF_OVF_BVF_FVF_GVF_UVF_HVF  ; QualityGems

Yes two of them have the same ID.

Offline lydaanTopic starter

  • Jr. Member
  • **
  • Posts: 70
  • Activity:
    0%
  • Reputation Power: 3
  • lydaan has no influence.
  • Respect: +6
  • Referrals: 0
    • View Profile
Re: Mulchine - stripped down gatherer - A learning experiment
« Reply #8 on: December 29, 2015, 06:16:34 PM »
0
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

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Mulchine - stripped down gatherer - A learning experiment
« Reply #9 on: December 30, 2015, 09:14:25 AM »
0

You can try something like this
Code: [Select]
for #findindex 1 #findcnt
        {
if #Findcol <> 0
       {
           exevent Drag #findid ; No need for Findstack when it doesn't stack.
           exevent Dropc %TrashBarrel
           wait 25    ; Finds only Blackrock, not the Diamonds.
        }

You can also lok at XIIx over.   http://www.scriptuo.com/index.php?topic=5948.0

Offline lydaanTopic starter

  • Jr. Member
  • **
  • Posts: 70
  • Activity:
    0%
  • Reputation Power: 3
  • lydaan has no influence.
  • Respect: +6
  • Referrals: 0
    • View Profile
Re: Mulchine - stripped down gatherer - A learning experiment
« Reply #10 on: December 30, 2015, 10:21:18 AM »
0
YESSS!!!  :D

Thanks Ghost... super easy to implement!!!
-----------------------------------------------------------------
Was just reading the thread and looking over 12x's script.... made it about halway through the thread, and it's clear that my knowledge of the game is severely lacking, and it probably won't improve because I doubt I'll play anywhere else besides my FS.

So, Now that I've spent countless hours and turned my brain to jello many days on this, I think I'm going to change my plans for this script.

Thinking back to what I ORGINALLY planned to do... it sounds like a nub rehash of 12x's script...
Right now, it's doing evrything I want it to do, but my buddy, Iseldorn, who's the reason why I play UO at all is out of town, and I am writing this, because I don't like Twinkle's Strip miner, except for that it works, and he uses it... I'm happy with where it's at, and am probably going to move over to getting LJ working on my FS...

That said, Mulchine is going to be closer to it's name, and closer to what it's developed into in the sense that it WON'T have all the bells and whistles like 12x's or even twinkle's, but will be a no nonsense (manual setup for now) fast miner... Hpefully the fastest. I've tried to push the envelope for speed, and efficiency, and I think I've achieved that... So, as I guess I originally said.. it will be a stripped down bare-bones, bare-minimum gatherer, at least for the time being. the last thing I'm going to do with this at this point is to fix my travel sub... that's the last biggest piece of efficiency that it really needs.

I doubt this is the last I'll work on it, but learning how to write "coding" projects on the fly has been invaluable... I've only ever hacked video games and written some fairly complex html websites (in notepad) with java script that i ripped from other websites back in the day (97-99, haha), and have minimal experience with Java (enough to understand OO programming, and be able to pick up other OO languages). EUO on the other hand keeps throwing me weird curveballs, as it is a semi-oo language that is NOT compiled... my headache last night uploading v1.1 and then having it fail  when I turned the debug off (just if checks to false, and skips all those extra lines), was kind of a wakeup call, and more than I really want to get into  in euo, for now...

As i said about coding - At some point a few weeks ago i got really sub happy and have about four subs that could probably be turned into one, and looking forward to LJ, I would probably have to edit 1 a bit and add 2 more... So, I think that after I work out the travel sub, I'll just be focusing on making Mulchine leaner. I'd really like to get the lines down to as minimal as possible (as I think this improves euo's fail rate) and start calling other euo scripts to keep things light and running smooth. I don't really know if this is the way to do it, but my overall plan is to have one master script that manages my three accounts, moving between somwhere around 12 sub scripts (3 mining scripts, 3 LJ scripts, 3 5char cycling bod getters, a bod filler, wood stuff seller, and maybe an iron seller) with some log dumps, and a menu that has all 3 accounts active on it.

If anyone actually uses Mulchine, i would gladly provide updates, and would LOVE to work out issues with the variable/non-static waits, as my test system isn't super baller, but my CPU clock is fairly high (3.7-3.85Ghz) and my internet connection is rock solid save the occasional lag spike.

So, after I get the travel fcr wait worked out, until my friend Iseldorn gets back in town and starts bitching at me about what the script doesn't have, I'll just be working on cleaning up the subs (hopefully reducing the amount of lines in the loop) and working on getting LJ working...

Anyway, thanks for the support! I'll post v1.1.1 with that uvf blackrock fix and the updated travel, later today.

- Lydaan

---------------------------------------------------------

I thoought I'd add a note describing variable/non-static waits...

Here's a sample with fail-safes (i ripped the fail-safes out of 1.1 -no debugger last night when I got pissed that it was hanging.... it hasn't hung up without them on my 3 test accounts in 3 days (72 hours, so 216+ hrs of test time)... hence why I ripped them out)

this is my favorite one, as sometimes I don't even see the gumnp refresh after the shovel is made, and it just instantly starts digging again

Code: [Select]
sub makeshovel
   opentinkgumpbreak1:   <---------- fail-safe loop
   set %opentinkgumpbreak 0
   set #lobjectid %carrytink
   event macro 17 0
   opentinkgumpwait1:   <---------- the variable-wait loop.... may hang, but I haven't experienced it since I cleaned things up
   if #contkind <> gjz
   {
      if %debug = yes
         event sysmessage Your Crafting Gump # , contsize is #contsize
      set %opentinkgumpbreak %opentinkgumpbreak + 1
      if %opentinkgumpbreak >= 5
         goto opentinkgumpbreak1
      goto opentinkgumpwait1     <----------------------  end of the variable-wait loop
   }
   if %debug = yes
      event sysmessage Passed...
   wait %genericwait  
   contpos 40 40
   set %npclickx #contposx + 380
   set %npclicky #contposy + 270
   set %shovclickx #contposx + 230
   set %shovclicky #contposy + 70
   click %npclickx %npclicky f
   click %shovclickx %shovclicky f
   shovwait:
   if #contsize <> 530_437   <----- another loops
      goto shovwait
   click %npclickx %npclicky r f
return

and the same sub with the fail-safe ripped out, currently running since last night about 11pm on 3 accounts:

Code: [Select]
sub makeshovel
   set #lobjectid %carrytink
   event macro 17 0
   opentinkgumpwait1:   <--------variable-wait loop start
   if #contkind <> gjz
      goto opentinkgumpwait1 <--------- variable wait-loop end
   contpos 40 40
   set %npclickx #contposx + 380
   set %npclicky #contposy + 270
   set %shovclickx #contposx + 230
   set %shovclicky #contposy + 70
   click %npclickx %npclicky f
   click %shovclickx %shovclicky f
   shovwait:
   if #contsize <> 530_437     <----gump refresh loop
      goto shovwait
   click %npclickx %npclicky r f
return

---------------------------------------

My make/craft tinker sub seems to be failing... going to hash that out before i post v1.1.1...

----------------------------------------

OKAY!!!
so it's come to my attention that I'm pretty burned out when it comes to scripting... not sure when I'll get this update up... want to hash out a few things before I post the next version.. probably a day or two
« Last Edit: December 30, 2015, 06:12:09 PM by lydaan »

Offline lydaanTopic starter

  • Jr. Member
  • **
  • Posts: 70
  • Activity:
    0%
  • Reputation Power: 3
  • lydaan has no influence.
  • Respect: +6
  • Referrals: 0
    • View Profile
Re: Mulchine - stripped down gatherer - A learning experiment
« Reply #11 on: December 31, 2015, 09:43:08 AM »
0
*** IT HAS COME TO MY ATTENTION ***

Script needs a full overhaul.... Release TBD

Offline lydaanTopic starter

  • Jr. Member
  • **
  • Posts: 70
  • Activity:
    0%
  • Reputation Power: 3
  • lydaan has no influence.
  • Respect: +6
  • Referrals: 0
    • View Profile
Re: Mulchine - stripped down gatherer - A learning experiment
« Reply #12 on: December 31, 2015, 11:09:37 AM »
0

You can try something like this
Code: [Select]
for #findindex 1 #findcnt
        {
if #Findcol <> 0
       {
           exevent Drag #findid ; No need for Findstack when it doesn't stack.
           exevent Dropc %TrashBarrel
           wait 25    ; Finds only Blackrock, not the Diamonds.
        }

You can also lok at XIIx over.   http://www.scriptuo.com/index.php?topic=5948.0

so, do you know if #findcol <> 0 works for all blackrock?

I'm just going to assume yes until I hear otherwise, so here's what I did:

Code: [Select]
set %gemtypes gxs_axs_tws_vws_zws_uws_evf_vuf_rvf_ovf_bvf_fvf_gvf_uvf_hvf
set %brtypes uvf_ewf_fwf_gwf

...

for #findindex 1 #findcnt
   {
      exevent drag #findid #findstack
      if #findtype in %oretypes
         exevent dropc %orebag
      if #findtype in %brtypes && #findcol <> 0
         exevent dropc %blackrockcont
      if #findtype in %gemtypes
         exevent dropc %gembag
      wait %globalwait
   }


*edit* other option

The only other way I can think of to do this easily would be to take uvf out of both of the drag types and do:

Code: [Select]
for #findindex 1 #findcnt
   {
      exevent drag #findid #findstack
      if #findtype in %oretypes
         exevent dropc %orebag
      if #findtype in %brtypes && #findcol <> 0
         exevent dropc %blackrockcont
      if #findtype in %gemtypes
         exevent dropc %gembag
      if #findtype = uvf
         if #findcol <> 0
            exevent dropc %blackrockcont
         else
            exevent dropc %gembag
      wait %globalwait
   }

I prefer the first way, as it saves on lines... but am going with the latter until I hear back about #findcol <> 0 and all blackrocktypes
« Last Edit: December 31, 2015, 07:07:07 PM by lydaan »

Tags: