Author Topic: Mining Script  (Read 2921 times)

March 21, 2014, 11:45:25 PM

Offline Oslin

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Here is a little Macro for Mining      you will need shovels and a portable forge   (orc forge will work) and mining keys


it will mine the cave floor  (sorry no mountain sides) smelt the ore and place the ingot into you mining keys for you.


I does not move you around  but it does tell you when it time to find more ore   


in steam go to macros make new  copy paste the macro


Enjoy


if not @findalias 'mobile forge'
  promptalias 'mobile forge'
endif
while weight <= 481
  usetype 0xf39
  waitfortarget 750
  targettileoffset 0 0 0
  pause 750
  if @injournal 'no metal' 'system'
    @clearjournal
    for 3
      @usetype 0x19b9
      waitfortarget 750
      target! 'mobile forge'
      @usetype 0x19b8
      waitfortarget 750
      target! 'mobile forge'
      @usetype 0x19b7
      waitfortarget 750
      target! 'mobile forge'
      @usetype 0x19ba
      waitfortarget 750
      target! 'mobile forge'
    endfor
    usetype 0x1be8
    waitforgump 0x6abce12 1000
    replygump 0x6abce12 31
    waitforgump 0x6abce12 1000
    replygump 0x6abce12 0
    headmsg 'No more ore here. Smelting complete!'
    stop
  endif
endwhile
for 3
  @usetype 0x19b9
  waitfortarget 750
  target!

March 22, 2014, 09:17:52 PM
Reply #1

Offline Topknot

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
nice macro thx :)

March 24, 2014, 09:26:01 AM
Reply #2

Offline Rael

  • Newbie
  • *
  • Posts: 4
  • Karma: +1/-1
Thanks Oslin... Can't wait to give this a try!!!

March 29, 2014, 03:16:47 AM
Reply #3

Offline Kenandan

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Love the use of the keys. I am stealing this, as it is way cleaner then mine.

For mining on the side of a mountain:

Change:

waitfortarget 750
  targettileoffset 0 0 0
  pause 750

To:

waitfortarget 750
 if direction == 0
targettileoffset 0 -1 0
elseif direction == 1
targettileoffset 1 -1 0
elseif direction == 2
targettileoffset 1 0 0
elseif direction == 3
targettileoffset 1 1 0
elseif direction == 4
targettileoffset 0 1 0
elseif direction == 5
targettileoffset -1 1 0
elseif direction == 6
targettileoffset -1 0 0
elseif direction == 7
targettileoffset -1 -1 0
endif
pause 750

This will change the macro from mining directly under your feet, to mining 1 space front of your character that it is facing. So if your facing north, it will mine north. West/west, etc.

I don't know if its possible to make it cleaner.


March 30, 2014, 08:40:56 AM
Reply #4

Offline Rael

  • Newbie
  • *
  • Posts: 4
  • Karma: +1/-1
Oslin made a couple changes, ignored a couple lines of the code, to my (his) cave floor mining script which eliminated the error and need for me to retarget my forge. I think I will setup another macro with your changes Kenandan to mine the sides. Thanks guys!