Author Topic: TrailMyx's Mining Helper  (Read 11849 times)

0 Members and 1 Guest are viewing this topic.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
TrailMyx's Mining Helper
« on: June 28, 2008, 05:44:32 PM »
0
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
  1. set %logfile c:\mininglog.txt
  2.  
  3. set %packanimalname beetle_name_here
  4.  
  5. packloop:
  6. finditem ZGB G_2
  7. if #FINDKIND <> -1
  8. {
  9.   event property #FINDID
  10.   if %packanimalname in #PROPERTY
  11.   {
  12.     set %packanimal #FINDID
  13.     goto skippacksearch
  14.   }
  15.   ignoreitem #FINDID
  16.   goto packloop
  17. }
  18. else
  19. {
  20.   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.
  21.   stop
  22. }
  23.  
  24. skippacksearch:
  25.  
  26. set %mintinkertools 2
  27. gosub SyncTextScan
  28.  
  29. gosub OpenStatusBar
  30. gosub OpenBackPack
  31. gosub CheckTinkerTool
  32. gosub CheckShovel
  33.  
  34. mainloop:
  35.  
  36. gosub FindValidText where_do_you_wish
  37. if %2 = 1
  38. {
  39.   wait 20
  40.   goto loop1
  41. }
  42. goto mainloop
  43.  
  44. loop1:
  45. gosub FindValidTextNoAdvance there_is_no
  46. if %2 = 1
  47. {
  48.   sound
  49.   gosub SyncTextScan
  50.   gosub CheckWeight
  51.   goto mainloop
  52. }
  53. gosub FindValidTextNoAdvance that_is_too_far
  54. if %2 = 1
  55. {
  56.   gosub SyncTextScan
  57.   goto mainloop
  58. }
  59. gosub FindValidTextNoAdvance you_can't_mine
  60. if %2 = 1
  61. {
  62.   gosub SyncTextScan
  63.   goto mainloop
  64. }
  65. gosub FindValidTextNoAdvance your_backpack_is_full
  66. if %2 = 1
  67. {
  68.   gosub SyncTextScan
  69.   gosub CheckWeight
  70.   goto mainloop
  71. }
  72. gosub FindValidTextNoAdvance target_cannot_be
  73. if %2 = 1
  74. {
  75.   gosub SyncTextScan
  76.   goto mainloop
  77. }
  78. gosub FindValidTextNoAdvance you_dig_some
  79. if %2 = 1
  80.   gosub SyncTextScan
  81. gosub FindValidTextNoAdvance you_loosen_some
  82. if %2 = 1
  83.   gosub SyncTextScan
  84. gosub CheckWeight
  85. gosub CheckTinkerTool
  86. gosub CheckShovel
  87. wait 10
  88. event macro 17 0
  89. target 3s
  90. event macro 22 0
  91. goto loop1
  92. ;--------------------------------------------
  93. sub CheckWeight
  94.   if ( #WEIGHT >= #MAXWEIGHT ) || ( #WEIGHT > 400 )
  95.   {
  96.     gosub SyncTextScan
  97. drag_again:
  98.     finditem DWJ C_ , #BACKPACKID
  99.     if #FINDKIND <> -1
  100.     {
  101.       exevent drag #FINDID #FINDSTACK
  102.       wait 5
  103.       exevent dropc %packanimal
  104.       wait 5
  105.       goto drag_again
  106.     }
  107.   }
  108. return
  109. ;--------------------------------------------
  110. sub OpenStatusBar
  111.   event macro 8 2 ; open status
  112.   gosub GumpWait NULL status_gump NULL
  113.   contpos 0 600
  114. return
  115. ;--------------------------------------------
  116. sub OpenBackPack
  117.   event macro 8 7 ; open backpack
  118.   gosub GumpWait NULL container_gump NULL
  119.   set %mypack #CONTID
  120.   contpos 750 330
  121. return
  122. ;--------------------------------------------
  123. sub CheckShovel
  124. CheckShovel_loop1:
  125.   finditem ENK C_ , #BACKPACKID  ; ingots
  126.   if #FINDSTACK < 4
  127.   {
  128.     display ok You don't have enough ingots to make a shovel.
  129.     halt
  130.   }
  131.   findItem WWF_TWF_QPF C_ , #BACKPACKID ; QPF = pickaxe
  132.   if #findkind = -1
  133.   {
  134.     gosub CheckTinkerTool
  135.     finditem JTL_KTL C_ , #BACKPACKID
  136.     set #LOBJECTID #FINDID
  137.     event Macro 17 0
  138.     gosub GumpWait generic_gump generic_gump
  139.     set %clickx #CONTPOSX + 28
  140.     set %clicky #CONTPOSY + 109
  141.     click %clickx %clicky
  142.     gosub GumpWait generic_gump generic_gump
  143.     set %clickx #CONTPOSX + 384
  144.     set %clicky #CONTPOSY + 271
  145.     click %clickx %clicky
  146.     gosub GumpWait generic_gump generic_gump
  147.     set %clickx #CONTPOSX + 234
  148.     set %clicky #CONTPOSY + 71
  149.     click %clickx %clicky
  150.     gosub GumpWait generic_gump generic_gump
  151.     findItem WWF_TWF C_ , #BACKPACKID
  152.     if #findkind <> -1
  153.     {
  154.       set %clickx #CONTPOSX + 166
  155.       set %clicky #CONTPOSY + 337
  156.       click %clickx %clicky r
  157.       set #LOBJECTID #FINDID
  158.       set #LTARGETKIND 2
  159.       return
  160.     }
  161.     goto CheckShovel_loop1
  162.   }
  163.   else
  164.   {
  165.     set #LOBJECTID #FINDID
  166.   }
  167. return
  168. ;--------------------------------------------
  169. sub CheckTinkerTool
  170.   set %close FALSE
  171. tinkerloop:
  172.   set %tinkcount 0
  173.   findItem JTL_KTL C_ , #BACKPACKID
  174.   if #findkind = -1
  175.   {
  176.     display ok Ack, no more tinker tool
  177.     halt
  178.   }
  179.   if #FINDCNT < %mintinkertools
  180.   {
  181.     set #LOBJECTID #FINDID
  182.     event Macro 17 0
  183.     gosub GumpWait generic_gump generic_gump
  184.     if %tinkcount = 0
  185.     {
  186.       set %clickx #CONTPOSX + 28
  187.       set %clicky #CONTPOSY + 109
  188.       click %clickx %clicky
  189.       gosub GumpWait generic_gump generic_gump
  190.       set %clickx #CONTPOSX + 236
  191.       set %clicky #CONTPOSY + 129
  192.       click %clickx %clicky
  193.       gosub GumpWait generic_gump generic_gump
  194.       set %tinkcount %tinkcount + 1
  195.       goto tinkerloop
  196.     }
  197.     set %clickx #CONTPOSX + 286
  198.     set %clicky #CONTPOSY + 413
  199.     click %clickx %clicky
  200.     gosub GumpWait generic_gump generic_gump
  201.     set %tinkcount %tinkcount + 1
  202.     set %close TRUE
  203.     goto tinkerloop
  204.   }
  205.   if %close = TRUE
  206.   {
  207.     set %clickx #CONTPOSX + 166
  208.     set %clicky #CONTPOSY + 337
  209.     click %clickx %clicky r
  210.   }
  211. return
  212. ;-------------------------------------------------------------------------------
  213. ; %1 = FindText
  214. sub SyncTextScan
  215.   set %_jindex #jindex + 1
  216. return
  217. ;-------------------------------------------------------------------------------
  218. ; %1 = string to search for
  219. ; %2 = 0 = bad text, 1 = string found
  220. sub FindValidText
  221.   if ( %_jindex = N/A ) || ( #jindex < %_jindex )
  222.   {
  223.     set %_jindex #jindex
  224.   }
  225.   set %2 0
  226. FindValidText_loop1:
  227.   if #jindex >= %_jindex
  228.   {
  229.     scanjournal %_jindex
  230.     if %1 in #journal
  231.     {
  232.       if :_ , %1 notin #journal
  233.       {
  234.         set %2 1
  235.         set %_jindex %_jindex + 1
  236.         return
  237.       }
  238.     }
  239.     set %_jindex %_jindex + 1
  240.     goto FindValidText_loop1
  241.   }
  242. return
  243. ;-------------------------------------------------------------------------------
  244. ; %1 = string to search for
  245. ; %2 = 0 = bad text, 1 = string found
  246. sub FindValidTextNoAdvance
  247.   if ( %_jindex = N/A ) || ( #jindex < %_jindex )
  248.   {
  249.     set %_jindex #jindex
  250.   }
  251.   set %temp_jindex %_jindex
  252.   set %2 0
  253. FindValidTextNoAdvance_loop1:
  254.   if %temp_jindex <= #jindex
  255.   {
  256.     scanjournal %temp_jindex
  257.     if %1 in #journal
  258.     {
  259.       if :_ , %1 notin #journal
  260.       {
  261.         set %2 1
  262.         set %temp_jindex %temp_jindex + 1
  263.         return
  264.       }
  265.     }
  266.     set %temp_jindex %temp_jindex + 1
  267.     goto FindValidTextNoAdvance_loop1
  268.   }
  269. return
  270. ;-------------------------------------------------------------------------------
  271. ; %1 = Gumpname 1
  272. ; %2 = Gumpname 2
  273. sub GumpWait
  274.   wait 10
  275.   set %timedelay #SCNT
  276. GumpWait_loop1:
  277.   if #CONTNAME = %1 || #CONTNAME = %2
  278.     return
  279.   if #SCNT > %timedelay + 7
  280.     return
  281.   goto GumpWait_loop1
  282. return
  283.  
« Last Edit: May 05, 2017, 04:52:47 PM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline warroto

  • Newbie
  • *
  • Posts: 5
  • Activity:
    0%
  • Reputation Power: 1
  • warroto has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: TrailMyx's Mining Helper
« Reply #1 on: June 25, 2010, 08:36:40 AM »
0
I have a doubt, I cannot start the auto miner script because it says "target cannot be seen"... What does this mean?
tanks

Offline death123

  • Jr. Member
  • **
  • Posts: 10
  • Activity:
    0%
  • Reputation Power: 1
  • death123 has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: TrailMyx's Mining Helper
« Reply #2 on: October 06, 2013, 10:27:07 AM »
0
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

Tags: