Anyone have a Mining Script

Post requests for scripts here.

Anyone have a Mining Script

Postby Skeeno2017 » Thu Jul 20, 2017 2:24 pm

Hi There,

I have tried the mining scripts on the scripts page but I can't seem to get them to work, not too sure if they old now?

Does anyone have a working mining script that would kindly share?

Thanks :)
Skeeno2017
Novice
 
Posts: 8
Joined: Fri Jun 16, 2017 10:42 am

Re: Anyone have a Mining Script

Postby unk » Thu Jul 20, 2017 3:49 pm

i use this one from the script forum:

Only thing I had to change was the hotkey to start because it wouldn't work with spacebar

Code: Select all
;==================================
; Script Name: MineGrid
; Author: FuzzyLogic
; Version: 1.2
; Client Tested with: 2.0.0
; EUO version tested with: 1.5
; Shard OSI / FS: Free Shard Neverlands
; Notes: FOR MINOC MINES WITH .AUTO MINING TURNED -OFF-.
;==================================
; EDIT VARIABLES =
;================
set %Banker MDD
set %Forges AUJ_AVJ_BUJ_BVJ_CUJ_CVJ_DUJ_DVJ_EUJ_EVJ_FUJ_GUJ_HVJ_IVJ_JBG_JUJ_KUJ_NUJ_NVJ_OUJ_OVJ_PUJ_QUJ_ROJ_SOJ_TUJ_UUJ_VTJ_WTJ_XUJ_YUJ_ZTJ_ZUJ
set %Ores DWJ
set %Moongate OTF
set %Ingots ENK_DWJ_RVH_EVF_FVF_RVF_BVF_HVF_MWF_GVF_VUF_OVF
set %Weight #WEIGHT
set %MaxWeight 240
set #SYSMSGCOL 1940
set %Smelt #FALSE
set %Weight #WEIGHT
;==================================
; V 1.1 - Some additional moongate protection, granite/stones/marble will be ignored during smelting, changes made to prevent all ores stacking before banking as a theif protection(unless smelted).
; V 1.2 - More frequent weight checks, added more theif/pk protection, changed journal/sysmsg scanning to hopefully be more efficient.
;==================================

event SysMessage Go to Minoc mine, choose an ore pouch and press F8
Waiting:
onhotkey f8
  goto Setbag
goto Waiting

Setbag:
if #CONTNAME <> container_gump || #CONTID = #BACKPACKID
  goto Waiting
set %Lootbag #CONTID
event sysmessage Ore bag is set, script now mining.
key BACK

;===============================================================================================================================================

Start:
if #WEIGHT > %MaxWeight
{
  event sysmessage Max weight reached!
  Manualbank:
  gosub MineToForge
  if %Smelt = #TRUE
    gosub MakeIngots
  gosub ForgeToBank
  gosub BankIngots
  gosub BankToMine
  set %Weight #WEIGHT
}
gosub MoveRandomTile
goto MineGrid
goto Start

;===============================================================================================================================================

MineGrid:
gosub Mine 0 0
if #WEIGHT > %MaxWeight
goto Start
gosub Mine -1 2
if #WEIGHT > %MaxWeight
goto Start
gosub Mine 0 2
if #WEIGHT > %MaxWeight
goto Start
gosub Mine 1 2
if #WEIGHT > %MaxWeight
goto Start
gosub Mine -2 1
if #WEIGHT > %MaxWeight
goto Start
gosub Mine -1 1
if #WEIGHT > %MaxWeight
goto Start
gosub Mine 0 1
if #WEIGHT > %MaxWeight
goto Start
gosub Mine 1 1
if #WEIGHT > %MaxWeight
goto Start
gosub Mine 2 1
if #WEIGHT > %MaxWeight
goto Start
gosub Mine -2 0
if #WEIGHT > %MaxWeight
goto Start
gosub Mine -1 0
if #WEIGHT > %MaxWeight
goto Start
gosub Mine 1 0
if #WEIGHT > %MaxWeight
goto Start
gosub Mine 2 0
if #WEIGHT > %MaxWeight
goto Start
gosub Mine -2 -1
if #WEIGHT > %MaxWeight
goto Start
gosub Mine -1 -1
if #WEIGHT > %MaxWeight
goto Start
gosub Mine 0 -1
if #WEIGHT > %MaxWeight
goto Start
gosub Mine 1 -1
if #WEIGHT > %MaxWeight
goto Start
gosub Mine 2 -1
if #WEIGHT > %MaxWeight
goto Start
gosub Mine -1 -2
if #WEIGHT > %MaxWeight
goto Start
gosub Mine 0 -2
if #WEIGHT > %MaxWeight
goto Start
gosub Mine 1 -2
goto Start

;===============================================================================================================================================

sub Mine
finditem WTH_NPF C
if #findkind = -1
{
event sysmessage No Tool
halt
}
set #lobjectid #findid
set #ltargetkind 3
set #ltargetx #charposx + %1
set #ltargety #charposy + %2
set #ltargetz #charposz
event macro 17 0
target
event macro 22 0
wait 20
deletejournal
set #sCnt 1

Looping:
if #sysmsg = You_stop_mining. || #sysmsg = That_is_too_far_away || #sysmsg = There_is_no_more_ore_to_mine_here. || #sysmsg = you_fail_to_find_any_ore. || #sysmsg = you_fail_to_find_any_usable_ore || #sysmsg = You_fail_to_find_usable_ore
{
  deletejournal
  wait 10
  return
}
set %jrnl #jindex
if #jindex > %jrnl
set %jrnl %jrnl + 1
scanjournal %jrnl
if You_stop_mining. in #JOURNAL || That_is_too_far_away in #JOURNAL || There_is_no_more_ore_to_mine_here. in #JOURNAL || you_fail_to_find_any_ore. in #JOURNAL || you_fail_to_find_any_usable_ore in #JOURNAL || You_fail_to_find_usable_ore in #JOURNAL
{
  deletejournal
  wait 10
  return
}
if ore_in_your_backpack in #JOURNAL
{
  deletejournal
  gosub MoveMetal
}
if #CONTNAME = waiting_gump && #CONTSIZE = 356_212
{
  click 400 375
  msg .age$
  return
}
if #sCnt > 60
{
  event sysmessage 60s timer reached, resetting..
  wait 10
  return
}
onhotkey B ALT
  goto Manualbank
finditem %Moongate G_10
if #findkind <> -1
gosub Moongate
goto Looping

;===============================================================================================================================================

sub MoveRandomTile
for %i 1 2
{
set %steps #random % 4 + 1
set %direction #random % 2
if %direction = 0
   set %direction -
if %direction = 1
   set %direction +
if %i = 1
set %move . %i #CHARPOSX %direction %steps
if %i = 2
set %move . %i #CHARPOSY %direction %steps
}
Event pathFind %Move1 %Move2 #CHARPOSZ
for %i 5 1
{
 scanjournal %i
 if Can't_get_there in #JOURNAL
 {
    deletejournal %i
    gosub MoveRandomTile
 }
}
set #scnt 0
repeat
until #CHARPOSX = %Move1 && #CHARPOSY = %Move2 || #scnt > 5
if This_gate_leads in #journal
gosub MoveRandomTile
return

;===============================================================================================================================================

sub MineToForge
finditem %Moongate G_10
if #findkind <> -1
gosub Moongate
gosub pathFind 2564 484 0
gosub pathFind 2559 493 0
gosub pathFind 2558 502 0
gosub pathFind 2563 509 5
gosub pathFind 2567 516 15
gosub pathFind 2571 522 15
return

;===============================================================================================================================================

sub MakeIngots
repeat
  finditem %Ores C
  if #findcol = 906 || #findcol = 952 || #findcol = 2999
  ignoreitem #findid
  if #FINDKIND <> -1
  {
    set #LOBJECTID #FINDID
    event Macro 17 0
    wait 12
  }
until #FINDKIND = -1
set %Weight #WEIGHT
return

;===============================================================================================================================================

sub ForgeToBank
ignoreitem reset
finditem %Banker G_10
if #FINDID <> -1
{
  gosub pathFind #findx #findy #FINDZ
  set #LOBJECTID %Banker
  event Macro 17 0
  repeat
  until #CONTNAME = generic_gump && #CONTSIZE = 230_298
  set %Cont #CONTID
  click 100 140
  repeat
  until #CONTSIZE = 180_240
  set %Bankbox #CONTID
}
return

;===============================================================================================================================================

sub BankIngots
finditem %Ingots , _ , %Ores C_ , #BACKPACKID
if #FINDKIND <> -1
{
  for %n 1 #FINDCNT
  {
    set #FINDINDEX %n
    exevent Drag #FINDID #FINDSTACK
    wait 10
    exevent Dropc %Bankbox
    wait 10
  }
}
finditem %Ingots , _ , %Ores C_ , %Lootbag
if #FINDKIND <> -1
{
  for %n 1 #FINDCNT
  {
    set #FINDINDEX %n
    exevent Drag #FINDID #FINDSTACK
    wait 10
    exevent Dropc %Bankbox

    wait 10
  }
}
set %Weight #WEIGHT
return

;===============================================================================================================================================

sub BankToMine
finditem %Moongate G_10
if #findkind <> -1
gosub Moongate
gosub pathfind 2567 524 15
gosub pathfind 2572 522 15
gosub pathfind 2567 516 15
gosub pathfind 2563 509 5
gosub pathfind 2558 502 0
gosub pathfind 2558 502 0
gosub pathfind 2559 493 0
gosub pathfind 2564 484 0
return

;===============================================================================================================================================

sub MoveMetal
finditem %Ingots , _ , %Ores C_ , #BACKPACKID
if #FINDKIND <> -1
{
  for %n 1 #FINDCNT
  {
    set #FINDINDEX %n
    if #LLIFTEDKIND = 0
    {
      exevent Drag #FINDID #FINDSTACK
      wait 10
      exevent Dropc %Lootbag 50 50
      wait 10
    }
  }
}
set %Weight #WEIGHT
return

;===============================================================================================================================================

sub pathfind
repeat
{
  event pathfind %1 %2 %3
  wait 40
}
until #CHARPOSX = %1 && #CHARPOSY = %2
return

;===============================================================================================================================================

sub Moongate
event sysmessage Someone is gating, waiting
repeat
finditem %Moongate G_10
until #findkind = -1
event sysmessage Returning..
return
unk
Expert
 
Posts: 54
Joined: Sun Apr 09, 2017 5:07 pm

Re: Anyone have a Mining Script

Postby Skeeno2017 » Thu Jul 20, 2017 9:36 pm

Ahh thats great thanks, i had tried this but wouldnt work and i wasnt sure how to sort it. Ill give this a go, thank you
Skeeno2017
Novice
 
Posts: 8
Joined: Fri Jun 16, 2017 10:42 am


Return to Script requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron