Official ScriptUO EasyUO Scripts > Script Snippets
TrailMyx's Mining Helper
(1/1)
TrailMyx:
I wrote this little script for my RL Mom a loooong time ago because she loves to go out with her beetle and mine by hand. This script waits for you to target an area, then will mine that area dry. It will also fill your beetle up until your beetle is also full. This requires tinkering, since the tools are also made. with this script; you can comment that out if you'd like.
This script is ancient so I have no idea if it still works. It's not my best work for sure, probably one of my first original scripts.
--- Code: easyuo ---set %logfile c:\mininglog.txt set %packanimalname beetle_name_here packloop:finditem ZGB G_2if #FINDKIND <> -1{ event property #FINDID if %packanimalname in #PROPERTY { set %packanimal #FINDID goto skippacksearch } ignoreitem #FINDID goto packloop}else{ display ok Cannot locate a pack animal. Be sure$to change the packanimalname variable$to the name of your packy. If you are$riding, please dismount and run again. stop} skippacksearch: set %mintinkertools 2gosub SyncTextScan gosub OpenStatusBargosub OpenBackPackgosub CheckTinkerToolgosub CheckShovel mainloop: gosub FindValidText where_do_you_wishif %2 = 1{ wait 20 goto loop1}goto mainloop loop1:gosub FindValidTextNoAdvance there_is_noif %2 = 1{ sound gosub SyncTextScan gosub CheckWeight goto mainloop}gosub FindValidTextNoAdvance that_is_too_farif %2 = 1{ gosub SyncTextScan goto mainloop}gosub FindValidTextNoAdvance you_can't_mineif %2 = 1{ gosub SyncTextScan goto mainloop}gosub FindValidTextNoAdvance your_backpack_is_fullif %2 = 1{ gosub SyncTextScan gosub CheckWeight goto mainloop}gosub FindValidTextNoAdvance target_cannot_beif %2 = 1{ gosub SyncTextScan goto mainloop}gosub FindValidTextNoAdvance you_dig_someif %2 = 1 gosub SyncTextScangosub FindValidTextNoAdvance you_loosen_someif %2 = 1 gosub SyncTextScangosub CheckWeightgosub CheckTinkerToolgosub CheckShovelwait 10event macro 17 0target 3sevent macro 22 0goto loop1;--------------------------------------------sub CheckWeight if ( #WEIGHT >= #MAXWEIGHT ) || ( #WEIGHT > 400 ) { gosub SyncTextScandrag_again: finditem DWJ C_ , #BACKPACKID if #FINDKIND <> -1 { exevent drag #FINDID #FINDSTACK wait 5 exevent dropc %packanimal wait 5 goto drag_again } }return;--------------------------------------------sub OpenStatusBar event macro 8 2 ; open status gosub GumpWait NULL status_gump NULL contpos 0 600return;--------------------------------------------sub OpenBackPack event macro 8 7 ; open backpack gosub GumpWait NULL container_gump NULL set %mypack #CONTID contpos 750 330return;--------------------------------------------sub CheckShovelCheckShovel_loop1: finditem ENK C_ , #BACKPACKID ; ingots if #FINDSTACK < 4 { display ok You don't have enough ingots to make a shovel. halt } findItem WWF_TWF_QPF C_ , #BACKPACKID ; QPF = pickaxe if #findkind = -1 { gosub CheckTinkerTool finditem JTL_KTL C_ , #BACKPACKID set #LOBJECTID #FINDID event Macro 17 0 gosub GumpWait generic_gump generic_gump set %clickx #CONTPOSX + 28 set %clicky #CONTPOSY + 109 click %clickx %clicky gosub GumpWait generic_gump generic_gump set %clickx #CONTPOSX + 384 set %clicky #CONTPOSY + 271 click %clickx %clicky gosub GumpWait generic_gump generic_gump set %clickx #CONTPOSX + 234 set %clicky #CONTPOSY + 71 click %clickx %clicky gosub GumpWait generic_gump generic_gump findItem WWF_TWF C_ , #BACKPACKID if #findkind <> -1 { set %clickx #CONTPOSX + 166 set %clicky #CONTPOSY + 337 click %clickx %clicky r set #LOBJECTID #FINDID set #LTARGETKIND 2 return } goto CheckShovel_loop1 } else { set #LOBJECTID #FINDID }return;--------------------------------------------sub CheckTinkerTool set %close FALSEtinkerloop: set %tinkcount 0 findItem JTL_KTL C_ , #BACKPACKID if #findkind = -1 { display ok Ack, no more tinker tool halt } if #FINDCNT < %mintinkertools { set #LOBJECTID #FINDID event Macro 17 0 gosub GumpWait generic_gump generic_gump if %tinkcount = 0 { set %clickx #CONTPOSX + 28 set %clicky #CONTPOSY + 109 click %clickx %clicky gosub GumpWait generic_gump generic_gump set %clickx #CONTPOSX + 236 set %clicky #CONTPOSY + 129 click %clickx %clicky gosub GumpWait generic_gump generic_gump set %tinkcount %tinkcount + 1 goto tinkerloop } set %clickx #CONTPOSX + 286 set %clicky #CONTPOSY + 413 click %clickx %clicky gosub GumpWait generic_gump generic_gump set %tinkcount %tinkcount + 1 set %close TRUE goto tinkerloop } if %close = TRUE { set %clickx #CONTPOSX + 166 set %clicky #CONTPOSY + 337 click %clickx %clicky r }return;-------------------------------------------------------------------------------; %1 = FindTextsub SyncTextScan set %_jindex #jindex + 1return;-------------------------------------------------------------------------------; %1 = string to search for; %2 = 0 = bad text, 1 = string foundsub FindValidText if ( %_jindex = N/A ) || ( #jindex < %_jindex ) { set %_jindex #jindex } set %2 0FindValidText_loop1: if #jindex >= %_jindex { scanjournal %_jindex if %1 in #journal { if :_ , %1 notin #journal { set %2 1 set %_jindex %_jindex + 1 return } } set %_jindex %_jindex + 1 goto FindValidText_loop1 }return;-------------------------------------------------------------------------------; %1 = string to search for; %2 = 0 = bad text, 1 = string foundsub FindValidTextNoAdvance if ( %_jindex = N/A ) || ( #jindex < %_jindex ) { set %_jindex #jindex } set %temp_jindex %_jindex set %2 0FindValidTextNoAdvance_loop1: if %temp_jindex <= #jindex { scanjournal %temp_jindex if %1 in #journal { if :_ , %1 notin #journal { set %2 1 set %temp_jindex %temp_jindex + 1 return } } set %temp_jindex %temp_jindex + 1 goto FindValidTextNoAdvance_loop1 }return;-------------------------------------------------------------------------------; %1 = Gumpname 1; %2 = Gumpname 2sub GumpWait wait 10 set %timedelay #SCNTGumpWait_loop1: if #CONTNAME = %1 || #CONTNAME = %2 return if #SCNT > %timedelay + 7 return goto GumpWait_loop1return
warroto:
I have a doubt, I cannot start the auto miner script because it says "target cannot be seen"... What does this mean?
tanks
death123:
its really good to make that script to work
its too relaxing to mining in dungeons
maybe add the mining of powders too...
i am only user of scripts any can upgrade that?:p
Navigation
[0] Message Index
Go to full version