;UPDATED 3/29/2004
initevents
key p alt
;******** INITIAL SETTINGS*****************
set %script #TRUE
set %hidefield #false ;set this to #true if you wish to hide at each rune location #false if not
set %manaset #FALSE
set %Totalmana #mana
set %hideme #TRUE
set %color #true
set %smelt #true
set %shovels 5
set %shovelid WWF_qpf_twf_qpf
set %alloreid DWJ_GWJ_EWJ_TVJ_enk
set %delay 30
set %runebook 1
set %runenum 1
set %targetfirst 0
set %counterstarted 0
set %scnt 0
set %secureid 0
set %sss 0
SET %S 0
SET %cx #charposx
SET %cy #charposy
set %maxweight #maxweight - 25
set *511 pause
set %_runebook1 0
set %_runebook3 0
set %_runebook2 0
set %usetwobooks 0
chooseskill hidi
wait 10
if #skill > 799
set %hidefield #true
chooseskill mini
wait 10
if #skill < 700
set %smelt #false
chooseskill mage
wait 10
set %mage #skill
chooseskill chiv
wait 10
set %chiv #skill
if %mage > %chiv
set %spot 345
else
set %spot 381
;*********PAPERDOLL SETUP********************
Event macro 8 1
wait 1s
contpos 650 0
event macro 8 7
wait 1s
event macro 8 2
wait %pause1
contpos 200 200
wait 1S
CLICK 596 358
event macro 8 7
wait 20
contpos 615 330
wait 10
set %backpackid #contid
finditem ZBN c_
wait 10
set #LOBJECTID #findid
event macro 17 0
wait 25
set %drag #contkind
click 465 334 r
finditem jif_kif_iif_hif G_1
wait 20
set #LOBJECTID #findid
event macro 17 0
wait 20
set %secureid #findid
ignoreitem #lobjectid
if #findid = x 4
msg Bank $
set %markk 15
wait 25
set %secureid #contid
finditem cud_hkf c_
wait 20
set #LOBJECTID #findid
set %orebagid #findid
ignoreitem reset
set #lobjectid %secureid
wait 10
;**********RUNEBOOK SET UP****************************
runebook1:
finditem ZBN c_ , %backpackid
event property #findid
IF valorite1 in #property || verite1 in #property || dullcopper1 in #property ||
+ shadow1 in #property || copper1 in #property || bronze1 in #property ||
+ gold1 in #property || Agapite1 in #property 4
set #lobjectid #findid
set %_runebook1 #lobjectid
gosub rune
set %first %qqq
ignoreitem #findid
if %_runebook1 = 0
goto runebook1
If valorite1 in #property || verite1 in #property || Agapite1 in #property
set %smelt #false
ignoreitem reset
runebook2:
set %second 0
finditem ZBN c_ , %backpackid
event property #findid
IF valorite2 in #property || verite2 in #property || dullcopper2 in #property ||
+ shadow2 in #property || copper2 in #property || bronze2 in #property ||
+ gold2 in #property || Agapite2 in #property 4
set #lobjectid #findid
set %_runebook3 #lobjectid
gosub rune
set %second %qqq
ignoreitem #findid
If valorite2 in #property || verite2 in #property || Agapite2 in #property
set %smelt #false
if #findid = x 2
ignoreitem reset
goto homebook
if %_runebook3 = 0
goto runebook2
ignoreitem reset
homebook:
finditem ZBN c_ , %backpackid
event property #findid
wait 10
if home in #property 4
set #lobjectid #findid
set %_runebook2 #lobjectid
gosub rune
set %houserune %rrr
ignoreitem #findid
if #findid = x 2
ignoreitem reset
goto homebook
if %_runebook2 = 0
goto homebook
ignoreitem reset
sub rune
set %qqq 16
up:
if %qqq notin #property 2
set %qqq %qqq - 1
goto up
set %rrr %qqq
return
if %second <> 0
set %usetwobooks 1
set %number %first
;****************MAIN MENU**********************
if %script = #false
goto front
menu clear
menu window size 300 100
menu window color yellow
menu font bgcolor yellow
menu window title Another Rune Book Mining Script
menu font align center
menu font style b
menu font color green
menu font size 11
menu text stat 56 5 Jebbits V1.20 Rune Mining
menu font size 11
menu font style b
menu font color blue
menu text stat 22 23 Did you program your mining spots?
menu font style b
menu font color blue
menu font size 11
menu text stat 63 41 Is Healthwatch running?
menu font style
menu font color blue
menu font size 12
menu text stat 18 58 Dont mess with your pack placement
menu font style
menu font color red
menu font size 12
menu text stat 60 76 Press Enter When Ready
menu font style
menu font color red
menu font size 9
set #menubutton N/A
menu show
menuloop:
onhotkey enter
goto loop1
goto menuloop
front:
;******PRE-SHOVEL CHECK***********
loop1:
menu hide
finditem %shovelid c_ , %backpackid
if #findkind <> 0
gosub shovell
;***********MAIN LOOP****************
loop:
gosub recall
gosub digger
gosub findshovel
checkshovel:
gosub makeshovel
noshovelneeded:
gosub digger
gosub check
goto loop
;******FIND SHOVEL SUBROUTINE***********
sub findshovel
finding:
finditem %shovelid c_ , %backpackid
wait 5
if #findid = X
GOTO CHECKSHOVEL
return
;******MAKE SHOVEL SUBROUTINE***********
sub makeshovel
set %runenum2 %runenum
set %runebook2 %runebook
set %runebook 2
set %runenum %houserune
gosub house
gosub shovell
goto houserecall
;**********DIGGING SUBROUTINE***********
sub digger
IF %MARK <> 0
gosub loc
set #ltargetkind 2
for %i 1 25
{
if %health = #true && #hits < #maxhits - 10
gosub health
if %hidefield = #true && H notin #charstatus
gosub hide
GOSUB FINDSHOVEL
IGNOREITEM RESET
set #lobjectid #findid
event macro 17 0
IGNOREITEM #FINDID
SET %FINDX #LTARGETX
if %x <> 1 2
click %digspotx %digspoty d
click %digspotx %digspoty d
IF %FINDX <> #LTARGETX
set %x 1
wait 10
event macro 22
gosub check
}
return
;-----------------FIELD HIDING-------------------------
sub hide
if H notin #charstatus && #scnt < %sss + 10 && %hidefield = #TRUE
{
event macro 13 21
set %sss #scnt
}
return
;**************CHECK SUBROUTINE****************
sub check
FOR %i 1 2
{
SCANJOURNAL %I
If no_metal in #journal && %mark = 1 2
DELETEJOURNAL
GOTO NEXTRUNE2
if no_metal in #journal && %mark <> 1 2
DELETEJOURNAL
gosub loc2
}
set %counter %counter + 1
scanjournal
if #weight > %maxweight || Your_backpack_is_full in #journal
{
DELETEJOURNAL
set %runenum2 %runenum
set %runebook2 %runebook
set %runebook 2
set %runenum %houserune
gosub house
houserecall:
set %runebook %runebook2
set %runenum %runenum2
set %counterstarted 0
gosub recall
}
if you_loosen in #journal 1
gosub digger
If you_destroyed in #journal 1
gosub checkshovel
IF can't_mine in #journal ||
+ cannot_see in #journal ||
+ far_away in #journal
{
DELETEJOURNAL
if %MARK = 0
gosub loc2
nextrune2:
set %runenum %runenum + 1
set %targetfirst 0
set %prospector 0
set %counterstarted 0
if %usetwobooks = 1
{
if %runenum = %number + 1
{
if %runebook = 1
{
set %runebook 3
set %runenum 1
set %number %second
goto loop
}
if %runebook = 3
{
set %runebook 1
set %runenum 1
set %number %first
goto loop
}
}
}
if %runenum = %number + 1
{
set %runenum 1
}
goto loop
}
if %counter = 20
set %x + 1
if %counter = 20
set %counter 0
if %counter > 19
gosub checkshovel
return
;***********HOUSE SUBROUTINE************
sub house
gosub recall
wait 20
;***********WALKING TO SECURE*************
set %scnt #scnt
movingtime:
if #scnt - %scnt > 4
{
set %scnt #scnt
event macro 5 1
event macro 5 1
gosub recall
}
move %cx %cy 0 1s
if #charposx <> %cx || #charposy <> %cy
goto movingtime
set %x + 1
set %counter 0
;***************************HIDING********************
if %hideme
event macro 13 21
wait 5
;****************FIND AND OPEN CHEST*************
opensecure:
;Find chest
if %markk = 15 2
msg Bank $
goto skip
FINDITEM %SECUREID
IF #FINDKIND = -1
{
GOTO OPENSECURE:
}
skip:
;Open chest
set #LOBJECTID %secureid
set #findmod 0_0
set #NEXTCPOSX 27
set #NEXTCPOSY 49
event macro 17 0
WaitSecureToOpen:
finditem %orebagid
if #findid <> %orebagid
goto WaitSecureToOpen
INGOREITEM RESET
;---------------------------------------------Ore routine-------------------------------------------------
IF %SMELT = #true
gosub smelt
ore:
finditem %alloreid c_ , %backpackid
finditem %alloreid
if #findkind = 1
{
goto ore
}
if #findkind = 0
{
IF #lLiftedKind <> 1
event drag #findid
wait 15
msg $
wait 5
finditem %orebagid
set #findmod 20_10
click #findx #findy p
wait 5
goto ore
}
rock:
set %w #weight
finditem BVI_dwj_ c_ , %backpackid
if #findkind <> 0
goto mana
if #findkind = 0 && %color = #true
{
IF #lLiftedKind <> 1
event drag #findid
if #findCol = 0 ;regular
click 168 167 p
if #findCol = 2419 ;Dull Copper
click 145 167 p
if #findCol = 2406 ;Shadow
click 122 167 p
if #findCol = 2413 ;Copper
click 102 167 p
if #findCol = 2418 ;Bronze
click 79 167 p
if #findCol = 2213 ;Golden
click 61 216 p
if #findCol = 2425 ;Agapite
click 81 216 p
if #findCol = 2207 ;Verite
click 105 216 p
if #findCol = 2219 ;Valorite
click 120 216 p
WAIT 25
goto rock
}
if #findkind = 0
{
IF #lLiftedKind <> 1
event drag #findid
wait 20
click 151 167 p
}
;if %w = #weight
;{
;event drag #findid
;wait 20
; click 197 115 p
;}
goto rock
mana:
IF %manaset = #false
{
return
}
if #mana < %Totalmana
{
event macro 13 46
wait 10s
goto mana
}
return
;--------------------------------------GET SHOVEL---------------------------------------------------------
sub shovell
finditem %shovelid c_ , %backpackid
if #findid <> x
return
set %amount 0
getmore:
finditem %shovelid c_ , %secureid c_
wait 1s
finditem %shovelid
if #findkind = -1
{
IGNOREITEM #findid
halt
}
if #findkind = 0
{
more:
event drag #findid
wait 10
msg $
wait 10
finditem %secureid c_
set #findmod 20_10
click 718 367
wait 20
ignoreitem #findid
wait 5
finditem %shovelid c_ , %secureid c_
set %amount %amount + 1
wait 5
}
if #findkind = -1
{
return
}
If %amount < %shovels
{
goto more
}
return
;**********************RUNEBOOK SUBROUTINE**********************************
sub Recall
set %x 0
set %sss = 0
recallagain:
set %_runebooknum %runebook
set %_runenumber %runenum
set %_style 0
set %_time 10
set %_oldx #charposx
set %_oldy #charposy
set %_page 0
set %_side 0
set %_num %_runenumber / 2
set %_page %_runenumber + 1
set %_page %_page / 2
set %_num %_num * 2
if %_num = %_runenumber
set %_side 1
set %_runex 290
if %_side = 1
set %_runex 450
set %_pagexmod %_page * 34
set %_pagex 256
set %_pagex %_pagex + %_pagexmod
if %_page > 4
set %_pagex %_pagex + 31
recallselectbook:
if %_runebooknum = 1
set %_runebookid %_runebook1
if %_runebooknum = 2
set %_runebookid %_runebook2
if %_runebooknum = 3
set %_runebookid %_runebook3
recallopenagain:
wait 5
set #LOBJECTID %_runebookid
event macro 17 0
wait 5
set #SCNT 0
recallwaitforbook:
if #SCNT > 10
goto recallopenagain
;Next line changes with patch
;-----------------------------------------------------------------------------------------------------------------------------------------
if #CONTKIND <> %Drag
goto recallwaitforbook
deletejournal
WAIT 5
click %_pagex 395
WAIT 5
click %_runex %spot
set #SCNT 0
recallwaitforrecall:
if #SCNT > 10
goto recallagain
scanjournal 1
if tithing_points in #journal 2
set %spot 345
display msg You have run out of Tithing points. Script has been reset for Magery. Press ok to continue with magery or Tith and restart.
if too_encumbered in #journal
gosub dragit
if something_is_blocking_the_location in #journal
goto nextrune2
if for_this_spell in #journal 2
event macro 13 46
wait 30
if %_oldx = #charposx
{
if %_oldy = #charposy
{
goto recallwaitforrecall
}
}
return
;----------------------------------------SMELT-------------------------------------------
sub smelt
gosub findForge
set #lTargetID %return
set #lTargetKind 1
_smelt:
findItem DWJ_EWJ_GWJ C
if ! #findKind
{
set #lObjectID #findID
event Macro 17 0
wait 5
event Macro 22 0
goto _smelt
}
return
;--------------------------------------FORGE------------------------------------
sub findForge
findItem JBG_ouj_soj
if #findKind
{
gosub smelt
}
set %return #findID
return
;----------------------------------------HEAL----------------------------------------
sub health
if #hits >= #maxhits - 10
return
set *511 resume
loopit:
wait 10
if #hits < #maxhits - 10
goto loopit
set *511 pause
return
;------------------------OVERWEIGHT ORE DRAG-----------------------------
sub dragit
SET %ST 300
SET %SY 215
SET %SS 0
set %maxweight %MAXWEIGHT - 5
drop:
if #weight < #maxweight
return
WAIT 15
SET %SS %SS + 1
IF %SSS = 5
RETURN
IF %SS = 2
SET %SY %SY + 30
IF %SS = 3
SET %ST %ST + 30
IF %SS = 4
SET %SY %SY - 30
FINDdwj:
finditem dwj c_ , %backpackid
If #findcol <> 0 && #FINDID <> X
{
ignoreitem #findid
goto FINDdwj
}
if #FindCol = 0
{
if #findkind = 0
{
IF #LLIFTEDKIND = 0
Event Drag #Findid
wait 5
msg 1 $
wait 20
click %ST %SY P
}
GOTO drop
return
;-------------------------------Program loc below here-------------------------------
;Directions:
;Set the %digspotx equal to the x-cursor-coordinate of the digging spot.
;Set the %digspoty equal to the y-cursor-coordinate of the digging spot.
;The first set of 16 locations is for your main ore runebook.
;The second set of 16 locations is for the optional ore runebook.
sub loc
SET %MARK 0
set %x + 1
if %_runebooknum = 1
{
if %_runenumber = 1
{
set %digspotx 353
set %digspoty 221
goto digdig
}
if %_runenumber = 2
{
set %digspotx 287
set %digspoty 262
goto digdig
}
if %_runenumber = 3
{
set %digspotx 369
set %digspoty 229
goto digdig
}
if %_runenumber = 4
{
set %digspotx 286
set %digspoty 292
goto digdig
}
if %_runenumber = 5
{
set %digspotx 353
set %digspoty 210
goto digdig
}
if %_runenumber = 6
{
set %digspotx 347
set %digspoty 244
goto digdig
}
if %_runenumber = 7
{
set %digspotx 351
set %digspoty 214
goto digdig
}
if %_runenumber = 8
{
set %digspotx 345
set %digspoty 214
goto digdig
}
if %_runenumber = 9
{
set %digspotx 351
set %digspoty 252
goto digdig
}
if %_runenumber = 10
{
set %digspotx 282
set %digspoty 259
goto digdig
}
if %_runenumber = 11
{
set %digspotx 296
set %digspoty 369
goto digdig
}
if %_runenumber = 12
{
set %digspotx 315
set %digspoty 103
goto digdig
}
if %_runenumber = 13
{
set %digspotx 297
set %digspoty 220
goto digdig
}
if %_runenumber = 14
{
set %digspotx 262
set %digspoty 188
goto digdig
}
if %_runenumber = 15
{
set %digspotx 364
set %digspoty 262
goto digdig
}
if %_runenumber = 16
{
set %digspotx 364
set %digspoty 262
goto digdig
}
;------------------------------------------------------------------------------------------------------------------------------------------------
}
if %_runebooknum = 3
{
if %_runenumber = 1
{
set %digspotx 292
set %digspoty 244
goto digdig
}
if %_runenumber = 2
{
set %digspotx 271
set %digspoty 272
goto digdig
}
if %_runenumber = 3
{
set %digspotx 318
set %digspoty 144
goto digdig
}
if %_runenumber = 4
{
set %digspotx 365
set %digspoty 187
goto digdig
}
if %_runenumber = 5
{
set %digspotx 300
set %digspoty 235
goto digdig
}
if %_runenumber = 6
{
set %digspotx 250
set %digspoty 196
goto digdig
}
if %_runenumber = 7
{
set %digspotx 258
set %digspoty 142
goto digdig
}
if %_runenumber = 8
{
set %digspotx 225
set %digspoty 144
goto digdig
}
if %_runenumber = 9
{
set %digspotx 313
set %digspoty 44
goto digdig
}
if %_runenumber = 10
{
set %digspotx 329
set %digspoty 170
goto digdig
}
if %_runenumber = 11
{
set %digspotx 294
set %digspoty 245
goto digdig
}
if %_runenumber = 12
{
set %digspotx 306
set %digspoty 167
goto digdig
}
if %_runenumber = 13
{
set %digspotx 315
set %digspoty 119
goto digdig
}
if %_runenumber = 14
{
set %digspotx 214
set %digspoty 246
goto digdig
}
if %_runenumber = 15
{
set %digspotx 296
set %digspoty 65
goto digdig
}
if %_runenumber = 16
{
set %digspotx 363
set %digspoty 276
goto digdig
}
}
return
;-------------------------second dig-----------------------
;This area is for setting up a second dig spot for each rune
;If you leave zeros it will skip that dig spot
sub loc2
set %MARK 1
set %x + 2
if %_runebooknum = 1
{
if %_runenumber = 1
{
set %digspotx 238
set %digspoty 270
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 2
{
set %digspotx 357
set %digspoty 291
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 3
{
set %digspotx 199
set %digspoty 115
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 4
{
set %digspotx 221
set %digspoty 242
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 5
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 6
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 7
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 8
{
set %digspotx 246
set %digspoty 207
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 9
{
set %digspotx 261
set %digspoty 117
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 10
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 11
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 12
{
set %digspotx 193
set %digspoty 39
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 13
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 14
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 15
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 16
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
;------------------------------------------------------------------------------------------------------------------------------------------------
}
if %_runebooknum = 3
{
if %_runenumber = 1
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 2
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 3
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 4
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 5
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 6
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 7
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 8
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 9
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 10
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 11
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 12
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 13
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 14
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 15
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
if %_runenumber = 16
{
set %digspotx 0
set %digspoty 0
if %digspotx = 0 || %digspoty = 0
goto nextrune2
goto digdig
}
}
return